git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
path: root/nagios-plugins-contrib-24.20190301~bpo9+1
diff options
context:
space:
mode:
Diffstat (limited to 'nagios-plugins-contrib-24.20190301~bpo9+1')
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/.travis.yml25
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/Makefile27
l---------nagios-plugins-contrib-24.20190301~bpo9+1/README1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/Makefile5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/ajp.cfg6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/check_ajp103
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/control8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/copyright17
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/Makefile15
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/COPYING340
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/INSTALL19
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/Makefile23
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/README14
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/TODO1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/changelog33
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/check_backuppc265
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/check_backuppc.861
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/control8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/copyright6
l---------nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/src1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/Makefile4
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/bgpstate.cfg5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/check_bgpstate215
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/control5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/copyright6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/Makefile8
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/check_checksums110
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/control5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/copyright15
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/tests2
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/update_checksums47
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/Makefile1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/check_clamav190
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/control10
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/copyright14
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/Makefile3
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/check_cups617
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/control8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/copyright6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/cups.cfg5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/tests3
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/Makefile7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/control5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/copyright15
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/debsecan.cfg5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/src/LICENSE674
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/src/README.md39
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/src/check_debsecan306
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/tests2
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/Makefile3
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/check_drbd456
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/control7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/copyright7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/Makefile14
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/CHANGES.txt15
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/LICENSE.txt674
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/README.txt77
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_email_delivery970
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_email_delivery_epn498
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_quota431
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_quota_epn235
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_receive999
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_receive_epn492
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_smtp_send782
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_smtp_send_epn458
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/How to connect to IMAP server manually.txt69
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/How to test plugin.txt15
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_email_delivery.html522
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_email_delivery.pod472
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_quota.html258
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_quota.pod196
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_receive.html551
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_receive.pod507
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_smtp_send.html375
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_smtp_send.pod324
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/imap_ssl_cert.html178
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/imap_ssl_cert.pod122
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/imap_ssl_cert236
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/imap_ssl_cert_epn114
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/nagios-plugins-check_email_delivery.spec63
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/control15
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/copyright15
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/email_delivery.cfg4
l---------nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/src1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/Makefile5
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/check_etc_hosts249
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/control8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/copyright14
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/tests3
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/Makefile5
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/check_etc_resolv139
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/control5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/copyright14
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/tests2
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/Makefile10
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/README.md34
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/check_graphite.py286
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/control4
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/copyright5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/Makefile4
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/check_haproxy321
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/control6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/copyright8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/haproxy.cfg5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/Makefile12
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/check_haproxy_stats.pl225
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/control7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/copyright13
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/Makefile11
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/CHANGES15
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/COPYING674
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/INSTALL23
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/README16
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis1004
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.8325
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.php42
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.pod245
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.spec52
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/install.sh50
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis.cfg6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/control8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/copyright15
l---------nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/src1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/Makefile15
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/AUTHORS1
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/COPYING340
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/ChangeLog226
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/INSTALL229
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.am6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.in764
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/NEWS0
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/README346
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/TODO71
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/acinclude.m478
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/aclocal.m4758
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.guess1558
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.sub1788
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure4028
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure.in133
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/install-sh527
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/missing215
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem.pm240
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component.pm7
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem.pm176
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm139
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm121
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm154
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm177
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/NetConnectorSubsystem.pm134
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerEnclosureSubsystem.pm136
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerSupplySubsystem.pm238
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/ServerBladeSubsystem.pm158
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant.pm771
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component.pm5
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem.pm45
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/CLI.pm32
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/SNMP.pm68
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem.pm124
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/CLI.pm27
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/SNMP.pm78
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem.pm112
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/CLI.pm57
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/SNMP.pm50
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem.pm159
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da.pm407
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/CLI.pm239
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm232
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca.pm433
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm34
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm303
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide.pm256
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm27
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm115
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas.pm251
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm27
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm126
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi.pm227
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm27
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm134
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem.pm236
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/CLI.pm78
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/SNMP.pm221
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem.pm263
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/CLI.pm101
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/SNMP.pm231
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem.pm197
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/CLI.pm87
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/SNMP.pm746
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem.pm202
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem/SNMP.pm189
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem.pm214
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/CLI.pm81
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/SNMP.pm96
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/SNMP.pm67
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem.pm205
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/CLI.pm56
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/SNMP.pm119
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/SNMP/Utils.pm103
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Server.pm447
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Storage.pm308
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/StorageWorks.pm157
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.am104
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.in574
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Nagios/MiniPlugin.pm333
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/check_hpasm.pl215
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/subst.in64
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/control18
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/copyright19
l---------nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/src1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/Makefile4
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/check_httpd_status444
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/control7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/copyright14
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/httpd_status.cfg5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/tests3
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/COPYING674
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/Makefile6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/README.md67
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/changelog129
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/check_ipmi_sensor1074
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/contrib/default-combinedgraph.template37
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/control8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/copyright34
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/ipmi_sensor.cfg18
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/Makefile16
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/control7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/copyright52
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/nagios-check-libs199
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/nagios-check-libs.conf21
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/tests2
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_libs/update-check_libs-status90
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_libs/update_files.sh10
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/Makefile5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/check_libs_ng90
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/control4
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/copyright23
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/tests2
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/Makefile4
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/check_libvirt526
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/control6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/copyright22
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/Makefile14
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/AUTHORS7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/COPYING674
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/COPYRIGHT15
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/Changes57
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/INSTALL66
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MANIFEST29
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MANIFEST.SKIP17
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/META.yml32
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MYMETA.json53
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MYMETA.yml31
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/Makefile.PL55
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/NAME1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/NEWS31
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/README96
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/TODO3
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/VERSION1
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/check_lm_sensors721
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/check_lm_sensors.pod129
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/check_lm_sensors.spec90
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/control7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/copyright6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/lm_sensors.cfg16
l---------nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/src1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/Makefile9
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/check_memcached.l613
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/control12
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/copyright16
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/memcached.cfg5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/Makefile1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/check_memory154
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/control9
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/copyright16
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/Makefile14
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/README.md325
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/check_mongodb.py1651
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/control6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/copyright21
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/mongodb.cfg29
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/Makefile9
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/check-multipath.pl1556
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/control6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/copyright16
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/multipath.cfg5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/version1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/Makefile16
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/AUTHORS1
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/COPYING340
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/ChangeLog83
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/INSTALL233
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/Makefile.am13
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/Makefile.in761
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/NEWS1
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/README140
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/TODO3
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/acinclude.m4734
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/aclocal.m4128
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/config.guess1558
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/config.sub1788
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/configure4190
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/configure.ac103
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/contrib/CheckMySQLHealthExt1.pm68
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/contrib/README.my-extensions139
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/contrib/check_mysql_health.php370
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/install-sh527
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/missing215
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Makefile.am53
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Makefile.in516
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Cluster.pm620
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server.pm1652
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance.pm512
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Innodb.pm190
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Myisam.pm119
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Replication.pm144
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/Extraopts.pm103
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/check_mysql_health.pl613
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/subst.in61
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/t/Makefile.am21
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/t/Makefile.in412
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/t/check_mysql_health.t159
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/control8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/copyright19
l---------nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/src1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/Makefile1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/check_nfsmounts150
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/control4
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/copyright17
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/Makefile1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/check_printer375
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/control7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/copyright27
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/printer.cfg5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/Makefile4
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/check_raid6664
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/control30
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/copyright9
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/Makefile16
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/.travis.yml11
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/AUTHORS12
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/COPYING674
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/COPYRIGHT17
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/Changes127
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/INSTALL74
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MANIFEST32
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MANIFEST.SKIP18
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/META.yml29
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MYMETA.json51
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MYMETA.yml32
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/Makefile.PL65
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/NEWS22
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/README.md31
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/TODO2
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/VERSION1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl642
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl.ini104
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl.pod144
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl.spec116
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/AutoInstall.pm934
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install.pm451
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/AutoInstall.pm93
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Base.pm83
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Include.pm34
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/MakeMaker.pm56
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Makefile.pm418
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Metadata.pm722
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Scripts.pm29
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/00_modules.t61
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/01_validation.t20
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/test.sh23
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/control6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/copyright17
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/rbl.cfg5
l---------nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/src1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/Makefile9
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/check_redis.php300
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/check_redis.pl2914
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/control13
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/copyright17
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/redis.cfg5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/Makefile11
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/README.check_smstools45
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/bin/check_smstools241
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/control7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/copyright2
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/Makefile9
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/check_snmp_environment.pl2744
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/control12
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/copyright17
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/Makefile4
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/check_snmp_time333
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/control12
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/copyright7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/snmp_time.cfg11
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/Makefile8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._COPYRIGHTbin0 -> 176 bytes
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._Makefilebin0 -> 176 bytes
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._NEWSbin0 -> 176 bytes
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._check_ssl_certbin0 -> 176 bytes
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/AUTHORS82
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/COPYING674
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/COPYRIGHT75
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/ChangeLog593
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/INSTALL21
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/Makefile53
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/NEWS161
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/README.md167
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/TODO5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/VERSION1
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/check_ssl_cert2483
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/check_ssl_cert.1222
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/check_ssl_cert.spec395
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/test/cabundle.crt3893
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/test/cacert.crt42
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/test/unit_tests.sh417
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/control8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/copyright19
l---------nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/src1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/ssl_cert.cfg5
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/tests2
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/Makefile4
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/check_uptime722
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/check_uptime.cfg15
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/control10
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/copyright19
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/tests2
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/Makefile6
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_v46/check_v46318
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/control10
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/copyright16
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/Makefile15
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/control6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/copyright24
l---------nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/src1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/tests3
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/LICENSE23
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/Makefile.am11
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/Makefile.in848
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/README.md12
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/aclocal.m410504
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/autogen.des20
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/autogen.sh46
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/check_varnish.c383
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/compile347
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/config.guess1462
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/config.h.in114
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/config.sub1825
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/configure16364
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/configure.ac77
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/depcomp791
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/install-sh508
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/ltmain.sh11156
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/missing215
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/Makefile13
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/check_webinject1979
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/control11
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/copyright15
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/webinject.cfg12
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/Makefile1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/check_whois301
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/control9
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/copyright27
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/whois.cfg4
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/Makefile1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/check_zone_auth324
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/control7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/copyright27
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/zone_auth.cfg4
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/Makefile1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/check_zone_rrsig_expiration313
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/control7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/copyright27
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/zone-rrsig.cfg4
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/common.mk71
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/README.Debian.plugins.in20
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/README.source66
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/autoreconf3
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/changelog997
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/compat1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/control223
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/control.in33
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/copyright1209
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/copyright.in35
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/gbp.conf4
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/nagios-plugins-contrib.docs1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/nagios-plugins-contrib.lintian-overrides3
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/debian/packaging-helper.py330
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_ajp/return_critical_on_failed_connection79
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_backuppc/use_nagios_plugins34
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_bgpstate/epn10
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_clamav/clamav_locations73
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_cups/ParseDateDelta11
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_cups/epn8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_cups/monitoring-plugin46
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_drbd/fix_for_oos_and_cosmetic62
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_email_delivery/epn45
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_email_delivery/paths27
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_haproxy/epn8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_haproxy/monitoring-plugin48
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_haproxy_stats/interpreter16
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/epn9
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/htdigest_auth17
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/monitoring-plugin49
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_imap_quota/syntax_error_fix17
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libs/config_path11
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libs/lsof-speedup27
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libs/space_before_deleted12
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libvirt/fix_uom26
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libvirt/monitoring-plugin48
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_lm_sensors/interpreter8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_lm_sensors/manpage_whatis_fix12
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_lm_sensors/spelling_errors11
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_memory/monitoring-plugin43
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_memory/new_free53
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_nfsmounts/nfs4_support11
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_nfsmounts/nfs_write_location20
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_nfsmounts/perl_module43
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/debian_bts17
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/epn8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/use_data_dumper_if_needed18
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/use_nagios_plugin38
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_raid/no_epn8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_raid/prefer_cciss_vol_status_over_hpacucli15
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_rbl/additional_rbls45
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_rbl/interpreter8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_smstools/monitoring-plugin46
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_smstools/operator_siglvl30
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_snmp_environment/epn10
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_snmp_time/epn8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_uptime/missing_backslash16
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_v46/no_epn9
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_varnish/fix_for_v56186
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_webinject/epn9
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_cert_expire_dir_check_name_fix14
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_packages-inifile13
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_packages_,_fix30
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_packages_location11
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_running_kernel_jessie_centos_fix42
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/epn8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/status_directory22
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/percona-nagios-plugins/fix_bashism8
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/series54
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/debian/rules43
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/source/format1
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/debian/tests/control37
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/debian/tests/test_check_varnish35
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/dsa/Makefile23
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-cert-expire77
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-cert-expire-dir90
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-dnssec-delegation301
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-entropy82
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-packages362
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-running-kernel255
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-soas218
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-statusfile90
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/dsa/control20
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/dsa/copyright33
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/dsa/etc/obsolete-packages-ignore4
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/dsa/sbin/dsa-update-apt-status100
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/dsa/sbin/dsa-update-unowned-file-status53
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/dsa/update-files.sh13
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/extras/Makefile16
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/extras/check_apt.cmd25
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/extras/control7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/extras/copyright20
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/extras/send_nsca_host_or_service_check_result86
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/Changelog115
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/Makefile13
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/control7
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/copyright12
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-aws-rds.py562
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-lvm-snapshots187
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mongo.py594
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-deadlocks189
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-deleted-files286
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-file-privs289
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-innodb368
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-pidfile291
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-processlist323
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-replication-delay280
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-replication-running242
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-status482
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-ts-count210
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-pt-table-checksum239
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-unix-memory207
585 files changed, 155951 insertions, 0 deletions
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/.travis.yml b/nagios-plugins-contrib-24.20190301~bpo9+1/.travis.yml
new file mode 100644
index 0000000..f5aa710
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/.travis.yml
@@ -0,0 +1,25 @@
+sudo: required
+
+env:
+ - TRAVIS_DEBIAN_DISTRIBUTION=unstable
+ - TRAVIS_DEBIAN_DISTRIBUTION=testing
+ - TRAVIS_DEBIAN_DISTRIBUTION=stable
+
+matrix:
+ allow_failures:
+ - env: TRAVIS_DEBIAN_DISTRIBUTION=unstable
+ - env: TRAVIS_DEBIAN_DISTRIBUTION=testing
+
+services:
+ - docker
+
+script:
+ # build the debian package
+ - wget -O- http://travis.debian.net/script.sh | sh -
+
+#notifications:
+# email: false
+
+branches:
+ except:
+ - /^debian\/\d/
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/Makefile
new file mode 100644
index 0000000..55e8807
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/Makefile
@@ -0,0 +1,27 @@
+PLUGINS := $(strip $(shell find . -mindepth 2 -maxdepth 2 -name Makefile -printf '%h '))
+
+ifeq ($(wildcard /etc/debian_version),/etc/debian_version)
+HOST_ARCH := $(strip $(shell dpkg-architecture -q DEB_HOST_ARCH))
+else
+ifeq ($(wildcard /usr/bin/rpm),/usr/bin/rpm)
+HOST_ARCH := $(strip $(shell rpm --eval '%{_arch}'))
+endif
+endif
+
+ifeq ($(HOST_ARCH),$(filter $(HOST_ARCH),hurd-i386))
+ PLUGINS := $(filter-out check_memcached check_varnish,$(PLUGINS))
+endif
+ifeq ($(HOST_ARCH),$(filter $(HOST_ARCH),arm64))
+ PLUGINS := $(filter-out check_memcached,$(PLUGINS))
+endif
+ifeq ($(HOST_ARCH),$(filter $(HOST_ARCH),m68k))
+ PLUGINS := $(filter-out check_varnish,$(PLUGINS))
+endif
+
+
+default: all
+
+$(PLUGINS)::
+ $(MAKE) -C $@ $(MAKECMDGOALS)
+
+all clean install : $(PLUGINS)
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/README b/nagios-plugins-contrib-24.20190301~bpo9+1/README
new file mode 120000
index 0000000..71839fd
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/README
@@ -0,0 +1 @@
+debian/README.source \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/Makefile
new file mode 100644
index 0000000..e301afc
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/Makefile
@@ -0,0 +1,5 @@
+PLUGIN := check_ajp
+
+include ../common.mk
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/ajp.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/ajp.cfg
new file mode 100644
index 0000000..89221e0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/ajp.cfg
@@ -0,0 +1,6 @@
+# 'check_ajp' command definition
+define command{
+ command_name check_ajp
+ command_line /usr/lib/nagios/plugins/check_ajp --app '$HOSTADDRESS$'
+ }
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/check_ajp b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/check_ajp
new file mode 100644
index 0000000..68aa243
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/check_ajp
@@ -0,0 +1,103 @@
+#!/usr/bin/perl -w
+#
+# History:
+# 2010-11-05 First release (v1)
+#
+# Comment: Please send bug fixes and enhancements to <rmichel@devnu11.net>
+#
+# check_ajp - nagios plugin for jboss monitoring
+# Copyright (C) 2010 Michel Rode <rmichel@devnu11.net>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#
+# Usage: ./check_ajp --app ip.of.the.app [--port 8009 --warn 1 --crit 2 --timeout 5]
+#
+
+use warnings;
+use strict;
+use Getopt::Long;
+use Socket;
+use Time::HiRes 'time';
+
+my $app = '';
+my $port = '8009';
+my $warntime = '1.5';
+my $crittime = '3';
+my $timeout = '10';
+
+my ($iaddr, $paddr, $proto, $sock, $time1, $time2);
+my $pong = 'null';
+
+sub xdie{
+ my $msg = shift;
+ printf STDERR "Usage: check_ajp --app ip.of.the.app [--port 8009 --warn 1 --crit 2 --timeout 5]\n\n";
+ printf STDERR "ERROR: $msg\n";
+ exit 3;
+}
+
+GetOptions("app=s" => \$app, "port=s" => \$port, "warn=f" => \$warntime, "crit=f" => \$crittime, "timeout=f" => \$timeout);
+
+my $ping = pack 'C5' # Format template.
+ , 0x12, 0x34 # Magic number for server->container packets.
+ , 0x00, 0x01 # 2 byte int length of payload.
+ , 0x0A # Type of packet. 10 = CPing.
+;
+
+my $expected = pack 'C5' # Format template.
+ , 0x41, 0x42 # Magic number for container->server packets.
+ , 0x00, 0x01 # 2 byte int length of payload.
+ , 0x09 # Type of packet. 9 = CPong reply.
+;
+
+$iaddr = inet_aton($app) || xdie("No host given !");
+$paddr = sockaddr_in($port, $iaddr) || xdie("Wrong port !");
+$proto = getprotobyname 'tcp';
+
+$time1 = time();
+
+eval {
+ local $SIG{ALRM} = sub { die "alarm\n" };
+ alarm($timeout);
+ socket $sock, PF_INET, SOCK_STREAM, $proto || xdie("socket !");
+ connect $sock, $paddr || xdie("connect !");
+ syswrite $sock, $ping || xdie("syswrite !");
+ sysread $sock, $pong, 5 || xdie("sysread !");
+ alarm(0);
+};
+
+if ($@) {
+ die unless $@ eq "alarm\n";
+ $time2 = (time() - $time1);
+ printf "CRITICAL - AJP - Timeout after %1.0fs\n",$time2;
+ exit 2;
+} else {
+ $time2 = (time() - $time1);
+
+ if ($pong eq $expected) {
+ if ($time2 >= $crittime) {
+ printf "CRITICAL - AJP - %3.5f seconds response time|time=%3.6fs;;;0.000000;%2.6f\n",$time2,$time2,$timeout;
+ exit 2;
+ } elsif ($time2 >= $warntime) {
+ printf "WARNING - AJP - %3.5f seconds response time|time=%3.6fs;;;0.000000;%2.6f\n",$time2,$time2,$timeout;
+ exit 1;
+ } else {
+ printf "OK - AJP - %3.5f seconds response time|time=%3.6fs;;;0.000000;%2.6f\n",$time2,$time2,$timeout;
+ exit 0;
+ }
+ } else {
+ printf "UNKNOWN - AJP - %3.5f seconds response time|time=%3.6fs;;;0.000000;%2.6f\n",$time2,$time2,$timeout;
+ exit 3;
+ }
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/control
new file mode 100644
index 0000000..3b586cf
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/control
@@ -0,0 +1,8 @@
+Version: 1
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to monitor the AJP ping response time
+ Should work with all application servers (Tomcat, JBoss,....)
+ which provide an AJPv13 connector.
+Homepage: http://blog.devnu11.net/projects/
+Watch: http://blog.devnu11.net/projects/ <p>v([0-9]*) &#8211; md5:
+Recommends: libsocket-perl
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/copyright
new file mode 100644
index 0000000..cc3b682
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ajp/copyright
@@ -0,0 +1,17 @@
+Comment: Please send bug fixes and enhancements to <rmichel@devnu11.net>
+
+check_ajp - nagios plugin for jboss monitoring
+Copyright (C) 2010 Michel Rode <rmichel@devnu11.net>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/Makefile
new file mode 100644
index 0000000..8881513
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/Makefile
@@ -0,0 +1,15 @@
+#/usr/bin/make -f
+
+PLUGIN = check_backuppc
+MANPAGES = src/check_backuppc.8
+DOCFILES = src/README
+NAGIOS_LIB = /usr/lib/nagios/plugins
+BACKUPPC_LIB = /usr/share/backuppc/lib
+CLEANFILES = $(PLUGIN)
+
+include ../common.mk
+
+$(PLUGIN):
+ sed -e "s|NAGIOS_LIB|$(NAGIOS_LIB)|g" -e \
+ "s|BACKUPPC_LIB|${BACKUPPC_LIB}|g" src/check_backuppc > $@
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/COPYING b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/COPYING
new file mode 100644
index 0000000..b7b5f53
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/INSTALL b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/INSTALL
new file mode 100644
index 0000000..c025a04
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/INSTALL
@@ -0,0 +1,19 @@
+Automated Install Steps:
+------------------------
+1) Set NAGIOS_LIB to the directory containing Nagios's util.pm
+2) Set BACKUPPC_LIB to the directory containing BackupPC's Perl libraries
+3) Set PREFIX to the desired installation location
+4) make install
+
+Manual Install Steps:
+---------------------
+1) Edit check_backuppc and adjust the two "use lib" lines to refer to the
+ correct location for Nagios's utils.pm and BackupPC's Perl libraries.
+2) Copy check_backuppc into where you want this plugin.
+
+Configuration:
+--------------
+1) Add a sudoers entry to allow Nagios to run this plugin as the BackupPC user.
+2) Configure Nagios to run this plugin through sudo as the BackupPC user.
+3) Test
+4) Add to Nagios service checks
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/Makefile
new file mode 100644
index 0000000..fec0526
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/Makefile
@@ -0,0 +1,23 @@
+ifndef PREFIX
+ PREFIX=/usr/local
+endif
+ifndef NAGIOS_LIB
+ NAGIOS_LIB=/usr/lib/nagios/plugins
+endif
+ifndef BACKUPPC_LIB
+ BACKUPPC_LIB=/usr/share/backuppc/lib
+endif
+
+install:
+ sed -e "s|NAGIOS_LIB|$(NAGIOS_LIB)|g" -e \
+ "s|BACKUPPC_LIB|${BACKUPPC_LIB}|g" check_backuppc \
+ > check_backuppc.processed
+ install -d ${PREFIX}/lib/nagios/plugins
+ install -m 755 check_backuppc.processed ${PREFIX}/lib/nagios/plugins
+ mv ${PREFIX}/lib/nagios/plugins/check_backuppc.processed \
+ ${PREFIX}/lib/nagios/plugins/check_backuppc
+ install -m 644 check_backuppc.8 ${PREFIX}/man/man8
+
+uninstall:
+ rm -f ${PREFIX}/lib/nagios/plugins/check_backuppc
+ rm -f ${PREFIX}/man/man8/check_backuppc.8
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/README b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/README
new file mode 100644
index 0000000..191e8c4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/README
@@ -0,0 +1,14 @@
+This plugin must be run as the same user that BackupPC runs under. For a host
+to be considered an archive host by the --backup-only and --archive-only options
+at least one archive must be run by the host.
+
+Sample configuration for NRPE with Ubuntu hosts:
+1) Add the following line to /etc/sudoers on the backup host
+ nagios ALL = (backuppc) NOPASSWD: /usr/local/lib/nagios/plugins/check_backuppc
+
+2) Add the following line to /etc/nagios/nrpe.cfg
+ command[check_backuppc]=/usr/bin/sudo -u backuppc \
+ /usr/local/lib/nagios/plugins/check_backuppc
+
+3) Add the appropriate stanza to your Nagios configuration to use this check
+ with NRPE.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/TODO b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/TODO
new file mode 100644
index 0000000..155e902
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/TODO
@@ -0,0 +1 @@
+Test with Nagios2
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/changelog b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/changelog
new file mode 100644
index 0000000..47cb42f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/changelog
@@ -0,0 +1,33 @@
+Mar. 18 2007 - 1.1.0
+ - Added --status-only option
+ - Fixed logic of --warning option
+ - Adjusted default warning age to 0 and critical age to 7 days
+
+Sep. 16 2006 - 1.0
+ - Added manpage
+ - Adjusted spacing in debug messages
+ - Adjusted behaviour of when an initial backup fails
+ - Code cleanup
+
+Aug. 31 2006 - 0.9.0
+ - Added Makefile
+ - Increased verbosity level
+ - Added host exclusion option
+ - Added --archive-only and --backup-only options
+
+Aug. 23 2006 - 0.8.0
+ - Added hostname option
+ - Added warning threshold
+ - Added severity reduction count
+ - Code cleanup
+
+Aug. 22 2006 - 0.2.0
+ - First public release
+ - Code cleanup
+ - Added command-line arguments
+
+Aug. 16 2006 - 0.1.1
+ - Change error detection to checking for 'error' in hashes
+
+Aug. 15 2006 - 0.1.0
+ - First technically working version of plugin, still needs options
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/check_backuppc b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/check_backuppc
new file mode 100755
index 0000000..d8ea383
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/check_backuppc
@@ -0,0 +1,265 @@
+#!/usr/bin/perl
+#
+# check_backuppc: a Nagios plugin to check the status of BackupPC
+#
+# Tested against BackupPC 2.1.2 and Nagios 1.3
+# <http://backuppc.sourceforge.net>
+# <http://nagios.org>
+#
+# AUTHORS
+# Seneca Cunningham <tetragon@users.sourceforge.net>
+#
+# COPYRIGHT
+# Copyright (C) 2006,2007 Seneca Cunningham
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+use strict;
+no utf8;
+
+# Nagios
+use lib "NAGIOS_LIB";
+use utils qw(%ERRORS $TIMEOUT);
+use POSIX qw(strftime difftime);
+use Getopt::Long;
+Getopt::Long::Configure('bundling');
+
+# BackupPC
+use lib "BACKUPPC_LIB";
+use BackupPC::Lib;
+
+my $version = '1.1.0';
+my $warnLevel = 0;
+my $daysOld = 7;
+my $verbose = 0;
+my $opt_V = 0;
+my $opt_h = 0;
+my $goodOpt = 0;
+my $reduce = 0;
+my $backupOnly = 0;
+my $archiveOnly = 0;
+my $statusOnly = 0;
+my @hostsDesired;
+my @hostsExcluded;
+
+# Process options
+$goodOpt = GetOptions(
+ 'v+' => \$verbose, 'verbose+' => \$verbose,
+ 'c=f' => \$daysOld, 'critical=f' => \$daysOld,
+ 'w=f' => \$warnLevel, 'warning=f' => \$warnLevel,
+ 'V' => \$opt_V, 'version' => \$opt_V,
+ 'h' => \$opt_h, 'help' => \$opt_h,
+ 'r=i' => \$reduce, 'reduce' => \$reduce,
+ 'b' => \$backupOnly, 'backup-only' => \$backupOnly,
+ 'a' => \$archiveOnly, 'archive-only' => \$archiveOnly,
+ 's' => \$statusOnly, 'status-only' => \$statusOnly,
+ 'H=s' => \@hostsDesired, 'hostname=s' => \@hostsDesired,
+ 'x=s' => \@hostsExcluded, 'exclude=s' => \@hostsExcluded);
+
+@hostsDesired = () if $#hostsDesired < 0;
+@hostsExcluded = () if $#hostsExcluded < 0;
+
+if ($opt_V)
+{
+ print "check_backuppc - " . $version . "\n";
+ exit $ERRORS{'OK'};
+}
+if ($backupOnly and $archiveOnly)
+{
+ $goodOpt = 0;
+ print "Cannot apply both --backup-only and --archive-only, contradictory\n\n";
+}
+if ($opt_h or not $goodOpt)
+{
+ print "check_backuppc - " . $version . "\n";
+ print "A Nagios plugin to check on BackupPC backup status.\n\n";
+ print "Options:\n";
+ print " --hostname,-H only check the specified host\n";
+ print " --exclude,-x do not check the specified host\n";
+ print " --archive-only,-a only check the archive hosts\n";
+ print " --backup-only,-b only check the backup hosts\n";
+ print " --status-only,-s only check backup status, omit connection failures that are\n";
+ print " less than \$Conf{FullPeriod} old\n";
+ print " --warning,-w days old an errored host must be to cause a warning\n";
+ print " --critical,-c number of days old an errored backup must be to be critical\n";
+ print " --reduce,-r maximum number of failed hosts for severity reduction\n";
+ print " --verbose,-v increase verbosity\n";
+ print " --version,-V display plugin version\n";
+ print " --help,-h display this message\n\n";
+ exit $ERRORS{'OK'} if $goodOpt;
+ exit $ERRORS{'UNKNOWN'};
+}
+if ($warnLevel > $daysOld)
+{
+ print("BACKUPPC UNKNOWN - Warning threshold must be <= critical\n");
+ exit $ERRORS{'UNKNOWN'};
+}
+
+# Connect to BackupPC
+my $server;
+if (!($server = BackupPC::Lib->new))
+{
+ print "BACKUPPC CRITICAL - Couldn't connect to BackupPC\n";
+ exit $ERRORS{'CRITICAL'};
+}
+my %Conf = $server->Conf();
+
+$server->ChildInit();
+
+my $err = $server->ServerConnect($Conf{ServerHost}, $Conf{ServerPort});
+if ($err)
+{
+ print("BACKUPPC UNKNOWN - Can't connect to server ($err)\n");
+ exit $ERRORS{'UNKNOWN'};
+}
+
+# hashes that BackupPC uses for varios status info
+my %Status;
+my %Jobs;
+my %Info;
+
+# query the BackupPC server for host, job, and server info
+my $info_raw = $server->ServerMesg('status info');
+my $jobs_raw = $server->ServerMesg('status jobs');
+my $status_raw = $server->ServerMesg('status hosts');
+
+# undump the output... BackupPC uses Data::Dumper
+eval $info_raw;
+eval $jobs_raw;
+eval $status_raw;
+
+# check the dumped output
+my $hostCount = 0;
+my @goodHost;
+my @badHost;
+my @tooOld;
+my @notTooOld;
+
+foreach my $host (@hostsDesired, @hostsExcluded)
+{
+ if (not grep {/$host/} keys(%Status))
+ {
+ print("BACKUPPC UNKNOWN - Unknown host ($host)\n");
+ exit $ERRORS{'UNKNOWN'};
+ }
+}
+
+# host status checks
+foreach my $host (sort(keys(%Status)))
+{
+ next if $host =~ /^ /;
+ next if (@hostsDesired and not grep {/$host/} @hostsDesired);
+ next if (@hostsExcluded and grep {/$host/} @hostsExcluded);
+ next if ($backupOnly and $Status{$host}{'type'} eq 'archive');
+ next if ($archiveOnly and $Status{$host}{'type'} ne 'archive');
+ $hostCount++;
+ # Debug
+ if ($verbose == 3)
+ {
+ print "Host $host state " . $Status{$host}{'state'};
+ print " with error: " . $Status{$host}{'error'} . "\n";
+ }
+ if ($Status{$host}{'error'})
+ {
+ # Check connectivity errors with greater care
+ if ($statusOnly && (
+ $Status{$host}{'error'} eq 'ping too slow' ||
+ $Status{$host}{'error'} eq 'no ping response' ||
+ $Status{$host}{'error'} eq 'host not found')) {
+ if ($Status{$host}{'lastGoodBackupTime'} - $Status{$host}{'startTime'} <= $Conf{FullPeriod} * 3600 * 24) {
+ push @goodHost, $host;
+ next;
+ }
+ }
+ push @badHost, $host;
+ # Check bad host ages
+ $Status{$host}{'lastGoodBackupTime'} = $Status{$host}{'startTime'} if (not $Status{$host}{'lastGoodBackupTime'});
+ if (difftime(time(), $Status{$host}{'lastGoodBackupTime'}) > ($daysOld * 3600 * 24))
+ {
+ push @tooOld, $host;
+ }
+ elsif (difftime(time(), $Status{$host}{'lastGoodBackupTime'}) > ($warnLevel * 3600 * 24))
+ {
+ push @notTooOld, $host;
+ }
+ else
+ {
+ push @goodHost, $host;
+ pop @badHost;
+ }
+ # Debug
+ if ($verbose == 2)
+ {
+ print "Host $host state " . $Status{$host}{'state'};
+ print " with error: " . $Status{$host}{'error'} . "\n";
+ }
+ }
+ else
+ {
+ push @goodHost, $host;
+ }
+}
+
+if ($hostCount == @goodHost or $#badHost < $reduce and not @tooOld)
+{
+ print "BACKUPPC OK - (" . @badHost . "/" . $hostCount . ") failures\n";
+ exit $ERRORS{'OK'};
+}
+
+# Only failures reach this far
+# WARNING
+if ($#tooOld < 0 or $#badHost < $reduce)
+{
+ print "BACKUPPC WARNING - (";
+ if ($verbose)
+ {
+ foreach my $host (@badHost)
+ {
+ print $host . " (" . $Status{$host}{'error'} . "), ";
+ }
+ print ")\n";
+ }
+ else
+ {
+ print $#badHost + 1 . "/" . $hostCount . ") failures\n";
+ }
+ exit $ERRORS{'WARNING'};
+}
+
+# CRITICAL
+print "BACKUPPC CRITICAL - (";
+if ($#notTooOld >= 0 and $verbose)
+{
+ foreach my $host (@notTooOld)
+ {
+ print $host . " (" . $Status{$host}{'error'} . "), ";
+ }
+ print "), (";
+}
+if ($verbose)
+{
+ foreach my $host (@tooOld)
+ {
+ print $host . " (" . $Status{$host}{'error'} . "), " if $verbose;
+ }
+ print ") critical\n";
+}
+else
+{
+ print $#badHost + 1 . "/" . $hostCount . ") failures, ";
+ print $#tooOld + 1 . " critical\n";
+}
+exit $ERRORS{'CRITICAL'};
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/check_backuppc.8 b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/check_backuppc.8
new file mode 100644
index 0000000..372afdc
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/check_backuppc-1.1.0/check_backuppc.8
@@ -0,0 +1,61 @@
+.TH check_backuppc 8
+.SH NAME
+check_backuppc \- A Nagios plugin to monitor BackupPC
+.SH SYNOPSIS
+.B check_backuppc
+.I [options]
+.SH DESCRIPTION
+.B check_backuppc
+is a nagios plugin that reports on the status of BackupPC. By default, it
+monitors both archive and backup hosts for errors.
+.SH OPTIONS
+.TP
+.B \-a, \-\-archive\-only
+Only check the status of archive hosts.
+.TP
+.B \-b, \-\-backup\-only
+Only check the status of non-archive hosts.
+.TP
+.B \-s, \-\-status\-only
+Only check the status of the backups, omit connection failures that are less
+than $Conf{FullPeriod} old.
+.TP
+.B \-H, \-\-hostname hostname
+Only check the specified host. Uses hostnames that BackupPC is configured to
+use, can be specified multiple times.
+.TP
+.B \-x, \-\-exclude hostname
+Do not check the specified host. Uses hostnames that BackupPC is configured to
+use, can be specified multiple times.
+.TP
+.B \-w, \-\-warning age
+The days old at which a failure is considered a warning, default 1.
+.TP
+.B \-c, \-\-critical age
+The days old at which a failure is considered critical, default 8.
+.TP
+.B \-r, \-\-reduce count
+The maximum number of failed hosts for which to reduce reported severity,
+default 0.
+.TP
+.B \-h, \-\-help
+Show summary of options.
+.SH NOTES
+This plugin must be run on the same host and as the same user as BackupPC.
+An archive host only takes on a reported type of archive after its first archive
+run.
+.SH EXAMPLES
+.TP
+.EX
+/usr/local/lib/nagios/plugins/check_backuppc -r1 -w3 -c8 -b -x otter
+.EE
+Check the status of all backup hosts except "otter". Warn if a failed backup
+is older than three days old, return critical if a failure is older than eight
+days old unless there is only a single failure. In that case, warn if the
+single failed backup is older than eight days.
+.SH AUTHOR
+Seneca Cunningham <tetragon@users.sourceforge.net>
+.SH "SEE ALSO"
+.\" Always quote multiple words for .SH
+.BR sudo (8).
+.BR backuppc (8).
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/control
new file mode 100644
index 0000000..6897900
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/control
@@ -0,0 +1,8 @@
+Uploaders: Jan Wagner <waja@cyconet.org>
+Recommends: libmonitoring-plugin-perl | libnagios-plugin-perl
+Suggests: backuppc
+Version: 1.1.0
+Homepage: http://n-backuppc.sourceforge.net/
+Watch: http://sourceforge.net/projects/n-backuppc/files/ check_backuppc-([0-9.]+)\.tar\.gz
+Description: plugin for checking on the status of
+ BackupPC backups
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/copyright
new file mode 100644
index 0000000..b7b58f8
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/copyright
@@ -0,0 +1,6 @@
+Copyright (C) 2006,2007 Seneca Cunningham
+
+License: GPL v2
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/src b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/src
new file mode 120000
index 0000000..127d37d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_backuppc/src
@@ -0,0 +1 @@
+check_backuppc-1.1.0 \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/Makefile
new file mode 100644
index 0000000..52de70c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/Makefile
@@ -0,0 +1,4 @@
+#/usr/bin/make -f
+
+include ../common.mk
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/bgpstate.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/bgpstate.cfg
new file mode 100644
index 0000000..76a7343
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/bgpstate.cfg
@@ -0,0 +1,5 @@
+# 'check_snmp_bgpstate' command definition
+define command{
+ command_name check_snmp_bgpstate
+ command_line /usr/lib/nagios/plugins/check_bgpstate '$HOSTADDRESS$' -c '$ARG1$'
+ }
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/check_bgpstate b/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/check_bgpstate
new file mode 100644
index 0000000..645d750
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/check_bgpstate
@@ -0,0 +1,215 @@
+#!/usr/bin/perl -w
+#
+# check_bgpstate.pl - nagios plugin
+#
+# Copyright (C) 2000 Christoph Kron
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+#
+# Report bugs to: ck@zet.net
+#
+# 11.01.2000 Version 1.0
+
+
+
+use strict;
+
+use Net::SNMP;
+use Getopt::Long;
+&Getopt::Long::config('auto_abbrev');
+
+
+# whois programm for RIPE database queries
+my $whois = '/usr/bin/whois';
+my $status;
+my $TIMEOUT = 30;
+
+# critical bgp sessions
+my %uplinks = ( 1273, 'Uplink ECRC',
+ 1755, 'Uplink EBONE',
+ 3300, 'Uplink AUCS'
+ );
+
+my %ERRORS = ('UNKNOWN' , '-1',
+ 'OK' , '0',
+ 'WARNING', '1',
+ 'CRITICAL', '2');
+
+
+my %bgpPeerState = (
+ '1',"idle",
+ '2',"connect",
+ '3',"active",
+ '4',"opensent",
+ '5',"openconfirm",
+ '6',"established"
+ );
+my $state = "UNKNOWN";
+my $answer = "";
+my $snmpkey;
+my $snmpoid;
+my $key;
+my $community = "public";
+my $port = 161;
+my @snmpoids;
+my $snmpbgpPeerState = '1.3.6.1.2.1.15.3.1.2';
+my $snmpbgpPeerLocalAddr = '1.3.6.1.2.1.15.3.1.5';
+my $snmpbgpPeerRemoteAddr = '1.3.6.1.2.1.15.3.1.7';
+my $snmpbgpPeerRemoteAs = '1.3.6.1.2.1.15.3.1.9';
+my $hostname;
+my $session;
+my $error;
+my $response;
+my %bgpStatus;
+my $bgpestablished =0 ;
+my $bgpcritical =0;
+my $bgpdown =0;
+my $bgpidle =0;
+my $bgpmessage;
+my $asname;
+my $remoteas;
+my @output;
+
+sub usage {
+ printf "\nMissing arguments!\n";
+ printf "\n";
+ printf "Perl bgpstate plugin for Nagios\n";
+ printf "monitors all BGP sessions\n";
+ printf "usage: \n";
+ printf "check_bgpstate.pl -c <READCOMMUNITY> -p <PORT> <HOSTNAME>\n";
+ printf "Copyright (C) 2000 Christoph Kron\n";
+ printf "check_bgpstate.pl comes with ABSOLUTELY NO WARRANTY\n";
+ printf "This programm is licensed under the terms of the ";
+ printf "GNU General Public License\n(check source code for details)\n";
+ printf "\n\n";
+ exit $ERRORS{"UNKNOWN"};
+}
+
+# Just in case of problems, let's not hang Nagios
+$SIG{'ALRM'} = sub {
+ print ("ERROR: No snmp response from $hostname (alarm)\n");
+ exit $ERRORS{"UNKNOWN"};
+};
+alarm($TIMEOUT);
+
+
+$status = GetOptions("community=s",\$community,
+ "port=i",\$port);
+if ($status == 0)
+{
+ &usage;
+}
+
+ #shift;
+ $hostname = shift || &usage;
+
+
+push(@snmpoids, $snmpbgpPeerState);
+push(@snmpoids, $snmpbgpPeerLocalAddr);
+push(@snmpoids, $snmpbgpPeerRemoteAddr);
+push(@snmpoids, $snmpbgpPeerRemoteAs);
+
+foreach $snmpoid (@snmpoids) {
+
+ ($session, $error) = Net::SNMP->session(
+ -hostname => $hostname,
+ -community => $community,
+ -port => $port
+ );
+
+ if (!defined($session)) {
+ $state='UNKNOWN';
+ $answer=$error;
+ print ("$state: $answer");
+ exit $ERRORS{$state};
+ }
+
+ if (!defined($response = $session->get_table($snmpoid))) {
+ $answer=$session->error;
+ $session->close;
+ $state = 'CRITICAL';
+ print ("$state: $answer,$snmpkey");
+ exit $ERRORS{$state};
+ }
+
+ foreach $snmpkey (keys %{$response}) {
+ $snmpkey =~ m/.*\.(\d+\.\d+\.\d+\.\d+$)/;
+ $key = $1;
+# printf "debug: $snmpkey: $key -> $response->{$snmpkey}\n";
+ $bgpStatus{$key}{$snmpoid} = $response->{$snmpkey};
+ }
+ $session->close;
+}
+
+foreach $key (keys %bgpStatus) {
+ if ($bgpStatus{$key}{$snmpbgpPeerState} == 6 ) {
+ $bgpestablished++;
+ }
+ elsif ($bgpStatus{$key}{$snmpbgpPeerState} == 1 ) {
+ $bgpidle++;
+ }
+ else {
+ $bgpdown++ ;
+ if (exists($uplinks{$bgpStatus{$key}{$snmpbgpPeerRemoteAs}}) ) {
+ $bgpcritical++;
+ }
+ @output = `$whois -T aut-num AS$bgpStatus{$key}{$snmpbgpPeerRemoteAs}`;
+
+ $asname = "";
+ foreach (@output) {
+ if (m/as-name/) {
+ $asname = $_;
+ $asname =~ s/as-name://;
+ last;
+ }
+ if ( $asname =~ "" && m/descr/ ) {
+ $asname = $_;
+ $asname =~ s/descr://;
+ }
+ }
+ $asname =~ s/^\s*//;
+ $asname =~ s/\s*$//;
+ $bgpmessage .= sprintf("Peering with AS%s not established -> %s<BR>",
+ $bgpStatus{$key}{$snmpbgpPeerRemoteAs},
+ $asname);
+ }
+}
+
+
+ if ($bgpdown > 0) {
+ if ($bgpcritical > 0) {
+ $state = 'CRITICAL';
+ }
+ else {
+ $state = 'WARNING';
+ }
+ $answer = sprintf("host '%s', sessions up: %d, down: %d, shutdown: %d<BR>",
+ $hostname,
+ $bgpestablished,
+ $bgpdown, $bgpidle);
+ $answer = $answer . $bgpmessage . "\n";
+ }
+ else {
+ $state = 'OK';
+ $answer = sprintf("host '%s', sessions up: %d, down: %d, shutdown: %d\n",
+ $hostname,
+ $bgpestablished,
+ $bgpdown,$bgpidle);
+ }
+
+print ("$state: $answer");
+exit $ERRORS{$state};
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/control
new file mode 100644
index 0000000..77609f5
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/control
@@ -0,0 +1,5 @@
+Homepage: https://raw.github.com/nagios-plugins/nagios-plugins/ba7615631add0b610ada6a819d6c8f8c46a2d36d/contrib/check_bgpstate.pl
+Recommends: libnet-snmp-perl, whois
+Version: 1.0
+Uploaders: Jan Wagner <waja@cyconet.org>
+Description: plugin to check all BGP session on Cisco routers
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/copyright
new file mode 100644
index 0000000..f42c74a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_bgpstate/copyright
@@ -0,0 +1,6 @@
+C) 2000 Christoph Kron <ck@zet.net>
+
+License: GPL-2
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 1 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/Makefile
new file mode 100644
index 0000000..6d064e3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/Makefile
@@ -0,0 +1,8 @@
+PLUGIN := check_checksums
+
+include ../common.mk
+
+install::
+ install -d $(DESTDIR)/usr/lib/nagios
+ install -m 755 -o root -g root update_checksums $(DESTDIR)/usr/lib/nagios
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/check_checksums b/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/check_checksums
new file mode 100755
index 0000000..74a97c2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/check_checksums
@@ -0,0 +1,110 @@
+#!/bin/bash
+#
+# check_checksums - Nagios plugin to check file checksums
+# against (local, not 100% secure) lists.
+# Supports md5 sha1 sha224 sha256 sha384 sha512 checksums.
+#
+#
+# Copyright (C) 2013 Bernd Zeimetz <b.zeimetz@conova.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+umask 077
+
+if [ $# -gt 0 ]; then
+ case $1 in
+ -h|--help|help)
+ cat << __EOH__
+$0 - Nagios plugin to check file checksums
+------------------------------------------
+The plugin supports md5 sha1 sha224 sha256 sha384 sha512 checksums.
+As the lists are stored local it is not 100% secure.
+
+Usage:
+ For each file you want to monitor write the current checksum
+ into the stored file list. Use the checksum tool you prefer,
+ probably depending on your CPU power.
+
+ sha512sum /path/to/the/file >> /etc/nagios/check_checksums.sha512
+ sha384sum /path/to/the/file >> /etc/nagios/check_checksums.sha384
+ sha256sum /path/to/the/file >> /etc/nagios/check_checksums.sha256
+ sha224sum /path/to/the/file >> /etc/nagios/check_checksums.sha224
+ sha1sum /path/to/the/file >> /etc/nagios/check_checksums.sha1
+ md5sum /path/to/the/file >> /etc/nagios/check_checksums.md5
+
+ Set useful file permissions:
+ chown root:nagios /etc/nagios/check_checksums.*
+ chmod 0640 /etc/nagios/check_checksums.*
+
+ Run
+ $0
+ in nrpe or nagios to check if the checksums are still the same.
+ It will return UNKNOWN if there is no checksum file at all.
+
+ To update *ALL* stored checksums please run
+ /usr/lib/nagios/update_checksums
+ and all checksum files will be updated. A copy of the original file will
+ be stored in /etc/nagios.
+
+__EOH__
+ exit 3
+ ;;
+ esac
+fi
+
+if dpkg --compare-versions `dpkg-query -W coreutils | awk '{print $2}'` ge 8.13; then
+ STRICT="--strict"
+else
+ STRICT=""
+fi
+
+RET=3
+OUT="UNKNOWN"
+tmp_out=`mktemp`
+tmp_err=`mktemp`
+trap "rm -f ${tmp_out} ${tmp_err}" EXIT
+
+for t in md5 sha1 sha224 sha256 sha384 sha512; do
+ fname="/etc/nagios/check_checksums.${t}"
+ tool="${t}sum"
+ if [ -f ${fname} ]; then
+ if [ ${RET} -eq 3 ]; then
+ RET=0
+ OUT="OK"
+ fi
+ ${tool} --quiet ${STRICT} --check ${fname} 1>>${tmp_out} 2>>${tmp_err}
+ err=$?
+
+ if [ ${err} -gt 0 ]; then
+ RET=2
+ OUT="CRITICAL"
+ fi
+ fi
+done
+
+if [ $RET -eq 0 ]; then
+ echo "OK - all checksums verified | failed=0;1;1;0;"
+else
+ echo -n "${OUT} - "
+ sed 's,WARNING: ,,' ${tmp_err} | tr '\n' '/' | sed 's,/$,,'
+ echo
+ cat ${tmp_out}
+ count=`wc -l ${tmp_out} | awk '{print $1}'`
+ echo "| failed=${count};1;1;0;"
+ /usr/bin/logger -p user.err -t check_checksums -f ${tmp_out}
+fi
+rm -f ${tmp_out} ${tmp_err}
+
+exit ${RET}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/control
new file mode 100644
index 0000000..73b015c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/control
@@ -0,0 +1,5 @@
+Version: 20130611
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to verify file checksums
+ against (local, not 100% secure) lists.
+ Supports md5 sha1 sha224 sha256 sha384 sha512 checksums.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/copyright
new file mode 100644
index 0000000..8faae12
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/copyright
@@ -0,0 +1,15 @@
+Copyright (C) 2013 Bernd Zeimetz <b.zeimetz@conova.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/tests b/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/tests
new file mode 100644
index 0000000..2c651c8
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/tests
@@ -0,0 +1,2 @@
+Test-Command: mkdir -p /etc/nagios/ && sha256sum /bin/true > /etc/nagios/check_checksums.sha256 && /usr/lib/nagios/plugins/check_checksums
+Restrictions: needs-root, breaks-testbed
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/update_checksums b/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/update_checksums
new file mode 100755
index 0000000..2ef376b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_checksums/update_checksums
@@ -0,0 +1,47 @@
+#!/bin/bash
+#
+# Tool to rebuild all checksums for check_checksums
+#
+#
+# Copyright (C) 2013 Bernd Zeimetz <b.zeimetz@conova.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+umask 027
+
+for t in md5 sha1 sha224 sha256 sha384 sha512; do
+ fname="/etc/nagios/check_checksums.${t}"
+ tool="${t}sum"
+ if [ -f ${fname} ]; then
+ tmp=`mktemp`
+ chown root:nagios ${tmp}
+ chmod 640 ${tmp}
+
+ trap "rm -f ${tmp}" EXIT
+
+ sed 's,^[^ ]* ,,' ${fname} | while read f; do
+ if [ -f "${f}" ]; then
+ ${tool} "${f}" >> ${tmp}
+ else
+ echo "${f} went missing, ignoring!"
+ fi
+ done
+
+ ln "${fname}" "${fname}_`date '+%s'`"
+ mv "${tmp}" "${fname}"
+ fi
+done
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/Makefile
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/Makefile
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/check_clamav b/nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/check_clamav
new file mode 100644
index 0000000..af92211
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/check_clamav
@@ -0,0 +1,190 @@
+#!/usr/bin/perl -w
+#
+# Copyright (c) 2005-2008 Darren Spruell <phatbuckett@gmail.com>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+################################################################################
+# This script is used to compare the version and signature level of the
+# currently running clamd daemon with the latest available versions listed in
+# the TXT record for current.cvd.clamav.net.
+#
+# In order to use this script, you might need to make the following adjustments:
+# - Set the "use lib" path correctly (where utils.pm is located.)
+# - Set the path to your clamd binary in $clamd_cmd.
+#
+# This plugin requires the Net::DNS Perl module.
+################################################################################
+
+# Plugin directory / home of utils.pm.
+use lib "/usr/local/libexec/nagios";
+use utils qw(%ERRORS &print_revision &support &usage);
+use Getopt::Long qw(:config no_ignore_case bundling);
+use File::Basename;
+use Net::DNS;
+
+use strict;
+
+# Path to installed clamd binary.
+my $clamd_cmd = "/usr/local/sbin/clamd";
+
+# Leave the rest of this alone:
+my $prog_name = basename $0;
+my $prog_ver = "1.2";
+
+my $warn_val = 1; # Default - override with -w arg
+my $crit_val = 2; # Default - override with -c arg
+my $help_val = 0; # Off unless -h arg
+my $verb_val = 0; # Off unless -v arg
+my $vers_val = 0; # Off unless -V arg
+
+my ($msg, $rev_word, $rr, $status, $status_print);
+
+# Gives us a way to print out verbose debug information to the screen when user
+# passes in a -v argument.
+# print_debug() should receive one parameter: a text string to print out.
+sub print_debug() {
+ my $message = shift;
+ if ($verb_val == 1) {
+ print "DEBUG: " . $message . "\n";
+ }
+}
+
+# Looks up and returns the current CVD version information from
+# clamav.net.
+sub lookup_current() {
+ my $res = Net::DNS::Resolver->new;
+ my $query = $res->search("current.cvd.clamav.net", "TXT");
+ if ($query) {
+ foreach $rr (grep { $_->type eq 'TXT' } $query->answer) {
+ &print_debug("Net::DNS found result: (TXT) " . $rr->txtdata);
+ return $rr->txtdata;
+ }
+ } else {
+ warn "query failed: ", $res->errorstring, "\n";
+ }
+}
+
+# comp_sig_ver() should receive three parameters: remote signature database
+# version, local signature database version, and build date of local
+# signatures database.
+sub comp_sig_ver() {
+ my $sig_rem = shift;
+ my $sig_local = shift;
+ my $sig_date = shift;
+ my $diff = 0;
+ my $msg = "";
+
+ if ($sig_local != $sig_rem) {
+ $diff = $sig_rem - $sig_local;
+ $rev_word = ($diff == 1) ? "revision" : "revisions";
+ if ($diff >= $crit_val) {
+ &print_debug("Installed daily.cvd is behind clamav.net");
+ $status = $ERRORS{'CRITICAL'}; # Will exit with CRITICAL status
+ $status_print = "CRITICAL";
+ } elsif ($diff >= $warn_val) {
+ &print_debug("Installed daily.cvd is behind clamav.net");
+ $status = $ERRORS{'WARNING'}; # Will exit with WARNING status
+ $status_print = "WARNING";
+ } else {
+ &print_debug("Installed daily.cvd is behind clamav.net");
+ $status = $ERRORS{'OK'}; # Will exit with OK status
+ $status_print = "OK";
+ }
+ $msg = "ClamAV " . $status_print . ": daily.cvd " . $sig_local .
+ " out of date by " . $diff . " " . $rev_word;
+ } else {
+ &print_debug("Installed daily.cvd matches latest from clamav.net");
+ $status = $ERRORS{'OK'}; # Will exit with OK status
+ $msg = "ClamAV OK: daily.cvd " . $sig_local . " (" . $sig_date .
+ ") is up to date";
+ }
+ return $msg, $status;
+}
+
+# Show usage information
+sub show_help() {
+ print <<END;
+$prog_name Nagios plugin $prog_ver (c) 2005-2008 Darren Spruell <phatbuckett\@gmail.com>
+
+Perl Check ClamAV daily.cvd plugin for Nagios
+
+Usage: $prog_name [-w <warn>] [-c <crit>] [-V] [-v] [-h]
+
+-w, --warning=INTEGER
+ Number of revisions behind current daily.cvd to generate a warning state (Default: 1)
+-c, --critical=INTEGER
+ Number of revisions behind current daily.cvd to generate a critical state (Default: 2)
+-V, --version
+ Output version information for the plugin
+-v, --verbose
+ Enable verbose output
+-h, --help
+ Show this help
+END
+}
+
+GetOptions (
+ "w=i" => \$warn_val, "warning=i" => \$warn_val,
+ "c=i" => \$crit_val, "critical=i" => \$crit_val,
+ "h" => \$help_val, "help" => \$help_val,
+ "V" => \$vers_val, "version" => \$vers_val,
+ "v" => \$verb_val, "verbose" => \$verb_val,
+);
+
+if ($help_val != 0) {
+ &show_help;
+ exit $ERRORS{'OK'};
+}
+
+if ($vers_val != 0) {
+ &print_revision($prog_name,$prog_ver);
+ exit $ERRORS{'OK'};
+}
+
+# Make sure the binary exists.
+if (-x $clamd_cmd) {
+ &print_debug("Found clamd at $clamd_cmd");
+} else {
+ &print_debug("Can't execute clamd at $clamd_cmd");
+ die("FATAL: Unable to execute $clamd_cmd");
+}
+
+&print_debug("Threshhold values: warning=$warn_val, critical=$crit_val");
+
+# Should return something like: ClamAV 0.87.1/1205/Wed Dec 7 07:00:48 2005
+chomp(my $clamd_ver = `$clamd_cmd -V`);
+
+# Should return something like: 0.87.1:34:1206:1134072033:1
+chomp(my $dnstxt_ver = &lookup_current());
+
+# Parse what we get from clamd -V and our DNS query
+my @clamdresults = split(/\//,$clamd_ver);
+my @txtresults = split(/:/,$dnstxt_ver);
+
+# Get the currently running ClamAV sig level and cvd date out of this
+my $local_latest_daily = $clamdresults[1];
+my $local_latest_date = $clamdresults[2];
+
+&print_debug("Local daily.cvd dated $local_latest_date");
+&print_debug("Local daily.cvd version = $local_latest_daily");
+
+# Get the latest ClamAV daily signatures version out of this
+my $clamav_latest_daily = $txtresults[2];
+&print_debug("Latest daily.cvd version = $clamav_latest_daily");
+
+my @prog_sig_res = &comp_sig_ver($clamav_latest_daily, $local_latest_daily,
+ $local_latest_date);
+
+print $prog_sig_res[0] . "\n";
+exit $prog_sig_res[1];
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/control
new file mode 100644
index 0000000..8f706c8
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/control
@@ -0,0 +1,10 @@
+Homepage: http://exchange.nagios.org/directory/Plugins/Anti-2DVirus/ClamAV/ClamAV-check-plugin/details
+Watch: http://exchange.nagios.org/directory/Plugins/Anti-2DVirus/ClamAV/ClamAV-check-plugin/details <td>check_clamav plugin v([0-9.]+)</td>
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to check for clamav signature freshness
+ This script is used to compare the version and signature
+ level of the currently running clamd daemon with the latest
+ available versions listed in the TXT record for
+ current.cvd.clamav.net.
+Recommends: nagios-plugins-basic, libnet-dns-perl
+Version: 1.2
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/copyright
new file mode 100644
index 0000000..dcd354d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_clamav/copyright
@@ -0,0 +1,14 @@
+Copyright (c) 2005-2008 Darren Spruell <phatbuckett@gmail.com>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/Makefile
new file mode 100644
index 0000000..cf9673d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/Makefile
@@ -0,0 +1,3 @@
+#/usr/bin/make -f
+
+include ../common.mk
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/check_cups b/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/check_cups
new file mode 100644
index 0000000..b202fbc
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/check_cups
@@ -0,0 +1,617 @@
+#!/usr/bin/perl
+
+=head1 NAME
+
+check_cups - monitor CUPS queues
+
+=head1 AUTHOR
+
+Steve Huff <shuff@hmdc.harvard.edu>
+
+=head1 SYNOPSIS
+
+Polls a CUPS server to discover queues, then reports on queue status.
+
+=head1 REQUIRES
+
+Perl5.004, strict, warnings, Data::Dumper, Nagios::Plugin, Net::CUPS, Date::Manip, POSIX
+
+=head1 EXPORTS
+
+Nothing
+
+=head1 DESCRIPTION
+
+C<check_cups> polls the specified CUPS server and discovers print queues. It tests against a queue length threshold and an age of the oldest job in the queue threshold.
+
+Performance data (queue length and maximum queue age) is provided.
+
+Future development plans include the option to specify the number of expected print queues.
+
+=cut
+
+# these need to be outside the BEGIN
+use strict;
+use warnings;
+
+# see this page for an explanation regarding the levels of warnings:
+# http://search.cpan.org/~rgarcia/perl-5.6.2/pod/perllexwarn.pod
+no warnings qw( redefine prototype );
+
+BEGIN {
+
+ # use Opsview libs
+ use lib '/usr/local/nagios/perl/lib';
+ use lib '/usr/local/nagios/lib';
+
+ use Nagios::Plugin;
+
+ use Data::Dumper;
+
+ use Date::Manip;
+ use POSIX qw( strftime );
+
+ use Net::CUPS;
+
+ # reregister interrupt
+ $SIG{INT} = \&DoInterrupt;
+
+} ## end BEGIN
+
+########################################################################
+# IMPORTANT VARIABLES
+#
+# default values
+my( $timeout, $verbose );
+my $WARNINGJOBS = 6;
+my $CRITICALJOBS = 10;
+my $WARNINGAGE = '20 minutes';
+my $CRITICALAGE = '1 hour';
+
+#
+########################################################################
+
+#
+# MAIN
+#
+
+# instantiate the Nagios::Plugin object
+my( $usagemsg ) = <<USAGE;
+Usage: %s -H <hostname> [-w <number of queued jobs>] [-c <number of queued jobs>] [-W <age of oldest job in queue>] [-C <age of oldest job in queue>] [-t timeout] [-v|d] [-h]
+USAGE
+my( $blurb ) = <<BLURB;
+check_cups polls the specified CUPS server and discovers print queues. It tests against a queue length threshold and an age of the oldest job in the queue threshold.
+
+Performance data (queue length and maximum queue age) is provided.
+
+Future development plans include the option to specify the number of expected print queues.
+BLURB
+my( $license ) = <<LICENSE;
+This Nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY.
+It may be used, redistributed and/or modified under the terms of the GNU
+General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).
+
+This plugin was written at The Harvard-MIT Data Center
+(http://www.hmdc.harvard.edu) by Steve Huff (<shuff\@hmdc.harvard.edu>).
+LICENSE
+my( $plugin ) = Nagios::Plugin->new(
+ shortname => 'check_cups',
+ usage => $usagemsg,
+ version => '0.2',
+ blurb => $blurb,
+ license => $license,
+ );
+
+=head2 Plugin Metadata
+
+Metadata is documented in L<Nagios::Plugin> and L<Nagios::Plugin::Getopt>.
+
+Other available options of interest include C<url>, C<extra>, and C<timeout>.
+
+=cut
+
+# add the additional options
+$plugin->add_arg(
+ spec => 'hostname|H=s',
+ help => [
+ "Hostname to query",
+ "IP address to query",
+ ],
+ label => [ 'HOSTNAME', 'IP' ],
+ required => 1,
+ );
+
+# queued jobs
+$plugin->add_arg(
+ spec => 'warning|w=i',
+ help => "Warning threshold in number of queued jobs (default $WARNINGJOBS)",
+ default => $WARNINGJOBS,
+ label => [ 'QUEUED JOBS' ],
+ required => 0,
+ );
+
+$plugin->add_arg(
+ spec => 'critical|c=i',
+ help => "Critical threshold in number of queued jobs (default $CRITICALJOBS)",
+ default => $CRITICALJOBS,
+ label => [ 'QUEUED JOBS' ],
+ required => 0,
+ );
+
+# job age
+$plugin->add_arg(
+ spec => 'warningage|W=s',
+ help => "Warning threshold of job age (default '$WARNINGAGE')",
+ default => $WARNINGAGE,
+ label => [ 'TIME SPECIFICATION' ],
+ required => 0,
+ );
+
+$plugin->add_arg(
+ spec => 'criticalage|C=s',
+ help => "Critical threshold of job age (default '$CRITICALAGE')",
+ default => $CRITICALAGE,
+ label => [ 'TIME SPECIFICATION' ],
+ required => 0,
+ );
+
+=head2 Plugin Options
+
+Refer to L<Nagios::Plugin::Getopt> for option specifications - they differ slightly from pure L<Getopt::Long>-style option specifications.
+
+A number of standard options (C<--help>, C<--version>, C<--usage>, C<--timeout>, and C<--verbose>) are implemented by default, thanks to the arguments passed to C<Nagios::Plugin->new()>, and do not need to be specified. Moreover, if you attempt to override them, you will simply create two such options, which produces confusing C<--help> output and unexpected behavior.
+
+=cut
+
+# parse options
+$plugin->getopts;
+
+my( $opts ) = $plugin->opts;
+
+# declare variables
+my( $server, $queues, $warningjobs, $criticaljobs, $warningage, $criticalage );
+
+# every variable must have a value
+$server = $opts->get( 'hostname' );
+$timeout = $opts->get( 'timeout' ); # See above: option provided by default
+$verbose = $opts->get( 'verbose' ); # See above: option provided by default
+$warningjobs = $opts->get( 'warning' );
+$criticaljobs = $opts->get( 'critical' );
+$warningage = $opts->get( 'warningage' );
+$criticalage = $opts->get( 'criticalage' );
+
+# sanity check
+defined( $server )
+ or $plugin->nagios_die( "No value provided for --hostname!" );
+
+# parse time differentials
+my( $nowdate ) = ParseDate( 'now' );
+
+my( $warningdelta ) = ParseDateDelta( $warningage );
+unless( defined( $warningdelta ) ) {
+
+ $plugin->nagios_die( "'$warningage' is not a valid time specification!" );
+}
+
+my( $criticaldelta ) = ParseDateDelta( $criticalage );
+unless( defined( $criticaldelta ) ) {
+
+ $plugin->nagios_die( "'$criticalage' is not a valid time specification!" );
+}
+
+my( $warningminutes ) = sprintf( '%d', Delta_Format( $warningdelta, 'approx', 0, '%mt' ) );
+my( $criticalminutes ) = sprintf( '%d', Delta_Format( $criticaldelta, 'approx', 0, '%mt' ) );
+
+# critical thresholds must be greater than warning thresholds
+if ( $warningjobs >= $criticaljobs ) {
+
+ $plugin->nagios_die( "Job number warning threshold ($warningjobs) must be less than critical threshold ($criticaljobs)." );
+}
+
+if ( $warningminutes >= $criticalminutes ) {
+
+ $plugin->nagios_die( "Job age warning threshold ($warningage) must be less than critical threshold ($criticalage)." );
+}
+
+=head2 Testing and Exit Status
+
+The basic methodology of a Nagios plugin is as follows:
+
+=over
+
+=item 1.
+
+Run some sort of test.
+
+=item 2.
+
+Validate the result against provided (or default) thresholds.
+
+=item 3.
+
+Exit with the appropriate error code, optionally outputting text.
+
+=back
+
+Running the test is up to you.
+
+The function to use for validating the result is C<Nagios::Plugin::check_threshold()> (see L<Nagios::Plugin::Threshold> and L<Nagios::Plugin::Range> for details and specifications), which returns a value appropriate for use as an exit code.
+
+The functions to use for exiting are C<Nagios::Plugin::nagios_exit()> and C<Nagios::Plugin::nagios_die()>. C<nagios_exit()> is the general-purpose exit function, while C<nagios_die()> should be used for any unexpected exits and indicates that something went wrong with the plugin's operation.
+
+=head3 Return String
+
+The plugin return string performs two functions:
+
+=over
+
+=item 1.
+
+It communicates in human-readable format more details about what exactly has gone wrong (e.g. "Disk usage on '/var' is at 92% (threshold 90%)").
+
+=item 2.
+
+It (optionally) communicates in machine-readable format performance data which can be aggregated by tools such as Nagiosgraph (e.g. '| time=0.042745s;5.000000;10.000000;0.000000 size=2162B;;;0'). See L<Nagios::Plugin::Performance> for details and specifications; the function to use is C<Nagios::plugin::add_perfdata()>.
+
+=back
+
+The plugin string will automatically be populated with the plugin name and the exit status (e.g. "check_snmp_disk OK - "); everything after the "- " is what you provide with the message arguments to C<nagios_exit()> or C<nagios_die()>. C<add_perfdata()> takes care of appending the "|" and properly formatting performance data.
+
+=cut
+
+# begin tracking status and message
+my( $status, $message ) = ( OK, '' );
+
+# do some test, with a timeout
+alarm $timeout; # the heavy lifting is done in Nagios::Plugin::Getopt
+my( $result ) = doTest( $server );
+alarm 0;
+
+# validate the result, queue by queue
+my( %ok, %warning, %critical, %unknown );
+
+debug( "Analyzing results..." );
+foreach my $queuename ( keys( %{$result} ) ) {
+
+ # FIXME - allow per-queue overrides
+
+ my( $queue ) = $result->{$queuename};
+
+ my( $age, $jobs ) = ( $queue->{delta}, $queue->{numjobs} );
+ # sanitize values
+ defined( $age ) or $age = 0;
+ defined( $jobs ) or $jobs = 0;
+
+ my( $agestatus ) = $plugin->check_threshold(
+ check => $age,
+ warning => $warningminutes,
+ critical => $criticalminutes,
+ );
+
+ my( $jobsstatus ) = $plugin->check_threshold(
+ check => $jobs,
+ warning => $warningjobs,
+ critical => $criticaljobs,
+ );
+
+ # sort the queue appropriately
+ if ( $agestatus == CRITICAL or $jobsstatus == CRITICAL ) {
+
+ $critical{$queuename} = { age => $age, jobs => $jobs };
+ }
+ elsif ( $agestatus == WARNING or $jobsstatus == WARNING ) {
+
+ $warning{$queuename} = { age => $age, jobs => $jobs };
+ }
+ elsif ( $agestatus == UNKNOWN or $jobsstatus == UNKNOWN ) {
+
+ $unknown{$queuename} = { age => $age, jobs => $jobs };
+ }
+ else {
+
+ $ok{$queuename} = { age => $age, jobs => $jobs };
+ }
+
+ # add performance data
+ $plugin->add_perfdata(
+ label => $queuename . "_jobs",
+ value => $jobs,
+ uom => undef,
+ warning => $warningjobs,
+ critical => $criticaljobs,
+ );
+
+ # add performance data
+ $plugin->add_perfdata(
+ label => $queuename . "_age",
+ value => $age,
+ uom => undef,
+ warning => $warningminutes,
+ critical => $criticalminutes,
+ );
+}
+
+# figure out our status
+if ( scalar( keys( %critical ) ) ) {
+
+ debug( Data::Dumper->Dump( [\%critical], [qw(*critical)] ), 3 );
+
+ $status = CRITICAL;
+
+ foreach my $queue ( sort( keys( %critical ) ) ) {
+
+ $message .= "$queue ( ";
+
+ my( $age, $jobs ) = ( $critical{$queue}->{age}, $critical{$queue}->{jobs} );
+
+ my( $prettyage ) = prettyDelta( ParseDateDelta( "$age minutes" ) );
+
+ my( @messages );
+
+ if ( $age > $criticalminutes ) {
+
+ push( @messages, "job $prettyage old" );
+ }
+ if ( $jobs > $criticaljobs ) {
+
+ push( @messages, "$jobs queued jobs" );
+ }
+
+ $message .= join( ',', @messages );
+
+ $message .= ' ) ';
+ }
+}
+elsif ( scalar( keys( %warning ) ) ) {
+
+ debug( Data::Dumper->Dump( [\%warning], [qw(*warning)] ), 3 );
+
+ $status = WARNING;
+
+ foreach my $queue ( sort( keys( %warning ) ) ) {
+
+ $message .= "$queue ( ";
+
+ my( $age, $jobs ) = ( $warning{$queue}->{age}, $warning{$queue}->{jobs} );
+
+ my( $prettyage ) = prettyDelta( parseDateDelta( "$age minutes" ) );
+
+ my( @messages );
+
+ if ( $age > $warningminutes ) {
+
+ push( @messages, "job $prettyage old" );
+ }
+ if ( $jobs > $warningjobs ) {
+
+ push( @messages, "$jobs queued jobs" );
+ }
+
+ $message .= join( ',', @messages );
+
+ $message .= ' ) ';
+ }
+}
+elsif ( scalar( keys( %unknown ) ) ) {
+
+ debug( Data::Dumper->Dump( [\%unknown], [qw(*unknown)] ), 3 );
+
+ $status = UNKNOWN;
+
+ $message .= 'Unable to determine status: ';
+
+ $message .= join( ',', sort( keys( %unknown ) ) );
+}
+else {
+
+ debug( Data::Dumper->Dump( [\%ok], [qw(*ok)] ), 3 );
+
+ $message .= 'All queues within parameters.';
+}
+
+# exit with appropriate return values
+$plugin->nagios_exit( $status, $message );
+
+################################################################################
+# #
+# doTest - poll server for printers
+# #
+################################################################################
+sub doTest( $ ) {
+
+ my( $host ) = @_;
+
+ my( %queues );
+
+ debug( "Creating Net::CUPS object...", 2 );
+ my( $cups ) = Net::CUPS->new();
+
+ unless ( defined( $cups ) ) {
+
+ debug( "Unable to create Net::CUPS object: $!" );
+ return( undef );
+ }
+
+ debug( "Setting server to '$host'...", 2 );
+ $cups->setServer( $host );
+
+ debug( "Polling for queues...", 1 );
+ foreach my $queue ( $cups->getDestinations() ) {
+
+ my( $name ) = $queue->getName();
+
+ if ( defined( $name ) ) {
+
+ $queues{$name} = { destination => $queue };
+ debug( "Found queue '$name'.", 3 );
+ }
+ else {
+
+ debug( "Unable to determine queue name!" );
+ }
+ }
+
+ debug( "Parsing queues...", 1 );
+ my( $now ) = strftime( '%s', localtime() );
+
+ foreach my $queue ( keys( %queues ) ) {
+
+ my( $destination ) = $queues{$queue}->{destination};
+
+ my( @jobs ) = $destination->getJobs( 0, 0 );
+ ( @jobs ) or ( @jobs ) = ();
+
+ foreach my $jobid ( @jobs ) {
+
+ my( $job ) = \%{$destination->getJob( $jobid )};
+ $queues{$queue}->{jobs}->{$jobid} = $job;
+
+ my( $delta ) = deltaMinutes( $job->{creation_time}, $now );
+
+ # track the largest delta in the queue
+ if ( ( ! exists( $queues{$queue}->{delta} ) ) ||
+ ( $delta > $queues{$queue}->{delta} ) ) {
+
+ $queues{$queue}->{delta} = $delta;
+ }
+ }
+ $queues{$queue}->{numjobs} = keys( %{$queues{$queue}->{jobs}} );
+ }
+ debug( Data::Dumper->Dump( [\%queues], [qw(*queues)] ), 3 );
+
+ return( \%queues );
+}
+
+################################################################################
+# #
+# deltaMinutes - determine the delta in days between two datestamps
+# #
+################################################################################
+sub deltaMinutes( $$ ) {
+
+ my( $lesser, $greater ) = sort( @_ );
+ debug( "Received '$lesser', '$greater'.", 3 );
+
+ my( $lesserdate ) = ParseDateString( "epoch $lesser" );
+ my( $greaterdate ) = ParseDateString( "epoch $greater" );
+
+ my( $delta ) = DateCalc( $lesserdate, $greaterdate );
+
+ my( $deltaminutes ) = sprintf( '%d', Delta_Format( $delta, 'approx', 0, '%mt' ) );
+ defined( $deltaminutes ) or $deltaminutes = 0;
+
+ debug( "Delta: $deltaminutes minutes.", 3 );
+ return( $deltaminutes );
+}
+
+################################################################################
+# #
+# prettyDelta - display time delta in sensible format
+# #
+################################################################################
+sub prettyDelta( $ ) {
+
+ my( $delta ) = @_;
+
+ debug( "Delta: '$delta'", 3 );
+
+ # parse the delta
+ my( $days, $hours, $minutes ) = Delta_Format(
+ $delta, 'approx', 0, ( qw(
+ %dh
+ %hv
+ %mv
+ ) )
+ );
+
+ debug( "\$days: $days\n\$hours: $hours\n\$minutes: $minutes", 3 );
+
+ # assemble the string
+ my( $pretty );
+
+ # a day or more?
+ if ( $days ) {
+
+ $pretty .= "$days day";
+
+ if ( $days > 1 ) {
+
+ $pretty .= "s";
+ }
+ }
+
+ # hours?
+ if ( $hours ) {
+
+ if ( $days ) {
+
+ if ( $minutes ) {
+
+ $pretty .= ", ";
+ }
+ else {
+
+ $pretty .= " and ";
+ }
+ }
+
+ $pretty .= "$hours hour";
+
+ if ( $hours > 1 ) {
+
+ $pretty .= "s";
+ }
+ }
+
+ # minutes?
+ if ( $minutes ) {
+
+ if ( $days && $hours ) {
+
+ $pretty .= ",";
+ }
+
+ if ( $days || $hours ) {
+
+ $pretty .= " and ";
+ }
+
+ $pretty .= "$minutes minute";
+
+ if ( $minutes > 1 ) {
+
+ $pretty .= "s";
+ }
+ }
+
+ debug( "\$pretty: '$pretty'", 3 );
+ return( $pretty );
+}
+
+################################################################################
+# #
+# debug - print debug info
+# #
+################################################################################
+sub debug( $;$ ) {
+
+ my( $message, $level ) = @_;
+
+ defined( $level ) or $level = 1;
+
+ if ( $verbose >= $level ) {
+
+ chomp $message;
+ print "$message\n";
+ }
+}
+
+################################################################################
+# #
+# DoInterrupt - handle SIGINT and clean up
+# #
+################################################################################
+sub DoInterrupt {
+
+ $plugin->nagios_die( "Interrupt received" );
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/control
new file mode 100644
index 0000000..0dfbf33
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/control
@@ -0,0 +1,8 @@
+Homepage: https://exchange.icinga.org/oldmonex/1867-check_cups/
+Uploaders: Jan Wagner <waja@cyconet.org>
+Description: plugin to check queues on a remote CUPS server
+ This plugin is monitoring of queues on a remote CUPS server,
+ which means that it doesn't need to be installed on the print
+ server and run via NRPE.
+Recommends: libdate-manip-perl, libmonitoring-plugin-perl | libnagios-plugin-perl (>= 0.31), libnet-cups-perl
+Version: 0.2
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/copyright
new file mode 100644
index 0000000..ee2c18e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/copyright
@@ -0,0 +1,6 @@
+Copyright (C) Steve Huff <shuff@hmdc.harvard.edu>
+
+This Nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY.
+It may be used, redistributed and/or modified under the terms of the GNU
+General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/cups.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/cups.cfg
new file mode 100644
index 0000000..0a302f3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/cups.cfg
@@ -0,0 +1,5 @@
+# 'check_cups_queue' command definition
+define command{
+ command_name check_cups_queue
+ command_line /usr/lib/nagios/plugins/check_cups -H '$HOSTADDRESS$' '$ARG1$'
+ }
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/tests b/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/tests
new file mode 100644
index 0000000..0ecd0e6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_cups/tests
@@ -0,0 +1,3 @@
+Depends: cups, libdate-manip-perl, libmonitoring-plugin-perl | libnagios-plugin-perl, libnet-cups-perl
+Test-Command: /usr/lib/nagios/plugins/check_cups -H localhost
+Restrictions: needs-root, isolation-container
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/Makefile
new file mode 100644
index 0000000..33faddd
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/Makefile
@@ -0,0 +1,7 @@
+#/usr/bin/make -f
+
+PLUGIN = src/check_debsecan
+DOCFILES = src/README.md
+
+include ../common.mk
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/control
new file mode 100644
index 0000000..ce4361b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/control
@@ -0,0 +1,5 @@
+Uploaders: Stefan Schoerghofer <amd1212@4md.gr>
+Recommends: debsecan
+Version: 1.0.0
+Homepage: https://github.com/AMD1212/check_debsecan
+Description: plugin to check the Debian CVE lists against your installed packages
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/copyright
new file mode 100644
index 0000000..1e81685
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/copyright
@@ -0,0 +1,15 @@
+Copyright (C) 2017 Stefan Schörghofer
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/debsecan.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/debsecan.cfg
new file mode 100644
index 0000000..b34ef0c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/debsecan.cfg
@@ -0,0 +1,5 @@
+# 'check_debsecan' command definition
+define command{
+ command_name check_debsecan
+ command_line /usr/lib/nagios/plugins/check_debsecan
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/src/LICENSE b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/src/LICENSE
new file mode 100644
index 0000000..9cecc1d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/src/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ {one line to give the program's name and a brief idea of what it does.}
+ Copyright (C) {year} {name of author}
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ {project} Copyright (C) {year} {fullname}
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/src/README.md b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/src/README.md
new file mode 100644
index 0000000..153431b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/src/README.md
@@ -0,0 +1,39 @@
+# check_debsecan
+Monitoring/Nagios plugin for Debian - Checks the Debian CVE database against all installed packages on your system
+
+Usage: check_debsecan [OPTIONS]
+
+Arguments:
+ -f warning value for fixed packages | default = 20
+ -F critical value for fixed packages | default = 30
+ -o warning value for obsolete packages | default = 1
+ -O critical value for obsolete packages | default = 1
+ -l warning value for "low urgency" fixes | default = 10
+ -L critical value for "low urgency" fixes | default = 20
+ -m warning value for "medium urgency" fixes | default = 5
+ -M critical value for "medium urgency" fixes | default = 10
+ -u warning value for urgent "high urgency" fixes | default = 1
+ -U critical value for urgent "high urgency" fixes | default = 1
+ -s set the suite parameter manually
+ -P "[proxy-url]" set the proxy manually
+
+Options:
+ -d produces debugging output
+ -r disables the cve/packages report
+ -h print this help
+
+Result:
+OK: (F:7;O:0;H:0;M:3;L:1) - 7 security fixes ready to install found!
+CVE-2016-8864 libdns-export100 (fixed, remotely exploitable, medium urgency)
+CVE-2017-3135 libdns-export100 (fixed)
+CVE-2017-5848 gstreamer1.0-plugins-bad (fixed, remotely exploitable, low urgency)
+TEMP-0000000-1E5903 libgraphicsmagick-q16-3 (fixed)
+CVE-2016-7444 libgnutls-deb0-28 (fixed, remotely exploitable, medium urgency)
+CVE-2017-5334 libgnutls-deb0-28 (fixed)
+CVE-2017-5027 chromium (fixed, remotely exploitable, medium urgency)
+| 'fixed'=7;20;30;0;30 'obsolete'=0;1;1;0;1 'high-urgency'=0;1;1;0;1 'medium-urgency'=3;5;10;0;10 'low-urgency'=1;10;20;0;20
+
+
+The default thresholds of the check are relatively high, so if you want to check for all CVE's just set -f 1 -F 1 so every CVE popping up will force the check to CRITICAL.
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/src/check_debsecan b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/src/check_debsecan
new file mode 100755
index 0000000..25c56fe
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/src/check_debsecan
@@ -0,0 +1,306 @@
+#!/bin/sh
+#
+# check_debsecan
+#
+# Check uses debsecan to query a list of vulnerabilies which affect a particular
+# Debian installation.
+#
+# Copyright (c) 2017 Stefan Schörghofer <amd@4md.gr>
+#
+# This module is free software; you can redistribute it and/or modify it
+# under the terms of GNU general public license (gpl) version 3.
+# See the LICENSE file for details.
+
+# Functions
+debug() {
+ if ${debug} ; then
+ echo "DEBUG: ${1}"
+ fi
+}
+
+error() {
+ echo "ERROR: ${1}"
+ exit 3
+}
+
+print_help() {
+ #### The following line is 80 characters long (helps to fit the help text in a standard terminal)
+ ######--------------------------------------------------------------------------------
+
+ echo
+ echo "Usage: check_debsecan [OPTIONS]"
+ echo
+ echo "Arguments:"
+ echo " -f warning value for fixed packages | default = 20"
+ echo " -F critical value for fixed packages | default = 30"
+ echo " -o warning value for obsolete packages | default = 1"
+ echo " -O critical value for obsolete packages | default = 1"
+ echo " -l warning value for \"low urgency\" fixes | default = 10"
+ echo " -L critical value for \"low urgency\" fixes | default = 20"
+ echo " -m warning value for \"medium urgency\" fixes | default = 5"
+ echo " -M critical value for \"medium urgency\" fixes | default = 10"
+ echo " -u warning value for urgent \"high urgency\" fixes | default = 1"
+ echo " -U critical value for urgent \"high urgency\" fixes | default = 1"
+ echo " -s set the suite parameter manually"
+ echo " -P \"[proxy-url]\" set the proxy manually"
+ echo
+ echo "Options:"
+ echo " -d produces debugging output"
+ echo " -r disables the cve/packages report"
+ echo " -h print this help"
+ echo
+
+ exit 3
+}
+
+argument_check() {
+ debug "Runnig argument check"
+ debug "fixed_warn is set to ${fixed_warn}, fixed_crit is set to ${fixed_crit}"
+ if [ ${fixed_warn} -gt ${fixed_crit} ] ; then
+ error "Value of -F needs to be bigger or equal than value of -f (Warning can't be bigger than critical)"
+ fi
+ debug "obsolete_warn is set to ${obsolete_warn}, obsolete_crit is set to ${obsolete_crit}"
+ if [ ${obsolete_warn} -gt ${obsolete_crit} ] ; then
+ error "Value of -O needs to be bigger or equal than value of -o (Warning can't be bigger than critical)"
+ fi
+ debug "low_urgency_warn is set to ${low_urgency_warn}, low_urgency_crit is set to ${low_urgency_crit}"
+ if [ ${low_urgency_warn} -gt ${low_urgency_crit} ] ; then
+ error "Value of -L needs to be bigger or equal than value of -l (Warning can't be bigger than critical)"
+ fi
+ debug "medium_urgency_warn is set to ${medium_urgency_warn}, medium_urgency_crit is set to ${medium_urgency_crit}"
+ if [ ${medium_urgency_warn} -gt ${medium_urgency_crit} ] ; then
+ error "Value of -M needs to be bigger or equal than value of -m (Warning can't be bigger than critical)"
+ fi
+ debug "high_urgency_warn is set to ${high_urgency_warn}, high_urgency_crit is set to ${high_urgency_crit}"
+ if [ ${high_urgency_warn} -gt ${high_urgency_crit} ] ; then
+ error "Value of -U needs to be bigger or equal than value of -u (Warning can't be bigger than critical)"
+ fi
+}
+
+check_if_numeric() {
+ case $1 in
+ ''|*[!0-9]*)
+ debug "Argument ${1} is not numeric but has to be"
+ echo "ERROR: Argument ${1} has to be numeric"
+ print_help
+ exit 3
+ ;;
+ *)
+ debug "Argument ${1} checked and is numeric"
+ ;;
+ esac
+}
+
+print_perfdata() {
+ echo "| 'fixed'=${fixed_num};${fixed_warn};${fixed_crit};0;${fixed_crit} 'obsolete'=${obsolete_num};${obsolete_warn};${obsolete_crit};0;${obsolete_crit} 'high-urgency'=${high_urgency_num};${high_urgency_warn};${high_urgency_crit};0;${high_urgency_crit} 'medium-urgency'=${medium_urgency_num};${medium_urgency_warn};${medium_urgency_crit};0;${medium_urgency_crit} 'low-urgency'=${low_urgency_num};${low_urgency_warn};${low_urgency_crit};0;${low_urgency_crit}"
+}
+
+print_numbers() {
+ echo -n "(F:${fixed_num};O:${obsolete_num};H:${high_urgency_num};M:${medium_urgency_num};L:${low_urgency_num})"
+}
+
+print_report() {
+ if ${critical} || ${warning} ; then
+ if ${report} ; then
+ cat ${debsecan_report}
+ fi
+ fi
+}
+
+cleanup() {
+ rm ${debsecan_report}
+}
+
+myexit() {
+ if ${critical} ; then
+ cleanup
+ exit 2
+ elif ${warning} ; then
+ cleanup
+ exit 1
+ else
+ cleanup
+ exit 0
+ fi
+}
+
+# Checks to execute before wasting CPU-Cycles
+# Checking for needed debsecan binary
+if ! [ -x /usr/bin/debsecan ] ; then
+ echo "ERROR: debsecan not found"
+ exit 3
+fi
+
+# Vars
+suite=$(grep "PRETTY_NAME" /etc/os-release | cut -d "(" -f 2 | cut -d ")" -f 1)
+fixed_warn=20
+fixed_crit=30
+obsolete_warn=1
+obsolete_crit=1
+low_urgency_warn=10
+low_urgency_crit=20
+medium_urgency_warn=5
+medium_urgency_crit=10
+high_urgency_warn=1
+high_urgency_crit=1
+debug=false
+report=true
+critical=false
+warning=false
+
+case ${suite} in
+ buzz|rex|bo|hamm|slink|potato)
+ echo "ERROR: The suite you are using is to old. Please upgrade to something newer, like Woody"
+ exit 3
+ ;;
+ stretch)
+ debug "Stretch is not supported at the moment. Switching suite to sid."
+ suite="sid"
+ ;;
+esac
+
+while getopts "dP:hf:F:o:O:l:L:m:M:u:U:s:r" opt; do
+ case ${opt} in
+ h)
+ print_help
+ ;;
+ d)
+ debug=true
+ debug "-d given, enabling debug"
+ ;;
+ f)
+ debug "Warning parameter for fixed triggered - setting to ${OPTARG}"
+ check_if_numeric ${OPTARG}
+ fixed_warn=${OPTARG}
+ ;;
+ F)
+ debug "Critical parameter for fixed triggered - setting to ${OPTARG}"
+ check_if_numeric ${OPTARG}
+ fixed_crit=${OPTARG}
+ ;;
+ o)
+ debug "Warning parameter for obsolete triggered - setting to ${OPTARG}"
+ check_if_numeric ${OPTARG}
+ obsolete_warn=${OPTARG}
+ ;;
+ O)
+ debug "Critical parameter for obsolete triggered - setting to ${OPTARG}"
+ check_if_numeric ${OPTARG}
+ obsolete_crit=${OPTARG}
+ ;;
+ l)
+ debug "Warning parameter for low urgency fixes triggered - setting to ${OPTARG}"
+ check_if_numeric ${OPTARG}
+ low_urgency_warn=${OPTARG}
+ ;;
+ L)
+ debug "Critical parameter for low urgency fixes triggered - setting to ${OPTARG}"
+ check_if_numeric ${OPTARG}
+ low_urgency_crit=${OPTARG}
+ ;;
+ m)
+ debug "Warning parameter for medium urgency fixes triggered - setting to ${OPTARG}"
+ check_if_numeric ${OPTARG}
+ medium_urgency_warn=${OPTARG}
+ ;;
+ M)
+ debug "Critical parameter for medium urgency fixes triggered - setting to ${OPTARG}"
+ check_if_numeric ${OPTARG}
+ medium_urgency_crit=${OPTARG}
+ ;;
+ u)
+ debug "Warning parameter for high urgency fixes triggered - setting to ${OPTARG}"
+ check_if_numeric ${OPTARG}
+ high_urgency_warn=${OPTARG}
+ ;;
+ U)
+ debug "Critical parameter for high urgency fixes triggered - setting to ${OPTARG}"
+ check_if_numeric ${OPTARG}
+ high_urgency_crit=${OPTARG}
+ ;;
+ r)
+ report=false
+ debug "-r given, disabling report"
+ ;;
+ s)
+ debug "Forcing suite to ${OPTARG} because parameter was given"
+ suite=${OPTARG}
+ ;;
+ P)
+ debug "Forcing proxy-setting to ${OPTARG}"
+ export http_proxy="${OPTARG}"
+ export https_proxy="${OPTARG}"
+ ;;
+ \?)
+ echo "ERROR: Invalid option ${OPTARG}"
+ exit 3
+ ;;
+ :)
+ echo "ERROR: Option -${OPTARG} requires an argument."
+ exit 3
+ ;;
+ esac
+done
+argument_check
+
+# Creating tempfile to store data
+debsecan_report=$(mktemp)
+
+# Execute debsecan
+debsecan --suite ${suite} --only-fixed >> ${debsecan_report}
+# Checking results
+if [ $? -ne 0 ] ; then
+ echo "ERROR: Problem executing debsecan. Check if your host is allowed to connect to the internet."
+ echo " If a proxy server should be used please export the http_proxy variable."
+ exit 3
+fi
+
+# Counting, printing and checking
+fixed_num=$(grep -E '[(, ]fixed[), ]' ${debsecan_report} | wc -l)
+obsolete_num=$(grep '[( ]obsolete[), ]' ${debsecan_report} | wc -l)
+low_urgency_num=$(grep '[( ]low urgency[), ]' ${debsecan_report} | wc -l)
+medium_urgency_num=$(grep '[( ]medium urgency[), ]' ${debsecan_report} | wc -l)
+high_urgency_num=$(grep '[( ]high urgency[), ]' ${debsecan_report} | wc -l)
+
+# Check for criticals
+if [ ${fixed_num} -ge ${fixed_crit} ] ; then
+ echo "CRITICAL: $(print_numbers) - ${fixed_num} security fixes ready to install found!"
+ critical=true
+elif [ ${obsolete_num} -ge ${obsolete_crit} ] ; then
+ echo "CRITICAL: $(print_numbers) - ${obsolete_num} obsolete package(s) found!"
+ critical=true
+elif [ ${high_urgency_num} -ge ${high_urgency_crit} ] ; then
+ echo "CRITICAL: $(print_numbers) - ${high_urgency_num} high urgency fixes ready to install found!"
+ critical=true
+elif [ ${medium_urgency_num} -ge ${medium_urgency_crit} ] ; then
+ echo "CRITICAL: $(print_numbers) - ${medium_urgency_num} medium urgency fixes ready to install found!"
+ critical=true
+elif [ ${low_urgency_num} -ge ${low_urgency_crit} ] ; then
+ echo "CRITICAL: $(print_numbers) - ${low_urgency_num} low urgency fixes ready to install found!"
+ critical=true
+
+# Check for warnings
+elif [ ${fixed_num} -ge ${fixed_warn} ] ; then
+ echo "WARNING: $(print_numbers) - ${fixed_num} security fixes ready to install found!"
+ warning=true
+elif [ ${obsolete_num} -ge ${obsolete_warn} ] ; then
+ echo "WARNING: $(print_numbers) - ${obsolete_num} obsolete package(s) found!"
+ warning=true
+elif [ ${high_urgency_num} -ge ${high_urgency_warn} ] ; then
+ echo "WARNING: $(print_numbers) - ${high_urgency_num} high urgency fixes ready to install found!"
+ warning=true
+elif [ ${medium_urgency_num} -ge ${medium_urgency_warn} ] ; then
+ echo "WARNING: $(print_numbers) - ${medium_urgency_num} medium urgency fixes ready to install found!"
+ warning=true
+elif [ ${low_urgency_num} -ge ${low_urgency_warn} ] ; then
+ echo "WARNING: $(print_numbers) - ${low_urgency_num} low urgency fixes ready to install found!"
+ warning=true
+else
+ # Everything OK
+ echo "OK: $(print_numbers) - There are ${fixed_num} security fixes to install and ${obsolete_num} obsolete packages to remove"
+fi
+
+print_report
+print_perfdata
+myexit
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/tests b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/tests
new file mode 100644
index 0000000..57e7020
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_debsecan/tests
@@ -0,0 +1,2 @@
+Depends: debsecan
+Test-Command: /usr/lib/nagios/plugins/check_debsecan -f 9998 -F 9999 -o 9998 -O 9999 -l 9998 -L 9999 -m 9998 -M 9999 -u 9998 -U 9999 -r
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/Makefile
new file mode 100644
index 0000000..cf9673d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/Makefile
@@ -0,0 +1,3 @@
+#/usr/bin/make -f
+
+include ../common.mk
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/check_drbd b/nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/check_drbd
new file mode 100644
index 0000000..aeda397
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/check_drbd
@@ -0,0 +1,456 @@
+#!/usr/bin/perl -w
+
+####################################################
+# check_drbd v0.5.3 #
+# by Brandon Lee Poyner bpoyner / CCAC.edu #
+####################################################
+
+use strict;
+use File::Basename;
+use Getopt::Long;
+
+my $drbd_proc='/proc/drbd';
+my $drbd_devices=0;
+my ($drbd_expect, $drbd_role, $drbd_version, $debug_mode);
+my (%options, %cs, %st, %ld, %ds, %check, %warning, %critical);
+
+my $prog_name=basename($0);
+my $prog_revision='0.5.3';
+
+my %errorcodes = (
+ 'OK' => { 'retvalue' => 0 },
+ 'WARNING' => { 'retvalue' => 1 },
+ 'CRITICAL' => { 'retvalue' => 2 },
+ 'UNKNOWN' => { 'retvalue' => 3 }
+);
+
+#
+# Define various states and default alarm values
+#
+my %state = (
+ 'Primary' => { 'value' => 'OK', 'type' => 'st' },
+ 'Secondary' => { 'value' => 'OK', 'type' => 'st' },
+ 'Unknown' => { 'value' => 'CRITICAL', 'type' => 'st' },
+ 'StandAlone' => { 'value' => 'WARNING', 'type' => 'cs' },
+ 'Unconnected' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ 'Timeout' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ 'BrokenPipe' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ 'WFConnection' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ 'WFReportParams' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ 'Connected' => { 'value' => 'OK', 'type' => 'cs' },
+ 'Unconfigured' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ # DRBD 0.6
+ 'SyncingAll' => { 'value' => 'WARNING', 'type' => 'cs' },
+ 'SyncingQuick' => { 'value' => 'WARNING', 'type' => 'cs' },
+ 'SyncPaused' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ # DRBD 0.7
+ 'WFBitMapS' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ 'WFBitMapT' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ 'SyncSource' => { 'value' => 'WARNING', 'type' => 'cs' },
+ 'SyncTarget' => { 'value' => 'WARNING', 'type' => 'cs' },
+ 'PausedSyncS' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ 'PausedSyncT' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ 'NetworkFailure' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ 'SkippedSyncS' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ 'SkippedSyncT' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ 'Consistent' => { 'value' => 'OK', 'type' => 'ld' },
+ 'Inconsistent' => { 'value' => 'CRITICAL', 'type' => 'ld' },
+ # DRBD 8.0
+ 'UpToDate' => { 'value' => 'OK', 'type' => 'ds' },
+ 'Consistent' => { 'value' => 'OK', 'type' => 'ds' },
+ 'Negotiating' => { 'value' => 'WARNING', 'type' => 'ds' },
+ 'Attaching' => { 'value' => 'WARNING', 'type' => 'ds' },
+ 'Diskless' => { 'value' => 'CRITICAL', 'type' => 'ds' },
+ 'Failed' => { 'value' => 'CRITICAL', 'type' => 'ds' },
+ 'Outdated' => { 'value' => 'CRITICAL', 'type' => 'ds' },
+ 'Inconsistent' => { 'value' => 'CRITICAL', 'type' => 'ds' },
+ 'DUnknown' => { 'value' => 'CRITICAL', 'type' => 'ds' },
+ # DRBD 8.2
+ 'VerifyS' => { 'value' => 'WARNING', 'type' => 'cs' },
+ 'VerifyT' => { 'value' => 'WARNING', 'type' => 'cs' },
+ # DRBD 8.3
+ 'Disconnecting' => { 'value' => 'WARNING', 'type' => 'cs' },
+ 'ProtocolError' => { 'value' => 'CRITICAL', 'type' => 'cs' },
+ 'TearDown' => { 'value' => 'WARNING', 'type' => 'cs' },
+ 'StartingSyncS' => { 'value' => 'WARNING', 'type' => 'cs' },
+ 'StartingSyncT' => { 'value' => 'WARNING', 'type' => 'cs' },
+ 'WFSyncUUID' => { 'value' => 'WARNING', 'type' => 'cs' }
+);
+
+&parse_options;
+&parse_proc;
+&parse_drbd_devices;
+&check_drbd_state;
+&report_status;
+&myexit('UNKNOWN',"$prog_name should never reach here");
+
+sub print_usage {
+ print <<EOF
+Usage: $prog_name [-d <All|Configured|...>] [-e expect] [-p proc] [-r role] [-o states] [-w states] [-c states] [--debug]
+ Options:
+ -d STRING [default: $drbd_devices. Example: 0,1,2 ]
+ -p STRING [default: $drbd_proc. Use '-' for stdin]
+ -e STRING [Must be this connected state. Example: Connected]
+ -r STRING [Must be this node state. Example: Primary]
+ -o STRING [Change value to OK. Example: StandAlone]
+ -w STRING [Change value to WARNING. Example: SyncingAll]
+ -c STRING [Change value to CRITICAL. Example: Inconsistent,WFConnection]
+EOF
+}
+
+sub print_revision {
+ print <<EOF;
+$prog_name $prog_revision
+
+The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
+copies of the plugins under the terms of the GNU General Public License.
+For more information about these matters, see the file named COPYING.
+EOF
+
+}
+
+sub print_help {
+ &print_revision;
+ print "\n";
+ &print_usage;
+ print <<EOF;
+
+Send email to nagios-users\@lists.sourceforge.net if you have questions
+regarding use of this software. To submit patches or suggest improvements,
+send email to bpoyner\@ccac.edu
+EOF
+ exit $errorcodes{'UNKNOWN'}->{'retvalue'};
+}
+
+sub parse_options {
+ my ($help, $version, $debug, $ok_string, $warning_string,
+ $critical_string);
+ #
+ # Get command line options
+ #
+ GetOptions("h|help" => \$help,
+ "V|version" => \$version,
+ "d|device|devices=s" => \$drbd_devices,
+ "e|expect=s" => \$drbd_expect,
+ "p|proc=s" => \$drbd_proc,
+ "r|role=s" => \$drbd_role,
+ "o|ok=s" => \$ok_string,
+ "w|warning=s" => \$warning_string,
+ "c|critical=s" => \$critical_string,
+ "debug" => \$debug);
+ if (defined($help) && ($help ne "")) {
+ &print_help;
+ exit $errorcodes{'UNKNOWN'}->{'retvalue'};
+ }
+ if (defined($version) && ($version ne "")) {
+ &print_revision;
+ exit $errorcodes{'UNKNOWN'}->{'retvalue'};
+ }
+ if (defined($drbd_expect) && ($drbd_expect ne "")) {
+ # User requested the connected state to be very specific
+ &change_values($drbd_expect,'cs','expect','connected state');
+ }
+ if (defined($drbd_role) && ($drbd_role ne "")) {
+ # User requested the node state to be very specific
+ &change_values($drbd_role,'st','role','node state');
+ }
+ if (defined($ok_string) && ($ok_string ne "")) {
+ # User requested certain values to be OK
+ &set_values($ok_string,'OK');
+ }
+ if (defined($warning_string) && ($warning_string ne "")) {
+ # User requested certain values to be WARNING
+ &set_values($warning_string,'WARNING');
+ }
+ if (defined($critical_string) && ($critical_string ne "")) {
+ # User requested certain values to be CRITICAL
+ &set_values($critical_string,'CRITICAL');
+ }
+ if (defined($debug) && ($debug ne "")) {
+ #
+ # Debugging information
+ #
+ $debug_mode=1;
+ print STDERR "<$prog_name settings>\n";
+ print STDERR "DRBD Devices: $drbd_devices\n";
+ printf STDERR "DRBD Proc: %s\n", defined($drbd_proc)?$drbd_proc:"";
+ printf STDERR "DRBD Expect: %s\n", defined($drbd_expect)?$drbd_expect:"";
+ printf STDERR "DRBD Role: %s\n", defined($drbd_role)?$drbd_role:"";
+ my (@ok, @critical, @warning);
+ for my $key ( keys %state ) {
+ if ($state{$key}->{'value'} eq 'OK') {
+ push(@ok,$key);
+ }
+ if ($state{$key}->{'value'} eq 'WARNING') {
+ push(@warning,$key);
+ }
+ if ($state{$key}->{'value'} eq 'CRITICAL') {
+ push(@critical,$key);
+ }
+ }
+ printf STDERR "DRBD OK: %s\n", join(" ",sort(@ok));
+ printf STDERR "DRBD WARNING: %s\n", join(" ",sort(@warning));
+ printf STDERR "DRBD CRITICAL: %s\n", join(" ",sort(@critical));
+ print STDERR "</$prog_name settings>\n";
+ }
+}
+
+sub parse_proc {
+ #
+ # Read in contents of proc file, feed results into hashes
+ #
+ my $input;
+ if ( $drbd_proc ne "-" ) {
+ $input = "DRBD";
+ if ( ! -e $drbd_proc ) {
+ &myexit('UNKNOWN',"No such file $drbd_proc");
+ }
+ open(DRBD, "$drbd_proc") ||
+ &myexit('UNKNOWN',"Could not open $drbd_proc");
+ } else {
+ $input = "STDIN";
+ }
+ while(<$input>) {
+ if (/^version: (\d+).(\d+)/) {
+ $drbd_version = "$1.$2";
+ }
+ if (/^\s?(\d+):.* cs:(\w+)/) {
+ $cs{$1} = $2;
+ }
+ if (/^\s?(\d+):.* st:(\w+)\//) {
+ $st{$1} = $2;
+ }
+ if (/^\s?(\d+):.* ld:(\w+)/) {
+ $ld{$1} = $2;
+ }
+ if (/^\s?(\d+):.* ds:(\w+)/) {
+ $ds{$1} = $2;
+ }
+ }
+ if ( $drbd_proc ne "-" ) {
+ close(DRBD);
+ }
+ if (defined($debug_mode) && ($debug_mode == 1)) {
+ #
+ # Debugging information
+ #
+ print STDERR "<$prog_name devices found>\n";
+ for my $key ( sort keys %cs ) {
+ printf STDERR "Found Device $key $cs{$key}%s%s%s\n", defined($st{$key})?" $st{$key}":"", defined($ld{$key})?" $ld{$key}":"", defined($ds{$key})?" $ds{$key}":"";
+ }
+ print STDERR "</$prog_name devices found>\n";
+ }
+}
+
+sub parse_drbd_devices {
+ #
+ # Determine which DRBD devices to monitor
+ #
+ my @devices;
+ if ($drbd_devices =~ /^all$/i) {
+ for my $device ( keys %cs ) {
+ push(@devices,$device);
+ }
+ } elsif ($drbd_devices =~ /^configured$/i) {
+ for my $device ( keys %cs ) {
+ next if ($cs{$device} eq "Unconfigured");
+ push(@devices,$device);
+ }
+ } else {
+ @devices = split(/,/,$drbd_devices);
+ }
+ foreach my $device (@devices) {
+ if (!(defined($cs{$device}))) {
+ &myexit('UNKNOWN',"Could not find device $device");
+ }
+ $check{$device} = 1;
+ }
+ if (int(keys %check) == 0) {
+ &myexit('UNKNOWN',"No configured devices found");
+ }
+ if (defined($debug_mode) && ($debug_mode == 1)) {
+ #
+ # Debugging information
+ #
+ print STDERR "<$prog_name devices to check>\n";
+ for my $key ( sort keys %check ) {
+ printf STDERR "Checking enabled for device $key\n";
+ }
+ print STDERR "</$prog_name devices to check>\n";
+ }
+}
+
+sub check_drbd_state {
+ for my $drbd_device ( sort keys %check ) {
+ if ((defined($drbd_version)) && ($drbd_version >= '8.0')) {
+ #
+ # We're dealing with version 8.0 or greater
+ # Set data state
+ #
+ if ((defined($ds{$drbd_device})) &&
+ (defined($state{$ds{$drbd_device}}))) {
+ $state{$ds{$drbd_device}}->{$drbd_device}->{'level'} = 1;
+ } elsif (defined($ds{$drbd_device})) {
+ &myexit('CRITICAL',"Data state unknown value '$ds{$drbd_device}' for device $drbd_device");
+ }
+ }
+ if ((defined($drbd_version)) && ($drbd_version == '0.7')) {
+ #
+ # We're dealing with version 0.7
+ # Set local data consistency
+ #
+ if ((defined($ld{$drbd_device})) &&
+ (defined($state{$ld{$drbd_device}}))) {
+ $state{$ld{$drbd_device}}->{$drbd_device}->{'level'} = 1;
+ } elsif (defined($ld{$drbd_device})) {
+ &myexit('CRITICAL',"Local data consistency unknown value '$ld{$drbd_device}' for device $drbd_device");
+ }
+ }
+ #
+ # Check for a state value (Primary, Secondary, etc)
+ #
+ if ((defined($st{$drbd_device})) &&
+ (defined($state{$st{$drbd_device}}))) {
+ $state{$st{$drbd_device}}->{$drbd_device}->{'level'} = 1;
+ } elsif (defined($st{$drbd_device})) {
+ &myexit('CRITICAL',"Node state unknown value '$st{$drbd_device}' for device $drbd_device");
+ }
+ #
+ # Check for a connected state value (Connected, StandAlone, etc)
+ #
+ if (defined($state{$cs{$drbd_device}})) {
+ $state{$cs{$drbd_device}}->{$drbd_device}->{'level'} = 1;
+ } else {
+ &myexit('CRITICAL',"Connection state unknown value '$cs{$drbd_device}' for device $drbd_device");
+ }
+ #
+ # Debugging information
+ #
+ if (defined($debug_mode) && ($debug_mode == 1)) {
+ print STDERR "<$prog_name device $drbd_device status>\n";
+ for my $key ( keys %state ) {
+ if (defined($state{$key}->{$drbd_device}->{'level'})) {
+ print STDERR "$key $state{$key}->{'value'}\n";
+ }
+ }
+ print STDERR "</$prog_name device $drbd_device status>\n";
+ }
+ #
+ # Determine if any values are CRITICAL or WARNING
+ #
+ for my $key ( keys %state ) {
+ if (defined($state{$key}->{$drbd_device}->{'level'})) {
+ if ($state{$key}->{'value'} eq "CRITICAL") {
+ $critical{$drbd_device} = 1;
+ }
+ if ($state{$key}->{'value'} eq "WARNING") {
+ $warning{$drbd_device} = 1;
+ }
+ }
+ }
+ }
+}
+
+sub report_status {
+ my $message;
+ my $critical_count=int(keys %critical);
+ my $warning_count=int(keys %warning);
+ if ($critical_count > 0) {
+ #
+ # We found a CRITICAL situation
+ #
+ my $i = 0;
+ for my $device (sort keys %critical) {
+ $message.=sprintf("Device %d%s $cs{$device}%s%s", $device,defined($st{$device})?" $st{$device}":"",defined($ld{$device})?" $ld{$device}":"",defined($ds{$device})?" $ds{$device}":"");
+ $i++;
+ if ($i != $critical_count) {
+ $message.=", ";
+ }
+ }
+ &myexit('CRITICAL',$message);
+ } elsif ($warning_count > 0) {
+ #
+ # We found a WARNING situation
+ #
+ my $i = 0;
+ for my $device (sort keys %warning) {
+ $message.=sprintf("Device %d%s $cs{$device}%s%s", $device,defined($st{$device})?" $st{$device}":"",defined($ld{$device})?" $ld{$device}":"",defined($ds{$device})?" $ds{$device}":"");
+ $i++;
+ if ($i != $warning_count) {
+ $message.=", ";
+ }
+ }
+ &myexit('WARNING',$message);
+ } else {
+ #
+ # Everything checks out OK
+ #
+ my $device_count=int(keys %check);
+ if ($device_count == 1) {
+ for my $device ( sort keys %check ) {
+ $message=sprintf("Device %d%s $cs{$device}%s%s", $device,defined($st{$device})?" $st{$device}":"",defined($ld{$device})?" $ld{$device}":"",defined($ds{$device})?" $ds{$device}":"");
+ }
+ } else {
+ my $i = 0;
+ for my $device ( sort keys %check ) {
+ $message.=sprintf("Dev %d %0.3s%0.3s%0.3s%0.3s", $device,defined($st{$device})?"$st{$device}":"",$cs{$device},defined($ld{$device})?"$ld{$device}":"",defined($ds{$device})?"$ds{$device}":"");
+ $i++;
+ if ($i != $device_count) {
+ $message.=", ";
+ }
+ }
+ }
+ &myexit('OK',$message);
+ }
+}
+
+sub set_values {
+ #
+ # Set item to value requested
+ #
+ my ($items,$value) = @_;
+ my @items = split(/,/,$items);
+ foreach my $item (@items) {
+ if (defined($state{$item})) {
+ $state{$item}->{'value'} = "$value";
+ } else {
+ print STDERR "State '$item' not found\n";
+ }
+ }
+}
+
+sub change_values {
+ #
+ # Look for all values of a given type, set requested value to OK
+ # and all other values to CRITICAL
+ #
+ my ($argument,$type,$error1,$error2) = @_;
+ if ((defined($state{$argument})) &&
+ ($state{$argument}->{'type'} eq "$type")) {
+ for my $key ( keys %state ) {
+ if ($state{$key}->{'type'} eq "$type") {
+ if ($key eq $argument) {
+ &set_values($argument,'OK');
+ } else {
+ &set_values($key,'CRITICAL');
+ }
+ }
+ }
+ } else {
+ &myexit('UNKNOWN',"$error1 option only works for $error2");
+ }
+}
+
+sub myexit {
+ #
+ # Print error message and exit
+ #
+ my ($error, $message) = @_;
+ if (!(defined($errorcodes{$error}))) {
+ printf STDERR "Error code $error not known\n";
+ print "DRBD UNKNOWN: $message\n";
+ exit $errorcodes{'UNKNOWN'}->{'retvalue'};
+ }
+ print "DRBD $error: $message\n";
+ exit $errorcodes{$error}->{'retvalue'};
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/control
new file mode 100644
index 0000000..89f93c1
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/control
@@ -0,0 +1,7 @@
+Homepage: https://exchange.icinga.org/oldmonex/512-check_drbd/
+Watch: https://exchange.icinga.org/oldmonex/512-check_drbd/check_drbd prog_revision='([0-9.]+)';
+Uploaders: Jan Wagner <waja@cyconet.org>
+Description: plugin to check DRBD device states
+ This plugin is for checking DRBD device states. It parses the
+ /proc/drbd device and analyses the output.
+Version: 0.5.3
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/copyright
new file mode 100644
index 0000000..6e32738
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_drbd/copyright
@@ -0,0 +1,7 @@
+Copyright (C) Brandon Lee Poyner <bpoyner@ccac.edu>
+
+The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
+copies of the plugins under the terms of the GNU General Public License.
+
+On Debian systems, the complete text of the GNU General
+Public License version 1 can be found in "/usr/share/common-licenses/GPL-1".
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/Makefile
new file mode 100644
index 0000000..54fe593
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/Makefile
@@ -0,0 +1,14 @@
+#/usr/bin/make -f
+
+PLUGIN = $(wildcard src/check_*) $(wildcard src/imap_ssl_*)
+MANPAGES = $(shell find src/docs -regex '[^ ]*.pod' -printf '%f\n' | sed 's,pod$$,7,')
+DOCFILES = src/docs/*.html src/docs/*.txt src/README.txt
+CLEANFILES = $(MANPAGES)
+
+include ../common.mk
+
+
+%.7: src/docs/%.pod
+ pod2man -s 7 $< > $@
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/CHANGES.txt b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/CHANGES.txt
new file mode 100644
index 0000000..05626d6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/CHANGES.txt
@@ -0,0 +1,15 @@
+2005-11-10
+* published
+2005-05-10
+* received patches from Johan Nilsson <johann (at) axis.com>
+2006-07-20
+* received patches from Geoff Crompton <geoff.crompton@strategicdata.com.au>
+2007-04-24
+* packaged ePN version of the plugins -- the __END__ block for embedded documentation was causing an error because of the way ePN wraps the perl scripts. see http://nagios.sourceforge.net/docs/2_0/embeddedperl.html
+* added SSL support using patch from Benjamin Ritcey <ben@ritcey.com>
+2007-10-21
+* added TLS support for SMTP using Net::SMTP::TLS
+* added SSL support for SMTP using Net::SMTP::SSL, but NOTE that I don't have access to an SMTPS server so I cannot test this.
+2007-12-04
+* small fix with SSL support for IMAP related to bugfix in Mail::IMAPClient 3.00 over 2.2.9 thanks to Seth P. Low <low@modog.com>
+* added --usage option to all three plugins for familiarity with the official nagios plugins
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/LICENSE.txt b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/LICENSE.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/LICENSE.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/README.txt b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/README.txt
new file mode 100644
index 0000000..6367b93
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/README.txt
@@ -0,0 +1,77 @@
+This file was updated on Sun Oct 21 21:32:12 PDT 2007.
+
+Developer guidelines:
+http://nagiosplug.sourceforge.net/developer-guidelines.html
+
+Nagios Plugins:
+http://nagiosplugins.org/
+ Nagios: http://nagios.org and http://nagiosplug.sourceforge.net
+
+Perl library: http://search.cpan.org/dist/Nagios-Plugin/lib/Nagios/Plugin.pm
+
+The email delivery plugin I wrote uses two other plugins
+(smtp send and imap receive), also included, to send a message
+to an email account and then check that account for the message
+and delete it. The plugin times how long it takes for the
+message to be delivered and the warning and critical thresholds
+are for this elapsed time.
+
+A few notes:
+
+1. I tried to use the check_smtp plugin for sending mail. I
+can do it on the command line but I can't get the newlines to
+happen from the nagios config file (\n doesn't seem to work so smtp
+server waits for the '.' but doesn't get it like it does when I
+use single quote and newlines from the command line). So if
+you know how to get the check_smtp plugin to send a message from
+the nagios config, that one could be used instead of the
+check_smtp_send plugin included here (and please let me know)
+
+
+2. I looked at check_mail.pl by bledi51 and its pretty good,
+and also conforms better to nagios perl plugin guidelnes than
+mine does. So I'm going to be revising my plugins to conform
+more.
+
+
+
+
+
+
+Finally, usage example from my own nagios config:
+
+define command{
+ command_name check_email_delivery
+ command_line $USER1$/check_email_delivery -H $HOSTADDRESS$ --mailfrom $ARG3$ --mailto $ARG4$ --username $ARG5$ --password $ARG6$ --libexec $USER1$ -w $ARG1$ -c $ARG2$
+ }
+
+define service{
+ use generic-service
+ host_name mail.your.net
+ service_description EMAIL DELIVERY
+ check_command check_email_delivery!5!120!sender@your.net!recipient@your.net!recipient@your.net!password
+ }
+
+
+A new usage example equivalent to the old one but using the new --plugins and --token options:
+
+define command{
+ command_name check_email_delivery
+ command_line $USER1$/check_email_delivery -p '$USER1$/check_smtp_send -H $HOSTADDRESS$ --mailfrom $ARG3$ --mailto $ARG4$ -U $ARG5$ -P $ARG6$ --subject "Nagios %TOKEN1%" -w $ARG1$ -c $ARG2$' -p '$USER1$/check_imap_receive -H $HOSTADDRESS$ -U $ARG5$ -P $ARG6$ -s SUBJECT -s "Nagios %TOKEN1%" -w $ARG1$ -c $ARG2$' -w $ARG1$,$ARG1$ -c $ARG2$,$ARG2$
+ }
+
+define service{
+ use generic-service
+ host_name mail.your.net
+ service_description EMAIL DELIVERY
+ check_command check_email_delivery!5!120!sender@your.net!recipient@your.net!recipient@your.net!password
+ }
+
+
+References to similar plugins:
+
+pop3(s) email matching plugin by kkvenkit
+check_mail.pl by bledi51
+check_email_loop.pl by ryanwilliams
+check_pop.pl and check_imap.pl by http://www.jhweiss.de/software/nagios.html
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_email_delivery b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_email_delivery
new file mode 100644
index 0000000..689d619
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_email_delivery
@@ -0,0 +1,970 @@
+#!/usr/bin/perl
+use strict;
+my $VERSION = '0.7.1';
+my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
+my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt';
+my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 );
+
+# look for required modules
+exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long/);
+
+BEGIN {
+ if( grep { /^--hires$/ } @ARGV ) {
+ eval "use Time::HiRes qw(time);";
+ warn "Time::HiRes not installed\n" if $@;
+ }
+}
+
+# get options from command line
+Getopt::Long::Configure("bundling");
+my $verbose = 0;
+my $help = "";
+my $help_usage = "";
+my $show_version = "";
+my $host = "";
+my $smtp_server = "";
+my $smtp_port = "";
+my $imap_server = "";
+my $smtp_username = "";
+my $smtp_password = "";
+my $smtp_tls = "";
+my $imap_port = "";
+my $imap_username = "";
+my $imap_password = "";
+my $imap_mailbox = "";
+my $username = "";
+my $password = "";
+my $ssl = "";
+my $imap_ssl = "";
+my $mailto = "";
+my $mailfrom = "";
+my @header = ();
+my $body = "";
+my $warnstr = "";
+my $critstr = "";
+my $waitstr = "";
+my $delay_warn = 95;
+my $delay_crit = 300;
+my $smtp_warn = 15;
+my $smtp_crit = 30;
+my $imap_warn = 15;
+my $imap_crit = 30;
+my $timeout = "";
+my @alert_plugins = ();
+my $imap_interval = 5;
+my $imap_retries = 5;
+my @plugins = ();
+my @token_formats = ();
+my $tokenfile = "";
+my $default_crit = 30;
+my $default_warn = 15;
+my $default_wait = 5;
+my $default_timeout = 60;
+my $time_hires = "";
+my $libexec = "/usr/local/nagios/libexec";
+my $ok;
+$ok = Getopt::Long::GetOptions(
+ "V|version"=>\$show_version,
+ "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage,
+ "w|warning=s"=>\$warnstr,"c|critical=s"=>\$critstr, "t|timeout=s"=>\$timeout,
+ "libexec=s"=>\$libexec,
+ # plugin settings
+ "p|plugin=s"=>\@plugins, "T|token=s"=>\@token_formats,
+ "A|alert=i"=>\@alert_plugins,
+ "F|file=s"=>\$tokenfile,
+ # common settings
+ "H|hostname=s"=>\$host,
+ "U|username=s"=>\$username,"P|password=s"=>\$password,
+ "ssl!"=>\$ssl,
+ # smtp settings
+ "smtp-server=s"=>\$smtp_server,"smtp-port=i"=>\$smtp_port,
+ "mailto=s"=>\$mailto, "mailfrom=s",\$mailfrom,
+ "header=s"=>\@header, "body=s"=>\$body,
+ # smtp-tls settings
+ "smtptls!"=>\$smtp_tls,
+ "smtp-username=s"=>\$smtp_username,"smtp-password=s"=>\$smtp_password,
+ # delay settings
+ "wait=s"=>\$waitstr,
+ # imap settings
+ "imap-server=s"=>\$imap_server,"imap-port=i"=>\$imap_port,
+ "imap-username=s"=>\$imap_username,"imap-password=s"=>\$imap_password,
+ "imap-mailbox=s"=>\$imap_mailbox,
+ "imap-check-interval=i"=>\$imap_interval,"imap-retries=i"=>\$imap_retries,
+ "imapssl!"=>\$imap_ssl,
+ # Time
+ "hires"=>\$time_hires,
+ );
+
+if( $show_version ) {
+ print "$VERSION\n";
+ if( $verbose ) {
+ print "Warning threshold: $delay_warn seconds\n";
+ print "Critical threshold: $delay_crit seconds\n";
+ print "Default wait: $default_wait seconds\n";
+ print "Default timeout: $default_timeout seconds\n";
+ }
+ exit $status{UNKNOWN};
+}
+
+if( $help ) {
+ exec "perldoc", $0 or print "Try `perldoc $0`\n";
+ exit $status{UNKNOWN};
+}
+
+if( $host ) {
+ $smtp_server = $host if $smtp_server eq "";
+ $imap_server = $host if $imap_server eq "";
+}
+
+if( $username ) {
+ $smtp_username = $username if $smtp_username eq "";
+ $imap_username = $username if $imap_username eq "";
+}
+
+if( $password ) {
+ $smtp_password = $password if $smtp_password eq "";
+ $imap_password = $password if $imap_password eq "";
+}
+
+if( $ssl ) {
+ $imap_ssl = $ssl if $imap_ssl eq "";
+ $smtp_tls = $ssl if $smtp_tls eq "";
+}
+
+if( $help_usage
+ ||
+ (
+ scalar(@plugins) == 0
+ &&
+ (
+ $smtp_server eq "" || $mailto eq "" || $mailfrom eq ""
+ || $imap_server eq "" || $username eq "" || $password eq ""
+ )
+ )
+ ) {
+ print "Usage 1: $0 -H host \n\t".
+ "--mailto recipient\@your.net --mailfrom sender\@your.net --body 'message' \n\t".
+ "--username username --password password \n\t".
+ "[-w <seconds>] [-c <seconds>]\n\t" .
+ "[--imap-check-interval <seconds> ] [--imap-retries <times> ]\n";
+ print "Usage 2: $0 \n\t".
+ "-p 'first plugin command with %TOKEN1% embedded' \n\t".
+ "-p 'second plugin command with %TOKEN1% embedded' \n\t".
+ "[-w <seconds1>,<seconds2>] [-c <seconds1>,<seconds2>] \n";
+ exit $status{UNKNOWN};
+}
+
+# determine thresholds
+my @warning_times = split(",", $warnstr);
+my @critical_times = split(",", $critstr);
+my @alarm_times = split(",", $timeout);
+my @wait_times = split(",", $waitstr);
+my ($dw,$sw,$rw) = split(",", $warnstr);
+my ($dc,$sc,$rc) = split(",", $critstr);
+my ($wait) = split(",", $waitstr);
+$delay_warn = $dw if defined $dw and $dw ne "";
+$smtp_warn = $sw if defined $sw and $sw ne "";
+$imap_warn = $rw if defined $rw and $rw ne "";
+$delay_crit = $dc if defined $dc and $dc ne "";
+$smtp_crit = $sc if defined $sc and $sc ne "";
+$imap_crit = $rc if defined $rc and $rc ne "";
+my $smtp_thresholds = "";
+$smtp_thresholds .= "-w $smtp_warn " if defined $smtp_warn and $smtp_warn ne "";
+$smtp_thresholds .= "-c $smtp_crit " if defined $smtp_crit and $smtp_crit ne "";
+my $imap_thresholds = "";
+$imap_thresholds .= "-w $imap_warn " if defined $imap_warn and $imap_warn ne "";
+$imap_thresholds .= "-c $imap_crit " if defined $imap_crit and $imap_crit ne "";
+$imap_thresholds .= "--imap-check-interval $imap_interval " if defined $imap_interval and $imap_interval ne "";
+$imap_thresholds .= "--imap-retries $imap_retries " if defined $imap_retries and $imap_retries ne "";
+if( scalar(@alarm_times) == 1 ) {
+ $default_timeout = shift(@alarm_times);
+}
+
+# determine which other options to include
+my $smtp_options = "";
+$smtp_options .= "-H $smtp_server " if defined $smtp_server and $smtp_server ne "";
+$smtp_options .= "-p $smtp_port " if defined $smtp_port and $smtp_port ne "";
+$smtp_options .= "--tls " if defined $smtp_tls and $smtp_tls;
+$smtp_options .= "-U ".shellquote($smtp_username)." " if defined $smtp_username and $smtp_username ne "";
+$smtp_options .= "-P ".shellquote($smtp_password)." " if defined $smtp_password and $smtp_password ne "";
+$smtp_options .= "--mailto ".shellquote($mailto)." " if defined $mailto and $mailto ne "";
+$smtp_options .= "--mailfrom ".shellquote($mailfrom)." " if defined $mailfrom and $mailfrom ne "";
+foreach my $h( @header ) {
+ $smtp_options .= "--header ".shellquote($h)." ";
+}
+my $imap_options = "";
+$imap_options .= "-H $imap_server " if defined $imap_server and $imap_server ne "";
+$imap_options .= "-p $imap_port " if defined $imap_port and $imap_port ne "";
+$imap_options .= "-U ".shellquote($imap_username)." " if defined $imap_username and $imap_username ne "";
+$imap_options .= "-P ".shellquote($imap_password)." " if defined $imap_password and $imap_password ne "";
+$imap_options .= "--mailbox ".shellquote($imap_mailbox)." " if defined $imap_mailbox and $imap_mailbox ne "";
+$imap_options .= "--ssl " if defined $imap_ssl and $imap_ssl;
+
+
+# create the report object
+my $report = new PluginReport;
+my @report_plugins = (); # populated later with either (smtp,imap) or (plugin1,plugin2,...)
+my $time_start; # initialized later with time the work actually starts
+
+# create token formats for use with the plugins
+my @alpha = qw/a b c d e f g h i j k l m n o p q r s t u v w x y z/;
+my @numeric = qw/0 1 2 3 4 5 6 7 8 9/;
+my @hex = qw/0 1 2 3 4 5 6 7 8 9 a b c d e f/;
+my @pgp_even = qw/aardvark absurd accrue acme adrift adult afflict ahead aimless Algol allow alone ammo ancient apple artist assume Athens atlas Aztec baboon backfield backward banjo beaming bedlamp beehive beeswax befriend Belfast berserk billiard bison blackjack blockade blowtorch bluebird bombast bookshelf brackish breadline breakup brickyard briefcase Burbank button buzzard cement chairlift chatter checkup chisel choking chopper Christmas clamshell classic classroom cleanup clockwork cobra commence concert cowbell crackdown cranky crowfoot crucial crumpled crusade cubic dashboard deadbolt deckhand dogsled dragnet drainage dreadful drifter dropper drumbeat drunken Dupont dwelling eating edict egghead eightball endorse endow enlist erase escape exceed eyeglass eyetooth facial fallout flagpole flatfoot flytrap fracture framework freedom frighten gazelle Geiger glitter glucose goggles goldfish gremlin guidance hamlet highchair hockey indoors indulge inverse involve island jawbone keyboard kickoff kiwi klaxon locale lockup merit minnow miser Mohawk mural music necklace Neptune newborn nightbird Oakland obtuse offload optic orca payday peachy pheasant physique playhouse Pluto preclude prefer preshrunk printer prowler pupil puppy python quadrant quiver quota ragtime ratchet rebirth reform regain reindeer rematch repay retouch revenge reward rhythm ribcage ringbolt robust rocker ruffled sailboat sawdust scallion scenic scorecard Scotland seabird select sentence shadow shamrock showgirl skullcap skydive slingshot slowdown snapline snapshot snowcap snowslide solo southward soybean spaniel spearhead spellbind spheroid spigot spindle spyglass stagehand stagnate stairway standard stapler steamship sterling stockman stopwatch stormy sugar surmount suspense sweatband swelter tactics talon tapeworm tempest tiger tissue tonic topmost tracker transit trauma treadmill Trojan trouble tumor tunnel tycoon uncut unearth unwind uproot upset upshot vapor village virus Vulcan waffle wallet watchword wayside willow woodlark Zulu/;
+my @pgp_odd = qw/adroitness adviser aftermath aggregate alkali almighty amulet amusement antenna applicant Apollo armistice article asteroid Atlantic atmosphere autopsy Babylon backwater barbecue belowground bifocals bodyguard bookseller borderline bottomless Bradbury bravado Brazilian breakaway Burlington businessman butterfat Camelot candidate cannonball Capricorn caravan caretaker celebrate cellulose certify chambermaid Cherokee Chicago clergyman coherence combustion commando company component concurrent confidence conformist congregate consensus consulting corporate corrosion councilman crossover crucifix cumbersome customer Dakota decadence December decimal designing detector detergent determine dictator dinosaur direction disable disbelief disruptive distortion document embezzle enchanting enrollment enterprise equation equipment escapade Eskimo everyday examine existence exodus fascinate filament finicky forever fortitude frequency gadgetry Galveston getaway glossary gossamer graduate gravity guitarist hamburger Hamilton handiwork hazardous headwaters hemisphere hesitate hideaway holiness hurricane hydraulic impartial impetus inception indigo inertia infancy inferno informant insincere insurgent integrate intention inventive Istanbul Jamaica Jupiter leprosy letterhead liberty maritime matchmaker maverick Medusa megaton microscope microwave midsummer millionaire miracle misnomer molasses molecule Montana monument mosquito narrative nebula newsletter Norwegian October Ohio onlooker opulent Orlando outfielder Pacific pandemic Pandora paperweight paragon paragraph paramount passenger pedigree Pegasus penetrate perceptive performance pharmacy phonetic photograph pioneer pocketful politeness positive potato processor provincial proximate puberty publisher pyramid quantity racketeer rebellion recipe recover repellent replica reproduce resistor responsive retraction retrieval retrospect revenue revival revolver sandalwood sardonic Saturday savagery scavenger sensation sociable souvenir specialist speculate stethoscope stupendous supportive surrender suspicious sympathy tambourine telephone therapist tobacco tolerance tomorrow torpedo tradition travesty trombonist truncated typewriter ultimate undaunted underfoot unicorn unify universe unravel upcoming vacancy vagabond vertigo Virginia visitor vocalist voyager warranty Waterloo whimsical Wichita Wilmington Wyoming yesteryear Yucatan/;
+my %formats = (
+ 'a' => sub { pick_random(@alpha) },
+ 'n' => sub { pick_random(@numeric) },
+ 'c' => sub { pick_random(@alpha,@numeric) },
+ 'h' => sub { pick_random(@hex) },
+ 'U' => sub { time },
+ 'X' => sub { pick_random(@pgp_even) },
+ 'Y' => sub { pick_random(@pgp_odd) },
+);
+if( scalar(@plugins) ) {
+ # scan the plugin commands for use of tokens to count how many we need
+ my $token_count = 0;
+ foreach my $p (@plugins) {
+ my @matches = sort ($p =~ m/%TOKEN(\d+)%/g);
+ my $max = pop @matches;
+ $token_count = $max if defined($max) && $max > $token_count;
+ }
+ # create the tokens
+ my @tokens = ();
+ foreach my $t (1..$token_count) {
+ my $format = shift @token_formats;
+ $format = "U-X-Y" unless $format;
+ my @format_characters = split(//, $format);
+ my $token = "";
+ foreach my $c (@format_characters) {
+ if( defined $formats{$c} ) {
+ $token .= &{$formats{$c}};
+ }
+ else {
+ $token .= $c;
+ }
+ }
+ push @tokens, $token;
+ }
+ # substitute the tokens into each plugin command
+ foreach my $p (@plugins) {
+ foreach my $t (1..$token_count) {
+ my $token = $tokens[$t-1];
+ $p =~ s/%TOKEN$t%/$token/g;
+ }
+ }
+ # mark plugins that are allowed to generate alerts. default behavior is to alert for all plugins.
+ my %alert_plugins = ();
+ if( scalar(@alert_plugins) > 0 ) {
+ %alert_plugins = map { $_ => 1 } @alert_plugins;
+ }
+ else {
+ %alert_plugins = map { $_ => 1 } (1..scalar(@plugins));
+ }
+ # run each plugin and store its output in a report
+ $time_start = time;
+ my $i = 0;
+ foreach my $p( @plugins ) {
+ $i++;
+ my $plugin_timeout = shift(@alarm_times) || $default_timeout;
+ # run the plugin
+ eval {
+ local $SIG{ALRM} = sub { die "exceeded timeout $plugin_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
+ alarm $plugin_timeout;
+ my $output = `$p`;
+ chomp $output;
+ if( $output !~ m/OK|WARNING|CRITICAL/ ) {
+ print "EMAIL DELIVERY UNKNOWN - plugin $i error: $output\n";
+ print "Plugin $i: $p\n" if $verbose;
+ # record tokens in a file if option is enabled
+ record_tokens($tokenfile,\@tokens,$time_start,undef,'UNKNOWN',$i,$output) if $tokenfile;
+ exit $status{UNKNOWN};
+ }
+ if( $output =~ m/CRITICAL/ && $alert_plugins{$i} ) {
+ print "EMAIL DELIVERY CRITICAL - plugin $i failed: $output\n";
+ print "Plugin $i: $p" if $verbose;
+ # record tokens in a file if option is enabled
+ record_tokens($tokenfile,\@tokens,$time_start,undef,'CRITICAL',$i,$output) if $tokenfile;
+ exit $status{CRITICAL};
+ }
+ if( $output =~ m/WARNING/ && $alert_plugins{$i} ) {
+ print "EMAIL DELIVERY WARNING - plugin $i warning: $output\n";
+ print "Plugin $i: $p\n" if $verbose;
+ # record tokens in a file if option is enabled
+ record_tokens($tokenfile,\@tokens,$time_start,undef,'WARNING',$i,$output) if $tokenfile;
+ exit $status{WARNING};
+ }
+ $report->{"plugin".$i} = $output;
+ alarm 0;
+ };
+ if( $@ && $alert_plugins{$i} ) {
+ print "EMAIL DELIVERY CRITICAL - Could not run plugin $i: $@\n";
+ print "Plugin $i: $p\n" if $verbose;
+ exit $status{CRITICAL};
+ }
+ # if this wasn't the last plugin, wait before continuing
+ if( $i < scalar(@plugins) ) {
+ my $wait = shift(@wait_times) || $default_wait;
+ sleep $wait;
+ }
+ # compatibility with the "not using plugins" method... pretend to calculate the total round trip time (the delay) using data from the plugins ...
+ $report->{max} = 0;
+ $report->{delay} = 0;
+ }
+ # register the list of reports
+ foreach my $r ( 1..scalar(@plugins)) {
+ push @report_plugins, "plugin".$r;
+ }
+ # record tokens in a file if option is enabled
+ my $tmp_long_report = join(", ", map { "$_: $report->{$_}" } @report_plugins ) if $tokenfile;
+ record_tokens($tokenfile,\@tokens,$time_start,time,'OK',scalar(@plugins),$tmp_long_report) if $tokenfile;
+}
+else {
+ # not using plugins.
+ $time_start = time;
+
+ # send email via SMTP
+ my $id = $time_start; # XXX should include localhost name maybe or some random number in case the same mailbox is used for multiple delivery tests
+
+ my $smtp_plugin = "$libexec/check_smtp_send";
+ $smtp_plugin = "$libexec/check_smtp_send.pl" unless -e $smtp_plugin;
+ my $smtp_timeout = shift(@alarm_times) || $default_timeout;
+ eval {
+ local $SIG{ALRM} = sub { die "exceeded timeout $smtp_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
+ alarm $smtp_timeout;
+ my $smtp = `$smtp_plugin $smtp_options --header 'Subject: Nagios Message SMTP $smtp_server ID $id.' --body 'Nagios Email Delivery Plugin\n$body' $smtp_thresholds`;
+ if( $smtp !~ m/OK|WARNING|CRITICAL/ ) {
+ print "EMAIL DELIVERY UNKNOWN - smtp unknown: $smtp\n";
+ exit $status{UNKNOWN};
+ }
+ if( $smtp =~ m/CRITICAL/ ) {
+ print "EMAIL DELIVERY CRITICAL - smtp failed: $smtp\n";
+ exit $status{CRITICAL};
+ }
+ chomp $smtp;
+ $report->{smtp} = $smtp;
+ alarm 0;
+ };
+ if( $@ ) {
+ print "EMAIL DELIVERY CRITICAL - Could not connect to SMTP server $smtp_server: $@\n";
+ exit $status{CRITICAL};
+ }
+
+ # wait before checking the delivery
+ $wait = shift(@wait_times) || $default_wait;
+ sleep $wait;
+
+ # check email via IMAP
+ my $imap_plugin = "$libexec/check_imap_receive";
+ $imap_plugin = "$libexec/check_imap_receive.pl" unless -e $imap_plugin;
+ my $imap_timeout = shift(@alarm_times) || $default_timeout;
+ eval {
+ local $SIG{ALRM} = sub { die "exceeded timeout $imap_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
+ alarm $imap_timeout;
+ my $imap = `$imap_plugin $imap_options -s SUBJECT -s 'Nagios Message SMTP $smtp_server ID' --capture-max 'Nagios Message SMTP $smtp_server ID (\\d+)' --nodelete-captured $imap_thresholds`;
+ if( $imap !~ m/OK|WARNING|CRITICAL/ ) {
+ print "EMAIL DELIVERY UNKNOWN - imap unknown: $imap\n";
+ exit $status{UNKNOWN};
+ }
+ if( $imap =~ m/CRITICAL/ ) {
+ print "EMAIL DELIVERY CRITICAL - imap failed: $imap\n";
+ exit $status{CRITICAL};
+ }
+ if( $imap =~ m/ (\d+) max/ ) {
+ my $last_received = $1;
+ $report->{max} = $1;
+ my $delay = time - $last_received;
+ $report->{delay} = $delay;
+ }
+ chomp $imap;
+ $report->{imap} = $imap;
+ alarm 0;
+ };
+ if( $@ ) {
+ print "EMAIL DELIVERY CRITICAL - Could not connect to IMAP server $imap_server: $@\n";
+ exit $status{CRITICAL};
+ }
+ # register the list of reports
+ push @report_plugins, ("smtp","imap");
+}
+
+
+# calculate elapsed time and issue warnings
+my $time_end = time;
+my $elapsedtime = $time_end - $time_start;
+$report->{seconds} = $elapsedtime;
+
+my @warning = ();
+my @critical = ();
+
+push @warning, "most recent received $report->{delay} seconds ago" if( defined($report->{delay}) && $report->{delay} > $delay_warn );
+push @critical, "most recent received $report->{delay} seconds ago" if( defined($report->{delay}) && $report->{delay} > $delay_crit );
+push @warning, "no emails found" if( !defined($report->{delay}) );
+
+# print report and exit with known status
+my $perf_data = "delay=".$report->{delay}."s;$delay_warn;$delay_crit;0 elapsed=".$report->{seconds}."s"; # TODO: need a component for safely generating valid perf data format. for notes on the format, see http://www.perfparse.de/tiki-view_faq.php?faqId=6
+my $short_report = $report->text(qw/seconds delay/) . " | $perf_data";
+my $long_report = join("", map { "$_: $report->{$_}\n" } @report_plugins );
+if( scalar @critical ) {
+ my $alerts = join(", ", @critical);
+ print "EMAIL DELIVERY CRITICAL - $alerts; $short_report\n";
+ print $long_report if $verbose;
+ exit $status{CRITICAL};
+}
+if( scalar @warning ) {
+ my $alerts = join(", ", @warning);
+ print "EMAIL DELIVERY WARNING - $alerts; $short_report\n";
+ print $long_report if $verbose;
+ exit $status{WARNING};
+}
+print "EMAIL DELIVERY OK - $short_report\n";
+print $long_report if $verbose;
+exit $status{OK};
+
+# utility to load required modules. exits if unable to load one or more of the modules.
+sub load_modules {
+ my @missing_modules = ();
+ foreach( @_ ) {
+ eval "require $_";
+ push @missing_modules, $_ if $@;
+ }
+ if( @missing_modules ) {
+ print "Missing perl modules: @missing_modules\n";
+ return 0;
+ }
+ return 1;
+}
+
+# returns one random character from a set of characters
+sub pick_random {
+ my @set = @_;
+ my $size = scalar @set;
+ my $string = $set[int(rand($size))];
+ return $string;
+}
+
+# appens tokens and times to a tab-separated value file
+sub record_tokens {
+ my ($tokenfile,$tokens,$time_start,$time_end,$status,$plugin_num,$output) = @_;
+ if( $tokenfile ) {
+ my @tokens = @$tokens;
+ $time_end = "" unless defined $time_end;
+ $status = "" unless defined $status;
+ $plugin_num = "" unless defined $plugin_num;
+ $output = "" unless defined $output;
+ print "saving ".scalar(@tokens)." tokens into $tokenfile\n" if $verbose;
+ open(TOKENFILE,">>$tokenfile");
+ foreach(@tokens) {
+ print TOKENFILE "$_\t$time_start\t$time_end\t$status\t$plugin_num\t$output\n";
+ }
+ close(TOKENFILE);
+ }
+}
+
+# wraps argument in single-quotes and escapes any single-quotes in the argument
+sub shellquote {
+ my $str = shift || "";
+ $str =~ s/\'/\'\\\'\'/g;
+ return "'$str'";
+}
+
+
+# NAME
+# PluginReport
+# SYNOPSIS
+# $report = new PluginReport;
+# $report->{label1} = "value1";
+# $report->{label2} = "value2";
+# print $report->text(qw/label1 label2/);
+package PluginReport;
+
+sub new {
+ my ($proto,%p) = @_;
+ my $class = ref($proto) || $proto;
+ my $self = bless {}, $class;
+ $self->{$_} = $p{$_} foreach keys %p;
+ return $self;
+}
+
+sub text {
+ my ($self,@labels) = @_;
+ my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels;
+ my $text = join(", ", @report);
+ return $text;
+}
+
+package main;
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+check_email_delivery - sends email and verifies delivery
+
+=head1 SYNOPSIS
+
+ check_email_delivery -vV
+ check_email_delivery --usage
+ check_email_delivery --help
+
+=head1 OPTIONS
+
+=over
+
+=item --warning <seconds>[,<smtp_seconds>,<imap_seconds>]
+
+Exit with WARNING if the most recent email found is older than <seconds>. The
+optional <smtp_seconds> and <imap_seconds> parameters will be passed on to the
+included plugins that are used for those tasks. If they are not
+given then they will not be passed on and the default for that plugin will apply.
+Also known as: -w <seconds>[,<send>[,<recv>]]
+
+When using the --plugin option, only one parameter is supported (-w <seconds>) and it will apply
+to the entire process. You can specify a warning threshold specific to each plugin in the
+plugin command line.
+
+When using the --plugin option, no measuring of "most recent email" is done because we would
+not know how to read this information from receive plugins. This may be addressed in future versions.
+
+=item --critical <seconds>[,<smtp_seconds>,<imap_seconds>]
+
+Exit with CRITICAL if the most recent email found is older than <seconds>. The
+optional <smtp_seconds> and <imap_seconds> parameters will be passed on to the
+included plugins that are used for those tasks. If they are not
+given then they will not be passed on and the default for that plugin will apply.
+Also known as: -c <seconds>[,<send>[,<recv>]]
+
+When using the --plugin option, only one parameter is supported (-c <seconds>) and it will apply
+to the entire process. You can specify a critical threshold specific to each plugin in the
+plugin command line.
+
+When using the --plugin option, no measuring of "most recent email" is done because we would
+not know how to read this information from receive plugins. This may be addressed in future versions.
+
+=item --timeout <seconds>
+
+=item --timeout <smtp_seconds>,<imap_seconds>
+
+=item --timeout <plugin1_seconds>,<plugin2_seconds>,...
+
+Exit with CRITICAL if the plugins do not return a status within the specified number of seconds.
+When only one parameter is used, it applies to each plugin. When multiple parameters are used
+(separated by commas) they apply to plugins in the same order the plugins were specified on the
+command line. When using --timeout but not the --plugin option, the first parameter is for
+check_smtp_send and the second is for check_imap_receive.
+
+=item --alert <pluginN>
+
+Exit with WARNING or CRITICAL only if a warning or error (--warning, --critical, or --timeout)
+occurs for specified plugins. If a warning or error occurs for non-specified plugins that run
+BEFORE the specified plugins, the exit status will be UNKNOWN. If a warning of error occurs
+for non-specified plugins that run AFTER the specified plugins, the exit status will not be
+affected.
+
+You would use this option if you are using check_email_delivery with the --plugin option and
+the plugins you configure each use different servers, for example different SMTP and IMAP servers.
+By default, if you do not use the --alert option, if anything goes wrong during the email delivery
+check, a WARNING or CRITICAL alert will be issued. This means that if you define check_email_delivery
+for the SMTP server only and the IMAP server fails, Nagios will alert you for the SMTP server which
+would be misleading. If you define it for both the SMTP server and IMAP server and just one of them
+fails, Nagios will alert you for both servers, which would still be misleading. If you have this
+situation, you may want to use the --alert option. You define the check_email_delivery check for
+both servers: for the SMTP server (first plugin) you use --alert 1, and for for the IMAP server
+(second plugin) you use --alert 2. When check_email_delivery runs with --alert 1 and the SMTP
+server fails, you will get the appropriate alert. If the IMAP server fails it will not affect the
+status. When check_email_delivery runs with --alert 2 and the SMTP server fails, you will get the
+UNKNOWN return code. If the IMAP server generates an alert you will get a WARNING or CRITICAL as
+appropriate.
+
+You can repeat this option to specify multiple plugins that should cause an alert.
+Do this if you have multiple plugins on the command line but some of them involve the same server.
+
+See also: --plugin.
+Also known as: -A <pluginN>
+
+
+=item --wait <seconds>[,<seconds>,...]
+
+How long to wait between sending the message and checking that it was received. View default with
+the -vV option.
+
+When using the --plugin option, you can specify as many wait-between times as you have plugins
+(minus the last plugin, because it makes no sense to wait after running the last one). For
+example, if you use the --plugin option twice to specify an SMTP plugin and an IMAP plugin, and
+you want to wait 5 seconds between sending and receiving, then you would specify --wait 5. A second
+example, if you are using the --plugin option three times, then specifying -w 5 will wait 5 seconds
+between the second and third plugins also. You can specify a different wait time
+of 10 seconds between the second and third plugins, like this: -w 5,10.
+
+=item --hostname <server>
+
+Address or name of the SMTP and IMAP server. Examples: mail.server.com, localhost, 192.168.1.100.
+Also known as: -H <server>
+
+=item --smtp-server <server>
+
+Address or name of the SMTP server. Examples: smtp.server.com, localhost, 192.168.1.100.
+Using this option overrides the hostname option.
+
+=item --smtp-port <number>
+
+Service port on the SMTP server. Default is 25.
+
+=item --smtp-username <username>
+
+=item --smtp-password <password>
+
+Username and password to use when connecting to the SMTP server with the TLS option.
+Use these options if the SMTP account has a different username/password than the
+IMAP account you are testing. These options take precendence over the --username and
+the --password options.
+
+These are shell-escaped; special characters are ok.
+
+=item --imap-server <server>
+
+Address or name of the IMAP server. Examples: imap.server.com, localhost, 192.168.1.100.
+Using this option overrides the hostname option.
+
+=item --imap-port <number>
+
+Service port on the IMAP server. Default is 143. If you use SSL the default is 993.
+
+=item --imap-username <username>
+
+=item --imap-password <password>
+
+Username and password to use when connecting to the IMAP server.
+Use these options if the IMAP account has a different username/password than the
+SMTP account you are testing. These options take precendence over the --username and
+the --password options.
+
+These are shell-escaped; special characters are ok.
+
+=item --username <username>
+
+=item --password <password>
+
+Username and password to use when connecting to IMAP server.
+Also known as: -U <username> -P <password>
+
+Also used as the username and password for SMTP when the TLS option is enabled.
+To specify a separate set of credentials for SMTP authentication, see the
+options --smtp-username and --smtp-password.
+
+=item --imap-check-interval <seconds>
+
+How long to wait between polls of the imap-server for the specified mail. Default is 5 seconds.
+
+=item --imap-retries <times>
+
+How many times to poll the imap-server for the mail, before we give up. Default is 10.
+
+=item --body <message>
+
+Use this option to specify the body of the email message.
+
+=item --header <header>
+
+Use this option to set an arbitrary header in the message. You can use it multiple times.
+
+=item --mailto recipient@your.net
+
+You can send a message to multiple recipients by repeating this option or by separating
+the email addresses with commas (no whitespace allowed):
+
+$ check_email_delivery ... --mailto recipient@your.net,recipient2@your.net --mailfrom sender@your.net
+
+This argument is shell-escaped; special characters or angle brackets around the address are ok.
+
+=item --mailfrom sender@your.net
+
+Use this option to set the "from" address in the email.
+
+=item --imapssl
+=item --noimapssl
+
+Use this to enable or disable SSL for the IMAP plugin.
+
+This argument is shell-escaped; special characters or angle brackets around the address are ok.
+
+=item --smtptls
+=item --nosmtptls
+
+Use this to enable or disable TLS/AUTH for the SMTP plugin.
+
+=item --libexec
+
+Use this option to set the path of the Nagios libexec directory. The default is
+/usr/local/nagios/libexec. This is where this plugin looks for the SMTP and IMAP
+plugins that it depends on.
+
+=item --plugin <command>
+
+This is a new option introduced in version 0.5 of the check_email_delivery plugin.
+It frees the plugin from depending on specific external plugins and generalizes the
+work done to determine that the email loop is operational. When using the --plugin
+option, the following options are ignored: libexec, imapssl, smtptls, hostname,
+username, password, smtp*, imap*, mailto, mailfrom, body, header, search.
+
+Use this option multiple times to specify the complete trip. Typically, you would use
+this twice to specify plugins for SMTP and IMAP, or SMTP and POP3.
+
+The output will be success if all the plugins return success. Each plugin should be a
+standard Nagios plugin.
+
+A random token will be automatically generated and passed to each plugin specified on
+the command line by substituting the string %TOKEN1%.
+
+Example usage:
+
+ command_name check_email_delivery
+ command_line check_email_delivery
+ --plugin "$USER1$/check_smtp_send -H $ARG1$ --mailto recipient@your.net --mailfrom sender@your.net --header 'Subject: Nagios Test %TOKEN1%.'"
+ --plugin "$USER1$/check_imap_receive -H $ARG1$ -U $ARG1$ -P $ARG2$ -s SUBJECT -s 'Nagios Test %TOKEN1%.'"
+
+This technique allows for a lot of flexibility in configuring the plugins that test
+each part of your email delivery loop.
+
+See also: --token.
+Also known as: -p <command>
+
+=item --token <format>
+
+This is a new option introduced in version 0.5 of the check_email_delivery plugin.
+It can be used in conjunction with --plugin to control the tokens that are generated
+and passed to the plugins, like %TOKEN1%.
+
+Use this option multiple times to specify formats for different tokens. For example,
+if you want %TOKEN1% to consist of only alphabetical characters but want %TOKEN2% to
+consist of only digits, then you might use these options: --token aaaaaa --token nnnnn
+
+Any tokens used in your plugin commands that have not been specified by --token <format>
+will default to --token U-X-Y
+
+Token formats:
+a - alpha character (a-z)
+n - numeric character (0-9)
+c - alphanumeric character (a-z0-9)
+h - hexadecimal character (0-9a-f)
+U - unix time, seconds from epoch. eg 1193012441
+X - a word from the pgp even list. eg aardvark
+Y - a word from the pgp odd list. eg adroitness
+
+Caution: It has been observed that some IMAP servers do not handle underscores well in the
+search criteria. For best results, avoid using underscores in your tokens. Use hyphens or commas instead.
+
+See also: --plugin.
+Also known as: -T <format>
+
+The PGP word list was obtained from http://en.wikipedia.org/wiki/PGP_word_list
+
+=item --file <file>
+
+Save (append) status information into the given tab-delimited file. Format used:
+
+ token start-time end-time status plugin-num output
+
+Note: format may change in future versions and may become configurable.
+
+This option available as of version 0.6.2.
+
+Also known as: -F <file>
+
+=item --hires
+
+Use the Time::HiRes module to measure time, if available.
+
+=item --verbose
+
+Display additional information. Useful for troubleshooting. Use together with --version to see the default
+warning and critical timeout values.
+Also known as: -v
+
+=item --version
+
+Display plugin version and exit.
+Also known as: -V
+
+=item --help
+
+Display this documentation and exit. Does not work in the ePN version.
+Also known as: -h
+
+=item --usage
+
+Display a short usage instruction and exit.
+
+=back
+
+=head1 EXAMPLES
+
+=head2 Send a message with custom headers
+
+$ check_email_delivery -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net
+--username recipient --password secret
+
+EMAIL DELIVERY OK - 1 seconds
+
+=head2 Set warning and critical timeouts for receive plugin only:
+
+$ check_email_delivery -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net
+--username recipient --password secret -w ,,5 -c ,,15
+
+EMAIL DELIVERY OK - 1 seconds
+
+=head1 EXIT CODES
+
+Complies with the Nagios plug-in specification:
+ 0 OK The plugin was able to check the service and it appeared to be functioning properly
+ 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly
+ 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold
+ 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service
+
+=head1 NAGIOS PLUGIN NOTES
+
+Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html
+
+This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because
+the path to utils.pm must be specified completely in this program and forces users to edit the source
+code if their install location is different (if they realize this is the problem). You can view
+the default timeout for this module by using the --verbose and --version options together. The
+short form is -vV.
+
+Other than that, it attempts to follow published guidelines for Nagios plugins.
+
+=head1 CHANGES
+
+ Wed Oct 29 13:08:00 PST 2005
+ + version 0.1
+
+ Wed Nov 9 17:16:09 PST 2005
+ + updated arguments to check_smtp_send and check_imap_receive
+ + added eval/alarm block to implement -c option
+ + added wait option to adjust sleep time between smtp and imap calls
+ + added delay-warn and delay-crit options to adjust email delivery warning thresholds
+ + now using an inline PluginReport package to generate the report
+ + copyright notice and GNU GPL
+ + version 0.2
+
+ Thu Apr 20 14:00:00 CET 2006 (by Johan Nilsson <johann (at) axis.com>)
+ + version 0.2.1
+ + corrected bug in getoptions ($imap_server would never ever be set from command-line...)
+ + will not make $smtp_server and $imap_server == $host if they're defined on commandline
+ + added support for multiple polls of imap-server, with specified intervals
+ + changed default behaviour in check_imap_server (searches for the specific id in subject and deletes mails found)
+ + increased default delay_warn from 65 seconds to 95 seconds
+
+ Thu Apr 20 16:00:00 PST 2006 (by Geoff Crompton <geoff.crompton@strategicdata.com.au>)
+ + fixed a bug in getoptions
+ + version 0.2.2
+
+ Tue Apr 24 21:17:53 PDT 2007
+ + now there is an alternate version (same but without embedded perl POD) that is compatible with the new new embedded-perl Nagios feature
+ + version 0.2.3
+
+ Fri Apr 27 20:32:53 PDT 2007
+ + documentation now mentions every command-line option accepted by the plugin, including abbreviations
+ + changed connection error to display timeout only if timeout was the error
+ + default IMAP plugin is libexec/check_imap_receive (also checking for same but with .pl extension)
+ + default SMTP plugin is libexec/check_smtp_send (also checking for same but with .pl extension)
+ + removed default values for SMTP port and IMAP port to allow those plugins to set the defaults; so current behavior stays the same and will continue to make sense with SSL
+ + version 0.3
+
+ Thu Oct 11 10:00:00 EET 2007 (by Timo Virtaneva <timo (at) virtaneva dot com>
+ + Changed the header and the search criteria so that the same email-box can be used for all smtp-servers
+ + version 0.3.1
+
+ Sun Oct 21 11:01:03 PDT 2007
+ + added support for TLS options to the SMTP plugin
+ + version 0.4
+
+ Sun Oct 21 16:17:14 PDT 2007
+ + added support for arbitrary plugins to send and receive mail (or anthing else!). see the --plugin option.
+ + version 0.5
+
+ Tue Dec 4 07:36:20 PST 2007
+ + added --usage option because the official nagios plugins have both --help and --usage
+ + added --timeout option to match the official nagios plugins
+ + shortcut option for --token is now -T to avoid clash with standard shortcut -t for --timeout
+ + fixed some minor pod formatting issues for perldoc
+ + version 0.5.1
+
+ Sat Dec 15 07:39:59 PST 2007
+ + improved compatibility with Nagios embedded perl (ePN)
+ + version 0.5.2
+
+ Thu Jan 17 20:27:36 PST 2008 (by Timo Virtaneva <timo (at) virtaneva dot com> on Thu Oct 11 10:00:00 EET 2007)
+ + Changed the header and the search criteria so that the same email-box can be used for all smtp-servers
+ + version 0.5.3
+
+ Mon Jan 28 22:11:02 PST 2008
+ + fixed a bug, smtp-password and imap-password are now string parameters
+ + added --alert option to allow selection of which plugin(s) should cause a WARNING or CRITICAL alert
+ + version 0.6
+
+ Mon Feb 11 19:09:37 PST 2008
+ + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules
+ + version 0.6.1
+
+ Mon May 26 10:39:19 PDT 2008
+ + added --file option to allow plugin to record status information into a tab-delimited file
+ + changed default token from U_X_Y to U-X-Y
+ + version 0.6.2
+
+ Wed Jan 14 08:29:35 PST 2009
+ + fixed a bug that the --header parameter was not being passed to the smtp plugin.
+ + version 0.6.3
+
+ Mon Jun 8 15:43:48 PDT 2009
+ + added performance data for use with PNP4Nagios! (thanks to Ben Ritcey for the patch)
+ + version 0.6.4
+
+ Wed Sep 16 07:10:10 PDT 2009
+ + added elapsed time in seconds to performance data
+ + version 0.6.5
+
+ Fri Oct 8 19:48:44 PDT 2010
+ + fixed uniform IMAP and SMTP username and password bug (thanks to Micle Moerenhout for pointing it out)
+ + version 0.6.6
+
+ Mon Jan 3 08:24:23 PST 2011
+ + added shell escaping for smtp-username, smtp-password, mailto, mailfrom, imap-username, and imap-password arguments
+ + version 0.7.0
+
+ Fri May 6 08:35:09 AST 2011
+ + added --hires option to enable use of Time::Hires if available
+ + version 0.7.1
+
+ Sun Jun 12 17:17:06 AST 2011
+ + added --imap-mailbox option to pass through to check_imap_receive --mailbox option
+ + added --ssl option to conveniently enable both --smtp-tls and --imap-ssl
+ + version 0.7.2
+
+=head1 AUTHOR
+
+Jonathan Buhacoff <jonathan@buhacoff.net>
+
+=head1 COPYRIGHT AND LICENSE
+
+ Copyright (C) 2005-2011 Jonathan Buhacoff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ http://www.gnu.org/licenses/gpl.txt
+
+=cut
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_email_delivery_epn b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_email_delivery_epn
new file mode 100644
index 0000000..b0cc304
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_email_delivery_epn
@@ -0,0 +1,498 @@
+#!/usr/bin/perl
+use strict;
+my $VERSION = '0.7.1';
+my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
+my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt';
+my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 );
+
+# look for required modules
+exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long/);
+
+BEGIN {
+ if( grep { /^--hires$/ } @ARGV ) {
+ eval "use Time::HiRes qw(time);";
+ warn "Time::HiRes not installed\n" if $@;
+ }
+}
+
+# get options from command line
+Getopt::Long::Configure("bundling");
+my $verbose = 0;
+my $help = "";
+my $help_usage = "";
+my $show_version = "";
+my $host = "";
+my $smtp_server = "";
+my $smtp_port = "";
+my $imap_server = "";
+my $smtp_username = "";
+my $smtp_password = "";
+my $smtp_tls = "";
+my $imap_port = "";
+my $imap_username = "";
+my $imap_password = "";
+my $imap_mailbox = "";
+my $username = "";
+my $password = "";
+my $ssl = "";
+my $imap_ssl = "";
+my $mailto = "";
+my $mailfrom = "";
+my @header = ();
+my $body = "";
+my $warnstr = "";
+my $critstr = "";
+my $waitstr = "";
+my $delay_warn = 95;
+my $delay_crit = 300;
+my $smtp_warn = 15;
+my $smtp_crit = 30;
+my $imap_warn = 15;
+my $imap_crit = 30;
+my $timeout = "";
+my @alert_plugins = ();
+my $imap_interval = 5;
+my $imap_retries = 5;
+my @plugins = ();
+my @token_formats = ();
+my $tokenfile = "";
+my $default_crit = 30;
+my $default_warn = 15;
+my $default_wait = 5;
+my $default_timeout = 60;
+my $time_hires = "";
+my $libexec = "/usr/local/nagios/libexec";
+my $ok;
+$ok = Getopt::Long::GetOptions(
+ "V|version"=>\$show_version,
+ "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage,
+ "w|warning=s"=>\$warnstr,"c|critical=s"=>\$critstr, "t|timeout=s"=>\$timeout,
+ "libexec=s"=>\$libexec,
+ # plugin settings
+ "p|plugin=s"=>\@plugins, "T|token=s"=>\@token_formats,
+ "A|alert=i"=>\@alert_plugins,
+ "F|file=s"=>\$tokenfile,
+ # common settings
+ "H|hostname=s"=>\$host,
+ "U|username=s"=>\$username,"P|password=s"=>\$password,
+ "ssl!"=>\$ssl,
+ # smtp settings
+ "smtp-server=s"=>\$smtp_server,"smtp-port=i"=>\$smtp_port,
+ "mailto=s"=>\$mailto, "mailfrom=s",\$mailfrom,
+ "header=s"=>\@header, "body=s"=>\$body,
+ # smtp-tls settings
+ "smtptls!"=>\$smtp_tls,
+ "smtp-username=s"=>\$smtp_username,"smtp-password=s"=>\$smtp_password,
+ # delay settings
+ "wait=s"=>\$waitstr,
+ # imap settings
+ "imap-server=s"=>\$imap_server,"imap-port=i"=>\$imap_port,
+ "imap-username=s"=>\$imap_username,"imap-password=s"=>\$imap_password,
+ "imap-mailbox=s"=>\$imap_mailbox,
+ "imap-check-interval=i"=>\$imap_interval,"imap-retries=i"=>\$imap_retries,
+ "imapssl!"=>\$imap_ssl,
+ # Time
+ "hires"=>\$time_hires,
+ );
+
+if( $show_version ) {
+ print "$VERSION\n";
+ if( $verbose ) {
+ print "Warning threshold: $delay_warn seconds\n";
+ print "Critical threshold: $delay_crit seconds\n";
+ print "Default wait: $default_wait seconds\n";
+ print "Default timeout: $default_timeout seconds\n";
+ }
+ exit $status{UNKNOWN};
+}
+
+if( $help ) {
+ exec "perldoc", $0 or print "Try `perldoc $0`\n";
+ exit $status{UNKNOWN};
+}
+
+if( $host ) {
+ $smtp_server = $host if $smtp_server eq "";
+ $imap_server = $host if $imap_server eq "";
+}
+
+if( $username ) {
+ $smtp_username = $username if $smtp_username eq "";
+ $imap_username = $username if $imap_username eq "";
+}
+
+if( $password ) {
+ $smtp_password = $password if $smtp_password eq "";
+ $imap_password = $password if $imap_password eq "";
+}
+
+if( $ssl ) {
+ $imap_ssl = $ssl if $imap_ssl eq "";
+ $smtp_tls = $ssl if $smtp_tls eq "";
+}
+
+if( $help_usage
+ ||
+ (
+ scalar(@plugins) == 0
+ &&
+ (
+ $smtp_server eq "" || $mailto eq "" || $mailfrom eq ""
+ || $imap_server eq "" || $username eq "" || $password eq ""
+ )
+ )
+ ) {
+ print "Usage 1: $0 -H host \n\t".
+ "--mailto recipient\@your.net --mailfrom sender\@your.net --body 'message' \n\t".
+ "--username username --password password \n\t".
+ "[-w <seconds>] [-c <seconds>]\n\t" .
+ "[--imap-check-interval <seconds> ] [--imap-retries <times> ]\n";
+ print "Usage 2: $0 \n\t".
+ "-p 'first plugin command with %TOKEN1% embedded' \n\t".
+ "-p 'second plugin command with %TOKEN1% embedded' \n\t".
+ "[-w <seconds1>,<seconds2>] [-c <seconds1>,<seconds2>] \n";
+ exit $status{UNKNOWN};
+}
+
+# determine thresholds
+my @warning_times = split(",", $warnstr);
+my @critical_times = split(",", $critstr);
+my @alarm_times = split(",", $timeout);
+my @wait_times = split(",", $waitstr);
+my ($dw,$sw,$rw) = split(",", $warnstr);
+my ($dc,$sc,$rc) = split(",", $critstr);
+my ($wait) = split(",", $waitstr);
+$delay_warn = $dw if defined $dw and $dw ne "";
+$smtp_warn = $sw if defined $sw and $sw ne "";
+$imap_warn = $rw if defined $rw and $rw ne "";
+$delay_crit = $dc if defined $dc and $dc ne "";
+$smtp_crit = $sc if defined $sc and $sc ne "";
+$imap_crit = $rc if defined $rc and $rc ne "";
+my $smtp_thresholds = "";
+$smtp_thresholds .= "-w $smtp_warn " if defined $smtp_warn and $smtp_warn ne "";
+$smtp_thresholds .= "-c $smtp_crit " if defined $smtp_crit and $smtp_crit ne "";
+my $imap_thresholds = "";
+$imap_thresholds .= "-w $imap_warn " if defined $imap_warn and $imap_warn ne "";
+$imap_thresholds .= "-c $imap_crit " if defined $imap_crit and $imap_crit ne "";
+$imap_thresholds .= "--imap-check-interval $imap_interval " if defined $imap_interval and $imap_interval ne "";
+$imap_thresholds .= "--imap-retries $imap_retries " if defined $imap_retries and $imap_retries ne "";
+if( scalar(@alarm_times) == 1 ) {
+ $default_timeout = shift(@alarm_times);
+}
+
+# determine which other options to include
+my $smtp_options = "";
+$smtp_options .= "-H $smtp_server " if defined $smtp_server and $smtp_server ne "";
+$smtp_options .= "-p $smtp_port " if defined $smtp_port and $smtp_port ne "";
+$smtp_options .= "--tls " if defined $smtp_tls and $smtp_tls;
+$smtp_options .= "-U ".shellquote($smtp_username)." " if defined $smtp_username and $smtp_username ne "";
+$smtp_options .= "-P ".shellquote($smtp_password)." " if defined $smtp_password and $smtp_password ne "";
+$smtp_options .= "--mailto ".shellquote($mailto)." " if defined $mailto and $mailto ne "";
+$smtp_options .= "--mailfrom ".shellquote($mailfrom)." " if defined $mailfrom and $mailfrom ne "";
+foreach my $h( @header ) {
+ $smtp_options .= "--header ".shellquote($h)." ";
+}
+my $imap_options = "";
+$imap_options .= "-H $imap_server " if defined $imap_server and $imap_server ne "";
+$imap_options .= "-p $imap_port " if defined $imap_port and $imap_port ne "";
+$imap_options .= "-U ".shellquote($imap_username)." " if defined $imap_username and $imap_username ne "";
+$imap_options .= "-P ".shellquote($imap_password)." " if defined $imap_password and $imap_password ne "";
+$imap_options .= "--mailbox ".shellquote($imap_mailbox)." " if defined $imap_mailbox and $imap_mailbox ne "";
+$imap_options .= "--ssl " if defined $imap_ssl and $imap_ssl;
+
+
+# create the report object
+my $report = new PluginReport;
+my @report_plugins = (); # populated later with either (smtp,imap) or (plugin1,plugin2,...)
+my $time_start; # initialized later with time the work actually starts
+
+# create token formats for use with the plugins
+my @alpha = qw/a b c d e f g h i j k l m n o p q r s t u v w x y z/;
+my @numeric = qw/0 1 2 3 4 5 6 7 8 9/;
+my @hex = qw/0 1 2 3 4 5 6 7 8 9 a b c d e f/;
+my @pgp_even = qw/aardvark absurd accrue acme adrift adult afflict ahead aimless Algol allow alone ammo ancient apple artist assume Athens atlas Aztec baboon backfield backward banjo beaming bedlamp beehive beeswax befriend Belfast berserk billiard bison blackjack blockade blowtorch bluebird bombast bookshelf brackish breadline breakup brickyard briefcase Burbank button buzzard cement chairlift chatter checkup chisel choking chopper Christmas clamshell classic classroom cleanup clockwork cobra commence concert cowbell crackdown cranky crowfoot crucial crumpled crusade cubic dashboard deadbolt deckhand dogsled dragnet drainage dreadful drifter dropper drumbeat drunken Dupont dwelling eating edict egghead eightball endorse endow enlist erase escape exceed eyeglass eyetooth facial fallout flagpole flatfoot flytrap fracture framework freedom frighten gazelle Geiger glitter glucose goggles goldfish gremlin guidance hamlet highchair hockey indoors indulge inverse involve island jawbone keyboard kickoff kiwi klaxon locale lockup merit minnow miser Mohawk mural music necklace Neptune newborn nightbird Oakland obtuse offload optic orca payday peachy pheasant physique playhouse Pluto preclude prefer preshrunk printer prowler pupil puppy python quadrant quiver quota ragtime ratchet rebirth reform regain reindeer rematch repay retouch revenge reward rhythm ribcage ringbolt robust rocker ruffled sailboat sawdust scallion scenic scorecard Scotland seabird select sentence shadow shamrock showgirl skullcap skydive slingshot slowdown snapline snapshot snowcap snowslide solo southward soybean spaniel spearhead spellbind spheroid spigot spindle spyglass stagehand stagnate stairway standard stapler steamship sterling stockman stopwatch stormy sugar surmount suspense sweatband swelter tactics talon tapeworm tempest tiger tissue tonic topmost tracker transit trauma treadmill Trojan trouble tumor tunnel tycoon uncut unearth unwind uproot upset upshot vapor village virus Vulcan waffle wallet watchword wayside willow woodlark Zulu/;
+my @pgp_odd = qw/adroitness adviser aftermath aggregate alkali almighty amulet amusement antenna applicant Apollo armistice article asteroid Atlantic atmosphere autopsy Babylon backwater barbecue belowground bifocals bodyguard bookseller borderline bottomless Bradbury bravado Brazilian breakaway Burlington businessman butterfat Camelot candidate cannonball Capricorn caravan caretaker celebrate cellulose certify chambermaid Cherokee Chicago clergyman coherence combustion commando company component concurrent confidence conformist congregate consensus consulting corporate corrosion councilman crossover crucifix cumbersome customer Dakota decadence December decimal designing detector detergent determine dictator dinosaur direction disable disbelief disruptive distortion document embezzle enchanting enrollment enterprise equation equipment escapade Eskimo everyday examine existence exodus fascinate filament finicky forever fortitude frequency gadgetry Galveston getaway glossary gossamer graduate gravity guitarist hamburger Hamilton handiwork hazardous headwaters hemisphere hesitate hideaway holiness hurricane hydraulic impartial impetus inception indigo inertia infancy inferno informant insincere insurgent integrate intention inventive Istanbul Jamaica Jupiter leprosy letterhead liberty maritime matchmaker maverick Medusa megaton microscope microwave midsummer millionaire miracle misnomer molasses molecule Montana monument mosquito narrative nebula newsletter Norwegian October Ohio onlooker opulent Orlando outfielder Pacific pandemic Pandora paperweight paragon paragraph paramount passenger pedigree Pegasus penetrate perceptive performance pharmacy phonetic photograph pioneer pocketful politeness positive potato processor provincial proximate puberty publisher pyramid quantity racketeer rebellion recipe recover repellent replica reproduce resistor responsive retraction retrieval retrospect revenue revival revolver sandalwood sardonic Saturday savagery scavenger sensation sociable souvenir specialist speculate stethoscope stupendous supportive surrender suspicious sympathy tambourine telephone therapist tobacco tolerance tomorrow torpedo tradition travesty trombonist truncated typewriter ultimate undaunted underfoot unicorn unify universe unravel upcoming vacancy vagabond vertigo Virginia visitor vocalist voyager warranty Waterloo whimsical Wichita Wilmington Wyoming yesteryear Yucatan/;
+my %formats = (
+ 'a' => sub { pick_random(@alpha) },
+ 'n' => sub { pick_random(@numeric) },
+ 'c' => sub { pick_random(@alpha,@numeric) },
+ 'h' => sub { pick_random(@hex) },
+ 'U' => sub { time },
+ 'X' => sub { pick_random(@pgp_even) },
+ 'Y' => sub { pick_random(@pgp_odd) },
+);
+if( scalar(@plugins) ) {
+ # scan the plugin commands for use of tokens to count how many we need
+ my $token_count = 0;
+ foreach my $p (@plugins) {
+ my @matches = sort ($p =~ m/%TOKEN(\d+)%/g);
+ my $max = pop @matches;
+ $token_count = $max if defined($max) && $max > $token_count;
+ }
+ # create the tokens
+ my @tokens = ();
+ foreach my $t (1..$token_count) {
+ my $format = shift @token_formats;
+ $format = "U-X-Y" unless $format;
+ my @format_characters = split(//, $format);
+ my $token = "";
+ foreach my $c (@format_characters) {
+ if( defined $formats{$c} ) {
+ $token .= &{$formats{$c}};
+ }
+ else {
+ $token .= $c;
+ }
+ }
+ push @tokens, $token;
+ }
+ # substitute the tokens into each plugin command
+ foreach my $p (@plugins) {
+ foreach my $t (1..$token_count) {
+ my $token = $tokens[$t-1];
+ $p =~ s/%TOKEN$t%/$token/g;
+ }
+ }
+ # mark plugins that are allowed to generate alerts. default behavior is to alert for all plugins.
+ my %alert_plugins = ();
+ if( scalar(@alert_plugins) > 0 ) {
+ %alert_plugins = map { $_ => 1 } @alert_plugins;
+ }
+ else {
+ %alert_plugins = map { $_ => 1 } (1..scalar(@plugins));
+ }
+ # run each plugin and store its output in a report
+ $time_start = time;
+ my $i = 0;
+ foreach my $p( @plugins ) {
+ $i++;
+ my $plugin_timeout = shift(@alarm_times) || $default_timeout;
+ # run the plugin
+ eval {
+ local $SIG{ALRM} = sub { die "exceeded timeout $plugin_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
+ alarm $plugin_timeout;
+ my $output = `$p`;
+ chomp $output;
+ if( $output !~ m/OK|WARNING|CRITICAL/ ) {
+ print "EMAIL DELIVERY UNKNOWN - plugin $i error: $output\n";
+ print "Plugin $i: $p\n" if $verbose;
+ # record tokens in a file if option is enabled
+ record_tokens($tokenfile,\@tokens,$time_start,undef,'UNKNOWN',$i,$output) if $tokenfile;
+ exit $status{UNKNOWN};
+ }
+ if( $output =~ m/CRITICAL/ && $alert_plugins{$i} ) {
+ print "EMAIL DELIVERY CRITICAL - plugin $i failed: $output\n";
+ print "Plugin $i: $p" if $verbose;
+ # record tokens in a file if option is enabled
+ record_tokens($tokenfile,\@tokens,$time_start,undef,'CRITICAL',$i,$output) if $tokenfile;
+ exit $status{CRITICAL};
+ }
+ if( $output =~ m/WARNING/ && $alert_plugins{$i} ) {
+ print "EMAIL DELIVERY WARNING - plugin $i warning: $output\n";
+ print "Plugin $i: $p\n" if $verbose;
+ # record tokens in a file if option is enabled
+ record_tokens($tokenfile,\@tokens,$time_start,undef,'WARNING',$i,$output) if $tokenfile;
+ exit $status{WARNING};
+ }
+ $report->{"plugin".$i} = $output;
+ alarm 0;
+ };
+ if( $@ && $alert_plugins{$i} ) {
+ print "EMAIL DELIVERY CRITICAL - Could not run plugin $i: $@\n";
+ print "Plugin $i: $p\n" if $verbose;
+ exit $status{CRITICAL};
+ }
+ # if this wasn't the last plugin, wait before continuing
+ if( $i < scalar(@plugins) ) {
+ my $wait = shift(@wait_times) || $default_wait;
+ sleep $wait;
+ }
+ # compatibility with the "not using plugins" method... pretend to calculate the total round trip time (the delay) using data from the plugins ...
+ $report->{max} = 0;
+ $report->{delay} = 0;
+ }
+ # register the list of reports
+ foreach my $r ( 1..scalar(@plugins)) {
+ push @report_plugins, "plugin".$r;
+ }
+ # record tokens in a file if option is enabled
+ my $tmp_long_report = join(", ", map { "$_: $report->{$_}" } @report_plugins ) if $tokenfile;
+ record_tokens($tokenfile,\@tokens,$time_start,time,'OK',scalar(@plugins),$tmp_long_report) if $tokenfile;
+}
+else {
+ # not using plugins.
+ $time_start = time;
+
+ # send email via SMTP
+ my $id = $time_start; # XXX should include localhost name maybe or some random number in case the same mailbox is used for multiple delivery tests
+
+ my $smtp_plugin = "$libexec/check_smtp_send";
+ $smtp_plugin = "$libexec/check_smtp_send.pl" unless -e $smtp_plugin;
+ my $smtp_timeout = shift(@alarm_times) || $default_timeout;
+ eval {
+ local $SIG{ALRM} = sub { die "exceeded timeout $smtp_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
+ alarm $smtp_timeout;
+ my $smtp = `$smtp_plugin $smtp_options --header 'Subject: Nagios Message SMTP $smtp_server ID $id.' --body 'Nagios Email Delivery Plugin\n$body' $smtp_thresholds`;
+ if( $smtp !~ m/OK|WARNING|CRITICAL/ ) {
+ print "EMAIL DELIVERY UNKNOWN - smtp unknown: $smtp\n";
+ exit $status{UNKNOWN};
+ }
+ if( $smtp =~ m/CRITICAL/ ) {
+ print "EMAIL DELIVERY CRITICAL - smtp failed: $smtp\n";
+ exit $status{CRITICAL};
+ }
+ chomp $smtp;
+ $report->{smtp} = $smtp;
+ alarm 0;
+ };
+ if( $@ ) {
+ print "EMAIL DELIVERY CRITICAL - Could not connect to SMTP server $smtp_server: $@\n";
+ exit $status{CRITICAL};
+ }
+
+ # wait before checking the delivery
+ $wait = shift(@wait_times) || $default_wait;
+ sleep $wait;
+
+ # check email via IMAP
+ my $imap_plugin = "$libexec/check_imap_receive";
+ $imap_plugin = "$libexec/check_imap_receive.pl" unless -e $imap_plugin;
+ my $imap_timeout = shift(@alarm_times) || $default_timeout;
+ eval {
+ local $SIG{ALRM} = sub { die "exceeded timeout $imap_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
+ alarm $imap_timeout;
+ my $imap = `$imap_plugin $imap_options -s SUBJECT -s 'Nagios Message SMTP $smtp_server ID' --capture-max 'Nagios Message SMTP $smtp_server ID (\\d+)' --nodelete-captured $imap_thresholds`;
+ if( $imap !~ m/OK|WARNING|CRITICAL/ ) {
+ print "EMAIL DELIVERY UNKNOWN - imap unknown: $imap\n";
+ exit $status{UNKNOWN};
+ }
+ if( $imap =~ m/CRITICAL/ ) {
+ print "EMAIL DELIVERY CRITICAL - imap failed: $imap\n";
+ exit $status{CRITICAL};
+ }
+ if( $imap =~ m/ (\d+) max/ ) {
+ my $last_received = $1;
+ $report->{max} = $1;
+ my $delay = time - $last_received;
+ $report->{delay} = $delay;
+ }
+ chomp $imap;
+ $report->{imap} = $imap;
+ alarm 0;
+ };
+ if( $@ ) {
+ print "EMAIL DELIVERY CRITICAL - Could not connect to IMAP server $imap_server: $@\n";
+ exit $status{CRITICAL};
+ }
+ # register the list of reports
+ push @report_plugins, ("smtp","imap");
+}
+
+
+# calculate elapsed time and issue warnings
+my $time_end = time;
+my $elapsedtime = $time_end - $time_start;
+$report->{seconds} = $elapsedtime;
+
+my @warning = ();
+my @critical = ();
+
+push @warning, "most recent received $report->{delay} seconds ago" if( defined($report->{delay}) && $report->{delay} > $delay_warn );
+push @critical, "most recent received $report->{delay} seconds ago" if( defined($report->{delay}) && $report->{delay} > $delay_crit );
+push @warning, "no emails found" if( !defined($report->{delay}) );
+
+# print report and exit with known status
+my $perf_data = "delay=".$report->{delay}."s;$delay_warn;$delay_crit;0 elapsed=".$report->{seconds}."s"; # TODO: need a component for safely generating valid perf data format. for notes on the format, see http://www.perfparse.de/tiki-view_faq.php?faqId=6
+my $short_report = $report->text(qw/seconds delay/) . " | $perf_data";
+my $long_report = join("", map { "$_: $report->{$_}\n" } @report_plugins );
+if( scalar @critical ) {
+ my $alerts = join(", ", @critical);
+ print "EMAIL DELIVERY CRITICAL - $alerts; $short_report\n";
+ print $long_report if $verbose;
+ exit $status{CRITICAL};
+}
+if( scalar @warning ) {
+ my $alerts = join(", ", @warning);
+ print "EMAIL DELIVERY WARNING - $alerts; $short_report\n";
+ print $long_report if $verbose;
+ exit $status{WARNING};
+}
+print "EMAIL DELIVERY OK - $short_report\n";
+print $long_report if $verbose;
+exit $status{OK};
+
+# utility to load required modules. exits if unable to load one or more of the modules.
+sub load_modules {
+ my @missing_modules = ();
+ foreach( @_ ) {
+ eval "require $_";
+ push @missing_modules, $_ if $@;
+ }
+ if( @missing_modules ) {
+ print "Missing perl modules: @missing_modules\n";
+ return 0;
+ }
+ return 1;
+}
+
+# returns one random character from a set of characters
+sub pick_random {
+ my @set = @_;
+ my $size = scalar @set;
+ my $string = $set[int(rand($size))];
+ return $string;
+}
+
+# appens tokens and times to a tab-separated value file
+sub record_tokens {
+ my ($tokenfile,$tokens,$time_start,$time_end,$status,$plugin_num,$output) = @_;
+ if( $tokenfile ) {
+ my @tokens = @$tokens;
+ $time_end = "" unless defined $time_end;
+ $status = "" unless defined $status;
+ $plugin_num = "" unless defined $plugin_num;
+ $output = "" unless defined $output;
+ print "saving ".scalar(@tokens)." tokens into $tokenfile\n" if $verbose;
+ open(TOKENFILE,">>$tokenfile");
+ foreach(@tokens) {
+ print TOKENFILE "$_\t$time_start\t$time_end\t$status\t$plugin_num\t$output\n";
+ }
+ close(TOKENFILE);
+ }
+}
+
+# wraps argument in single-quotes and escapes any single-quotes in the argument
+sub shellquote {
+ my $str = shift || "";
+ $str =~ s/\'/\'\\\'\'/g;
+ return "'$str'";
+}
+
+
+# NAME
+# PluginReport
+# SYNOPSIS
+# $report = new PluginReport;
+# $report->{label1} = "value1";
+# $report->{label2} = "value2";
+# print $report->text(qw/label1 label2/);
+package PluginReport;
+
+sub new {
+ my ($proto,%p) = @_;
+ my $class = ref($proto) || $proto;
+ my $self = bless {}, $class;
+ $self->{$_} = $p{$_} foreach keys %p;
+ return $self;
+}
+
+sub text {
+ my ($self,@labels) = @_;
+ my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels;
+ my $text = join(", ", @report);
+ return $text;
+}
+
+package main;
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_quota b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_quota
new file mode 100644
index 0000000..13f3504
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_quota
@@ -0,0 +1,431 @@
+#!/usr/bin/perl
+use strict;
+my $VERSION = '0.2';
+my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
+my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt';
+my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 );
+
+#### IDEA AND INITIAL IMPLEMENTATION BASED ON CHECK_IMAP_RECEIVE WAS CONTRIBUTED BY JOHAN ROMME from THE NETHERLANDS 14 Oct 2011
+
+# look for required modules
+exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Mail::IMAPClient/);
+
+BEGIN {
+ if( grep { /^--hires$/ } @ARGV ) {
+ eval "use Time::HiRes qw(time);";
+ warn "Time::HiRes not installed\n" if $@;
+ }
+}
+
+# get options from command line
+Getopt::Long::Configure("bundling");
+my $verbose = 0;
+my $help = "";
+my $help_usage = "";
+my $show_version = "";
+my $imap_server = "";
+my $default_imap_port = "143";
+my $default_imap_ssl_port = "993";
+my $imap_port = "";
+my $username = "";
+my $password = "";
+my $mailbox = "INBOX";
+my $warntime = 15;
+my $criticaltime = 30;
+my $timeout = 60;
+my $peek = "";
+my $ssl = 0;
+my $tls = 0;
+my $time_hires = "";
+my $ok;
+$ok = Getopt::Long::GetOptions(
+ "V|version"=>\$show_version,
+ "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage,
+ "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout,
+ # imap settings
+ "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port,
+ "U|username=s"=>\$username,"P|password=s"=>\$password, "m|mailbox=s"=>\$mailbox,
+ "ssl!"=>\$ssl, "tls!"=>\$tls,
+ # search settings
+ "peek!"=>\$peek,
+ # Time
+ "hires"=>\$time_hires,
+ );
+
+if( $show_version ) {
+ print "$VERSION\n";
+ if( $verbose ) {
+ print "Default warning threshold: $warntime seconds\n";
+ print "Default critical threshold: $criticaltime seconds\n";
+ print "Default timeout: $timeout seconds\n";
+ }
+ exit $status{UNKNOWN};
+}
+
+if( $help ) {
+ exec "perldoc", $0 or print "Try `perldoc $0`\n";
+ exit $status{UNKNOWN};
+}
+
+my @required_module = ();
+push @required_module, 'IO::Socket::SSL' if $ssl || $tls;
+exit $status{UNKNOWN} unless load_modules(@required_module);
+
+if( $help_usage
+ ||
+ ( $imap_server eq "" || $username eq "" || $password eq "" )
+ ) {
+ print "Usage: $0 -H host [-p port] -U username -P password [--imap-retries <tries>]\n";
+ exit $status{UNKNOWN};
+}
+
+
+# initialize
+my $report = new PluginReport;
+my $time_start = time;
+
+# connect to IMAP server
+print "connecting to server $imap_server\n" if $verbose > 2;
+my $imap;
+eval {
+ local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
+ alarm $timeout;
+
+ if( $ssl || $tls ) {
+ $imap_port = $default_imap_ssl_port unless $imap_port;
+ my $socket = IO::Socket::SSL->new("$imap_server:$imap_port");
+ die IO::Socket::SSL::errstr() unless $socket;
+ $socket->autoflush(1);
+ $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 );
+ $imap->State(Mail::IMAPClient->Connected);
+ $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works
+ $imap->User($username);
+ $imap->Password($password);
+ $imap->login() or die "$@";
+ }
+ else {
+ $imap_port = $default_imap_port unless $imap_port;
+ $imap = Mail::IMAPClient->new(Debug => 0 );
+ $imap->Server("$imap_server:$imap_port");
+ $imap->User($username);
+ $imap->Password($password);
+ $imap->connect() or die "$@";
+ }
+
+ $imap->Peek(1) if $peek;
+ $imap->Ignoresizeerrors(1);
+
+ alarm 0;
+};
+if( $@ ) {
+ chomp $@;
+ print "IMAP QUOTA CRITICAL - Could not connect to $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+unless( $imap ) {
+ print "IMAP QUOTA CRITICAL - Could not connect to $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+my $time_connected = time;
+
+my $quotaUsed;
+my $quotaLimit;
+my $quotaPercentage;
+my $quotaPercentageWarning = 80;
+my $quotaPercentageCritical = 90;
+my $quotaMessage;
+
+# look for the quota limits
+my $tries = 0;
+my @msgs;
+
+eval {
+ my $k;
+ my @l = $imap->getquotaroot();
+ foreach $k (@l) {
+ print "$k\n" if $verbose > 2;
+ if ($k =~ /STORAGE +(\d+) +(\d+)/) {
+ $quotaUsed = $1;
+ $quotaLimit = $2;
+ }
+ }
+ if (!length($quotaUsed) && !length($quotaLimit)) {
+ print "no answer from imap host\n" if $verbose > 2;
+ } elsif (!length($quotaUsed) || !length($quotaLimit) {
+ print "incorrect answer from imap host\n";
+ $imap->close();
+ exit $status{UNKNOWN};
+ } else {
+ $quotaPercentage = sprintf("%.1f", (100 * $quotaUsed) / $quotaLimit);
+ $quotaMessage = "$quotaUsed $quotaLimit - $quotaPercentage%";
+ }
+};
+if( $@ ) {
+ chomp $@;
+ print "IMAP QUOTA CRITICAL - Could not check quota at $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+
+
+# disconnect from IMAP server
+print "disconnecting from server\n" if $verbose > 2;
+$imap->logout();
+
+# calculate elapsed time and issue warnings
+my $time_end = time;
+my $elapsedtime = $time_end - $time_start;
+$report->{seconds} = $elapsedtime;
+
+# print report and exit with known status
+
+if($quotaPercentage >= $quotaPercentageCritical) {
+ print "IMAP QUOTA CRITICAL - $quotaMessage\n";
+ exit $status{CRITICAL};
+}
+if($quotaPercentage >= $quotaPercentageWarning) {
+ print "IMAP QUOTA WARNING - $quotaMessage\n";
+ exit $status{WARNING};
+}
+print "IMAP QUOTA OK - $quotaMessage\n";
+exit $status{OK};
+
+
+# utility to load required modules. exits if unable to load one or more of the modules.
+sub load_modules {
+ my @missing_modules = ();
+ foreach( @_ ) {
+ eval "require $_";
+ push @missing_modules, $_ if $@;
+ }
+ if( @missing_modules ) {
+ print "Missing perl modules: @missing_modules\n";
+ return 0;
+ }
+ return 1;
+}
+
+
+# NAME
+# PluginReport
+# SYNOPSIS
+# $report = new PluginReport;
+# $report->{label1} = "value1";
+# $report->{label2} = "value2";
+# print $report->text(qw/label1 label2/);
+package PluginReport;
+
+sub new {
+ my ($proto,%p) = @_;
+ my $class = ref($proto) || $proto;
+ my $self = bless {}, $class;
+ $self->{$_} = $p{$_} foreach keys %p;
+ return $self;
+}
+
+sub text {
+ my ($self,@labels) = @_;
+ my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels;
+ my $text = join(", ", @report);
+ return $text;
+}
+
+
+package main;
+1;
+
+__END__
+
+
+=pod
+
+=head1 NAME
+
+check_imap_quota - connects to an IMAP account and checks the quota
+
+=head1 SYNOPSIS
+
+ check_imap_quota -vV
+ check_imap_quota -?
+ check_imap_quota --help
+
+=head1 OPTIONS
+
+=over
+
+=item --warning <seconds>
+
+Warn if it takes longer than <seconds> to connect to the IMAP server. Default is 15 seconds.
+Also known as: -w <seconds>
+
+=item --critical <seconds>
+
+Return a critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 30 seconds.
+See also: --capture-critical <messages>
+Also known as: -c <seconds>
+
+=item --timeout <seconds>
+
+Abort with critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 60 seconds.
+The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to
+connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer
+than 30 seconds.
+Also known as: -t <seconds>
+
+=item --hostname <server>
+
+Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100
+Also known as: -H <server>
+
+=item --port <number>
+
+Service port on the IMAP server. Default is 143. If you use SSL, default is 993.
+Also known as: -p <number>
+
+=item --username <username>
+
+=item --password <password>
+
+Username and password to use when connecting to IMAP server.
+Also known as: -U <username> -P <password>
+
+=item --mailbox <mailbox>
+
+Use this option to specify the mailbox to search for messages. Default is INBOX.
+Also known as: -m <mailbox>
+
+=item --ssl
+
+=item --nossl
+
+Enable SSL protocol. Requires IO::Socket::SSL.
+
+Using this option automatically changes the default port from 143 to 993. You can still
+override this from the command line using the --port option.
+
+Use the nossl option to turn off the ssl option.
+
+=item --hires
+
+Use the Time::HiRes module to measure time, if available.
+
+=item --verbose
+
+Display additional information. Useful for troubleshooting. Use together with --version to see the default
+warning and critical timeout values.
+
+If the selected mailbox was not found, you can use verbosity level 3 (-vvv) to display a list of all
+available mailboxes on the server.
+
+Also known as: -v
+
+=item --version
+
+Display plugin version and exit.
+Also known as: -V
+
+=item --help
+
+Display this documentation and exit. Does not work in the ePN version.
+Also known as: -h
+
+=item --usage
+
+Display a short usage instruction and exit.
+
+=back
+
+=head1 EXAMPLES
+
+=head2 Report how many emails are in the mailbox
+
+ $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
+ -s ALL --nodelete
+
+ IMAP RECEIVE OK - 1 seconds, 7 found
+
+=head2 Report the email with the highest value
+
+Suppose your mailbox has some emails from an automated script and that a message
+from this script typically looks like this (abbreviated):
+
+ To: mailuser@server.net
+ From: autoscript@server.net
+ Subject: Results of Autoscript
+ Date: Wed, 09 Nov 2005 08:30:40 -0800
+ Message-ID: <auto-000000992528@server.net>
+
+ Homeruns 5
+
+And further suppose that you are interested in reporting the message that has the
+highest number of home runs, and also to leave this message in the mailbox for future
+checks, but remove the other matching messages with lesser values:
+
+ $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
+ -s SUBJECT -s "Results of Autoscript" --capture-max "Homeruns (\d+)" --nodelete-captured
+
+ IMAP RECEIVE OK - 1 seconds, 3 found, 1 captured, 5 max, 2 deleted
+
+=head2 Troubleshoot your search parameters
+
+Add the --nodelete and --imap-retries=1 parameters to your command line.
+
+=head1 EXIT CODES
+
+Complies with the Nagios plug-in specification:
+ 0 OK The plugin was able to check the service and it appeared to be functioning properly
+ 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly
+ 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold
+ 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service
+
+=head1 NAGIOS PLUGIN NOTES
+
+Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html
+
+This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because
+the path to utils.pm must be specified completely in this program and forces users to edit the source
+code if their install location is different (if they realize this is the problem). You can view
+the default timeout for this module by using the --verbose and --version options together. The
+short form is -vV.
+
+Other than that, it attempts to follow published guidelines for Nagios plugins.
+
+=head1 SEE ALSO
+
+http://nagios.org/
+http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod
+http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod
+
+=head1 CHANGES
+
+ Fri Nov 11 04:53:09 AST 2011
+ + version 0.1 created with quota code contributed by Johan Romme
+
+ Tue Dec 20 17:38:04 PST 2011
+ + fixed bug where a quota of 0 was reported as an incorrect response from the server, thanks to Eike Arndt
+ + version 0.2
+
+=head1 AUTHOR
+
+Jonathan Buhacoff <jonathan@buhacoff.net>
+
+=head1 COPYRIGHT AND LICENSE
+
+ Copyright (C) 2011 Jonathan Buhacoff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ http://www.gnu.org/licenses/gpl.txt
+
+=cut
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_quota_epn b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_quota_epn
new file mode 100644
index 0000000..d43877f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_quota_epn
@@ -0,0 +1,235 @@
+#!/usr/bin/perl
+use strict;
+my $VERSION = '0.2';
+my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
+my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt';
+my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 );
+
+#### IDEA AND INITIAL IMPLEMENTATION BASED ON CHECK_IMAP_RECEIVE WAS CONTRIBUTED BY JOHAN ROMME from THE NETHERLANDS 14 Oct 2011
+
+# look for required modules
+exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Mail::IMAPClient/);
+
+BEGIN {
+ if( grep { /^--hires$/ } @ARGV ) {
+ eval "use Time::HiRes qw(time);";
+ warn "Time::HiRes not installed\n" if $@;
+ }
+}
+
+# get options from command line
+Getopt::Long::Configure("bundling");
+my $verbose = 0;
+my $help = "";
+my $help_usage = "";
+my $show_version = "";
+my $imap_server = "";
+my $default_imap_port = "143";
+my $default_imap_ssl_port = "993";
+my $imap_port = "";
+my $username = "";
+my $password = "";
+my $mailbox = "INBOX";
+my $warntime = 15;
+my $criticaltime = 30;
+my $timeout = 60;
+my $peek = "";
+my $ssl = 0;
+my $tls = 0;
+my $time_hires = "";
+my $ok;
+$ok = Getopt::Long::GetOptions(
+ "V|version"=>\$show_version,
+ "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage,
+ "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout,
+ # imap settings
+ "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port,
+ "U|username=s"=>\$username,"P|password=s"=>\$password, "m|mailbox=s"=>\$mailbox,
+ "ssl!"=>\$ssl, "tls!"=>\$tls,
+ # search settings
+ "peek!"=>\$peek,
+ # Time
+ "hires"=>\$time_hires,
+ );
+
+if( $show_version ) {
+ print "$VERSION\n";
+ if( $verbose ) {
+ print "Default warning threshold: $warntime seconds\n";
+ print "Default critical threshold: $criticaltime seconds\n";
+ print "Default timeout: $timeout seconds\n";
+ }
+ exit $status{UNKNOWN};
+}
+
+if( $help ) {
+ exec "perldoc", $0 or print "Try `perldoc $0`\n";
+ exit $status{UNKNOWN};
+}
+
+my @required_module = ();
+push @required_module, 'IO::Socket::SSL' if $ssl || $tls;
+exit $status{UNKNOWN} unless load_modules(@required_module);
+
+if( $help_usage
+ ||
+ ( $imap_server eq "" || $username eq "" || $password eq "" )
+ ) {
+ print "Usage: $0 -H host [-p port] -U username -P password [--imap-retries <tries>]\n";
+ exit $status{UNKNOWN};
+}
+
+
+# initialize
+my $report = new PluginReport;
+my $time_start = time;
+
+# connect to IMAP server
+print "connecting to server $imap_server\n" if $verbose > 2;
+my $imap;
+eval {
+ local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
+ alarm $timeout;
+
+ if( $ssl || $tls ) {
+ $imap_port = $default_imap_ssl_port unless $imap_port;
+ my $socket = IO::Socket::SSL->new("$imap_server:$imap_port");
+ die IO::Socket::SSL::errstr() unless $socket;
+ $socket->autoflush(1);
+ $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 );
+ $imap->State(Mail::IMAPClient->Connected);
+ $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works
+ $imap->User($username);
+ $imap->Password($password);
+ $imap->login() or die "$@";
+ }
+ else {
+ $imap_port = $default_imap_port unless $imap_port;
+ $imap = Mail::IMAPClient->new(Debug => 0 );
+ $imap->Server("$imap_server:$imap_port");
+ $imap->User($username);
+ $imap->Password($password);
+ $imap->connect() or die "$@";
+ }
+
+ $imap->Peek(1) if $peek;
+ $imap->Ignoresizeerrors(1);
+
+ alarm 0;
+};
+if( $@ ) {
+ chomp $@;
+ print "IMAP QUOTA CRITICAL - Could not connect to $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+unless( $imap ) {
+ print "IMAP QUOTA CRITICAL - Could not connect to $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+my $time_connected = time;
+
+my $quotaUsed;
+my $quotaLimit;
+my $quotaPercentage;
+my $quotaPercentageWarning = 80;
+my $quotaPercentageCritical = 90;
+my $quotaMessage;
+
+# look for the quota limits
+my $tries = 0;
+my @msgs;
+
+eval {
+ my $k;
+ my @l = $imap->getquotaroot();
+ foreach $k (@l) {
+ print "$k\n" if $verbose > 2;
+ if ($k =~ /STORAGE +(\d+) +(\d+)/) {
+ $quotaUsed = $1;
+ $quotaLimit = $2;
+ }
+ }
+ if (!length($quotaUsed) && !length($quotaLimit)) {
+ print "no answer from imap host\n" if $verbose > 2;
+ } elsif (!length($quotaUsed) || !length($quotaLimit) {
+ print "incorrect answer from imap host\n";
+ $imap->close();
+ exit $status{UNKNOWN};
+ } else {
+ $quotaPercentage = sprintf("%.1f", (100 * $quotaUsed) / $quotaLimit);
+ $quotaMessage = "$quotaUsed $quotaLimit - $quotaPercentage%";
+ }
+};
+if( $@ ) {
+ chomp $@;
+ print "IMAP QUOTA CRITICAL - Could not check quota at $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+
+
+# disconnect from IMAP server
+print "disconnecting from server\n" if $verbose > 2;
+$imap->logout();
+
+# calculate elapsed time and issue warnings
+my $time_end = time;
+my $elapsedtime = $time_end - $time_start;
+$report->{seconds} = $elapsedtime;
+
+# print report and exit with known status
+
+if($quotaPercentage >= $quotaPercentageCritical) {
+ print "IMAP QUOTA CRITICAL - $quotaMessage\n";
+ exit $status{CRITICAL};
+}
+if($quotaPercentage >= $quotaPercentageWarning) {
+ print "IMAP QUOTA WARNING - $quotaMessage\n";
+ exit $status{WARNING};
+}
+print "IMAP QUOTA OK - $quotaMessage\n";
+exit $status{OK};
+
+
+# utility to load required modules. exits if unable to load one or more of the modules.
+sub load_modules {
+ my @missing_modules = ();
+ foreach( @_ ) {
+ eval "require $_";
+ push @missing_modules, $_ if $@;
+ }
+ if( @missing_modules ) {
+ print "Missing perl modules: @missing_modules\n";
+ return 0;
+ }
+ return 1;
+}
+
+
+# NAME
+# PluginReport
+# SYNOPSIS
+# $report = new PluginReport;
+# $report->{label1} = "value1";
+# $report->{label2} = "value2";
+# print $report->text(qw/label1 label2/);
+package PluginReport;
+
+sub new {
+ my ($proto,%p) = @_;
+ my $class = ref($proto) || $proto;
+ my $self = bless {}, $class;
+ $self->{$_} = $p{$_} foreach keys %p;
+ return $self;
+}
+
+sub text {
+ my ($self,@labels) = @_;
+ my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels;
+ my $text = join(", ", @report);
+ return $text;
+}
+
+
+package main;
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_receive b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_receive
new file mode 100644
index 0000000..6b4fd86
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_receive
@@ -0,0 +1,999 @@
+#!/usr/bin/perl
+use strict;
+my $VERSION = '0.7.5';
+my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
+my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt';
+my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 );
+
+# look for required modules
+exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Mail::IMAPClient/);
+
+BEGIN {
+ if( grep { /^--hires$/ } @ARGV ) {
+ eval "use Time::HiRes qw(time);";
+ warn "Time::HiRes not installed\n" if $@;
+ }
+}
+
+# get options from command line
+Getopt::Long::Configure("bundling");
+my $verbose = 0;
+my $help = "";
+my $help_usage = "";
+my $show_version = "";
+my $imap_server = "";
+my $default_imap_port = "143";
+my $default_imap_ssl_port = "993";
+my $imap_port = "";
+my $username = "";
+my $password = "";
+my $mailbox = "INBOX";
+my @search = ();
+my $search_critical_min = 1;
+my $search_critical_max = -1; # -1 means disabled for this option
+my $search_warning_min = 1;
+my $search_warning_max = -1; # -1 means disabled for this option
+my $capture_max = "";
+my $capture_min = "";
+my $delete = 1;
+my $no_delete_captured = "";
+my $warntime = 15;
+my $criticaltime = 30;
+my $timeout = 60;
+my $interval = 5;
+my $max_retries = 10;
+my $download = "";
+my $download_max = "";
+my $peek = "";
+my $template = "";
+my $ssl = 0;
+my $ssl_ca_file = "";
+my $tls = 0;
+my $time_hires = "";
+my $ok;
+$ok = Getopt::Long::GetOptions(
+ "V|version"=>\$show_version,
+ "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage,
+ "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout,
+ # imap settings
+ "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port,
+ "U|username=s"=>\$username,"P|password=s"=>\$password, "m|mailbox=s"=>\$mailbox,
+ "imap-check-interval=i"=>\$interval,"imap-retries=i"=>\$max_retries,
+ "ssl!"=>\$ssl, "ssl-ca-file=s"=>\$ssl_ca_file, "tls!"=>\$tls,
+ # search settings
+ "s|search=s"=>\@search,
+ "search-critical-min=i"=>\$search_critical_min, "search-critical-max=i"=>\$search_critical_max,
+ "search-warning-min=i"=>\$search_warning_min, "search-warning-max=i"=>\$search_warning_max,
+ "capture-max=s"=>\$capture_max, "capture-min=s"=>\$capture_min,
+ "delete!"=>\$delete, "nodelete-captured"=>\$no_delete_captured,
+ "download!"=>\$download, "download_max=i"=>\$download_max, "download-max=i"=>\$download_max,
+ "peek!"=>\$peek,
+ "template!"=>\$template,
+ # Time
+ "hires"=>\$time_hires,
+ );
+
+if( $show_version ) {
+ print "$VERSION\n";
+ if( $verbose ) {
+ print "Default warning threshold: $warntime seconds\n";
+ print "Default critical threshold: $criticaltime seconds\n";
+ print "Default timeout: $timeout seconds\n";
+ }
+ exit $status{UNKNOWN};
+}
+
+if( $help ) {
+ exec "perldoc", $0 or print "Try `perldoc $0`\n";
+ exit $status{UNKNOWN};
+}
+
+my @required_module = ();
+push @required_module, 'IO::Socket::SSL' if $ssl || $tls;
+push @required_module, 'Email::Simple' if $download;
+push @required_module, ('Text::Template','Date::Manip') if $template;
+exit $status{UNKNOWN} unless load_modules(@required_module);
+
+if( $help_usage
+ ||
+ ( $imap_server eq "" || $username eq "" || $password eq "" || scalar(@search)==0 )
+ ) {
+ print "Usage: $0 -H host [-p port] -U username -P password -s HEADER -s X-Nagios -s 'ID: 1234.' [-w <seconds>] [-c <seconds>] [--imap-check-interval <seconds>] [--imap-retries <tries>]\n";
+ exit $status{UNKNOWN};
+}
+
+# before attempting to connect to the server, check if any of the search parameters
+# use substitution functions and make sure we can parse them first. if we can't we
+# need to abort since the search will be meaningless.
+if( $template ) {
+ foreach my $token (@search) {
+ my $t = Text::Template->new(TYPE=>'STRING',SOURCE=>$token,PACKAGE=>'ImapSearchTemplate');
+ $token = $t->fill_in(PREPEND=>q{package ImapSearchTemplate;});
+ #print "token: $token\n";
+ }
+}
+
+
+# initialize
+my $report = new PluginReport;
+my $time_start = time;
+
+# connect to IMAP server
+print "connecting to server $imap_server\n" if $verbose > 2;
+my $imap;
+eval {
+ local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
+ alarm $timeout;
+
+ if( $ssl || $tls ) {
+ $imap_port = $default_imap_ssl_port unless $imap_port;
+ my %ssl_args = ();
+ if( length($ssl_ca_file) > 0 ) {
+ $ssl_args{SSL_verify_mode} = 1;
+ $ssl_args{SSL_ca_file} = $ssl_ca_file;
+ $ssl_args{SSL_verifycn_scheme} = 'imap';
+ $ssl_args{SSL_verifycn_name} = $imap_server;
+ }
+ my $socket = IO::Socket::SSL->new(PeerAddr=>"$imap_server:$imap_port", %ssl_args);
+ die IO::Socket::SSL::errstr() . " (if you get this only when using both --ssl and --ssl-ca-file, but not when using just --ssl, the server SSL certificate failed validation)" unless $socket;
+ $socket->autoflush(1);
+ $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 );
+ $imap->State(Mail::IMAPClient->Connected);
+ $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works
+ $imap->User($username);
+ $imap->Password($password);
+ $imap->login() or die "Cannot login: $@";
+ }
+ else {
+ $imap_port = $default_imap_port unless $imap_port;
+ $imap = Mail::IMAPClient->new(Debug => 0 );
+ $imap->Server("$imap_server:$imap_port");
+ $imap->User($username);
+ $imap->Password($password);
+ $imap->connect() or die "$@";
+ }
+
+ $imap->Peek(1) if $peek;
+ $imap->Ignoresizeerrors(1);
+
+ alarm 0;
+};
+if( $@ ) {
+ chomp $@;
+ print "IMAP RECEIVE CRITICAL - Could not connect to $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+unless( $imap ) {
+ print "IMAP RECEIVE CRITICAL - Could not connect to $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+my $time_connected = time;
+
+# select a mailbox
+print "selecting mailbox $mailbox\n" if $verbose > 2;
+unless( $imap->select($mailbox) ) {
+ print "IMAP RECEIVE CRITICAL - Could not select $mailbox: $@ $!\n";
+ if( $verbose > 2 ) {
+ print "Mailbox list:\n" . join("\n", $imap->folders) . "\n";
+ print "Mailbox separator: " . $imap->separator . "\n";
+ ##print "Special mailboxes:\n" . join("\n", map { "$_ => ".
+ }
+ $imap->logout();
+ exit $status{CRITICAL};
+}
+
+
+# search for messages
+my $tries = 0;
+my @msgs;
+until( scalar(@msgs) != 0 || $tries >= $max_retries ) {
+ eval {
+ $imap->select( $mailbox );
+ # if download flag is on, we download recent messages and search ourselves
+ if( $download ) {
+ print "downloading messages to search\n" if $verbose > 2;
+ @msgs = download_and_search($imap,@search);
+ }
+ else {
+ print "searching on server\n" if $verbose > 2;
+ @msgs = $imap->search(@search);
+ die "Invalid search parameters: $@" if $@;
+ }
+ };
+ if( $@ ) {
+ chomp $@;
+ print "Cannot search messages: $@\n";
+ $imap->close();
+ $imap->logout();
+ exit $status{UNKNOWN};
+ }
+ $report->{found} = scalar(@msgs);
+ $tries++;
+ sleep $interval unless (scalar(@msgs) != 0 || $tries >= $max_retries);
+}
+
+sub download_and_search {
+ my ($imap,@search) = @_;
+ my $ims = new ImapMessageSearch;
+ $ims->querytokens(@search);
+ my @found = ();
+ @msgs = reverse $imap->messages or (); # die "Cannot list messages: $@\n"; # reversing to get descending order, which is most recent messages first! (at least on my mail servers)
+ @msgs = @msgs[0..$download_max-1] if $download_max && scalar(@msgs) > $download_max;
+ foreach my $m (@msgs) {
+ my $message = $imap->message_string($m);
+ push @found, $m if $ims->match($message);
+ }
+ return @found;
+}
+
+
+
+# capture data in messages
+my $captured_max_id = "";
+my $captured_min_id = "";
+if( $capture_max || $capture_min ) {
+ my $max = undef;
+ my $min = undef;
+ my %captured = ();
+ for (my $i=0;$i < scalar(@msgs); $i++) {
+ my $message = $imap->message_string($msgs[$i]);
+ if( $message =~ m/$capture_max/ ) {
+ if( !defined($max) || $1 > $max ) {
+ $captured{ $i } = 1;
+ $max = $1;
+ $captured_max_id = $msgs[$i];
+ }
+ }
+ if( $message =~ m/$capture_min/ ) {
+ if( !defined($min) || $1 < $min ) {
+ $captured{ $i } = 1;
+ $min = $1;
+ $captured_min_id = $msgs[$i];
+ }
+ }
+ print $message if $verbose > 1;
+ }
+ $report->{captured} = scalar keys %captured;
+ $report->{max} = $max if defined $max;
+ $report->{min} = $min if defined $min;
+}
+
+# delete messages
+if( $delete ) {
+ print "deleting matching messages\n" if $verbose > 2;
+ my $deleted = 0;
+ for (my $i=0;$i < scalar(@msgs); $i++) {
+ next if ($no_delete_captured && ($captured_max_id eq $msgs[$i]));
+ next if ($no_delete_captured && ($captured_min_id eq $msgs[$i]));
+ $imap->delete_message($msgs[$i]);
+ $deleted++;
+ }
+ $report->{deleted} = $deleted;
+ $imap->expunge() if $deleted;
+}
+
+# deselect the mailbox
+$imap->close();
+
+# disconnect from IMAP server
+print "disconnecting from server\n" if $verbose > 2;
+$imap->logout();
+
+# calculate elapsed time and issue warnings
+my $time_end = time;
+my $elapsedtime = $time_end - $time_start;
+$report->{seconds} = $elapsedtime;
+$report->{found} = 0 unless defined $report->{found};
+$report->{captured} = 0 unless defined $report->{captured};
+
+my @warning = ();
+my @critical = ();
+
+push @warning, "found less than $search_warning_min" if( scalar(@msgs) < $search_warning_min );
+push @warning, "found more than $search_warning_max" if ( $search_warning_max > -1 && scalar(@msgs) > $search_warning_max );
+push @critical, "found less than $search_critical_min" if ( scalar(@msgs) < $search_critical_min );
+push @critical, "found more than $search_critical_max" if ( $search_critical_max > -1 && scalar(@msgs) > $search_critical_max );
+push @warning, "connection time more than $warntime" if( $time_connected - $time_start > $warntime );
+push @critical, "connection time more than $criticaltime" if( $time_connected - $time_start > $criticaltime );
+
+# print report and exit with known status
+my $perf_data = "elapsed=".$report->{seconds}."s found=".$report->{found}."messages captured=".$report->{captured}."messages"; # TODO: need a component for safely generating valid perf data format. for notes on the format, see http://www.perfparse.de/tiki-view_faq.php?faqId=6 and http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185
+my $short_report = $report->text(qw/seconds found captured max min deleted/) . " | $perf_data";
+if( scalar @critical ) {
+ my $crit_alerts = join(", ", @critical);
+ print "IMAP RECEIVE CRITICAL - $crit_alerts; $short_report\n";
+ exit $status{CRITICAL};
+}
+if( scalar @warning ) {
+ my $warn_alerts = join(", ", @warning);
+ print "IMAP RECEIVE WARNING - $warn_alerts; $short_report\n";
+ exit $status{WARNING};
+}
+print "IMAP RECEIVE OK - $short_report\n";
+exit $status{OK};
+
+
+# utility to load required modules. exits if unable to load one or more of the modules.
+sub load_modules {
+ my @missing_modules = ();
+ foreach( @_ ) {
+ eval "require $_";
+ push @missing_modules, $_ if $@;
+ }
+ if( @missing_modules ) {
+ print "Missing perl modules: @missing_modules\n";
+ return 0;
+ }
+ return 1;
+}
+
+
+# NAME
+# PluginReport
+# SYNOPSIS
+# $report = new PluginReport;
+# $report->{label1} = "value1";
+# $report->{label2} = "value2";
+# print $report->text(qw/label1 label2/);
+package PluginReport;
+
+sub new {
+ my ($proto,%p) = @_;
+ my $class = ref($proto) || $proto;
+ my $self = bless {}, $class;
+ $self->{$_} = $p{$_} foreach keys %p;
+ return $self;
+}
+
+sub text {
+ my ($self,@labels) = @_;
+ my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels;
+ my $text = join(", ", @report);
+ return $text;
+}
+
+package ImapMessageSearch;
+
+require Email::Simple;
+
+sub new {
+ my ($proto,%p) = @_;
+ my $class = ref($proto) || $proto;
+ my $self = bless {}, $class;
+ $self->{querystring} = [];
+ $self->{querytokens} = [];
+ $self->{queryfnlist} = [];
+ $self->{mimemessage} = undef;
+ $self->{$_} = $p{$_} foreach keys %p;
+ return $self;
+}
+
+sub querystring {
+ my ($self,$string) = @_;
+ $self->{querystring} = $string;
+ return $self->querytokens( parseimapsearch($string) );
+}
+
+sub querytokens {
+ my ($self,@tokens) = @_;
+ $self->{querytokens} = [@tokens];
+ $self->{queryfnlist} = [create_search_expressions(@tokens)];
+ return $self;
+}
+
+sub match {
+ my ($self,$message_string) = @_;
+ return 0 unless defined $message_string;
+ my $message_mime = Email::Simple->new($message_string);
+ return $self->matchmime($message_mime);
+}
+
+sub matchmime {
+ my ($self,$message_mime) = @_;
+ my $match = 1;
+ foreach my $x (@{$self->{queryfnlist}}) {
+ $match = $match && $x->($message_mime);
+ }
+ return $match;
+}
+
+# this should probably become its own Perl module... see also Net::IMAP::Server::Command::Search
+sub create_search_expressions {
+ my (@search) = @_;
+ return () unless scalar(@search);
+ my $token = shift @search;
+ if( $token eq 'TEXT' ) {
+ my $value = shift @search;
+ return (sub {shift->as_string =~ /\Q$value\E/i},create_search_expressions(@search));
+ }
+ if( $token eq 'BODY' ) {
+ my $value = shift @search;
+ return (sub {shift->body =~ /\Q$value\E/i},create_search_expressions(@search));
+ }
+ if( $token eq 'SUBJECT' ) {
+ my $value = shift @search;
+ return (sub {shift->header('Subject') =~ /\Q$value\E/i},create_search_expressions(@search));
+ }
+ if( $token eq 'HEADER' ) {
+ my $name = shift @search;
+ my $value = shift @search;
+ return (sub {shift->header($name) =~ /\Q$value\E/i},create_search_expressions(@search));
+ }
+ if( $token eq 'NOT' ) {
+ my @exp = create_search_expressions(@search);
+ my $next = shift @exp;
+ return (sub { ! $next->(@_) }, @exp);
+ }
+ if( $token eq 'OR' ) {
+ my @exp = create_search_expressions(@search);
+ my $next1 = shift @exp;
+ my $next2 = shift @exp;
+ return (sub { $next1->(@_) or $next2->(@_) }, @exp);
+ }
+ if( $token eq 'SENTBEFORE' ) {
+ my $value = shift @search;
+ return (sub {datecmp(shift->header('Date'),$value) < 0},create_search_expressions(@search));
+ }
+ if( $token eq 'SENTON' ) {
+ my $value = shift @search;
+ return (sub {datecmp(shift->header('Date'),$value) == 0},create_search_expressions(@search));
+ }
+ if( $token eq 'SENTSINCE' ) {
+ my $value = shift @search;
+ return (sub {datecmp(shift->header('Date'),$value) > 0},create_search_expressions(@search));
+ }
+ return sub { die "invalid search parameter: $token" };
+}
+
+sub datecmp {
+ my ($date1,$date2) = @_;
+ my $parsed1 = Date::Manip::ParseDate($date1);
+ my $parsed2 = Date::Manip::ParseDate($date2);
+ my $cmp = Date::Manip::Date_Cmp($parsed1,$parsed2);
+ print " $date1 <=> $date2 -> $cmp\n";
+ return $cmp <=> 0;
+}
+
+package ImapSearchTemplate;
+
+# Takes an English date specification ("now", etc) and an optional offset ("-4 hours")
+# and returns an RFC 2822 formatted date string.
+# see http://search.cpan.org/dist/Date-Manip/lib/Date/Manip.pod
+sub rfc2822dateHeader {
+ my ($when,$delta) = @_;
+ $when = Date::Manip::ParseDate($when);
+ $delta = Date::Manip::ParseDateDelta($delta) if $delta;
+ my $d = $delta ? Date::Manip::DateCalc($when,$delta) : $when;
+ return Date::Manip::UnixDate($d, "%a, %d %b %Y %H:%M:%S %z");
+}
+
+sub rfc2822date {
+ my ($when,$delta) = @_;
+ $when = Date::Manip::ParseDate($when);
+ $delta = Date::Manip::ParseDateDelta($delta) if $delta;
+ my $d = $delta ? Date::Manip::DateCalc($when,$delta) : $when;
+ return Date::Manip::UnixDate($d, "%d-%b-%Y");
+}
+
+# alias for 2822 ... RFC 822 is an older version and specifies 2-digit years, but we ignore that for now.
+sub rfc822dateHeader { return rfc2822dateHeader(@_); }
+sub rfc822date { return rfc2822date(@_); }
+
+sub date {
+ my ($format,$when,$delta) = @_;
+ $when = Date::Manip::ParseDate($when);
+ $delta = Date::Manip::ParseDateDelta($delta) if $delta;
+ my $d = $delta ? Date::Manip::DateCalc($when,$delta) : $when;
+ return Date::Manip::UnixDate($d, $format);
+}
+
+package main;
+1;
+
+__END__
+
+
+=pod
+
+=head1 NAME
+
+check_imap_receive - connects to and searches an IMAP account for messages
+
+=head1 SYNOPSIS
+
+ check_imap_receive -vV
+ check_imap_receive -?
+ check_imap_receive --help
+
+=head1 OPTIONS
+
+=over
+
+=item --warning <seconds>
+
+Warn if it takes longer than <seconds> to connect to the IMAP server. Default is 15 seconds.
+Also known as: -w <seconds>
+
+=item --critical <seconds>
+
+Return a critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 30 seconds.
+See also: --capture-critical <messages>
+Also known as: -c <seconds>
+
+=item --timeout <seconds>
+
+Abort with critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 60 seconds.
+The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to
+connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer
+than 30 seconds.
+Also known as: -t <seconds>
+
+=item --imap-check-interval <seconds>
+
+How long to wait after searching for a matching message before searching again. Only takes effect
+if no messages were found. Default is 5 seconds.
+
+=item --imap-retries <number>
+
+How many times to try searching for a matching message before giving up. If you set this to 0 then
+messages will not be searched at all. Setting this to 1 means the plugin only tries once. Etc.
+Default is 10 times.
+
+=item --hostname <server>
+
+Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100
+Also known as: -H <server>
+
+=item --port <number>
+
+Service port on the IMAP server. Default is 143. If you use SSL, default is 993.
+Also known as: -p <number>
+
+=item --username <username>
+
+=item --password <password>
+
+Username and password to use when connecting to IMAP server.
+Also known as: -U <username> -P <password>
+
+=item --mailbox <mailbox>
+
+Use this option to specify the mailbox to search for messages. Default is INBOX.
+Also known as: -m <mailbox>
+
+=item --search <string>
+
+Use this option to filter the messages. Default is not to filter. You may (must) use this option
+multiple times in order to create any valid IMAP search criteria. See the examples and see also
+http://www.ietf.org/rfc/rfc2060.txt (look for section 6.4.4, the SEARCH command)
+
+This is the way to find messages matching a given subject:
+ -s SUBJECT -s "a given subject"
+
+You can use the following technique for any header, including Subject. To find "Header-Name: some value":
+ -s HEADER -s Header-Name -s "some value"
+
+Modern IMAP servers that support rfc5032 extensions allow you to search for messages
+older or younger than a number of seconds. So to find messages received in the past hour,
+you can do:
+
+ -s YOUNGER -s 3600
+
+Or to find messages received more than 5 minutes ago, you can do:
+
+ -s OLDER -s 300
+
+Also known as: -s <string>
+
+=item --download
+
+=item --nodownload
+
+This option causes all messages in the specified mailbox to be downloaded from the server
+and searched locally. See --download-max if you only want to download a few messages.
+Currently only the following RFC 2060 search criteria are supported:
+TEXT, BODY, SUBJECT, HEADER, NOT, OR, SENTBEFORE, SENTON, SENTSINCE.
+
+Requires Email::Simple to be installed. It is available on CPAN.
+
+This option may be particularly useful to you if your mail server is slow to index
+messages (like Exchange 2003), causing the plugin not to find them with IMAP SEARCH
+even though they are in the inbox.
+
+It's also useful if you're searching for messages that have been on the server for a
+specified amount of time, like some minutes or hours, because the standard IMAP search
+function only allows whole dates. For this, use the standard search keywords but you
+can specify either just a date like in RFC 2060 or a date and a time.
+
+If you use SENTBEFORE, SENTON, or SENTSINCE, you must have Date::Manip installed
+on your system.
+
+
+=item --download-max
+
+Limits the number of messages downloaded from the server when the --download option is used.
+Default is to download and search all messages.
+
+=item --search-critical-min <messages>
+
+This option will trigger a CRITICAL status if the number of messages found by the search criteria
+is below the given number. Use in conjunction with --search.
+
+This parameter defaults to 1 so that if no messages are found, the plugin will exit with a CRITICAL status.
+
+If you want the original behavior where the plugin exits with a WARNING status when no messages are found,
+set this parameter to 0.
+
+=item --search-critical-max <messages>
+
+This option will trigger a CRITICAL status if the number of messages found by the search criteria
+is above the given number. Use in conjunction with --search.
+
+This parameter defaults to -1 meaning it's disabled. If you set it to 10, the plugin will exit with
+CRITICAL if it finds 11 messages. If you set it to 1, the plugin will exit with CRITICAL if it finds
+any more than 1 message. If you set it to 0, the plugin will exit with CRITICAL if it finds any messages
+at all. If you set it to -1 it will be disabled.
+
+=item --search-warning-min <messages>
+
+This option will trigger a WARNING status if the number of messages found by the search criteria
+is below the given number. Use in conjunction with --search.
+
+This parameter defaults to 1 so that if no messages are found, the plugin will exit with a WARNING status.
+
+If you want to suppress the original behavior where the plugin exits with a WARNING status when no messages are found,
+set this parameter to 0. When this parameter is 0, it means that you expect the mailbox not to have any messages.
+
+=item --search-warning-max <messages>
+
+This option will trigger a WARNING status if the number of messages found by the search criteria
+is above the given number. Use in conjunction with --search.
+
+This parameter defaults to -1 meaning it's disabled. If you set it to 10, the plugin will exit with
+WARNING if it finds 11 messages. If you set it to 1, the plugin will exit with WARNING if it finds
+any more than 1 message. If you set it to 0, the plugin will exit with WARNING if it finds any messages
+at all. If you set it to -1 it will be disabled.
+
+=item --capture-max <regexp>
+
+In addition to specifying search arguments to filter the emails in the IMAP account, you can specify
+a "capture-max" regexp argument and the eligible emails (found with search arguments)
+will be compared to each other and the OK line will have the highest captured value.
+
+The regexp is expected to capture a numeric value.
+
+=item --capture-min <regexp>
+
+In addition to specifying search arguments to filter the emails in the IMAP account, you can specify
+a "capture-min" regexp argument and the eligible emails (found with search arguments)
+will be compared to each other and the OK line will have the lowest captured value.
+
+The regexp is expected to capture a numeric value.
+
+=item --delete
+
+=item --nodelete
+
+Use the delete option to delete messages that matched the search criteria. This is useful for
+preventing the mailbox from filling up with automated messages (from the check_smtp_send plugin, for example).
+THE DELETE OPTION IS TURNED *ON* BY DEFAULT, in order to preserve compatibility with an earlier version.
+
+Use the nodelete option to turn off the delete option.
+
+=item --nodelete-captured
+
+If you use both the capture-max and delete arguments, you can also use the nodelete-captured argument to specify that the email
+with the highest captured value should not be deleted. This leaves it available for comparison the next time this plugin runs.
+
+If you do not use the delete option, this option has no effect.
+
+=item --ssl
+
+=item --nossl
+
+Enable SSL protocol. Requires IO::Socket::SSL.
+
+Using this option automatically changes the default port from 143 to 993. You can still
+override this from the command line using the --port option.
+
+Use the nossl option to turn off the ssl option.
+
+=item --ssl-ca-file
+
+Use this to verify the server SSL certificate against a local .pem file. You'll need to
+specify the path to the .pem file as the parameter.
+
+You can use the imap_ssl_cert utility included in this distribution to connect to your IMAP
+server and save its SSL certificates into your .pem file. Usage is like this:
+
+ imap_ssl_cert -H imap.server.com > ca_file.pem
+
+Only applicable when --ssl option is enabled.
+
+=item --template
+
+=item --notemplate
+
+Enable (or disable) processing of IMAP search parameters. Requires Text::Template and Date::Manip.
+
+Use this option to apply special processing to IMAP search parameters that allows you to use the
+results of arbitrary computations as the parameter values. For example, you can use this feature
+to search for message received up to 4 hours ago.
+
+Modern IMAP servers that support rfc5032 extensions allow searching with the YOUNGER and OLDER
+criteria so a message received up to 4 hours ago is -s YOUNGER -s 14400. But if your mail server
+doesn't support that, you could use the --template option to get similar functionality.
+
+When you enable the --template option, each parameter you pass to the -s option is parsed by
+Text::Template. See the Text::Template manual for more information, but in general any expression
+written in Perl will work.
+
+A convenience function called rfc2822dateHeader is provided to you so you can easily compute properly
+formatted dates for use as search parameters. The rfc2822date function can take one or two
+parameters itself: the date to format and an optional offset. To use the current time as a
+search parameter, you can write this:
+
+ $ check_imap_receive ... --template -s HEADER -s Delivery-Date -s '{rfc2822dateHeader("now")}'
+
+The output of {rfc2822dateHeader("now")} looks like this: Wed, 30 Sep 2009 22:44:03 -0700 and
+is suitable for use with a date header, like HEADER Delivery-Date.
+
+To use a time in the past relative to the current time or day, you can use a second convenience function
+called rfc2822date and write this:
+
+ $ check_imap_receive ... --template -s SENTSINCE -s '{rfc2822date("now","-1 day")}'
+
+The output of {rfc2822date("now","-1 day")} looks like this: 29-Sep-2009 and is suitable for use
+with BEFORE, ON, SENTBEFORE, SENTON, SENTSINCE, and SINCE.
+
+I have seen some email clients use a different format in the Date field,
+like September 17, 2009 9:46:51 AM PDT. To specify an arbitrary format like this one, write this:
+
+ $ check_imap_receive ... --template -s HEADER -s Delivery-Date -s '{date("%B %e, %Y %i:%M:%S %p %Z","now","-4 hours")}'
+
+You can use BEFORE, ON, SENTBEFORE, SENTON, SENTSINCE, or SINCE to search for messages that arrived
+on, before, or after a given day but not on, before, or after a specific time on that day.
+
+To search for messages that arrived on, before, or after a specific time you have to use the
+Delivery-Date or another date field, like with -s HEADER -s Delivery-Date in the example above.
+
+See the Date::Manip manual for more information on the allowed expressions for date and delta strings.
+
+=item --hires
+
+Use the Time::HiRes module to measure time, if available.
+
+=item --verbose
+
+Display additional information. Useful for troubleshooting. Use together with --version to see the default
+warning and critical timeout values.
+
+If the selected mailbox was not found, you can use verbosity level 3 (-vvv) to display a list of all
+available mailboxes on the server.
+
+Also known as: -v
+
+=item --version
+
+Display plugin version and exit.
+Also known as: -V
+
+=item --help
+
+Display this documentation and exit. Does not work in the ePN version.
+Also known as: -h
+
+=item --usage
+
+Display a short usage instruction and exit.
+
+=back
+
+=head1 EXAMPLES
+
+=head2 Report how many emails are in the mailbox
+
+ $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
+ -s ALL --nodelete
+
+ IMAP RECEIVE OK - 1 seconds, 7 found
+
+=head2 Report the email with the highest value
+
+Suppose your mailbox has some emails from an automated script and that a message
+from this script typically looks like this (abbreviated):
+
+ To: mailuser@server.net
+ From: autoscript@server.net
+ Subject: Results of Autoscript
+ Date: Wed, 09 Nov 2005 08:30:40 -0800
+ Message-ID: <auto-000000992528@server.net>
+
+ Homeruns 5
+
+And further suppose that you are interested in reporting the message that has the
+highest number of home runs, and also to leave this message in the mailbox for future
+checks, but remove the other matching messages with lesser values:
+
+ $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
+ -s SUBJECT -s "Results of Autoscript" --capture-max "Homeruns (\d+)" --nodelete-captured
+
+ IMAP RECEIVE OK - 1 seconds, 3 found, 1 captured, 5 max, 2 deleted
+
+=head2 Troubleshoot your search parameters
+
+Add the --nodelete and --imap-retries=1 parameters to your command line.
+
+=head1 EXIT CODES
+
+Complies with the Nagios plug-in specification:
+ 0 OK The plugin was able to check the service and it appeared to be functioning properly
+ 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly
+ 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold
+ 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service
+
+=head1 NAGIOS PLUGIN NOTES
+
+Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html
+
+This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because
+the path to utils.pm must be specified completely in this program and forces users to edit the source
+code if their install location is different (if they realize this is the problem). You can view
+the default timeout for this module by using the --verbose and --version options together. The
+short form is -vV.
+
+Other than that, it attempts to follow published guidelines for Nagios plugins.
+
+=head1 SEE ALSO
+
+http://nagios.org/
+http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod
+http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod
+
+=head1 CHANGES
+
+ Wed Oct 29 11:00:00 PST 2005
+ + version 0.1
+
+ Wed Nov 9 09:53:32 PST 2005
+ + added delete/nodelete option. deleting found messages is still default behavior.
+ + added capture-max option
+ + added nodelete-captured option
+ + added mailbox option
+ + added eval/alarm block to implement -c option
+ + now using an inline PluginReport package to generate the report
+ + copyright notice and GNU GPL
+ + version 0.2
+
+ Thu Apr 20 14:00:00 CET 2006 (by Johan Nilsson <johann (at) axis.com>)
+ + version 0.2.1
+ + added support for multiple polls of imap-server, with specified intervals
+
+ Tue Apr 24 21:17:53 PDT 2007
+ + now there is an alternate version (same but without embedded perl POD) that is compatible with the new new embedded-perl Nagios feature
+ + added patch from Benjamin Ritcey <ben@ritcey.com> for SSL support on machines that have an SSL-enabled
+ + version 0.2.3
+
+ Fri Apr 27 18:56:50 PDT 2007
+ + fixed problem that "Invalid search parameters" was not printed because of missing newline to flush it
+ + warnings and critical errors now try to append error messages received from the IMAP client
+ + changed connection error to display timeout only if timeout was the error
+ + documentation now mentions every command-line option accepted by the plugin, including abbreviations
+ + added abbreviations U for username, P for password, m for mailbox
+ + fixed bug that imap-check-interval applied even after the last try (imap-retries) when it was not necessary
+ + the IMAP expunge command is not sent unless at least one message is deleted
+ + fixed bug that the "no messages" warning was printed even if some messages were found
+ + version 0.3
+
+ Sun Oct 21 14:08:07 PDT 2007
+ + added port info to the "could not connect" error message
+ + fixed bug that occurred when using --ssl --port 143 which caused port to remain at the default 993 imap/ssl port
+ + added clarity shortcuts --search-subject and --search-header
+ + port is no longer a required option. defaults to 143 for regular IMAP and 993 for IMAP/SSL
+ + version 0.3.1
+
+ Sun Oct 21 20:41:56 PDT 2007
+ + reworked ssl support to use IO::Socket::SSL instead of the convenience method Mail::IMAPClient->Ssl (which is not included in the standard Mail::IMAPClient package)
+ + removed clarity shortcuts (bad idea, code bloat)
+ + version 0.4
+
+ Tue Dec 4 07:05:27 PST 2007
+ + added version check to _read_line workaround for SSL-related bug in Mail::IMAPClient version 2.2.9 ; newer versions fixed the bug
+ + added --usage option because the official nagios plugins have both --help and --usage
+ + added --timeout option to match the official nagios plugins
+ + fixed some minor pod formatting issues for perldoc
+ + version 0.4.1
+
+ Sat Dec 15 07:39:59 PST 2007
+ + improved compatibility with Nagios embedded perl (ePN)
+ + version 0.4.2
+
+ Mon Jan 7 21:35:23 PST 2008
+ + changed version check for Mail::IMAPClient version 2.2.9 to use string comparison le "2.2.9"
+ + fixed bug where script was dying on socket->autoflush when socket does not exist because autoflush was being called before checking the socket object
+ + version 0.4.3
+
+ Mon Feb 11 19:13:38 PST 2008
+ + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules
+ + version 0.4.4
+
+ Mon May 26 08:33:27 PDT 2008
+ + fixed a bug for number captured, it now reflects number of messages captured instead of always returning "1"
+ + added --capture-min option to complement --capture-max
+ + added --search-critical-min to trigger a CRITICAL alert if number of messages found is less than argument, with default 1.
+ + fixed warning and critical messages to use "more than" or "less than" instead of the angle brackets, to make them more web friendly
+ + version 0.5
+
+ Wed Jul 2 14:59:05 PDT 2008
+ + fixed a bug for not finding a message after the first try, by reselecting the mailbox before each search
+ + version 0.5.1
+
+ Sat Dec 13 08:57:29 PST 2008
+ + added --download option to allow local searching of messages (useful if your server has an index that handles searching but it takes a while before new emails show up and you want immediate results), supports only the TEXT, BODY, SUBJECT, and HEADER search keys
+ + added --download-max option to set a limit on number of messages downloaded with --download
+ + version 0.6.0
+
+ Wed Sep 30 23:25:33 PDT 2009
+ + fixed --download-max option (was incorrectly looking for --download_max). currently both will work, in the future only --download-max will work
+ + added --template option to allow arbitrary substitutions for search parameters, and provided three convenience functions for working with dates
+ + added date search criteria to the --download option: SENTBEFORE, SENTON, and SENTSINCE which check the Date header and allow hours and minutes in addition to dates (whereas the IMAP standard only allows dates)
+ + added --search-critical-max to trigger a CRITICAL alert if number of messages found is more than argument, disabled by default.
+ + fixed a bug in --download --search where messages would match even though they failed the search criteria
+ + changed behavior of --download-max to look at the most recent messages first (hopefully); the IMAP protocol doesn't guarantee the order that the messages are returned but I observed that many mail servers return them in chronological order; so now --download-max reverses the order to look at the newer messages first
+ + added performance data for use with PNP4Nagios!
+ + version 0.7.0
+
+ Fri Oct 2 15:22:00 PDT 2009
+ + added --search-warning-max and --search-warning-min to trigger a WARNING alert if number of messages is more than or less than the specified number.
+ + fixed --download option not to fail with CRITICAL if mailbox is empty; now this can be configured with --search-warning-min or --search-critical-min
+ + version 0.7.1
+
+ Sat Nov 21 18:27:17 PST 2009
+ + fixed problem with using --download option on certain mail servers by turning on the IgnoreSizeErrors feature in IMAPClient
+ + added --peek option to prevent marking messages as seen
+ + version 0.7.2
+
+ Tue Jan 5 12:13:53 PST 2010
+ + added error message and exit with unknown status when an unrecognized IMAP search criteria is encountered by the --download --search option
+
+ Wed May 5 11:14:51 PDT 2010
+ + added mailbox list when mailbox is not found and verbose level 3 is on (-vvv)
+ + version 0.7.3
+
+ Tue Mar 8 18:58:14 AST 2011
+ + updated documentation for --search and --template to mention rfc5032 extensions (thanks to Stuart Henderson)
+
+ Fri May 6 08:35:09 AST 2011
+ + added --hires option to enable use of Time::Hires if available
+ + version 0.7.4
+
+ Fri Nov 11 01:51:40 AST 2011
+ + added --ssl-ca-file option to allow verifying the server certificate against a local .pem file (thanks to Alexandre Bezroutchko)
+ + added imap_ssl_cert.pl utility (not in this file) to conveniently save the server's SSL certificates into a local .pem file
+ + version 0.7.5
+
+=head1 AUTHOR
+
+Jonathan Buhacoff <jonathan@buhacoff.net>
+
+=head1 COPYRIGHT AND LICENSE
+
+ Copyright (C) 2005-2011 Jonathan Buhacoff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ http://www.gnu.org/licenses/gpl.txt
+
+=cut
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_receive_epn b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_receive_epn
new file mode 100644
index 0000000..f1c0fc4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_imap_receive_epn
@@ -0,0 +1,492 @@
+#!/usr/bin/perl
+use strict;
+my $VERSION = '0.7.5';
+my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
+my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt';
+my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 );
+
+# look for required modules
+exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Mail::IMAPClient/);
+
+BEGIN {
+ if( grep { /^--hires$/ } @ARGV ) {
+ eval "use Time::HiRes qw(time);";
+ warn "Time::HiRes not installed\n" if $@;
+ }
+}
+
+# get options from command line
+Getopt::Long::Configure("bundling");
+my $verbose = 0;
+my $help = "";
+my $help_usage = "";
+my $show_version = "";
+my $imap_server = "";
+my $default_imap_port = "143";
+my $default_imap_ssl_port = "993";
+my $imap_port = "";
+my $username = "";
+my $password = "";
+my $mailbox = "INBOX";
+my @search = ();
+my $search_critical_min = 1;
+my $search_critical_max = -1; # -1 means disabled for this option
+my $search_warning_min = 1;
+my $search_warning_max = -1; # -1 means disabled for this option
+my $capture_max = "";
+my $capture_min = "";
+my $delete = 1;
+my $no_delete_captured = "";
+my $warntime = 15;
+my $criticaltime = 30;
+my $timeout = 60;
+my $interval = 5;
+my $max_retries = 10;
+my $download = "";
+my $download_max = "";
+my $peek = "";
+my $template = "";
+my $ssl = 0;
+my $ssl_ca_file = "";
+my $tls = 0;
+my $time_hires = "";
+my $ok;
+$ok = Getopt::Long::GetOptions(
+ "V|version"=>\$show_version,
+ "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage,
+ "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout,
+ # imap settings
+ "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port,
+ "U|username=s"=>\$username,"P|password=s"=>\$password, "m|mailbox=s"=>\$mailbox,
+ "imap-check-interval=i"=>\$interval,"imap-retries=i"=>\$max_retries,
+ "ssl!"=>\$ssl, "ssl-ca-file=s"=>\$ssl_ca_file, "tls!"=>\$tls,
+ # search settings
+ "s|search=s"=>\@search,
+ "search-critical-min=i"=>\$search_critical_min, "search-critical-max=i"=>\$search_critical_max,
+ "search-warning-min=i"=>\$search_warning_min, "search-warning-max=i"=>\$search_warning_max,
+ "capture-max=s"=>\$capture_max, "capture-min=s"=>\$capture_min,
+ "delete!"=>\$delete, "nodelete-captured"=>\$no_delete_captured,
+ "download!"=>\$download, "download_max=i"=>\$download_max, "download-max=i"=>\$download_max,
+ "peek!"=>\$peek,
+ "template!"=>\$template,
+ # Time
+ "hires"=>\$time_hires,
+ );
+
+if( $show_version ) {
+ print "$VERSION\n";
+ if( $verbose ) {
+ print "Default warning threshold: $warntime seconds\n";
+ print "Default critical threshold: $criticaltime seconds\n";
+ print "Default timeout: $timeout seconds\n";
+ }
+ exit $status{UNKNOWN};
+}
+
+if( $help ) {
+ exec "perldoc", $0 or print "Try `perldoc $0`\n";
+ exit $status{UNKNOWN};
+}
+
+my @required_module = ();
+push @required_module, 'IO::Socket::SSL' if $ssl || $tls;
+push @required_module, 'Email::Simple' if $download;
+push @required_module, ('Text::Template','Date::Manip') if $template;
+exit $status{UNKNOWN} unless load_modules(@required_module);
+
+if( $help_usage
+ ||
+ ( $imap_server eq "" || $username eq "" || $password eq "" || scalar(@search)==0 )
+ ) {
+ print "Usage: $0 -H host [-p port] -U username -P password -s HEADER -s X-Nagios -s 'ID: 1234.' [-w <seconds>] [-c <seconds>] [--imap-check-interval <seconds>] [--imap-retries <tries>]\n";
+ exit $status{UNKNOWN};
+}
+
+# before attempting to connect to the server, check if any of the search parameters
+# use substitution functions and make sure we can parse them first. if we can't we
+# need to abort since the search will be meaningless.
+if( $template ) {
+ foreach my $token (@search) {
+ my $t = Text::Template->new(TYPE=>'STRING',SOURCE=>$token,PACKAGE=>'ImapSearchTemplate');
+ $token = $t->fill_in(PREPEND=>q{package ImapSearchTemplate;});
+ #print "token: $token\n";
+ }
+}
+
+
+# initialize
+my $report = new PluginReport;
+my $time_start = time;
+
+# connect to IMAP server
+print "connecting to server $imap_server\n" if $verbose > 2;
+my $imap;
+eval {
+ local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
+ alarm $timeout;
+
+ if( $ssl || $tls ) {
+ $imap_port = $default_imap_ssl_port unless $imap_port;
+ my %ssl_args = ();
+ if( length($ssl_ca_file) > 0 ) {
+ $ssl_args{SSL_verify_mode} = 1;
+ $ssl_args{SSL_ca_file} = $ssl_ca_file;
+ $ssl_args{SSL_verifycn_scheme} = 'imap';
+ $ssl_args{SSL_verifycn_name} = $imap_server;
+ }
+ my $socket = IO::Socket::SSL->new(PeerAddr=>"$imap_server:$imap_port", %ssl_args);
+ die IO::Socket::SSL::errstr() . " (if you get this only when using both --ssl and --ssl-ca-file, but not when using just --ssl, the server SSL certificate failed validation)" unless $socket;
+ $socket->autoflush(1);
+ $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 );
+ $imap->State(Mail::IMAPClient->Connected);
+ $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works
+ $imap->User($username);
+ $imap->Password($password);
+ $imap->login() or die "Cannot login: $@";
+ }
+ else {
+ $imap_port = $default_imap_port unless $imap_port;
+ $imap = Mail::IMAPClient->new(Debug => 0 );
+ $imap->Server("$imap_server:$imap_port");
+ $imap->User($username);
+ $imap->Password($password);
+ $imap->connect() or die "$@";
+ }
+
+ $imap->Peek(1) if $peek;
+ $imap->Ignoresizeerrors(1);
+
+ alarm 0;
+};
+if( $@ ) {
+ chomp $@;
+ print "IMAP RECEIVE CRITICAL - Could not connect to $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+unless( $imap ) {
+ print "IMAP RECEIVE CRITICAL - Could not connect to $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+my $time_connected = time;
+
+# select a mailbox
+print "selecting mailbox $mailbox\n" if $verbose > 2;
+unless( $imap->select($mailbox) ) {
+ print "IMAP RECEIVE CRITICAL - Could not select $mailbox: $@ $!\n";
+ if( $verbose > 2 ) {
+ print "Mailbox list:\n" . join("\n", $imap->folders) . "\n";
+ print "Mailbox separator: " . $imap->separator . "\n";
+ ##print "Special mailboxes:\n" . join("\n", map { "$_ => ".
+ }
+ $imap->logout();
+ exit $status{CRITICAL};
+}
+
+
+# search for messages
+my $tries = 0;
+my @msgs;
+until( scalar(@msgs) != 0 || $tries >= $max_retries ) {
+ eval {
+ $imap->select( $mailbox );
+ # if download flag is on, we download recent messages and search ourselves
+ if( $download ) {
+ print "downloading messages to search\n" if $verbose > 2;
+ @msgs = download_and_search($imap,@search);
+ }
+ else {
+ print "searching on server\n" if $verbose > 2;
+ @msgs = $imap->search(@search);
+ die "Invalid search parameters: $@" if $@;
+ }
+ };
+ if( $@ ) {
+ chomp $@;
+ print "Cannot search messages: $@\n";
+ $imap->close();
+ $imap->logout();
+ exit $status{UNKNOWN};
+ }
+ $report->{found} = scalar(@msgs);
+ $tries++;
+ sleep $interval unless (scalar(@msgs) != 0 || $tries >= $max_retries);
+}
+
+sub download_and_search {
+ my ($imap,@search) = @_;
+ my $ims = new ImapMessageSearch;
+ $ims->querytokens(@search);
+ my @found = ();
+ @msgs = reverse $imap->messages or (); # die "Cannot list messages: $@\n"; # reversing to get descending order, which is most recent messages first! (at least on my mail servers)
+ @msgs = @msgs[0..$download_max-1] if $download_max && scalar(@msgs) > $download_max;
+ foreach my $m (@msgs) {
+ my $message = $imap->message_string($m);
+ push @found, $m if $ims->match($message);
+ }
+ return @found;
+}
+
+
+
+# capture data in messages
+my $captured_max_id = "";
+my $captured_min_id = "";
+if( $capture_max || $capture_min ) {
+ my $max = undef;
+ my $min = undef;
+ my %captured = ();
+ for (my $i=0;$i < scalar(@msgs); $i++) {
+ my $message = $imap->message_string($msgs[$i]);
+ if( $message =~ m/$capture_max/ ) {
+ if( !defined($max) || $1 > $max ) {
+ $captured{ $i } = 1;
+ $max = $1;
+ $captured_max_id = $msgs[$i];
+ }
+ }
+ if( $message =~ m/$capture_min/ ) {
+ if( !defined($min) || $1 < $min ) {
+ $captured{ $i } = 1;
+ $min = $1;
+ $captured_min_id = $msgs[$i];
+ }
+ }
+ print $message if $verbose > 1;
+ }
+ $report->{captured} = scalar keys %captured;
+ $report->{max} = $max if defined $max;
+ $report->{min} = $min if defined $min;
+}
+
+# delete messages
+if( $delete ) {
+ print "deleting matching messages\n" if $verbose > 2;
+ my $deleted = 0;
+ for (my $i=0;$i < scalar(@msgs); $i++) {
+ next if ($no_delete_captured && ($captured_max_id eq $msgs[$i]));
+ next if ($no_delete_captured && ($captured_min_id eq $msgs[$i]));
+ $imap->delete_message($msgs[$i]);
+ $deleted++;
+ }
+ $report->{deleted} = $deleted;
+ $imap->expunge() if $deleted;
+}
+
+# deselect the mailbox
+$imap->close();
+
+# disconnect from IMAP server
+print "disconnecting from server\n" if $verbose > 2;
+$imap->logout();
+
+# calculate elapsed time and issue warnings
+my $time_end = time;
+my $elapsedtime = $time_end - $time_start;
+$report->{seconds} = $elapsedtime;
+$report->{found} = 0 unless defined $report->{found};
+$report->{captured} = 0 unless defined $report->{captured};
+
+my @warning = ();
+my @critical = ();
+
+push @warning, "found less than $search_warning_min" if( scalar(@msgs) < $search_warning_min );
+push @warning, "found more than $search_warning_max" if ( $search_warning_max > -1 && scalar(@msgs) > $search_warning_max );
+push @critical, "found less than $search_critical_min" if ( scalar(@msgs) < $search_critical_min );
+push @critical, "found more than $search_critical_max" if ( $search_critical_max > -1 && scalar(@msgs) > $search_critical_max );
+push @warning, "connection time more than $warntime" if( $time_connected - $time_start > $warntime );
+push @critical, "connection time more than $criticaltime" if( $time_connected - $time_start > $criticaltime );
+
+# print report and exit with known status
+my $perf_data = "elapsed=".$report->{seconds}."s found=".$report->{found}."messages captured=".$report->{captured}."messages"; # TODO: need a component for safely generating valid perf data format. for notes on the format, see http://www.perfparse.de/tiki-view_faq.php?faqId=6 and http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185
+my $short_report = $report->text(qw/seconds found captured max min deleted/) . " | $perf_data";
+if( scalar @critical ) {
+ my $crit_alerts = join(", ", @critical);
+ print "IMAP RECEIVE CRITICAL - $crit_alerts; $short_report\n";
+ exit $status{CRITICAL};
+}
+if( scalar @warning ) {
+ my $warn_alerts = join(", ", @warning);
+ print "IMAP RECEIVE WARNING - $warn_alerts; $short_report\n";
+ exit $status{WARNING};
+}
+print "IMAP RECEIVE OK - $short_report\n";
+exit $status{OK};
+
+
+# utility to load required modules. exits if unable to load one or more of the modules.
+sub load_modules {
+ my @missing_modules = ();
+ foreach( @_ ) {
+ eval "require $_";
+ push @missing_modules, $_ if $@;
+ }
+ if( @missing_modules ) {
+ print "Missing perl modules: @missing_modules\n";
+ return 0;
+ }
+ return 1;
+}
+
+
+# NAME
+# PluginReport
+# SYNOPSIS
+# $report = new PluginReport;
+# $report->{label1} = "value1";
+# $report->{label2} = "value2";
+# print $report->text(qw/label1 label2/);
+package PluginReport;
+
+sub new {
+ my ($proto,%p) = @_;
+ my $class = ref($proto) || $proto;
+ my $self = bless {}, $class;
+ $self->{$_} = $p{$_} foreach keys %p;
+ return $self;
+}
+
+sub text {
+ my ($self,@labels) = @_;
+ my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels;
+ my $text = join(", ", @report);
+ return $text;
+}
+
+package ImapMessageSearch;
+
+require Email::Simple;
+
+sub new {
+ my ($proto,%p) = @_;
+ my $class = ref($proto) || $proto;
+ my $self = bless {}, $class;
+ $self->{querystring} = [];
+ $self->{querytokens} = [];
+ $self->{queryfnlist} = [];
+ $self->{mimemessage} = undef;
+ $self->{$_} = $p{$_} foreach keys %p;
+ return $self;
+}
+
+sub querystring {
+ my ($self,$string) = @_;
+ $self->{querystring} = $string;
+ return $self->querytokens( parseimapsearch($string) );
+}
+
+sub querytokens {
+ my ($self,@tokens) = @_;
+ $self->{querytokens} = [@tokens];
+ $self->{queryfnlist} = [create_search_expressions(@tokens)];
+ return $self;
+}
+
+sub match {
+ my ($self,$message_string) = @_;
+ return 0 unless defined $message_string;
+ my $message_mime = Email::Simple->new($message_string);
+ return $self->matchmime($message_mime);
+}
+
+sub matchmime {
+ my ($self,$message_mime) = @_;
+ my $match = 1;
+ foreach my $x (@{$self->{queryfnlist}}) {
+ $match = $match && $x->($message_mime);
+ }
+ return $match;
+}
+
+# this should probably become its own Perl module... see also Net::IMAP::Server::Command::Search
+sub create_search_expressions {
+ my (@search) = @_;
+ return () unless scalar(@search);
+ my $token = shift @search;
+ if( $token eq 'TEXT' ) {
+ my $value = shift @search;
+ return (sub {shift->as_string =~ /\Q$value\E/i},create_search_expressions(@search));
+ }
+ if( $token eq 'BODY' ) {
+ my $value = shift @search;
+ return (sub {shift->body =~ /\Q$value\E/i},create_search_expressions(@search));
+ }
+ if( $token eq 'SUBJECT' ) {
+ my $value = shift @search;
+ return (sub {shift->header('Subject') =~ /\Q$value\E/i},create_search_expressions(@search));
+ }
+ if( $token eq 'HEADER' ) {
+ my $name = shift @search;
+ my $value = shift @search;
+ return (sub {shift->header($name) =~ /\Q$value\E/i},create_search_expressions(@search));
+ }
+ if( $token eq 'NOT' ) {
+ my @exp = create_search_expressions(@search);
+ my $next = shift @exp;
+ return (sub { ! $next->(@_) }, @exp);
+ }
+ if( $token eq 'OR' ) {
+ my @exp = create_search_expressions(@search);
+ my $next1 = shift @exp;
+ my $next2 = shift @exp;
+ return (sub { $next1->(@_) or $next2->(@_) }, @exp);
+ }
+ if( $token eq 'SENTBEFORE' ) {
+ my $value = shift @search;
+ return (sub {datecmp(shift->header('Date'),$value) < 0},create_search_expressions(@search));
+ }
+ if( $token eq 'SENTON' ) {
+ my $value = shift @search;
+ return (sub {datecmp(shift->header('Date'),$value) == 0},create_search_expressions(@search));
+ }
+ if( $token eq 'SENTSINCE' ) {
+ my $value = shift @search;
+ return (sub {datecmp(shift->header('Date'),$value) > 0},create_search_expressions(@search));
+ }
+ return sub { die "invalid search parameter: $token" };
+}
+
+sub datecmp {
+ my ($date1,$date2) = @_;
+ my $parsed1 = Date::Manip::ParseDate($date1);
+ my $parsed2 = Date::Manip::ParseDate($date2);
+ my $cmp = Date::Manip::Date_Cmp($parsed1,$parsed2);
+ print " $date1 <=> $date2 -> $cmp\n";
+ return $cmp <=> 0;
+}
+
+package ImapSearchTemplate;
+
+# Takes an English date specification ("now", etc) and an optional offset ("-4 hours")
+# and returns an RFC 2822 formatted date string.
+# see http://search.cpan.org/dist/Date-Manip/lib/Date/Manip.pod
+sub rfc2822dateHeader {
+ my ($when,$delta) = @_;
+ $when = Date::Manip::ParseDate($when);
+ $delta = Date::Manip::ParseDateDelta($delta) if $delta;
+ my $d = $delta ? Date::Manip::DateCalc($when,$delta) : $when;
+ return Date::Manip::UnixDate($d, "%a, %d %b %Y %H:%M:%S %z");
+}
+
+sub rfc2822date {
+ my ($when,$delta) = @_;
+ $when = Date::Manip::ParseDate($when);
+ $delta = Date::Manip::ParseDateDelta($delta) if $delta;
+ my $d = $delta ? Date::Manip::DateCalc($when,$delta) : $when;
+ return Date::Manip::UnixDate($d, "%d-%b-%Y");
+}
+
+# alias for 2822 ... RFC 822 is an older version and specifies 2-digit years, but we ignore that for now.
+sub rfc822dateHeader { return rfc2822dateHeader(@_); }
+sub rfc822date { return rfc2822date(@_); }
+
+sub date {
+ my ($format,$when,$delta) = @_;
+ $when = Date::Manip::ParseDate($when);
+ $delta = Date::Manip::ParseDateDelta($delta) if $delta;
+ my $d = $delta ? Date::Manip::DateCalc($when,$delta) : $when;
+ return Date::Manip::UnixDate($d, $format);
+}
+
+package main;
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_smtp_send b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_smtp_send
new file mode 100644
index 0000000..ade0fe3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_smtp_send
@@ -0,0 +1,782 @@
+#!/usr/bin/perl
+use strict;
+use POSIX qw(strftime);
+my $VERSION = '0.7.3';
+my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
+my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt';
+my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 );
+
+# look for required modules
+exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Net::SMTP/);
+
+BEGIN {
+ if( grep { /^--hires$/ } @ARGV ) {
+ eval "use Time::HiRes qw(time);";
+ warn "Time::HiRes not installed\n" if $@;
+ }
+}
+
+Getopt::Long::Configure("bundling");
+my $verbose = 0;
+my $help = "";
+my $help_usage = "";
+my $show_version = "";
+my $smtp_server = "";
+my $default_smtp_port = "25";
+my $default_smtp_ssl_port = "465";
+my $default_smtp_tls_port = "587";
+my $smtp_port = "";
+my @mailto = ();
+my $mailfrom = "";
+my @header = ();
+my $body = "";
+my $stdin = "";
+my $template = "";
+my $expect_response = "250";
+my $warntime = 15;
+my $criticaltime = 30;
+my $timeout = 60;
+my $tls = 0;
+my $ssl = 0;
+my $auth_method = undef;
+my $username = "";
+my $password = "";
+my $time_hires = "";
+my $mx_lookup = 0;
+my $ok;
+$ok = Getopt::Long::GetOptions(
+ "V|version"=>\$show_version,
+ "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage,
+ "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout,
+ # smtp settings
+ "H|hostname=s"=>\$smtp_server,"p|port=i"=>\$smtp_port,
+ "mailto=s"=>\@mailto, "mailfrom=s",\$mailfrom,
+ "header=s"=>\@header, "body=s"=>\$body, "stdin"=>\$stdin,
+ "template!"=>\$template,
+ # SSL/TLS/auth options
+ "tls!"=>\$tls, "ssl!"=>\$ssl, "auth=s"=>\$auth_method,
+ "U|username=s"=>\$username,"P|password=s"=>\$password,
+ # Server response
+ "E|expect-response=s"=>\$expect_response,
+ # Time
+ "hires"=>\$time_hires,
+ );
+
+if( $show_version ) {
+ print "$VERSION\n";
+ if( $verbose ) {
+ print "Default warning threshold: $warntime seconds\n";
+ print "Default critical threshold: $criticaltime seconds\n";
+ print "Default timeout: $timeout seconds\n";
+ }
+ exit $status{UNKNOWN};
+}
+
+if( $help ) {
+ exec "perldoc", $0 or print "Try `perldoc $0`\n";
+ exit $status{UNKNOWN};
+}
+
+if( $smtp_server eq "" && scalar(@mailto) == 1 ) {
+ # no SMTP server specified but one mailto address given means we can look up the MX record
+ $mx_lookup = 1;
+}
+
+my @required_module = ();
+push @required_module, 'Net::SMTP::SSL' if $ssl;
+push @required_module, ('MIME::Base64','Authen::SASL') if $ssl && $username;
+push @required_module, 'Net::SMTP::TLS' if $tls;
+push @required_module, 'Net::SMTP_auth' if $auth_method and not $tls; # whereas if auth_method and tls we use TLS_auth, which is included in this script!
+push @required_module, 'Text::Template' if $template;
+push @required_module, 'Net::DNS' if $mx_lookup;
+push @required_module, 'Email::Address' if $mx_lookup;
+exit $status{UNKNOWN} unless load_modules(@required_module);
+
+
+# split up @mailto if commas were used instead of multiple options
+@mailto = split(/,/,join(',',@mailto));
+
+if( $help_usage ||
+ (
+ ($smtp_server eq "" && !$mx_lookup) || scalar(@mailto)==0 || $mailfrom eq ""
+ )
+ ) {
+ print "Usage: $0 [-H host [-p port]] --mailto recipient\@your.net [--mailto recipient2\@your.net ...] --mailfrom sender\@your.net --body 'some text' [-w <seconds>] [-c <seconds>]\n";
+ exit $status{UNKNOWN};
+}
+
+# initialize
+my $report = new PluginReport;
+my $time_start = time;
+my $actual_response = undef;
+my @warning = ();
+my @critical = ();
+
+my $smtp_debug = 0;
+$smtp_debug = 1 if $verbose >= 3;
+
+# default date and message id headers
+push @header, default_date_header() unless find_header("Date",@header);
+push @header, default_messageid_header() unless find_header("Message-ID",@header);
+
+# look up MX server if necessary
+if( $mx_lookup ) {
+ my $addr = Email::Address->new( undef, $mailto[0] );
+ my $mx_domain = $addr->host;
+ print "MX lookup " . $mx_domain . "\n" if $verbose > 1;
+ my $res = Net::DNS::Resolver->new;
+ my @mx = Net::DNS::mx($res, $mx_domain);
+ if( @mx ) {
+ # use the first server
+ foreach my $rr (@mx) {
+ print "pref : " . $rr->preference . " exchange: " . $rr->exchange . "\n" if $verbose > 2;
+ }
+ $smtp_server = $mx[0]->exchange;
+ print "smtp server: $smtp_server\n" if $verbose;
+ }
+ else {
+ print "SMTP SEND CRITICAL - Cannot find MX records for $mx_domain\n";
+ exit $status{CRITICAL};
+ }
+}
+
+# connect to SMTP server
+# create the smtp handle using Net::SMTP, Net::SMTP::SSL, Net::SMTP::TLS, or an authentication variant
+my $smtp;
+eval {
+ if( $tls and $auth_method ) {
+ $smtp_port = $default_smtp_tls_port unless $smtp_port;
+ $smtp = TLS_auth->new($smtp_server, Timeout=>$timeout, Port=>$smtp_port, User=>$username, Password=>$password, Auth_Method=>$auth_method);
+ if( $smtp ) {
+ my $message = oneline($smtp->message());
+ die "cannot connect with TLS/$auth_method: $message" if $smtp->code() =~ m/53\d/;
+ }
+ }
+ elsif( $tls ) {
+ $smtp_port = $default_smtp_tls_port unless $smtp_port;
+ $smtp = Net::SMTP::TLS->new($smtp_server, Timeout=>$timeout, Port=>$smtp_port, User=>$username, Password=>$password);
+ if( $smtp ) {
+ my $message = oneline($smtp->message());
+ die "cannot connect with TLS: $message" if $smtp->code() =~ m/53\d/;
+ }
+ }
+ elsif( $ssl ) {
+ $smtp_port = $default_smtp_ssl_port unless $smtp_port;
+ $smtp = Net::SMTP::SSL->new($smtp_server, Port => $smtp_port, Timeout=>$timeout,Debug=>$smtp_debug);
+ if( $smtp && $username ) {
+ $smtp->auth($username, $password);
+ my $message = oneline($smtp->message());
+ die "cannot connect with SSL/password: $message" if $smtp->code() =~ m/53\d/;
+ }
+ }
+ elsif( $auth_method ) {
+ $smtp_port = $default_smtp_port unless $smtp_port;
+ $smtp = Net::SMTP_auth->new($smtp_server, Port=>$smtp_port, Timeout=>$timeout,Debug=>$smtp_debug);
+ if( $smtp ) {
+ $smtp->auth($auth_method, $username, $password);
+ my $message = oneline($smtp->message());
+ die "cannot connect with SSL/$auth_method: $message" if $smtp->code() =~ m/53\d/;
+ }
+ }
+ else {
+ $smtp_port = $default_smtp_port unless $smtp_port;
+ $smtp = Net::SMTP->new($smtp_server, Port=>$smtp_port, Timeout=>$timeout,Debug=>$smtp_debug);
+ if( $smtp && $username ) {
+ $smtp->auth($username, $password);
+ my $message = oneline($smtp->message());
+ die "cannot connect with password: $message" if $smtp->code() =~ m/53\d/;
+ }
+ }
+};
+if( $@ ) {
+ $@ =~ s/\n/ /g; # the error message can be multiline but we want our output to be just one line
+ print "SMTP SEND CRITICAL - $@\n";
+ exit $status{CRITICAL};
+}
+unless( $smtp ) {
+ print "SMTP SEND CRITICAL - Could not connect to $smtp_server port $smtp_port\n";
+ exit $status{CRITICAL};
+}
+my $time_connected = time;
+
+# add the monitored server's banner to the report
+if( $tls ) {
+ $report->{banner} = "";
+}
+elsif( $ssl ) {
+ $report->{banner} = $smtp->banner || "";
+ chomp $report->{banner};
+}
+else {
+ $report->{banner} = $smtp->banner || "";
+ chomp $report->{banner};
+}
+
+
+# send email
+if( $stdin ) {
+ $body = "";
+ while(<STDIN>) {
+ $body .= $_;
+ }
+}
+
+# if user wants to use template substitutions, this is the place to process body and headers
+if( $template ) {
+ foreach my $item (@header,$body) {
+ my $t = Text::Template->new(TYPE=>'STRING',SOURCE=>$item,PACKAGE=>'SmtpMessageTemplate');
+ $item = $t->fill_in(PREPEND=>q{package SmtpMessageTemplate;});
+# print "item: $item\n";
+ }
+}
+
+
+$smtp->mail($mailfrom);
+foreach( @mailto ) {
+ # the two SMTP modules have different error reporting mechanisms:
+ if( $tls ) {
+ # Net::SMTP::TLS croaks when the recipient is rejected
+ eval {
+ $smtp->to($_);
+ };
+ if( $@ ) {
+ print "SMTP SEND CRITICAL - Could not send to $_\n";
+ print "Reason: $@\n" if $verbose;
+ exit $status{CRITICAL};
+ }
+ }
+ else {
+ # Net::SMTP returns false when the recipient is rejected
+ my $to_returned = $smtp->to($_);
+ if( !$to_returned ) {
+ print "SMTP SEND CRITICAL - Could not send to $_\n";
+ print "Reason: Recipient rejected or authentication failed\n" if $verbose;
+ exit $status{CRITICAL};
+ }
+ }
+}
+
+# Net::SMTP::TLS doesn't implement code() so we need to wrap calls in eval to get our error messages
+
+ # start data transfer (expect response 354)
+ $smtp->data();
+
+ # send data
+ $smtp->datasend("To: ".join(", ",@mailto)."\n");
+ $smtp->datasend("From: $mailfrom\n");
+ foreach( @header ) {
+ $smtp->datasend("$_\n");
+ }
+ $smtp->datasend("\n");
+ $smtp->datasend($body);
+ $smtp->datasend("\n");
+
+eval {
+ # end data transfer (expect response 250)
+ $smtp->dataend();
+};
+if( $@ ) {
+ $actual_response = $tls ? get_tls_error($@) : $smtp->code();
+}
+else {
+ $actual_response = $tls ? "250" : $smtp->code(); # no error means we got 250
+}
+
+eval {
+ # disconnect from SMTP server (expect response 221)
+ $smtp->quit();
+};
+if( $@ ) {
+ push @warning, "Error while disconnecting from $smtp_server";
+}
+
+# calculate elapsed time and issue warnings
+my $time_end = time;
+my $elapsedtime = $time_end - $time_start;
+$report->{seconds} = $elapsedtime;
+
+push @warning, "connection time more than $warntime" if( $time_connected - $time_start > $warntime );
+push @critical, "connection time more than $criticaltime" if( $time_connected - $time_start > $criticaltime );
+push @critical, "response was $actual_response but expected $expect_response" if ( $actual_response ne $expect_response );
+
+# print report and exit with known status
+my $perf_data = "elapsed=".$report->{seconds}."s;$warntime;$criticaltime"; # TODO: need a component for safely generating valid perf data format. for notes on the format, see http://www.perfparse.de/tiki-view_faq.php?faqId=6 and http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185
+my $short_report = $report->text(qw/seconds/) . " | $perf_data";
+my $long_report = join("", map { "$_: $report->{$_}\n" } qw/banner/ );
+if( scalar @critical ) {
+ my $crit_alerts = join(", ", @critical);
+ print "SMTP SEND CRITICAL - $crit_alerts; $short_report\n";
+ print $long_report if $verbose;
+ exit $status{CRITICAL};
+}
+if( scalar @warning ) {
+ my $warn_alerts = join(", ", @warning);
+ print "SMTP SEND WARNING - $warn_alerts; $short_report\n";
+ print $long_report if $verbose;
+ exit $status{WARNING};
+}
+print "SMTP SEND OK - $short_report\n";
+print $long_report if $verbose;
+exit $status{OK};
+
+
+# utility to load required modules. exits if unable to load one or more of the modules.
+sub load_modules {
+ my @missing_modules = ();
+ foreach( @_ ) {
+ eval "require $_";
+ push @missing_modules, $_ if $@;
+ }
+ if( @missing_modules ) {
+ print "Missing perl modules: @missing_modules\n";
+ return 0;
+ }
+ return 1;
+}
+
+# utility to extract error codes out of Net::SMTP::TLS croak messages
+sub get_tls_error {
+ my ($errormsg) = @_;
+ $errormsg =~ m/: (\d+) (.+)/;
+ my $code = $1;
+ return $code;
+}
+
+# looks for a specific header in a list of headers; returns true if found
+sub find_header {
+ my ($name, @list) = @_;
+ return scalar grep { m/^$name: /i } @list;
+}
+
+# RFC 2822 date header
+sub default_date_header {
+ return strftime "Date: %a, %e %b %Y %H:%M:%S %z (%Z)", gmtime;
+}
+
+# RFC 2822 message id header
+sub default_messageid_header {
+ my $random = randomstring(16,qw/0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z/);
+ my $hostname = `hostname`;
+ chomp $hostname;
+ return "Message-ID: <".time.".".$random.".checksmtpsend@".$hostname.">";
+}
+
+# returns a random string of specified length using characters from specified set
+sub randomstring {
+ my ($length,@set) = @_;
+ my $size = scalar @set;
+ my $string = "";
+ while($length--) {
+ $string .= $set[int(rand($size))];
+ }
+ return $string;
+}
+
+# replaces all newlines in the input string with spaces
+sub oneline {
+ my ($input) = @_;
+ $input =~ s/[\r\n]+/ /g;
+ return $input;
+}
+
+# NAME
+# PluginReport
+# SYNOPSIS
+# $report = new PluginReport;
+# $report->{label1} = "value1";
+# $report->{label2} = "value2";
+# print $report->text(qw/label1 label2/);
+package PluginReport;
+
+sub new {
+ my ($proto,%p) = @_;
+ my $class = ref($proto) || $proto;
+ my $self = bless {}, $class;
+ $self->{$_} = $p{$_} foreach keys %p;
+ return $self;
+}
+
+sub text {
+ my ($self,@labels) = @_;
+ my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels;
+ my $text = join(", ", @report);
+ return $text;
+}
+
+package SmtpMessageTemplate;
+
+sub trim {
+ my ($text) = @_;
+ $text =~ s/^\s*//;
+ $text =~ s/\s*$//;
+ return $text;
+}
+
+# NAME
+# TLS_auth
+# SYNOPSYS
+#
+# Based on contribution by Brad Guillory
+package TLS_auth;
+#use Net::SMTP::TLS;
+our @ISA = qw(Net::SMTP::TLS);
+use Carp;
+sub new {
+ my ($proto,$server,%p) = @_;
+ my $class = ref($proto) || $proto;
+ #my $self = bless {}, $class;
+ no strict 'refs';
+ no warnings 'once';
+ *Net::SMTP::TLS::login = *TLS_auth::login; # override parent's login with ours so when it's called in the constructor, our overriden version will be used
+ my $self = Net::SMTP::TLS->new($server,%p);
+ return $self;
+}
+
+
+sub login {
+ my ($self) = @_;
+ my $type = $self->{features}->{AUTH};
+ if(not $type){
+ die "Server did not return AUTH in capabilities\n"; # croak
+ }
+# print "Feature: $type\nAuth Method: $self->{Auth_Method}\n";
+ if($type =~ /CRAM\-MD5/ and $self->{Auth_Method} =~ /CRAM\-MD5/i){
+ $self->auth_MD5();
+ }elsif($type =~ /LOGIN/ and $self->{Auth_Method} =~ /LOGIN/i){
+ $self->auth_LOGIN();
+ }elsif($type =~ /PLAIN/ and $self->{Auth_Method} =~ /PLAIN/i){
+ #print "Calling auth_PLAIN\n";
+ $self->auth_PLAIN();
+ }else{
+ die "Unsupported Authentication mechanism: $self->{Auth_Method}\n"; # croak
+ }
+}
+
+
+package main;
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+check_smtp_send - connects to an SMTP server and sends a message
+
+=head1 SYNOPSIS
+
+ check_smtp_send -vV
+ check_smtp_send -?
+ check_smtp_send --help
+
+=head1 OPTIONS
+
+=over
+
+=item --warning <seconds>
+
+Warn if it takes longer than <seconds> to connect to the SMTP server. Default is 15 seconds.
+Also known as: -w <seconds>
+
+=item --critical <seconds>
+
+Return a critical status if it takes longer than <seconds> to connect to the SMTP server. Default is 30 seconds.
+Also known as: -c <seconds>
+
+=item --timeout <seconds>
+
+Abort with critical status if it takes longer than <seconds> to connect to the SMTP server. Default is 60 seconds.
+The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to
+connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer
+than 30 seconds.
+Also known as: -t <seconds>
+
+=item --hostname <server>
+
+Address or name of the SMTP server. Examples: mail.server.com, localhost, 192.168.1.100
+
+If not provided, and if there is only one --mailto address, the script will automatically look up the MX record
+for the --mailto address and use that as the hostname. You can use this to check that your MX records are correct.
+When omitting the --hostname option, it doesn't really make sense to specify --port, --username, or --password
+but you can still do so and they will have their normal effect. To look up the MX records you need to have the
+module Net::DNS and Email::Address installed.
+
+Also known as: -H <server>
+
+=item --port <number>
+
+Service port on the SMTP server. Default is 25 for regular SMTP, 465 for SSL, and 587 for TLS.
+Also known as: -p <number>
+
+=item --tls
+
+=item --notls
+
+Enable TLS/AUTH protocol. Requires Net::SMTP::TLS, availble on CPAN.
+
+When using this option, the default port is 587.
+You can specify a port from the command line using the --port option.
+
+Use the notls option to turn off the tls option.
+
+Also, you may need to fix your copy of Net::SMTP::TLS. Here is the diff against version 0.12:
+
+ 254c254
+ < $me->_command(sprintf("AUTH PLAIN %S",
+ ---
+ > $me->_command(sprintf("AUTH PLAIN %s",
+
+
+=item --ssl
+
+=item --nossl
+
+Enable SSL protocol. Requires Net::SMTP::SSL and Authen::SASL, availble on CPAN.
+
+When using this option, the default port is 465. You can override with the --port option.
+
+Use the nossl option to turn off the ssl option.
+
+=item --auth <method>
+
+Enable authentication with Net::SMTP_auth (sold separately).
+For example, try using --auth PLAIN or --auth CRAM-MD5.
+
+=item --username <username>
+
+=item --password <password>
+
+Username and password to use when connecting to SMTP server.
+Also known as: -U <username> -P <password>
+
+=item --body <message>
+
+Use this option to specify the body of the email message. If you need newlines in your message,
+you might need to use the --stdin option instead.
+
+=item --header <header>
+
+Use this option to set an arbitrary header in the message. You can use it multiple times.
+
+=item --stdin
+
+Grab the body of the email message from stdin.
+
+=item --mailto recipient@your.net
+
+You can send a message to multiple recipients by repeating this option or by separating
+the email addresses with commas (no whitespace allowed):
+
+$ check_smtp_send -H mail.server.net --mailto recipient@your.net,recipient2@your.net --mailfrom sender@your.net
+
+SMTP SEND OK - 1 seconds
+
+=item --mailfrom sender@your.net
+
+Use this option to set the "from" address in the email.
+
+=item --template
+
+=item --notemplate
+
+Enable (or disable) processing of message body and headers. Requires Text::Template.
+
+Use this option to apply special processing to your message body and headers that allows you to use the
+results of arbitrary computations in the text. For example, you can use this feature to send a message
+containing the hostname of the machine that sent the message without customizing the plugin configuration
+on each machine.
+
+When you enable the --template option, the message body and headers are parsed by
+Text::Template. Even a message body provided using the --stdin option will be parsed.
+See the Text::Template manual for more information, but in general any expression
+written in Perl will work.
+
+There is one convenience function provided to you, trim, which will remove leading and trailing whitespace
+from its parameter. Here's an example:
+
+ check_smtp_send -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net
+ --template --body 'hello, this message is from {use Sys::Hostname; hostname}'
+ --header 'Subject: test message from {trim(`whoami`)}'
+
+
+=item --expect-response <code>
+
+Use this option to specify which SMTP response code should be expected from the server
+after the SMTP dialog is complete. The default is 250 (message accepted).
+
+Also known as: -E <code>
+
+=item --hires
+
+Use the Time::HiRes module to measure time, if available.
+
+=item --verbose
+
+Display additional information. Useful for troubleshooting.
+
+One --verbose will show extra information for OK, WARNING, and CRITICAL status.
+
+Use one --verbose together with --version to see the default warning and critical timeout values.
+
+Three --verbose (or -vvv) will show debug information, unless you're using --tls because Net::SMTP::TLS
+does not have a Debug feature.
+
+Also known as: -v
+
+=item --version
+
+Display plugin version and exit.
+Also known as: -V
+
+=item --help
+
+Display this documentation and exit. Does not work in the ePN version.
+Also known as: -h
+
+=item --usage
+
+Display a short usage instruction and exit.
+
+=back
+
+=head1 EXAMPLES
+
+=head2 Send a message with custom headers
+
+$ check_smtp_send -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net
+--body 'Homeruns 5' --header 'Subject: Hello, world!' --header 'X-Your-Header: Yes'
+
+SMTP SEND OK - 1 seconds
+
+=head1 EXIT CODES
+
+Complies with the Nagios plug-in specification:
+ 0 OK The plugin was able to check the service and it appeared to be functioning properly
+ 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly
+ 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold
+ 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service
+
+=head1 NAGIOS PLUGIN NOTES
+
+Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html
+
+This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because
+the path to utils.pm must be specified completely in this program and forces users to edit the source
+code if their install location is different (if they realize this is the problem). You can view
+the default timeout for this module by using the --verbose and --version options together. The
+short form is -vV.
+
+Other than that, it attempts to follow published guidelines for Nagios plugins.
+
+=head1 CHANGES
+
+ Wed Oct 29 14:05:00 PST 2005
+ + version 0.1
+
+ Wed Nov 9 15:01:48 PST 2005
+ + now using an inline PluginReport package to generate the report
+ + added stdin option
+ + copyright notice and GNU GPL
+ + version 0.2
+
+ Thu Apr 20 16:00:00 PST 2006 (by Geoff Crompton <geoff.crompton@strategicdata.com.au>)
+ + added bailing if the $smtp->to() call fails
+ + added support for mailto recipients separated by commas
+ + version 0.2.1
+
+ Tue Apr 24 21:17:53 PDT 2007
+ + moved POD text to separate file in order to accomodate the new embedded-perl Nagios feature
+ + version 0.2.3
+
+ Fri Apr 27 20:26:42 PDT 2007
+ + documentation now mentions every command-line option accepted by the plugin, including abbreviations
+ + version 0.3
+
+ Sun Oct 21 10:34:14 PDT 2007
+ + added support for TLS and authentication via the Net::SMTP::TLS module. see --tls option.
+ + version 0.4
+
+ Sun Oct 21 13:54:26 PDT 2007
+ + added support for SSL via the Net::SMTP::SSL module. see --ssl option.
+ + port is no longer a required option. defaults to 25 for regular smtp, 465 for ssl, and 587 for tls.
+ + added port info to the "could not connect" error message
+ + version 0.4.1
+
+ Tue Dec 4 07:42:32 PST 2007
+ + added --usage option because the official nagios plugins have both --help and --usage
+ + added --timeout option to match the official nagios plugins
+ + fixed some minor pod formatting issues for perldoc
+ + version 0.4.2
+
+ Mon Feb 11 19:09:37 PST 2008
+ + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules
+ + version 0.4.3
+
+ Mon May 26 09:12:14 PDT 2008
+ + fixed warning and critical messages to use "more than" or "less than" instead of the angle brackets, to make them more web friendly
+ + version 0.4.4
+
+ Wed Jul 2 07:12:35 PDT 2008
+ + added --expect-response option submitted by Christian Kauhaus <kc@gocept.com>
+ + added support for authentication via Net::SMTP_auth. see --auth option.
+ + version 0.4.5
+
+ Sun Oct 5 15:18:23 PDT 2008
+ + added error handling for smtp server disconnects ungracefully during QUIT (gmail.com does)
+ + version 0.4.6
+
+ Thu Oct 1 12:09:35 PDT 2009
+ + added --template option to allow arbitrary substitutions for body and headers, and provided one convenience function for trimming strings
+ + added performance data for use with PNP4Nagios!
+ + version 0.5.0
+
+ Thu Oct 8 11:17:04 PDT 2009
+ + added more detailed error messages when using --verbose
+ + version 0.5.1
+
+ Tue Feb 9 12:14:49 PST 2010
+ + added support for combining --auth with --tls using a subclass of Net::SMTP::TLS submitted by Brad Guillory; please note that to use the "PLAIN" authentication type you need to patch your Net::SMTP:TLS because it has a bug in sub auth_PLAIN (sprintf %S instead of %s)
+ + version 0.5.2
+
+ Mon Jan 3 10:39:42 PST 2011
+ + added default Date and Message-ID headers; Date header uses POSIX strftime and Message-ID header uses hostname command to get localhost name
+ + version 0.7.0
+
+ Fri May 6 08:35:09 AST 2011
+ + added --hires option to enable use of Time::Hires if available
+ + version 0.7.1
+
+ Wed Jul 6 19:18:26 AST 2011
+ + the --hostname is now optional; if not provided the plugin will lookup the MX record for the --mailto address (requires Net::DNS)
+ + version 0.7.2
+
+ Tue Dec 13 09:24:04 PST 2011
+ + separated authentication errors from connection errors
+ + version 0.7.3
+
+=head1 AUTHOR
+
+Jonathan Buhacoff <jonathan@buhacoff.net>
+
+=head1 COPYRIGHT AND LICENSE
+
+ Copyright (C) 2005-2011 Jonathan Buhacoff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ http://www.gnu.org/licenses/gpl.txt
+
+=cut
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_smtp_send_epn b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_smtp_send_epn
new file mode 100644
index 0000000..9648ec8
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/check_smtp_send_epn
@@ -0,0 +1,458 @@
+#!/usr/bin/perl
+use strict;
+use POSIX qw(strftime);
+my $VERSION = '0.7.3';
+my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
+my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt';
+my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 );
+
+# look for required modules
+exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Net::SMTP/);
+
+BEGIN {
+ if( grep { /^--hires$/ } @ARGV ) {
+ eval "use Time::HiRes qw(time);";
+ warn "Time::HiRes not installed\n" if $@;
+ }
+}
+
+Getopt::Long::Configure("bundling");
+my $verbose = 0;
+my $help = "";
+my $help_usage = "";
+my $show_version = "";
+my $smtp_server = "";
+my $default_smtp_port = "25";
+my $default_smtp_ssl_port = "465";
+my $default_smtp_tls_port = "587";
+my $smtp_port = "";
+my @mailto = ();
+my $mailfrom = "";
+my @header = ();
+my $body = "";
+my $stdin = "";
+my $template = "";
+my $expect_response = "250";
+my $warntime = 15;
+my $criticaltime = 30;
+my $timeout = 60;
+my $tls = 0;
+my $ssl = 0;
+my $auth_method = undef;
+my $username = "";
+my $password = "";
+my $time_hires = "";
+my $mx_lookup = 0;
+my $ok;
+$ok = Getopt::Long::GetOptions(
+ "V|version"=>\$show_version,
+ "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage,
+ "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout,
+ # smtp settings
+ "H|hostname=s"=>\$smtp_server,"p|port=i"=>\$smtp_port,
+ "mailto=s"=>\@mailto, "mailfrom=s",\$mailfrom,
+ "header=s"=>\@header, "body=s"=>\$body, "stdin"=>\$stdin,
+ "template!"=>\$template,
+ # SSL/TLS/auth options
+ "tls!"=>\$tls, "ssl!"=>\$ssl, "auth=s"=>\$auth_method,
+ "U|username=s"=>\$username,"P|password=s"=>\$password,
+ # Server response
+ "E|expect-response=s"=>\$expect_response,
+ # Time
+ "hires"=>\$time_hires,
+ );
+
+if( $show_version ) {
+ print "$VERSION\n";
+ if( $verbose ) {
+ print "Default warning threshold: $warntime seconds\n";
+ print "Default critical threshold: $criticaltime seconds\n";
+ print "Default timeout: $timeout seconds\n";
+ }
+ exit $status{UNKNOWN};
+}
+
+if( $help ) {
+ exec "perldoc", $0 or print "Try `perldoc $0`\n";
+ exit $status{UNKNOWN};
+}
+
+if( $smtp_server eq "" && scalar(@mailto) == 1 ) {
+ # no SMTP server specified but one mailto address given means we can look up the MX record
+ $mx_lookup = 1;
+}
+
+my @required_module = ();
+push @required_module, 'Net::SMTP::SSL' if $ssl;
+push @required_module, ('MIME::Base64','Authen::SASL') if $ssl && $username;
+push @required_module, 'Net::SMTP::TLS' if $tls;
+push @required_module, 'Net::SMTP_auth' if $auth_method and not $tls; # whereas if auth_method and tls we use TLS_auth, which is included in this script!
+push @required_module, 'Text::Template' if $template;
+push @required_module, 'Net::DNS' if $mx_lookup;
+push @required_module, 'Email::Address' if $mx_lookup;
+exit $status{UNKNOWN} unless load_modules(@required_module);
+
+
+# split up @mailto if commas were used instead of multiple options
+@mailto = split(/,/,join(',',@mailto));
+
+if( $help_usage ||
+ (
+ ($smtp_server eq "" && !$mx_lookup) || scalar(@mailto)==0 || $mailfrom eq ""
+ )
+ ) {
+ print "Usage: $0 [-H host [-p port]] --mailto recipient\@your.net [--mailto recipient2\@your.net ...] --mailfrom sender\@your.net --body 'some text' [-w <seconds>] [-c <seconds>]\n";
+ exit $status{UNKNOWN};
+}
+
+# initialize
+my $report = new PluginReport;
+my $time_start = time;
+my $actual_response = undef;
+my @warning = ();
+my @critical = ();
+
+my $smtp_debug = 0;
+$smtp_debug = 1 if $verbose >= 3;
+
+# default date and message id headers
+push @header, default_date_header() unless find_header("Date",@header);
+push @header, default_messageid_header() unless find_header("Message-ID",@header);
+
+# look up MX server if necessary
+if( $mx_lookup ) {
+ my $addr = Email::Address->new( undef, $mailto[0] );
+ my $mx_domain = $addr->host;
+ print "MX lookup " . $mx_domain . "\n" if $verbose > 1;
+ my $res = Net::DNS::Resolver->new;
+ my @mx = Net::DNS::mx($res, $mx_domain);
+ if( @mx ) {
+ # use the first server
+ foreach my $rr (@mx) {
+ print "pref : " . $rr->preference . " exchange: " . $rr->exchange . "\n" if $verbose > 2;
+ }
+ $smtp_server = $mx[0]->exchange;
+ print "smtp server: $smtp_server\n" if $verbose;
+ }
+ else {
+ print "SMTP SEND CRITICAL - Cannot find MX records for $mx_domain\n";
+ exit $status{CRITICAL};
+ }
+}
+
+# connect to SMTP server
+# create the smtp handle using Net::SMTP, Net::SMTP::SSL, Net::SMTP::TLS, or an authentication variant
+my $smtp;
+eval {
+ if( $tls and $auth_method ) {
+ $smtp_port = $default_smtp_tls_port unless $smtp_port;
+ $smtp = TLS_auth->new($smtp_server, Timeout=>$timeout, Port=>$smtp_port, User=>$username, Password=>$password, Auth_Method=>$auth_method);
+ if( $smtp ) {
+ my $message = oneline($smtp->message());
+ die "cannot connect with TLS/$auth_method: $message" if $smtp->code() =~ m/53\d/;
+ }
+ }
+ elsif( $tls ) {
+ $smtp_port = $default_smtp_tls_port unless $smtp_port;
+ $smtp = Net::SMTP::TLS->new($smtp_server, Timeout=>$timeout, Port=>$smtp_port, User=>$username, Password=>$password);
+ if( $smtp ) {
+ my $message = oneline($smtp->message());
+ die "cannot connect with TLS: $message" if $smtp->code() =~ m/53\d/;
+ }
+ }
+ elsif( $ssl ) {
+ $smtp_port = $default_smtp_ssl_port unless $smtp_port;
+ $smtp = Net::SMTP::SSL->new($smtp_server, Port => $smtp_port, Timeout=>$timeout,Debug=>$smtp_debug);
+ if( $smtp && $username ) {
+ $smtp->auth($username, $password);
+ my $message = oneline($smtp->message());
+ die "cannot connect with SSL/password: $message" if $smtp->code() =~ m/53\d/;
+ }
+ }
+ elsif( $auth_method ) {
+ $smtp_port = $default_smtp_port unless $smtp_port;
+ $smtp = Net::SMTP_auth->new($smtp_server, Port=>$smtp_port, Timeout=>$timeout,Debug=>$smtp_debug);
+ if( $smtp ) {
+ $smtp->auth($auth_method, $username, $password);
+ my $message = oneline($smtp->message());
+ die "cannot connect with SSL/$auth_method: $message" if $smtp->code() =~ m/53\d/;
+ }
+ }
+ else {
+ $smtp_port = $default_smtp_port unless $smtp_port;
+ $smtp = Net::SMTP->new($smtp_server, Port=>$smtp_port, Timeout=>$timeout,Debug=>$smtp_debug);
+ if( $smtp && $username ) {
+ $smtp->auth($username, $password);
+ my $message = oneline($smtp->message());
+ die "cannot connect with password: $message" if $smtp->code() =~ m/53\d/;
+ }
+ }
+};
+if( $@ ) {
+ $@ =~ s/\n/ /g; # the error message can be multiline but we want our output to be just one line
+ print "SMTP SEND CRITICAL - $@\n";
+ exit $status{CRITICAL};
+}
+unless( $smtp ) {
+ print "SMTP SEND CRITICAL - Could not connect to $smtp_server port $smtp_port\n";
+ exit $status{CRITICAL};
+}
+my $time_connected = time;
+
+# add the monitored server's banner to the report
+if( $tls ) {
+ $report->{banner} = "";
+}
+elsif( $ssl ) {
+ $report->{banner} = $smtp->banner || "";
+ chomp $report->{banner};
+}
+else {
+ $report->{banner} = $smtp->banner || "";
+ chomp $report->{banner};
+}
+
+
+# send email
+if( $stdin ) {
+ $body = "";
+ while(<STDIN>) {
+ $body .= $_;
+ }
+}
+
+# if user wants to use template substitutions, this is the place to process body and headers
+if( $template ) {
+ foreach my $item (@header,$body) {
+ my $t = Text::Template->new(TYPE=>'STRING',SOURCE=>$item,PACKAGE=>'SmtpMessageTemplate');
+ $item = $t->fill_in(PREPEND=>q{package SmtpMessageTemplate;});
+# print "item: $item\n";
+ }
+}
+
+
+$smtp->mail($mailfrom);
+foreach( @mailto ) {
+ # the two SMTP modules have different error reporting mechanisms:
+ if( $tls ) {
+ # Net::SMTP::TLS croaks when the recipient is rejected
+ eval {
+ $smtp->to($_);
+ };
+ if( $@ ) {
+ print "SMTP SEND CRITICAL - Could not send to $_\n";
+ print "Reason: $@\n" if $verbose;
+ exit $status{CRITICAL};
+ }
+ }
+ else {
+ # Net::SMTP returns false when the recipient is rejected
+ my $to_returned = $smtp->to($_);
+ if( !$to_returned ) {
+ print "SMTP SEND CRITICAL - Could not send to $_\n";
+ print "Reason: Recipient rejected or authentication failed\n" if $verbose;
+ exit $status{CRITICAL};
+ }
+ }
+}
+
+# Net::SMTP::TLS doesn't implement code() so we need to wrap calls in eval to get our error messages
+
+ # start data transfer (expect response 354)
+ $smtp->data();
+
+ # send data
+ $smtp->datasend("To: ".join(", ",@mailto)."\n");
+ $smtp->datasend("From: $mailfrom\n");
+ foreach( @header ) {
+ $smtp->datasend("$_\n");
+ }
+ $smtp->datasend("\n");
+ $smtp->datasend($body);
+ $smtp->datasend("\n");
+
+eval {
+ # end data transfer (expect response 250)
+ $smtp->dataend();
+};
+if( $@ ) {
+ $actual_response = $tls ? get_tls_error($@) : $smtp->code();
+}
+else {
+ $actual_response = $tls ? "250" : $smtp->code(); # no error means we got 250
+}
+
+eval {
+ # disconnect from SMTP server (expect response 221)
+ $smtp->quit();
+};
+if( $@ ) {
+ push @warning, "Error while disconnecting from $smtp_server";
+}
+
+# calculate elapsed time and issue warnings
+my $time_end = time;
+my $elapsedtime = $time_end - $time_start;
+$report->{seconds} = $elapsedtime;
+
+push @warning, "connection time more than $warntime" if( $time_connected - $time_start > $warntime );
+push @critical, "connection time more than $criticaltime" if( $time_connected - $time_start > $criticaltime );
+push @critical, "response was $actual_response but expected $expect_response" if ( $actual_response ne $expect_response );
+
+# print report and exit with known status
+my $perf_data = "elapsed=".$report->{seconds}."s;$warntime;$criticaltime"; # TODO: need a component for safely generating valid perf data format. for notes on the format, see http://www.perfparse.de/tiki-view_faq.php?faqId=6 and http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185
+my $short_report = $report->text(qw/seconds/) . " | $perf_data";
+my $long_report = join("", map { "$_: $report->{$_}\n" } qw/banner/ );
+if( scalar @critical ) {
+ my $crit_alerts = join(", ", @critical);
+ print "SMTP SEND CRITICAL - $crit_alerts; $short_report\n";
+ print $long_report if $verbose;
+ exit $status{CRITICAL};
+}
+if( scalar @warning ) {
+ my $warn_alerts = join(", ", @warning);
+ print "SMTP SEND WARNING - $warn_alerts; $short_report\n";
+ print $long_report if $verbose;
+ exit $status{WARNING};
+}
+print "SMTP SEND OK - $short_report\n";
+print $long_report if $verbose;
+exit $status{OK};
+
+
+# utility to load required modules. exits if unable to load one or more of the modules.
+sub load_modules {
+ my @missing_modules = ();
+ foreach( @_ ) {
+ eval "require $_";
+ push @missing_modules, $_ if $@;
+ }
+ if( @missing_modules ) {
+ print "Missing perl modules: @missing_modules\n";
+ return 0;
+ }
+ return 1;
+}
+
+# utility to extract error codes out of Net::SMTP::TLS croak messages
+sub get_tls_error {
+ my ($errormsg) = @_;
+ $errormsg =~ m/: (\d+) (.+)/;
+ my $code = $1;
+ return $code;
+}
+
+# looks for a specific header in a list of headers; returns true if found
+sub find_header {
+ my ($name, @list) = @_;
+ return scalar grep { m/^$name: /i } @list;
+}
+
+# RFC 2822 date header
+sub default_date_header {
+ return strftime "Date: %a, %e %b %Y %H:%M:%S %z (%Z)", gmtime;
+}
+
+# RFC 2822 message id header
+sub default_messageid_header {
+ my $random = randomstring(16,qw/0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z/);
+ my $hostname = `hostname`;
+ chomp $hostname;
+ return "Message-ID: <".time.".".$random.".checksmtpsend@".$hostname.">";
+}
+
+# returns a random string of specified length using characters from specified set
+sub randomstring {
+ my ($length,@set) = @_;
+ my $size = scalar @set;
+ my $string = "";
+ while($length--) {
+ $string .= $set[int(rand($size))];
+ }
+ return $string;
+}
+
+# replaces all newlines in the input string with spaces
+sub oneline {
+ my ($input) = @_;
+ $input =~ s/[\r\n]+/ /g;
+ return $input;
+}
+
+# NAME
+# PluginReport
+# SYNOPSIS
+# $report = new PluginReport;
+# $report->{label1} = "value1";
+# $report->{label2} = "value2";
+# print $report->text(qw/label1 label2/);
+package PluginReport;
+
+sub new {
+ my ($proto,%p) = @_;
+ my $class = ref($proto) || $proto;
+ my $self = bless {}, $class;
+ $self->{$_} = $p{$_} foreach keys %p;
+ return $self;
+}
+
+sub text {
+ my ($self,@labels) = @_;
+ my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels;
+ my $text = join(", ", @report);
+ return $text;
+}
+
+package SmtpMessageTemplate;
+
+sub trim {
+ my ($text) = @_;
+ $text =~ s/^\s*//;
+ $text =~ s/\s*$//;
+ return $text;
+}
+
+# NAME
+# TLS_auth
+# SYNOPSYS
+#
+# Based on contribution by Brad Guillory
+package TLS_auth;
+#use Net::SMTP::TLS;
+our @ISA = qw(Net::SMTP::TLS);
+use Carp;
+sub new {
+ my ($proto,$server,%p) = @_;
+ my $class = ref($proto) || $proto;
+ #my $self = bless {}, $class;
+ no strict 'refs';
+ no warnings 'once';
+ *Net::SMTP::TLS::login = *TLS_auth::login; # override parent's login with ours so when it's called in the constructor, our overriden version will be used
+ my $self = Net::SMTP::TLS->new($server,%p);
+ return $self;
+}
+
+
+sub login {
+ my ($self) = @_;
+ my $type = $self->{features}->{AUTH};
+ if(not $type){
+ die "Server did not return AUTH in capabilities\n"; # croak
+ }
+# print "Feature: $type\nAuth Method: $self->{Auth_Method}\n";
+ if($type =~ /CRAM\-MD5/ and $self->{Auth_Method} =~ /CRAM\-MD5/i){
+ $self->auth_MD5();
+ }elsif($type =~ /LOGIN/ and $self->{Auth_Method} =~ /LOGIN/i){
+ $self->auth_LOGIN();
+ }elsif($type =~ /PLAIN/ and $self->{Auth_Method} =~ /PLAIN/i){
+ #print "Calling auth_PLAIN\n";
+ $self->auth_PLAIN();
+ }else{
+ die "Unsupported Authentication mechanism: $self->{Auth_Method}\n"; # croak
+ }
+}
+
+
+package main;
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/How to connect to IMAP server manually.txt b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/How to connect to IMAP server manually.txt
new file mode 100644
index 0000000..ce52655
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/How to connect to IMAP server manually.txt
@@ -0,0 +1,69 @@
+HOW TO CONNECT TO IMAP SERVER MANUALLY
+
+This how-to borrowed from: http://www.bincimap.org/bincimap-faq.html
+
+
+1) Connection
+Using telnet, connect to your service on port 143. Replace "server" with your server's name. If the server is set up correctly, you will see this greeting:
+ # telnet server 143
+ * OK IMAP Server ready
+
+If you have SSL enabled (most likely you do), connect to port 993 with the openssl tool. If the server is set up correctly, you will see this greeting:
+ # openssl s_client -connect server:993 -crlf
+ * OK IMAP Server ready
+
+2) Logging in / authenticating
+Firstly, check your bincimap.conf file, in the "Authentication" section, for this setting:
+allow plain auth in non ssl = "no"
+
+If you want users to be able to connect without using SSL, set this to "yes".
+Using either the telnet (in case of "yes" in the above example) or openssl tool, try the LOGIN command, replacing "username" with one username on your server, and "password" with that user's password. You should get the reply on the second line.
+1 LOGIN username password
+1 LOGIN completed
+
+Note that you should try logging in with at least two users to check that this feature is working properly.
+3) Listing, creating, renaming and deleting mailboxes
+Enter the following command to list the user's first level mailboxes. You should get at least one line of response (starting with "* LIST") before you get the "2 OK LIST" reponse.
+2 LIST "" "%"
+* LIST (\UnMarked) "/" "INBOX"
+2 OK LIST completed
+
+Check your bincimap.conf file, under the Mailbox section, and check the "depot" setting. Try creating a mailbox with the following command, replacing mailbox with a name of your choice. Note that if you are using the Maildir++ depot setting, you must use "INBOX/mailbox" instead:
+3 CREATE mailbox
+3 OK CREATE completed
+
+Rename the mailbox with this command. Note the "INBOX/" prefix when using a Maildir++ depot. (After that, rerunning the LIST command from above will give you a slightly different result than before):
+4 RENAME mailbox newmailbox
+4 OK RENAME completed
+
+Now delete the mailbox with this command:
+5 DELETE newmailbox
+5 OK DELETE completed
+
+4) Selecting a mailbox and looking inside
+Select your INBOX with this command. Note that the response may be slightly different from in this example:
+6 SELECT INBOX
+* 146 EXISTS
+* OK [UIDVALIDITY 1047992537]
+* OK [UIDNEXT 2683] 2683 is the next UID
+* FLAGS (\Answered \Flagged \Deleted \Recent \Seen \Draft)
+* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft)] Limited
+6 OK [READ-WRITE]
+
+Fetch the flags of all your messages with this command. Note that the "..." is for editorial clarity, many lines of output have been omitted in this example:
+7 FETCH 1:* FLAGS
+* 1 FETCH (FLAGS (\Seen \Answered))
+* 2 FETCH (FLAGS (\Seen \Answered))
+...
+* 146 FETCH (FLAGS (\Seen \Answered))
+7 OK FETCH completed
+
+Set a flag with this command:
+8 STORE 1 +FLAGS \Flagged
+* FETCH (FLAGS (\Seen \Flagged))
+8 OK STORE completed
+
+5) Logging out
+9 LOGOUT
+* BYE Server logging out
+9 OK LOGOUT finished.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/How to test plugin.txt b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/How to test plugin.txt
new file mode 100644
index 0000000..369baf4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/How to test plugin.txt
@@ -0,0 +1,15 @@
+HOW TO TEST THE PLUGIN
+
+Run the shell script tests which start the test server automatically:
+
+./test/3_email_delivery.sh
+
+
+
+
+
+
+If you want to start up the test server yourself:
+
+sudo perl test/dummy_smtp_server.pl
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_email_delivery.html b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_email_delivery.html
new file mode 100644
index 0000000..31422bc
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_email_delivery.html
@@ -0,0 +1,522 @@
+<?xml version="1.0" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>check_email_delivery - sends email and verifies delivery</title>
+<link rel="stylesheet" href="plainwhite.css" type="text/css" />
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<link rev="made" href="mailto:jonathan@greek.local" />
+</head>
+
+<body>
+
+
+<!-- INDEX BEGIN -->
+<div name="index">
+<p><a name="__index__"></a></p>
+<!--
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#options">OPTIONS</a></li>
+ <li><a href="#examples">EXAMPLES</a></li>
+ <ul>
+
+ <li><a href="#send_a_message_with_custom_headers">Send a message with custom headers</a></li>
+ <li><a href="#set_warning_and_critical_timeouts_for_receive_plugin_only_">Set warning and critical timeouts for receive plugin only:</a></li>
+ </ul>
+
+ <li><a href="#exit_codes">EXIT CODES</a></li>
+ <li><a href="#nagios_plugin_notes">NAGIOS PLUGIN NOTES</a></li>
+ <li><a href="#changes">CHANGES</a></li>
+ <li><a href="#author">AUTHOR</a></li>
+ <li><a href="#copyright_and_license">COPYRIGHT AND LICENSE</a></li>
+</ul>
+
+-->
+
+
+</div>
+<!-- INDEX END -->
+
+<p>
+</p>
+<hr />
+<h1><a name="name">NAME</a></h1>
+<p>check_email_delivery - sends email and verifies delivery</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ check_email_delivery -vV
+ check_email_delivery --usage
+ check_email_delivery --help</pre>
+<p>
+</p>
+<hr />
+<h1><a name="options">OPTIONS</a></h1>
+<dl>
+<dt><strong><a name="warning_seconds_smtp_seconds_imap_seconds" class="item">--warning &lt;seconds&gt;[,&lt;smtp_seconds&gt;,&lt;imap_seconds&gt;]</a></strong></dt>
+
+<dd>
+<p>Exit with WARNING if the most recent email found is older than &lt;seconds&gt;. The
+optional &lt;smtp_seconds&gt; and &lt;imap_seconds&gt; parameters will be passed on to the
+included plugins that are used for those tasks. If they are not
+given then they will not be passed on and the default for that plugin will apply.
+Also known as: -w &lt;seconds&gt;[,&lt;send&gt;[,&lt;recv&gt;]]</p>
+<p>When using the --plugin option, only one parameter is supported (-w &lt;seconds&gt;) and it will apply
+to the entire process. You can specify a warning threshold specific to each plugin in the
+plugin command line.</p>
+<p>When using the --plugin option, no measuring of &quot;most recent email&quot; is done because we would
+not know how to read this information from receive plugins. This may be addressed in future versions.</p>
+</dd>
+<dt><strong><a name="critical_seconds_smtp_seconds_imap_seconds" class="item">--critical &lt;seconds&gt;[,&lt;smtp_seconds&gt;,&lt;imap_seconds&gt;]</a></strong></dt>
+
+<dd>
+<p>Exit with CRITICAL if the most recent email found is older than &lt;seconds&gt;. The
+optional &lt;smtp_seconds&gt; and &lt;imap_seconds&gt; parameters will be passed on to the
+included plugins that are used for those tasks. If they are not
+given then they will not be passed on and the default for that plugin will apply.
+Also known as: -c &lt;seconds&gt;[,&lt;send&gt;[,&lt;recv&gt;]]</p>
+<p>When using the --plugin option, only one parameter is supported (-c &lt;seconds&gt;) and it will apply
+to the entire process. You can specify a critical threshold specific to each plugin in the
+plugin command line.</p>
+<p>When using the --plugin option, no measuring of &quot;most recent email&quot; is done because we would
+not know how to read this information from receive plugins. This may be addressed in future versions.</p>
+</dd>
+<dt><strong><a name="timeout_seconds" class="item">--timeout &lt;seconds&gt;</a></strong></dt>
+
+<dt><strong><a name="timeout_smtp_seconds_imap_seconds" class="item">--timeout &lt;smtp_seconds&gt;,&lt;imap_seconds&gt;</a></strong></dt>
+
+<dt><strong><a name="timeout_plugin1_seconds_plugin2_seconds" class="item">--timeout &lt;plugin1_seconds&gt;,&lt;plugin2_seconds&gt;,...</a></strong></dt>
+
+<dd>
+<p>Exit with CRITICAL if the plugins do not return a status within the specified number of seconds.
+When only one parameter is used, it applies to each plugin. When multiple parameters are used
+(separated by commas) they apply to plugins in the same order the plugins were specified on the
+command line. When using --timeout but not the --plugin option, the first parameter is for
+check_smtp_send and the second is for check_imap_receive.</p>
+</dd>
+<dt><strong><a name="alert_pluginn" class="item">--alert &lt;pluginN&gt;</a></strong></dt>
+
+<dd>
+<p>Exit with WARNING or CRITICAL only if a warning or error (--warning, --critical, or --timeout)
+occurs for specified plugins. If a warning or error occurs for non-specified plugins that run
+BEFORE the specified plugins, the exit status will be UNKNOWN. If a warning of error occurs
+for non-specified plugins that run AFTER the specified plugins, the exit status will not be
+affected.</p>
+<p>You would use this option if you are using check_email_delivery with the --plugin option and
+the plugins you configure each use different servers, for example different SMTP and IMAP servers.
+By default, if you do not use the --alert option, if anything goes wrong during the email delivery
+check, a WARNING or CRITICAL alert will be issued. This means that if you define check_email_delivery
+for the SMTP server only and the IMAP server fails, Nagios will alert you for the SMTP server which
+would be misleading. If you define it for both the SMTP server and IMAP server and just one of them
+fails, Nagios will alert you for both servers, which would still be misleading. If you have this
+situation, you may want to use the --alert option. You define the check_email_delivery check for
+both servers: for the SMTP server (first plugin) you use --alert 1, and for for the IMAP server
+(second plugin) you use --alert 2. When check_email_delivery runs with --alert 1 and the SMTP
+server fails, you will get the appropriate alert. If the IMAP server fails it will not affect the
+status. When check_email_delivery runs with --alert 2 and the SMTP server fails, you will get the
+UNKNOWN return code. If the IMAP server generates an alert you will get a WARNING or CRITICAL as
+appropriate.</p>
+<p>You can repeat this option to specify multiple plugins that should cause an alert.
+Do this if you have multiple plugins on the command line but some of them involve the same server.</p>
+<p>See also: --plugin.
+Also known as: -A &lt;pluginN&gt;</p>
+</dd>
+<dt><strong><a name="wait_seconds_seconds" class="item">--wait &lt;seconds&gt;[,&lt;seconds&gt;,...]</a></strong></dt>
+
+<dd>
+<p>How long to wait between sending the message and checking that it was received. View default with
+the -vV option.</p>
+<p>When using the --plugin option, you can specify as many wait-between times as you have plugins
+(minus the last plugin, because it makes no sense to wait after running the last one). For
+example, if you use the --plugin option twice to specify an SMTP plugin and an IMAP plugin, and
+you want to wait 5 seconds between sending and receiving, then you would specify --wait 5. A second
+example, if you are using the --plugin option three times, then specifying -w 5 will wait 5 seconds
+between the second and third plugins also. You can specify a different wait time
+of 10 seconds between the second and third plugins, like this: -w 5,10.</p>
+</dd>
+<dt><strong><a name="hostname_server" class="item">--hostname &lt;server&gt;</a></strong></dt>
+
+<dd>
+<p>Address or name of the SMTP and IMAP server. Examples: mail.server.com, localhost, 192.168.1.100.
+Also known as: -H &lt;server&gt;</p>
+</dd>
+<dt><strong><a name="smtp_server_server" class="item">--smtp-server &lt;server&gt;</a></strong></dt>
+
+<dd>
+<p>Address or name of the SMTP server. Examples: smtp.server.com, localhost, 192.168.1.100.
+Using this option overrides the hostname option.</p>
+</dd>
+<dt><strong><a name="smtp_port_number" class="item">--smtp-port &lt;number&gt;</a></strong></dt>
+
+<dd>
+<p>Service port on the SMTP server. Default is 25.</p>
+</dd>
+<dt><strong><a name="smtp_username_username" class="item">--smtp-username &lt;username&gt;</a></strong></dt>
+
+<dt><strong><a name="smtp_password_password" class="item">--smtp-password &lt;password&gt;</a></strong></dt>
+
+<dd>
+<p>Username and password to use when connecting to the SMTP server with the TLS option.
+Use these options if the SMTP account has a different username/password than the
+IMAP account you are testing. These options take precendence over the --username and
+the --password options.</p>
+<p>These are shell-escaped; special characters are ok.</p>
+</dd>
+<dt><strong><a name="imap_server_server" class="item">--imap-server &lt;server&gt;</a></strong></dt>
+
+<dd>
+<p>Address or name of the IMAP server. Examples: imap.server.com, localhost, 192.168.1.100.
+Using this option overrides the hostname option.</p>
+</dd>
+<dt><strong><a name="imap_port_number" class="item">--imap-port &lt;number&gt;</a></strong></dt>
+
+<dd>
+<p>Service port on the IMAP server. Default is 143. If you use SSL the default is 993.</p>
+</dd>
+<dt><strong><a name="imap_username_username" class="item">--imap-username &lt;username&gt;</a></strong></dt>
+
+<dt><strong><a name="imap_password_password" class="item">--imap-password &lt;password&gt;</a></strong></dt>
+
+<dd>
+<p>Username and password to use when connecting to the IMAP server.
+Use these options if the IMAP account has a different username/password than the
+SMTP account you are testing. These options take precendence over the --username and
+the --password options.</p>
+<p>These are shell-escaped; special characters are ok.</p>
+</dd>
+<dt><strong><a name="username_username" class="item">--username &lt;username&gt;</a></strong></dt>
+
+<dt><strong><a name="password_password" class="item">--password &lt;password&gt;</a></strong></dt>
+
+<dd>
+<p>Username and password to use when connecting to IMAP server.
+Also known as: -U &lt;username&gt; -P &lt;password&gt;</p>
+<p>Also used as the username and password for SMTP when the TLS option is enabled.
+To specify a separate set of credentials for SMTP authentication, see the
+options --smtp-username and --smtp-password.</p>
+</dd>
+<dt><strong><a name="imap_check_interval_seconds" class="item">--imap-check-interval &lt;seconds&gt;</a></strong></dt>
+
+<dd>
+<p>How long to wait between polls of the imap-server for the specified mail. Default is 5 seconds.</p>
+</dd>
+<dt><strong><a name="imap_retries_times" class="item">--imap-retries &lt;times&gt;</a></strong></dt>
+
+<dd>
+<p>How many times to poll the imap-server for the mail, before we give up. Default is 10.</p>
+</dd>
+<dt><strong><a name="body_message" class="item">--body &lt;message&gt;</a></strong></dt>
+
+<dd>
+<p>Use this option to specify the body of the email message.</p>
+</dd>
+<dt><strong><a name="header_header" class="item">--header &lt;header&gt;</a></strong></dt>
+
+<dd>
+<p>Use this option to set an arbitrary header in the message. You can use it multiple times.</p>
+</dd>
+<dt><strong><a name="mailto_recipient_your_net" class="item">--mailto <a href="mailto:recipient@your.net">recipient@your.net</a></a></strong></dt>
+
+<dd>
+<p>You can send a message to multiple recipients by repeating this option or by separating
+the email addresses with commas (no whitespace allowed):</p>
+<p>$ check_email_delivery ... --mailto <a href="mailto:recipient@your.net,recipient2@your.net">recipient@your.net,recipient2@your.net</a> --mailfrom <a href="mailto:sender@your.net">sender@your.net</a></p>
+<p>This argument is shell-escaped; special characters or angle brackets around the address are ok.</p>
+</dd>
+<dt><strong><a name="mailfrom_sender_your_net" class="item">--mailfrom <a href="mailto:sender@your.net">sender@your.net</a></a></strong></dt>
+
+<dd>
+<p>Use this option to set the &quot;from&quot; address in the email.</p>
+</dd>
+<dt><strong><a name="imapssl_item_noimapssl" class="item">--imapssl
+=item --noimapssl</a></strong></dt>
+
+<dd>
+<p>Use this to enable or disable SSL for the IMAP plugin.</p>
+<p>This argument is shell-escaped; special characters or angle brackets around the address are ok.</p>
+</dd>
+<dt><strong><a name="smtptls_item_nosmtptls" class="item">--smtptls
+=item --nosmtptls</a></strong></dt>
+
+<dd>
+<p>Use this to enable or disable TLS/AUTH for the SMTP plugin.</p>
+</dd>
+<dt><strong><a name="libexec" class="item">--libexec</a></strong></dt>
+
+<dd>
+<p>Use this option to set the path of the Nagios libexec directory. The default is
+/usr/local/nagios/libexec. This is where this plugin looks for the SMTP and IMAP
+plugins that it depends on.</p>
+</dd>
+<dt><strong><a name="plugin_command" class="item">--plugin &lt;command&gt;</a></strong></dt>
+
+<dd>
+<p>This is a new option introduced in version 0.5 of the check_email_delivery plugin.
+It frees the plugin from depending on specific external plugins and generalizes the
+work done to determine that the email loop is operational. When using the --plugin
+option, the following options are ignored: libexec, imapssl, smtptls, hostname,
+username, password, smtp*, imap*, mailto, mailfrom, body, header, search.</p>
+<p>Use this option multiple times to specify the complete trip. Typically, you would use
+this twice to specify plugins for SMTP and IMAP, or SMTP and POP3.</p>
+<p>The output will be success if all the plugins return success. Each plugin should be a
+standard Nagios plugin.</p>
+<p>A random token will be automatically generated and passed to each plugin specified on
+the command line by substituting the string %TOKEN1%.</p>
+<p>Example usage:</p>
+<pre>
+ command_name check_email_delivery
+ command_line check_email_delivery
+ --plugin &quot;$USER1$/check_smtp_send -H $ARG1$ --mailto recipient@your.net --mailfrom sender@your.net --header 'Subject: Nagios Test %TOKEN1%.'&quot;
+ --plugin &quot;$USER1$/check_imap_receive -H $ARG1$ -U $ARG1$ -P $ARG2$ -s SUBJECT -s 'Nagios Test %TOKEN1%.'&quot;</pre>
+<p>This technique allows for a lot of flexibility in configuring the plugins that test
+each part of your email delivery loop.</p>
+<p>See also: --token.
+Also known as: -p &lt;command&gt;</p>
+</dd>
+<dt><strong><a name="token_format" class="item">--token &lt;format&gt;</a></strong></dt>
+
+<dd>
+<p>This is a new option introduced in version 0.5 of the check_email_delivery plugin.
+It can be used in conjunction with --plugin to control the tokens that are generated
+and passed to the plugins, like %TOKEN1%.</p>
+<p>Use this option multiple times to specify formats for different tokens. For example,
+if you want %TOKEN1% to consist of only alphabetical characters but want %TOKEN2% to
+consist of only digits, then you might use these options: --token aaaaaa --token nnnnn</p>
+<p>Any tokens used in your plugin commands that have not been specified by --token &lt;format&gt;
+will default to --token U-X-Y</p>
+<p>Token formats:
+a - alpha character (a-z)
+n - numeric character (0-9)
+c - alphanumeric character (a-z0-9)
+h - hexadecimal character (0-9a-f)
+U - unix time, seconds from epoch. eg 1193012441
+X - a word from the pgp even list. eg aardvark
+Y - a word from the pgp odd list. eg adroitness</p>
+<p>Caution: It has been observed that some IMAP servers do not handle underscores well in the
+search criteria. For best results, avoid using underscores in your tokens. Use hyphens or commas instead.</p>
+<p>See also: --plugin.
+Also known as: -T &lt;format&gt;</p>
+<p>The PGP word list was obtained from <a href="http://en.wikipedia.org/wiki/PGP_word_list">http://en.wikipedia.org/wiki/PGP_word_list</a></p>
+</dd>
+<dt><strong><a name="file_file" class="item">--file &lt;file&gt;</a></strong></dt>
+
+<dd>
+<p>Save (append) status information into the given tab-delimited file. Format used:</p>
+<pre>
+ token start-time end-time status plugin-num output</pre>
+<p>Note: format may change in future versions and may become configurable.</p>
+<p>This option available as of version 0.6.2.</p>
+<p>Also known as: -F &lt;file&gt;</p>
+</dd>
+<dt><strong><a name="hires" class="item">--hires</a></strong></dt>
+
+<dd>
+<p>Use the Time::HiRes module to measure time, if available.</p>
+</dd>
+<dt><strong><a name="verbose" class="item">--verbose</a></strong></dt>
+
+<dd>
+<p>Display additional information. Useful for troubleshooting. Use together with --version to see the default
+warning and critical timeout values.
+Also known as: -v</p>
+</dd>
+<dt><strong><a name="version" class="item">--version</a></strong></dt>
+
+<dd>
+<p>Display plugin version and exit.
+Also known as: -V</p>
+</dd>
+<dt><strong><a name="help" class="item">--help</a></strong></dt>
+
+<dd>
+<p>Display this documentation and exit. Does not work in the ePN version.
+Also known as: -h</p>
+</dd>
+<dt><strong><a name="usage" class="item">--usage</a></strong></dt>
+
+<dd>
+<p>Display a short usage instruction and exit.</p>
+</dd>
+</dl>
+<p>
+</p>
+<hr />
+<h1><a name="examples">EXAMPLES</a></h1>
+<p>
+</p>
+<h2><a name="send_a_message_with_custom_headers">Send a message with custom headers</a></h2>
+<p>$ check_email_delivery -H mail.server.net --mailto <a href="mailto:recipient@your.net">recipient@your.net</a> --mailfrom <a href="mailto:sender@your.net">sender@your.net</a>
+--username recipient --password secret</p>
+<p>EMAIL DELIVERY OK - 1 seconds</p>
+<p>
+</p>
+<h2><a name="set_warning_and_critical_timeouts_for_receive_plugin_only_">Set warning and critical timeouts for receive plugin only:</a></h2>
+<p>$ check_email_delivery -H mail.server.net --mailto <a href="mailto:recipient@your.net">recipient@your.net</a> --mailfrom <a href="mailto:sender@your.net">sender@your.net</a>
+--username recipient --password secret -w ,,5 -c ,,15</p>
+<p>EMAIL DELIVERY OK - 1 seconds</p>
+<p>
+</p>
+<hr />
+<h1><a name="exit_codes">EXIT CODES</a></h1>
+<p><table cellspacing="0" cellpadding="0"><tr><td>Complies with the Nagios plug-in specification:
+<tr><td> 0<td>OK<td>The plugin was able to check the service and it appeared to be functioning properly
+<tr><td> 1<td>Warning<td>The plugin was able to check the service, but it appeared to be above some &quot;warning&quot; threshold or did not appear to be working properly
+<tr><td> 2<td>Critical<td>The plugin detected that either the service was not running or it was above some &quot;critical&quot; threshold
+<tr><td> 3<td>Unknown<td>Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service</table></p>
+<p>
+</p>
+<hr />
+<h1><a name="nagios_plugin_notes">NAGIOS PLUGIN NOTES</a></h1>
+<p>Nagios plugin reference: <a href="http://nagiosplug.sourceforge.net/developer-guidelines.html">http://nagiosplug.sourceforge.net/developer-guidelines.html</a></p>
+<p>This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because
+the path to utils.pm must be specified completely in this program and forces users to edit the source
+code if their install location is different (if they realize this is the problem). You can view
+the default timeout for this module by using the --verbose and --version options together. The
+short form is -vV.</p>
+<p>Other than that, it attempts to follow published guidelines for Nagios plugins.</p>
+<p>
+</p>
+<hr />
+<h1><a name="changes">CHANGES</a></h1>
+<pre>
+ Wed Oct 29 13:08:00 PST 2005
+ + version 0.1</pre>
+<pre>
+ Wed Nov 9 17:16:09 PST 2005
+ + updated arguments to check_smtp_send and check_imap_receive
+ + added eval/alarm block to implement -c option
+ + added wait option to adjust sleep time between smtp and imap calls
+ + added delay-warn and delay-crit options to adjust email delivery warning thresholds
+ + now using an inline PluginReport package to generate the report
+ + copyright notice and GNU GPL
+ + version 0.2</pre>
+<pre>
+ Thu Apr 20 14:00:00 CET 2006 (by Johan Nilsson &lt;johann (at) axis.com&gt;)
+ + version 0.2.1
+ + corrected bug in getoptions ($imap_server would never ever be set from command-line...)
+ + will not make $smtp_server and $imap_server == $host if they're defined on commandline
+ + added support for multiple polls of imap-server, with specified intervals
+ + changed default behaviour in check_imap_server (searches for the specific id in subject and deletes mails found)
+ + increased default delay_warn from 65 seconds to 95 seconds</pre>
+<pre>
+ Thu Apr 20 16:00:00 PST 2006 (by Geoff Crompton &lt;geoff.crompton@strategicdata.com.au&gt;)
+ + fixed a bug in getoptions
+ + version 0.2.2</pre>
+<pre>
+ Tue Apr 24 21:17:53 PDT 2007
+ + now there is an alternate version (same but without embedded perl POD) that is compatible with the new new embedded-perl Nagios feature
+ + version 0.2.3</pre>
+<pre>
+ Fri Apr 27 20:32:53 PDT 2007
+ + documentation now mentions every command-line option accepted by the plugin, including abbreviations
+ + changed connection error to display timeout only if timeout was the error
+ + default IMAP plugin is libexec/check_imap_receive (also checking for same but with .pl extension)
+ + default SMTP plugin is libexec/check_smtp_send (also checking for same but with .pl extension)
+ + removed default values for SMTP port and IMAP port to allow those plugins to set the defaults; so current behavior stays the same and will continue to make sense with SSL
+ + version 0.3</pre>
+<pre>
+ Thu Oct 11 10:00:00 EET 2007 (by Timo Virtaneva &lt;timo (at) virtaneva dot com&gt;
+ + Changed the header and the search criteria so that the same email-box can be used for all smtp-servers
+ + version 0.3.1</pre>
+<pre>
+ Sun Oct 21 11:01:03 PDT 2007
+ + added support for TLS options to the SMTP plugin
+ + version 0.4</pre>
+<pre>
+ Sun Oct 21 16:17:14 PDT 2007
+ + added support for arbitrary plugins to send and receive mail (or anthing else!). see the --plugin option.
+ + version 0.5</pre>
+<pre>
+ Tue Dec 4 07:36:20 PST 2007
+ + added --usage option because the official nagios plugins have both --help and --usage
+ + added --timeout option to match the official nagios plugins
+ + shortcut option for --token is now -T to avoid clash with standard shortcut -t for --timeout
+ + fixed some minor pod formatting issues for perldoc
+ + version 0.5.1</pre>
+<pre>
+ Sat Dec 15 07:39:59 PST 2007
+ + improved compatibility with Nagios embedded perl (ePN)
+ + version 0.5.2</pre>
+<pre>
+ Thu Jan 17 20:27:36 PST 2008 (by Timo Virtaneva &lt;timo (at) virtaneva dot com&gt; on Thu Oct 11 10:00:00 EET 2007)
+ + Changed the header and the search criteria so that the same email-box can be used for all smtp-servers
+ + version 0.5.3</pre>
+<pre>
+ Mon Jan 28 22:11:02 PST 2008
+ + fixed a bug, smtp-password and imap-password are now string parameters
+ + added --alert option to allow selection of which plugin(s) should cause a WARNING or CRITICAL alert
+ + version 0.6</pre>
+<pre>
+ Mon Feb 11 19:09:37 PST 2008
+ + fixed a bug for embedded perl version, variable &quot;%status&quot; will not stay shared in load_modules
+ + version 0.6.1</pre>
+<pre>
+ Mon May 26 10:39:19 PDT 2008
+ + added --file option to allow plugin to record status information into a tab-delimited file
+ + changed default token from U_X_Y to U-X-Y
+ + version 0.6.2</pre>
+<pre>
+ Wed Jan 14 08:29:35 PST 2009
+ + fixed a bug that the --header parameter was not being passed to the smtp plugin.
+ + version 0.6.3</pre>
+<pre>
+ Mon Jun 8 15:43:48 PDT 2009
+ + added performance data for use with PNP4Nagios! (thanks to Ben Ritcey for the patch)
+ + version 0.6.4</pre>
+<pre>
+ Wed Sep 16 07:10:10 PDT 2009
+ + added elapsed time in seconds to performance data
+ + version 0.6.5</pre>
+<pre>
+ Fri Oct 8 19:48:44 PDT 2010
+ + fixed uniform IMAP and SMTP username and password bug (thanks to Micle Moerenhout for pointing it out)
+ + version 0.6.6</pre>
+<pre>
+ Mon Jan 3 08:24:23 PST 2011
+ + added shell escaping for smtp-username, smtp-password, mailto, mailfrom, imap-username, and imap-password arguments
+ + version 0.7.0</pre>
+<pre>
+ Fri May 6 08:35:09 AST 2011
+ + added --hires option to enable use of Time::Hires if available
+ + version 0.7.1</pre>
+<pre>
+ Sun Jun 12 17:17:06 AST 2011
+ + added --imap-mailbox option to pass through to check_imap_receive --mailbox option
+ + added --ssl option to conveniently enable both --smtp-tls and --imap-ssl
+ + version 0.7.2</pre>
+<p>
+</p>
+<hr />
+<h1><a name="author">AUTHOR</a></h1>
+<p>Jonathan Buhacoff &lt;<a href="mailto:jonathan@buhacoff.net">jonathan@buhacoff.net</a>&gt;</p>
+<p>
+</p>
+<hr />
+<h1><a name="copyright_and_license">COPYRIGHT AND LICENSE</a></h1>
+<pre>
+ Copyright (C) 2005-2011 Jonathan Buhacoff</pre>
+<pre>
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.</pre>
+<pre>
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.</pre>
+<pre>
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see &lt;<a href="http://www.gnu.org/licenses/&gt">http://www.gnu.org/licenses/&gt</a>;.</pre>
+<pre>
+ <a href="http://www.gnu.org/licenses/gpl.txt">http://www.gnu.org/licenses/gpl.txt</a></pre>
+
+</body>
+
+</html>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_email_delivery.pod b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_email_delivery.pod
new file mode 100644
index 0000000..8e8c9dc
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_email_delivery.pod
@@ -0,0 +1,472 @@
+
+
+=pod
+
+=head1 NAME
+
+check_email_delivery - sends email and verifies delivery
+
+=head1 SYNOPSIS
+
+ check_email_delivery -vV
+ check_email_delivery --usage
+ check_email_delivery --help
+
+=head1 OPTIONS
+
+=over
+
+=item --warning <seconds>[,<smtp_seconds>,<imap_seconds>]
+
+Exit with WARNING if the most recent email found is older than <seconds>. The
+optional <smtp_seconds> and <imap_seconds> parameters will be passed on to the
+included plugins that are used for those tasks. If they are not
+given then they will not be passed on and the default for that plugin will apply.
+Also known as: -w <seconds>[,<send>[,<recv>]]
+
+When using the --plugin option, only one parameter is supported (-w <seconds>) and it will apply
+to the entire process. You can specify a warning threshold specific to each plugin in the
+plugin command line.
+
+When using the --plugin option, no measuring of "most recent email" is done because we would
+not know how to read this information from receive plugins. This may be addressed in future versions.
+
+=item --critical <seconds>[,<smtp_seconds>,<imap_seconds>]
+
+Exit with CRITICAL if the most recent email found is older than <seconds>. The
+optional <smtp_seconds> and <imap_seconds> parameters will be passed on to the
+included plugins that are used for those tasks. If they are not
+given then they will not be passed on and the default for that plugin will apply.
+Also known as: -c <seconds>[,<send>[,<recv>]]
+
+When using the --plugin option, only one parameter is supported (-c <seconds>) and it will apply
+to the entire process. You can specify a critical threshold specific to each plugin in the
+plugin command line.
+
+When using the --plugin option, no measuring of "most recent email" is done because we would
+not know how to read this information from receive plugins. This may be addressed in future versions.
+
+=item --timeout <seconds>
+
+=item --timeout <smtp_seconds>,<imap_seconds>
+
+=item --timeout <plugin1_seconds>,<plugin2_seconds>,...
+
+Exit with CRITICAL if the plugins do not return a status within the specified number of seconds.
+When only one parameter is used, it applies to each plugin. When multiple parameters are used
+(separated by commas) they apply to plugins in the same order the plugins were specified on the
+command line. When using --timeout but not the --plugin option, the first parameter is for
+check_smtp_send and the second is for check_imap_receive.
+
+=item --alert <pluginN>
+
+Exit with WARNING or CRITICAL only if a warning or error (--warning, --critical, or --timeout)
+occurs for specified plugins. If a warning or error occurs for non-specified plugins that run
+BEFORE the specified plugins, the exit status will be UNKNOWN. If a warning of error occurs
+for non-specified plugins that run AFTER the specified plugins, the exit status will not be
+affected.
+
+You would use this option if you are using check_email_delivery with the --plugin option and
+the plugins you configure each use different servers, for example different SMTP and IMAP servers.
+By default, if you do not use the --alert option, if anything goes wrong during the email delivery
+check, a WARNING or CRITICAL alert will be issued. This means that if you define check_email_delivery
+for the SMTP server only and the IMAP server fails, Nagios will alert you for the SMTP server which
+would be misleading. If you define it for both the SMTP server and IMAP server and just one of them
+fails, Nagios will alert you for both servers, which would still be misleading. If you have this
+situation, you may want to use the --alert option. You define the check_email_delivery check for
+both servers: for the SMTP server (first plugin) you use --alert 1, and for for the IMAP server
+(second plugin) you use --alert 2. When check_email_delivery runs with --alert 1 and the SMTP
+server fails, you will get the appropriate alert. If the IMAP server fails it will not affect the
+status. When check_email_delivery runs with --alert 2 and the SMTP server fails, you will get the
+UNKNOWN return code. If the IMAP server generates an alert you will get a WARNING or CRITICAL as
+appropriate.
+
+You can repeat this option to specify multiple plugins that should cause an alert.
+Do this if you have multiple plugins on the command line but some of them involve the same server.
+
+See also: --plugin.
+Also known as: -A <pluginN>
+
+
+=item --wait <seconds>[,<seconds>,...]
+
+How long to wait between sending the message and checking that it was received. View default with
+the -vV option.
+
+When using the --plugin option, you can specify as many wait-between times as you have plugins
+(minus the last plugin, because it makes no sense to wait after running the last one). For
+example, if you use the --plugin option twice to specify an SMTP plugin and an IMAP plugin, and
+you want to wait 5 seconds between sending and receiving, then you would specify --wait 5. A second
+example, if you are using the --plugin option three times, then specifying -w 5 will wait 5 seconds
+between the second and third plugins also. You can specify a different wait time
+of 10 seconds between the second and third plugins, like this: -w 5,10.
+
+=item --hostname <server>
+
+Address or name of the SMTP and IMAP server. Examples: mail.server.com, localhost, 192.168.1.100.
+Also known as: -H <server>
+
+=item --smtp-server <server>
+
+Address or name of the SMTP server. Examples: smtp.server.com, localhost, 192.168.1.100.
+Using this option overrides the hostname option.
+
+=item --smtp-port <number>
+
+Service port on the SMTP server. Default is 25.
+
+=item --smtp-username <username>
+
+=item --smtp-password <password>
+
+Username and password to use when connecting to the SMTP server with the TLS option.
+Use these options if the SMTP account has a different username/password than the
+IMAP account you are testing. These options take precendence over the --username and
+the --password options.
+
+These are shell-escaped; special characters are ok.
+
+=item --imap-server <server>
+
+Address or name of the IMAP server. Examples: imap.server.com, localhost, 192.168.1.100.
+Using this option overrides the hostname option.
+
+=item --imap-port <number>
+
+Service port on the IMAP server. Default is 143. If you use SSL the default is 993.
+
+=item --imap-username <username>
+
+=item --imap-password <password>
+
+Username and password to use when connecting to the IMAP server.
+Use these options if the IMAP account has a different username/password than the
+SMTP account you are testing. These options take precendence over the --username and
+the --password options.
+
+These are shell-escaped; special characters are ok.
+
+=item --username <username>
+
+=item --password <password>
+
+Username and password to use when connecting to IMAP server.
+Also known as: -U <username> -P <password>
+
+Also used as the username and password for SMTP when the TLS option is enabled.
+To specify a separate set of credentials for SMTP authentication, see the
+options --smtp-username and --smtp-password.
+
+=item --imap-check-interval <seconds>
+
+How long to wait between polls of the imap-server for the specified mail. Default is 5 seconds.
+
+=item --imap-retries <times>
+
+How many times to poll the imap-server for the mail, before we give up. Default is 10.
+
+=item --body <message>
+
+Use this option to specify the body of the email message.
+
+=item --header <header>
+
+Use this option to set an arbitrary header in the message. You can use it multiple times.
+
+=item --mailto recipient@your.net
+
+You can send a message to multiple recipients by repeating this option or by separating
+the email addresses with commas (no whitespace allowed):
+
+$ check_email_delivery ... --mailto recipient@your.net,recipient2@your.net --mailfrom sender@your.net
+
+This argument is shell-escaped; special characters or angle brackets around the address are ok.
+
+=item --mailfrom sender@your.net
+
+Use this option to set the "from" address in the email.
+
+=item --imapssl
+=item --noimapssl
+
+Use this to enable or disable SSL for the IMAP plugin.
+
+This argument is shell-escaped; special characters or angle brackets around the address are ok.
+
+=item --smtptls
+=item --nosmtptls
+
+Use this to enable or disable TLS/AUTH for the SMTP plugin.
+
+=item --libexec
+
+Use this option to set the path of the Nagios libexec directory. The default is
+/usr/local/nagios/libexec. This is where this plugin looks for the SMTP and IMAP
+plugins that it depends on.
+
+=item --plugin <command>
+
+This is a new option introduced in version 0.5 of the check_email_delivery plugin.
+It frees the plugin from depending on specific external plugins and generalizes the
+work done to determine that the email loop is operational. When using the --plugin
+option, the following options are ignored: libexec, imapssl, smtptls, hostname,
+username, password, smtp*, imap*, mailto, mailfrom, body, header, search.
+
+Use this option multiple times to specify the complete trip. Typically, you would use
+this twice to specify plugins for SMTP and IMAP, or SMTP and POP3.
+
+The output will be success if all the plugins return success. Each plugin should be a
+standard Nagios plugin.
+
+A random token will be automatically generated and passed to each plugin specified on
+the command line by substituting the string %TOKEN1%.
+
+Example usage:
+
+ command_name check_email_delivery
+ command_line check_email_delivery
+ --plugin "$USER1$/check_smtp_send -H $ARG1$ --mailto recipient@your.net --mailfrom sender@your.net --header 'Subject: Nagios Test %TOKEN1%.'"
+ --plugin "$USER1$/check_imap_receive -H $ARG1$ -U $ARG1$ -P $ARG2$ -s SUBJECT -s 'Nagios Test %TOKEN1%.'"
+
+This technique allows for a lot of flexibility in configuring the plugins that test
+each part of your email delivery loop.
+
+See also: --token.
+Also known as: -p <command>
+
+=item --token <format>
+
+This is a new option introduced in version 0.5 of the check_email_delivery plugin.
+It can be used in conjunction with --plugin to control the tokens that are generated
+and passed to the plugins, like %TOKEN1%.
+
+Use this option multiple times to specify formats for different tokens. For example,
+if you want %TOKEN1% to consist of only alphabetical characters but want %TOKEN2% to
+consist of only digits, then you might use these options: --token aaaaaa --token nnnnn
+
+Any tokens used in your plugin commands that have not been specified by --token <format>
+will default to --token U-X-Y
+
+Token formats:
+a - alpha character (a-z)
+n - numeric character (0-9)
+c - alphanumeric character (a-z0-9)
+h - hexadecimal character (0-9a-f)
+U - unix time, seconds from epoch. eg 1193012441
+X - a word from the pgp even list. eg aardvark
+Y - a word from the pgp odd list. eg adroitness
+
+Caution: It has been observed that some IMAP servers do not handle underscores well in the
+search criteria. For best results, avoid using underscores in your tokens. Use hyphens or commas instead.
+
+See also: --plugin.
+Also known as: -T <format>
+
+The PGP word list was obtained from http://en.wikipedia.org/wiki/PGP_word_list
+
+=item --file <file>
+
+Save (append) status information into the given tab-delimited file. Format used:
+
+ token start-time end-time status plugin-num output
+
+Note: format may change in future versions and may become configurable.
+
+This option available as of version 0.6.2.
+
+Also known as: -F <file>
+
+=item --hires
+
+Use the Time::HiRes module to measure time, if available.
+
+=item --verbose
+
+Display additional information. Useful for troubleshooting. Use together with --version to see the default
+warning and critical timeout values.
+Also known as: -v
+
+=item --version
+
+Display plugin version and exit.
+Also known as: -V
+
+=item --help
+
+Display this documentation and exit. Does not work in the ePN version.
+Also known as: -h
+
+=item --usage
+
+Display a short usage instruction and exit.
+
+=back
+
+=head1 EXAMPLES
+
+=head2 Send a message with custom headers
+
+$ check_email_delivery -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net
+--username recipient --password secret
+
+EMAIL DELIVERY OK - 1 seconds
+
+=head2 Set warning and critical timeouts for receive plugin only:
+
+$ check_email_delivery -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net
+--username recipient --password secret -w ,,5 -c ,,15
+
+EMAIL DELIVERY OK - 1 seconds
+
+=head1 EXIT CODES
+
+Complies with the Nagios plug-in specification:
+ 0 OK The plugin was able to check the service and it appeared to be functioning properly
+ 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly
+ 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold
+ 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service
+
+=head1 NAGIOS PLUGIN NOTES
+
+Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html
+
+This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because
+the path to utils.pm must be specified completely in this program and forces users to edit the source
+code if their install location is different (if they realize this is the problem). You can view
+the default timeout for this module by using the --verbose and --version options together. The
+short form is -vV.
+
+Other than that, it attempts to follow published guidelines for Nagios plugins.
+
+=head1 CHANGES
+
+ Wed Oct 29 13:08:00 PST 2005
+ + version 0.1
+
+ Wed Nov 9 17:16:09 PST 2005
+ + updated arguments to check_smtp_send and check_imap_receive
+ + added eval/alarm block to implement -c option
+ + added wait option to adjust sleep time between smtp and imap calls
+ + added delay-warn and delay-crit options to adjust email delivery warning thresholds
+ + now using an inline PluginReport package to generate the report
+ + copyright notice and GNU GPL
+ + version 0.2
+
+ Thu Apr 20 14:00:00 CET 2006 (by Johan Nilsson <johann (at) axis.com>)
+ + version 0.2.1
+ + corrected bug in getoptions ($imap_server would never ever be set from command-line...)
+ + will not make $smtp_server and $imap_server == $host if they're defined on commandline
+ + added support for multiple polls of imap-server, with specified intervals
+ + changed default behaviour in check_imap_server (searches for the specific id in subject and deletes mails found)
+ + increased default delay_warn from 65 seconds to 95 seconds
+
+ Thu Apr 20 16:00:00 PST 2006 (by Geoff Crompton <geoff.crompton@strategicdata.com.au>)
+ + fixed a bug in getoptions
+ + version 0.2.2
+
+ Tue Apr 24 21:17:53 PDT 2007
+ + now there is an alternate version (same but without embedded perl POD) that is compatible with the new new embedded-perl Nagios feature
+ + version 0.2.3
+
+ Fri Apr 27 20:32:53 PDT 2007
+ + documentation now mentions every command-line option accepted by the plugin, including abbreviations
+ + changed connection error to display timeout only if timeout was the error
+ + default IMAP plugin is libexec/check_imap_receive (also checking for same but with .pl extension)
+ + default SMTP plugin is libexec/check_smtp_send (also checking for same but with .pl extension)
+ + removed default values for SMTP port and IMAP port to allow those plugins to set the defaults; so current behavior stays the same and will continue to make sense with SSL
+ + version 0.3
+
+ Thu Oct 11 10:00:00 EET 2007 (by Timo Virtaneva <timo (at) virtaneva dot com>
+ + Changed the header and the search criteria so that the same email-box can be used for all smtp-servers
+ + version 0.3.1
+
+ Sun Oct 21 11:01:03 PDT 2007
+ + added support for TLS options to the SMTP plugin
+ + version 0.4
+
+ Sun Oct 21 16:17:14 PDT 2007
+ + added support for arbitrary plugins to send and receive mail (or anthing else!). see the --plugin option.
+ + version 0.5
+
+ Tue Dec 4 07:36:20 PST 2007
+ + added --usage option because the official nagios plugins have both --help and --usage
+ + added --timeout option to match the official nagios plugins
+ + shortcut option for --token is now -T to avoid clash with standard shortcut -t for --timeout
+ + fixed some minor pod formatting issues for perldoc
+ + version 0.5.1
+
+ Sat Dec 15 07:39:59 PST 2007
+ + improved compatibility with Nagios embedded perl (ePN)
+ + version 0.5.2
+
+ Thu Jan 17 20:27:36 PST 2008 (by Timo Virtaneva <timo (at) virtaneva dot com> on Thu Oct 11 10:00:00 EET 2007)
+ + Changed the header and the search criteria so that the same email-box can be used for all smtp-servers
+ + version 0.5.3
+
+ Mon Jan 28 22:11:02 PST 2008
+ + fixed a bug, smtp-password and imap-password are now string parameters
+ + added --alert option to allow selection of which plugin(s) should cause a WARNING or CRITICAL alert
+ + version 0.6
+
+ Mon Feb 11 19:09:37 PST 2008
+ + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules
+ + version 0.6.1
+
+ Mon May 26 10:39:19 PDT 2008
+ + added --file option to allow plugin to record status information into a tab-delimited file
+ + changed default token from U_X_Y to U-X-Y
+ + version 0.6.2
+
+ Wed Jan 14 08:29:35 PST 2009
+ + fixed a bug that the --header parameter was not being passed to the smtp plugin.
+ + version 0.6.3
+
+ Mon Jun 8 15:43:48 PDT 2009
+ + added performance data for use with PNP4Nagios! (thanks to Ben Ritcey for the patch)
+ + version 0.6.4
+
+ Wed Sep 16 07:10:10 PDT 2009
+ + added elapsed time in seconds to performance data
+ + version 0.6.5
+
+ Fri Oct 8 19:48:44 PDT 2010
+ + fixed uniform IMAP and SMTP username and password bug (thanks to Micle Moerenhout for pointing it out)
+ + version 0.6.6
+
+ Mon Jan 3 08:24:23 PST 2011
+ + added shell escaping for smtp-username, smtp-password, mailto, mailfrom, imap-username, and imap-password arguments
+ + version 0.7.0
+
+ Fri May 6 08:35:09 AST 2011
+ + added --hires option to enable use of Time::Hires if available
+ + version 0.7.1
+
+ Sun Jun 12 17:17:06 AST 2011
+ + added --imap-mailbox option to pass through to check_imap_receive --mailbox option
+ + added --ssl option to conveniently enable both --smtp-tls and --imap-ssl
+ + version 0.7.2
+
+=head1 AUTHOR
+
+Jonathan Buhacoff <jonathan@buhacoff.net>
+
+=head1 COPYRIGHT AND LICENSE
+
+ Copyright (C) 2005-2011 Jonathan Buhacoff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ http://www.gnu.org/licenses/gpl.txt
+
+=cut
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_quota.html b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_quota.html
new file mode 100644
index 0000000..8548ca0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_quota.html
@@ -0,0 +1,258 @@
+<?xml version="1.0" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>check_imap_quota - connects to an IMAP account and checks the quota</title>
+<link rel="stylesheet" href="plainwhite.css" type="text/css" />
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<link rev="made" href="mailto:jonathan@greek.local" />
+</head>
+
+<body>
+
+
+<!-- INDEX BEGIN -->
+<div name="index">
+<p><a name="__index__"></a></p>
+<!--
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#options">OPTIONS</a></li>
+ <li><a href="#examples">EXAMPLES</a></li>
+ <ul>
+
+ <li><a href="#report_how_many_emails_are_in_the_mailbox">Report how many emails are in the mailbox</a></li>
+ <li><a href="#report_the_email_with_the_highest_value">Report the email with the highest value</a></li>
+ <li><a href="#troubleshoot_your_search_parameters">Troubleshoot your search parameters</a></li>
+ </ul>
+
+ <li><a href="#exit_codes">EXIT CODES</a></li>
+ <li><a href="#nagios_plugin_notes">NAGIOS PLUGIN NOTES</a></li>
+ <li><a href="#see_also">SEE ALSO</a></li>
+ <li><a href="#changes">CHANGES</a></li>
+ <li><a href="#author">AUTHOR</a></li>
+ <li><a href="#copyright_and_license">COPYRIGHT AND LICENSE</a></li>
+</ul>
+
+-->
+
+
+</div>
+<!-- INDEX END -->
+
+<p>
+</p>
+<hr />
+<h1><a name="name">NAME</a></h1>
+<p>check_imap_quota - connects to an IMAP account and checks the quota</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ check_imap_quota -vV
+ check_imap_quota -?
+ check_imap_quota --help</pre>
+<p>
+</p>
+<hr />
+<h1><a name="options">OPTIONS</a></h1>
+<dl>
+<dt><strong><a name="warning_seconds" class="item">--warning &lt;seconds&gt;</a></strong></dt>
+
+<dd>
+<p>Warn if it takes longer than &lt;seconds&gt; to connect to the IMAP server. Default is 15 seconds.
+Also known as: -w &lt;seconds&gt;</p>
+</dd>
+<dt><strong><a name="critical_seconds" class="item">--critical &lt;seconds&gt;</a></strong></dt>
+
+<dd>
+<p>Return a critical status if it takes longer than &lt;seconds&gt; to connect to the IMAP server. Default is 30 seconds.
+See also: --capture-critical &lt;messages&gt;
+Also known as: -c &lt;seconds&gt;</p>
+</dd>
+<dt><strong><a name="timeout_seconds" class="item">--timeout &lt;seconds&gt;</a></strong></dt>
+
+<dd>
+<p>Abort with critical status if it takes longer than &lt;seconds&gt; to connect to the IMAP server. Default is 60 seconds.
+The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to
+connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer
+than 30 seconds.
+Also known as: -t &lt;seconds&gt;</p>
+</dd>
+<dt><strong><a name="hostname_server" class="item">--hostname &lt;server&gt;</a></strong></dt>
+
+<dd>
+<p>Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100
+Also known as: -H &lt;server&gt;</p>
+</dd>
+<dt><strong><a name="port_number" class="item">--port &lt;number&gt;</a></strong></dt>
+
+<dd>
+<p>Service port on the IMAP server. Default is 143. If you use SSL, default is 993.
+Also known as: -p &lt;number&gt;</p>
+</dd>
+<dt><strong><a name="username_username" class="item">--username &lt;username&gt;</a></strong></dt>
+
+<dt><strong><a name="password_password" class="item">--password &lt;password&gt;</a></strong></dt>
+
+<dd>
+<p>Username and password to use when connecting to IMAP server.
+Also known as: -U &lt;username&gt; -P &lt;password&gt;</p>
+</dd>
+<dt><strong><a name="mailbox_mailbox" class="item">--mailbox &lt;mailbox&gt;</a></strong></dt>
+
+<dd>
+<p>Use this option to specify the mailbox to search for messages. Default is INBOX.
+Also known as: -m &lt;mailbox&gt;</p>
+</dd>
+<dt><strong><a name="ssl" class="item">--ssl</a></strong></dt>
+
+<dt><strong><a name="nossl" class="item">--nossl</a></strong></dt>
+
+<dd>
+<p>Enable SSL protocol. Requires IO::Socket::SSL.</p>
+<p>Using this option automatically changes the default port from 143 to 993. You can still
+override this from the command line using the --port option.</p>
+<p>Use the nossl option to turn off the ssl option.</p>
+</dd>
+<dt><strong><a name="hires" class="item">--hires</a></strong></dt>
+
+<dd>
+<p>Use the Time::HiRes module to measure time, if available.</p>
+</dd>
+<dt><strong><a name="verbose" class="item">--verbose</a></strong></dt>
+
+<dd>
+<p>Display additional information. Useful for troubleshooting. Use together with --version to see the default
+warning and critical timeout values.</p>
+<p>If the selected mailbox was not found, you can use verbosity level 3 (-vvv) to display a list of all
+available mailboxes on the server.</p>
+<p>Also known as: -v</p>
+</dd>
+<dt><strong><a name="version" class="item">--version</a></strong></dt>
+
+<dd>
+<p>Display plugin version and exit.
+Also known as: -V</p>
+</dd>
+<dt><strong><a name="help" class="item">--help</a></strong></dt>
+
+<dd>
+<p>Display this documentation and exit. Does not work in the ePN version.
+Also known as: -h</p>
+</dd>
+<dt><strong><a name="usage" class="item">--usage</a></strong></dt>
+
+<dd>
+<p>Display a short usage instruction and exit.</p>
+</dd>
+</dl>
+<p>
+</p>
+<hr />
+<h1><a name="examples">EXAMPLES</a></h1>
+<p>
+</p>
+<h2><a name="report_how_many_emails_are_in_the_mailbox">Report how many emails are in the mailbox</a></h2>
+<pre>
+ $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
+ -s ALL --nodelete</pre>
+<pre>
+ IMAP RECEIVE OK - 1 seconds, 7 found</pre>
+<p>
+</p>
+<h2><a name="report_the_email_with_the_highest_value">Report the email with the highest value</a></h2>
+<p>Suppose your mailbox has some emails from an automated script and that a message
+from this script typically looks like this (abbreviated):</p>
+<pre>
+ To: mailuser@server.net
+ From: autoscript@server.net
+ Subject: Results of Autoscript
+ Date: Wed, 09 Nov 2005 08:30:40 -0800
+ Message-ID: &lt;auto-000000992528@server.net&gt;</pre>
+<pre>
+ Homeruns 5</pre>
+<p>And further suppose that you are interested in reporting the message that has the
+highest number of home runs, and also to leave this message in the mailbox for future
+checks, but remove the other matching messages with lesser values:</p>
+<pre>
+ $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
+ -s SUBJECT -s &quot;Results of Autoscript&quot; --capture-max &quot;Homeruns (\d+)&quot; --nodelete-captured</pre>
+<pre>
+ IMAP RECEIVE OK - 1 seconds, 3 found, 1 captured, 5 max, 2 deleted</pre>
+<p>
+</p>
+<h2><a name="troubleshoot_your_search_parameters">Troubleshoot your search parameters</a></h2>
+<p>Add the --nodelete and --imap-retries=1 parameters to your command line.</p>
+<p>
+</p>
+<hr />
+<h1><a name="exit_codes">EXIT CODES</a></h1>
+<p><table cellspacing="0" cellpadding="0"><tr><td>Complies with the Nagios plug-in specification:
+<tr><td> 0<td>OK<td>The plugin was able to check the service and it appeared to be functioning properly
+<tr><td> 1<td>Warning<td>The plugin was able to check the service, but it appeared to be above some &quot;warning&quot; threshold or did not appear to be working properly
+<tr><td> 2<td>Critical<td>The plugin detected that either the service was not running or it was above some &quot;critical&quot; threshold
+<tr><td> 3<td>Unknown<td>Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service</table></p>
+<p>
+</p>
+<hr />
+<h1><a name="nagios_plugin_notes">NAGIOS PLUGIN NOTES</a></h1>
+<p>Nagios plugin reference: <a href="http://nagiosplug.sourceforge.net/developer-guidelines.html">http://nagiosplug.sourceforge.net/developer-guidelines.html</a></p>
+<p>This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because
+the path to utils.pm must be specified completely in this program and forces users to edit the source
+code if their install location is different (if they realize this is the problem). You can view
+the default timeout for this module by using the --verbose and --version options together. The
+short form is -vV.</p>
+<p>Other than that, it attempts to follow published guidelines for Nagios plugins.</p>
+<p>
+</p>
+<hr />
+<h1><a name="see_also">SEE ALSO</a></h1>
+<p><a href="http://nagios.org/">http://nagios.org/</a>
+<a href="http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod">http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod</a>
+<a href="http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod">http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod</a></p>
+<p>
+</p>
+<hr />
+<h1><a name="changes">CHANGES</a></h1>
+<pre>
+ Fri Nov 11 04:53:09 AST 2011
+ + version 0.1 created with quota code contributed by Johan Romme</pre>
+<pre>
+ Tue Dec 20 17:38:04 PST 2011
+ + fixed bug where a quota of 0 was reported as an incorrect response from the server, thanks to Eike Arndt
+ + version 0.2</pre>
+<p>
+</p>
+<hr />
+<h1><a name="author">AUTHOR</a></h1>
+<p>Jonathan Buhacoff &lt;<a href="mailto:jonathan@buhacoff.net">jonathan@buhacoff.net</a>&gt;</p>
+<p>
+</p>
+<hr />
+<h1><a name="copyright_and_license">COPYRIGHT AND LICENSE</a></h1>
+<pre>
+ Copyright (C) 2011 Jonathan Buhacoff</pre>
+<pre>
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.</pre>
+<pre>
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.</pre>
+<pre>
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see &lt;<a href="http://www.gnu.org/licenses/&gt">http://www.gnu.org/licenses/&gt</a>;.</pre>
+<pre>
+ <a href="http://www.gnu.org/licenses/gpl.txt">http://www.gnu.org/licenses/gpl.txt</a></pre>
+
+</body>
+
+</html>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_quota.pod b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_quota.pod
new file mode 100644
index 0000000..03a02c2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_quota.pod
@@ -0,0 +1,196 @@
+
+
+
+=pod
+
+=head1 NAME
+
+check_imap_quota - connects to an IMAP account and checks the quota
+
+=head1 SYNOPSIS
+
+ check_imap_quota -vV
+ check_imap_quota -?
+ check_imap_quota --help
+
+=head1 OPTIONS
+
+=over
+
+=item --warning <seconds>
+
+Warn if it takes longer than <seconds> to connect to the IMAP server. Default is 15 seconds.
+Also known as: -w <seconds>
+
+=item --critical <seconds>
+
+Return a critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 30 seconds.
+See also: --capture-critical <messages>
+Also known as: -c <seconds>
+
+=item --timeout <seconds>
+
+Abort with critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 60 seconds.
+The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to
+connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer
+than 30 seconds.
+Also known as: -t <seconds>
+
+=item --hostname <server>
+
+Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100
+Also known as: -H <server>
+
+=item --port <number>
+
+Service port on the IMAP server. Default is 143. If you use SSL, default is 993.
+Also known as: -p <number>
+
+=item --username <username>
+
+=item --password <password>
+
+Username and password to use when connecting to IMAP server.
+Also known as: -U <username> -P <password>
+
+=item --mailbox <mailbox>
+
+Use this option to specify the mailbox to search for messages. Default is INBOX.
+Also known as: -m <mailbox>
+
+=item --ssl
+
+=item --nossl
+
+Enable SSL protocol. Requires IO::Socket::SSL.
+
+Using this option automatically changes the default port from 143 to 993. You can still
+override this from the command line using the --port option.
+
+Use the nossl option to turn off the ssl option.
+
+=item --hires
+
+Use the Time::HiRes module to measure time, if available.
+
+=item --verbose
+
+Display additional information. Useful for troubleshooting. Use together with --version to see the default
+warning and critical timeout values.
+
+If the selected mailbox was not found, you can use verbosity level 3 (-vvv) to display a list of all
+available mailboxes on the server.
+
+Also known as: -v
+
+=item --version
+
+Display plugin version and exit.
+Also known as: -V
+
+=item --help
+
+Display this documentation and exit. Does not work in the ePN version.
+Also known as: -h
+
+=item --usage
+
+Display a short usage instruction and exit.
+
+=back
+
+=head1 EXAMPLES
+
+=head2 Report how many emails are in the mailbox
+
+ $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
+ -s ALL --nodelete
+
+ IMAP RECEIVE OK - 1 seconds, 7 found
+
+=head2 Report the email with the highest value
+
+Suppose your mailbox has some emails from an automated script and that a message
+from this script typically looks like this (abbreviated):
+
+ To: mailuser@server.net
+ From: autoscript@server.net
+ Subject: Results of Autoscript
+ Date: Wed, 09 Nov 2005 08:30:40 -0800
+ Message-ID: <auto-000000992528@server.net>
+
+ Homeruns 5
+
+And further suppose that you are interested in reporting the message that has the
+highest number of home runs, and also to leave this message in the mailbox for future
+checks, but remove the other matching messages with lesser values:
+
+ $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
+ -s SUBJECT -s "Results of Autoscript" --capture-max "Homeruns (\d+)" --nodelete-captured
+
+ IMAP RECEIVE OK - 1 seconds, 3 found, 1 captured, 5 max, 2 deleted
+
+=head2 Troubleshoot your search parameters
+
+Add the --nodelete and --imap-retries=1 parameters to your command line.
+
+=head1 EXIT CODES
+
+Complies with the Nagios plug-in specification:
+ 0 OK The plugin was able to check the service and it appeared to be functioning properly
+ 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly
+ 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold
+ 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service
+
+=head1 NAGIOS PLUGIN NOTES
+
+Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html
+
+This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because
+the path to utils.pm must be specified completely in this program and forces users to edit the source
+code if their install location is different (if they realize this is the problem). You can view
+the default timeout for this module by using the --verbose and --version options together. The
+short form is -vV.
+
+Other than that, it attempts to follow published guidelines for Nagios plugins.
+
+=head1 SEE ALSO
+
+http://nagios.org/
+http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod
+http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod
+
+=head1 CHANGES
+
+ Fri Nov 11 04:53:09 AST 2011
+ + version 0.1 created with quota code contributed by Johan Romme
+
+ Tue Dec 20 17:38:04 PST 2011
+ + fixed bug where a quota of 0 was reported as an incorrect response from the server, thanks to Eike Arndt
+ + version 0.2
+
+=head1 AUTHOR
+
+Jonathan Buhacoff <jonathan@buhacoff.net>
+
+=head1 COPYRIGHT AND LICENSE
+
+ Copyright (C) 2011 Jonathan Buhacoff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ http://www.gnu.org/licenses/gpl.txt
+
+=cut
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_receive.html b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_receive.html
new file mode 100644
index 0000000..fee7c08
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_receive.html
@@ -0,0 +1,551 @@
+<?xml version="1.0" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>check_imap_receive - connects to and searches an IMAP account for messages</title>
+<link rel="stylesheet" href="plainwhite.css" type="text/css" />
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<link rev="made" href="mailto:jonathan@greek.local" />
+</head>
+
+<body>
+
+
+<!-- INDEX BEGIN -->
+<div name="index">
+<p><a name="__index__"></a></p>
+<!--
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#options">OPTIONS</a></li>
+ <li><a href="#examples">EXAMPLES</a></li>
+ <ul>
+
+ <li><a href="#report_how_many_emails_are_in_the_mailbox">Report how many emails are in the mailbox</a></li>
+ <li><a href="#report_the_email_with_the_highest_value">Report the email with the highest value</a></li>
+ <li><a href="#troubleshoot_your_search_parameters">Troubleshoot your search parameters</a></li>
+ </ul>
+
+ <li><a href="#exit_codes">EXIT CODES</a></li>
+ <li><a href="#nagios_plugin_notes">NAGIOS PLUGIN NOTES</a></li>
+ <li><a href="#see_also">SEE ALSO</a></li>
+ <li><a href="#changes">CHANGES</a></li>
+ <li><a href="#author">AUTHOR</a></li>
+ <li><a href="#copyright_and_license">COPYRIGHT AND LICENSE</a></li>
+</ul>
+
+-->
+
+
+</div>
+<!-- INDEX END -->
+
+<p>
+</p>
+<hr />
+<h1><a name="name">NAME</a></h1>
+<p>check_imap_receive - connects to and searches an IMAP account for messages</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ check_imap_receive -vV
+ check_imap_receive -?
+ check_imap_receive --help</pre>
+<p>
+</p>
+<hr />
+<h1><a name="options">OPTIONS</a></h1>
+<dl>
+<dt><strong><a name="warning_seconds" class="item">--warning &lt;seconds&gt;</a></strong></dt>
+
+<dd>
+<p>Warn if it takes longer than &lt;seconds&gt; to connect to the IMAP server. Default is 15 seconds.
+Also known as: -w &lt;seconds&gt;</p>
+</dd>
+<dt><strong><a name="critical_seconds" class="item">--critical &lt;seconds&gt;</a></strong></dt>
+
+<dd>
+<p>Return a critical status if it takes longer than &lt;seconds&gt; to connect to the IMAP server. Default is 30 seconds.
+See also: --capture-critical &lt;messages&gt;
+Also known as: -c &lt;seconds&gt;</p>
+</dd>
+<dt><strong><a name="timeout_seconds" class="item">--timeout &lt;seconds&gt;</a></strong></dt>
+
+<dd>
+<p>Abort with critical status if it takes longer than &lt;seconds&gt; to connect to the IMAP server. Default is 60 seconds.
+The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to
+connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer
+than 30 seconds.
+Also known as: -t &lt;seconds&gt;</p>
+</dd>
+<dt><strong><a name="imap_check_interval_seconds" class="item">--imap-check-interval &lt;seconds&gt;</a></strong></dt>
+
+<dd>
+<p>How long to wait after searching for a matching message before searching again. Only takes effect
+if no messages were found. Default is 5 seconds.</p>
+</dd>
+<dt><strong><a name="imap_retries_number" class="item">--imap-retries &lt;number&gt;</a></strong></dt>
+
+<dd>
+<p>How many times to try searching for a matching message before giving up. If you set this to 0 then
+messages will not be searched at all. Setting this to 1 means the plugin only tries once. Etc.
+Default is 10 times.</p>
+</dd>
+<dt><strong><a name="hostname_server" class="item">--hostname &lt;server&gt;</a></strong></dt>
+
+<dd>
+<p>Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100
+Also known as: -H &lt;server&gt;</p>
+</dd>
+<dt><strong><a name="port_number" class="item">--port &lt;number&gt;</a></strong></dt>
+
+<dd>
+<p>Service port on the IMAP server. Default is 143. If you use SSL, default is 993.
+Also known as: -p &lt;number&gt;</p>
+</dd>
+<dt><strong><a name="username_username" class="item">--username &lt;username&gt;</a></strong></dt>
+
+<dt><strong><a name="password_password" class="item">--password &lt;password&gt;</a></strong></dt>
+
+<dd>
+<p>Username and password to use when connecting to IMAP server.
+Also known as: -U &lt;username&gt; -P &lt;password&gt;</p>
+</dd>
+<dt><strong><a name="mailbox_mailbox" class="item">--mailbox &lt;mailbox&gt;</a></strong></dt>
+
+<dd>
+<p>Use this option to specify the mailbox to search for messages. Default is INBOX.
+Also known as: -m &lt;mailbox&gt;</p>
+</dd>
+<dt><strong><a name="search_string" class="item">--search &lt;string&gt;</a></strong></dt>
+
+<dd>
+<p>Use this option to filter the messages. Default is not to filter. You may (must) use this option
+multiple times in order to create any valid IMAP search criteria. See the examples and see also
+<a href="http://www.ietf.org/rfc/rfc2060.txt">http://www.ietf.org/rfc/rfc2060.txt</a> (look for section 6.4.4, the SEARCH command)</p>
+<p>This is the way to find messages matching a given subject:
+ -s SUBJECT -s &quot;a given subject&quot;</p>
+<p>You can use the following technique for any header, including Subject. To find &quot;Header-Name: some value&quot;:
+ -s HEADER -s Header-Name -s &quot;some value&quot;</p>
+<p>Modern IMAP servers that support rfc5032 extensions allow you to search for messages
+older or younger than a number of seconds. So to find messages received in the past hour,
+you can do:</p>
+<pre>
+ -s YOUNGER -s 3600</pre>
+<p>Or to find messages received more than 5 minutes ago, you can do:</p>
+<pre>
+ -s OLDER -s 300</pre>
+<p>Also known as: -s &lt;string&gt;</p>
+</dd>
+<dt><strong><a name="download" class="item">--download</a></strong></dt>
+
+<dt><strong><a name="nodownload" class="item">--nodownload</a></strong></dt>
+
+<dd>
+<p>This option causes all messages in the specified mailbox to be downloaded from the server
+and searched locally. See --download-max if you only want to download a few messages.
+Currently only the following <a href="http://www.ietf.org/rfc/rfc2060.txt" class="rfc">RFC 2060</a> search criteria are supported:
+TEXT, BODY, SUBJECT, HEADER, NOT, OR, SENTBEFORE, SENTON, SENTSINCE.</p>
+<p>Requires Email::Simple to be installed. It is available on CPAN.</p>
+<p>This option may be particularly useful to you if your mail server is slow to index
+messages (like Exchange 2003), causing the plugin not to find them with IMAP SEARCH
+even though they are in the inbox.</p>
+<p>It's also useful if you're searching for messages that have been on the server for a
+specified amount of time, like some minutes or hours, because the standard IMAP search
+function only allows whole dates. For this, use the standard search keywords but you
+can specify either just a date like in <a href="http://www.ietf.org/rfc/rfc2060.txt" class="rfc">RFC 2060</a> or a date and a time.</p>
+<p>If you use SENTBEFORE, SENTON, or SENTSINCE, you must have Date::Manip installed
+on your system.</p>
+</dd>
+<dt><strong><a name="download_max" class="item">--download-max</a></strong></dt>
+
+<dd>
+<p>Limits the number of messages downloaded from the server when the --download option is used.
+Default is to download and search all messages.</p>
+</dd>
+<dt><strong><a name="search_critical_min_messages" class="item">--search-critical-min &lt;messages&gt;</a></strong></dt>
+
+<dd>
+<p>This option will trigger a CRITICAL status if the number of messages found by the search criteria
+is below the given number. Use in conjunction with --search.</p>
+<p>This parameter defaults to 1 so that if no messages are found, the plugin will exit with a CRITICAL status.</p>
+<p>If you want the original behavior where the plugin exits with a WARNING status when no messages are found,
+set this parameter to 0.</p>
+</dd>
+<dt><strong><a name="search_critical_max_messages" class="item">--search-critical-max &lt;messages&gt;</a></strong></dt>
+
+<dd>
+<p>This option will trigger a CRITICAL status if the number of messages found by the search criteria
+is above the given number. Use in conjunction with --search.</p>
+<p>This parameter defaults to -1 meaning it's disabled. If you set it to 10, the plugin will exit with
+CRITICAL if it finds 11 messages. If you set it to 1, the plugin will exit with CRITICAL if it finds
+any more than 1 message. If you set it to 0, the plugin will exit with CRITICAL if it finds any messages
+at all. If you set it to -1 it will be disabled.</p>
+</dd>
+<dt><strong><a name="search_warning_min_messages" class="item">--search-warning-min &lt;messages&gt;</a></strong></dt>
+
+<dd>
+<p>This option will trigger a WARNING status if the number of messages found by the search criteria
+is below the given number. Use in conjunction with --search.</p>
+<p>This parameter defaults to 1 so that if no messages are found, the plugin will exit with a WARNING status.</p>
+<p>If you want to suppress the original behavior where the plugin exits with a WARNING status when no messages are found,
+set this parameter to 0. When this parameter is 0, it means that you expect the mailbox not to have any messages.</p>
+</dd>
+<dt><strong><a name="search_warning_max_messages" class="item">--search-warning-max &lt;messages&gt;</a></strong></dt>
+
+<dd>
+<p>This option will trigger a WARNING status if the number of messages found by the search criteria
+is above the given number. Use in conjunction with --search.</p>
+<p>This parameter defaults to -1 meaning it's disabled. If you set it to 10, the plugin will exit with
+WARNING if it finds 11 messages. If you set it to 1, the plugin will exit with WARNING if it finds
+any more than 1 message. If you set it to 0, the plugin will exit with WARNING if it finds any messages
+at all. If you set it to -1 it will be disabled.</p>
+</dd>
+<dt><strong><a name="capture_max_regexp" class="item">--capture-max &lt;regexp&gt;</a></strong></dt>
+
+<dd>
+<p>In addition to specifying search arguments to filter the emails in the IMAP account, you can specify
+a &quot;capture-max&quot; regexp argument and the eligible emails (found with search arguments)
+will be compared to each other and the OK line will have the highest captured value.</p>
+<p>The regexp is expected to capture a numeric value.</p>
+</dd>
+<dt><strong><a name="capture_min_regexp" class="item">--capture-min &lt;regexp&gt;</a></strong></dt>
+
+<dd>
+<p>In addition to specifying search arguments to filter the emails in the IMAP account, you can specify
+a &quot;capture-min&quot; regexp argument and the eligible emails (found with search arguments)
+will be compared to each other and the OK line will have the lowest captured value.</p>
+<p>The regexp is expected to capture a numeric value.</p>
+</dd>
+<dt><strong><a name="delete" class="item">--delete</a></strong></dt>
+
+<dt><strong><a name="nodelete" class="item">--nodelete</a></strong></dt>
+
+<dd>
+<p>Use the delete option to delete messages that matched the search criteria. This is useful for
+preventing the mailbox from filling up with automated messages (from the check_smtp_send plugin, for example).
+THE DELETE OPTION IS TURNED *ON* BY DEFAULT, in order to preserve compatibility with an earlier version.</p>
+<p>Use the nodelete option to turn off the delete option.</p>
+</dd>
+<dt><strong><a name="nodelete_captured" class="item">--nodelete-captured</a></strong></dt>
+
+<dd>
+<p>If you use both the capture-max and delete arguments, you can also use the nodelete-captured argument to specify that the email
+with the highest captured value should not be deleted. This leaves it available for comparison the next time this plugin runs.</p>
+<p>If you do not use the delete option, this option has no effect.</p>
+</dd>
+<dt><strong><a name="ssl" class="item">--ssl</a></strong></dt>
+
+<dt><strong><a name="nossl" class="item">--nossl</a></strong></dt>
+
+<dd>
+<p>Enable SSL protocol. Requires IO::Socket::SSL.</p>
+<p>Using this option automatically changes the default port from 143 to 993. You can still
+override this from the command line using the --port option.</p>
+<p>Use the nossl option to turn off the ssl option.</p>
+</dd>
+<dt><strong><a name="ssl_ca_file" class="item">--ssl-ca-file</a></strong></dt>
+
+<dd>
+<p>Use this to verify the server SSL certificate against a local .pem file. You'll need to
+specify the path to the .pem file as the parameter.</p>
+<p>You can use the imap_ssl_cert utility included in this distribution to connect to your IMAP
+server and save its SSL certificates into your .pem file. Usage is like this:</p>
+<pre>
+ imap_ssl_cert -H imap.server.com &gt; ca_file.pem</pre>
+<p>Only applicable when --ssl option is enabled.</p>
+</dd>
+<dt><strong><a name="template" class="item">--template</a></strong></dt>
+
+<dt><strong><a name="notemplate" class="item">--notemplate</a></strong></dt>
+
+<dd>
+<p>Enable (or disable) processing of IMAP search parameters. Requires Text::Template and Date::Manip.</p>
+<p>Use this option to apply special processing to IMAP search parameters that allows you to use the
+results of arbitrary computations as the parameter values. For example, you can use this feature
+to search for message received up to 4 hours ago.</p>
+<p>Modern IMAP servers that support rfc5032 extensions allow searching with the YOUNGER and OLDER
+criteria so a message received up to 4 hours ago is -s YOUNGER -s 14400. But if your mail server
+doesn't support that, you could use the --template option to get similar functionality.</p>
+<p>When you enable the --template option, each parameter you pass to the -s option is parsed by
+Text::Template. See the Text::Template manual for more information, but in general any expression
+written in Perl will work.</p>
+<p>A convenience function called rfc2822dateHeader is provided to you so you can easily compute properly
+formatted dates for use as search parameters. The rfc2822date function can take one or two
+parameters itself: the date to format and an optional offset. To use the current time as a
+search parameter, you can write this:</p>
+<pre>
+ $ check_imap_receive ... --template -s HEADER -s Delivery-Date -s '{rfc2822dateHeader(&quot;now&quot;)}'</pre>
+<p>The output of {rfc2822dateHeader(&quot;now&quot;)} looks like this: Wed, 30 Sep 2009 22:44:03 -0700 and
+is suitable for use with a date header, like HEADER Delivery-Date.</p>
+<p>To use a time in the past relative to the current time or day, you can use a second convenience function
+called rfc2822date and write this:</p>
+<pre>
+ $ check_imap_receive ... --template -s SENTSINCE -s '{rfc2822date(&quot;now&quot;,&quot;-1 day&quot;)}'</pre>
+<p>The output of {rfc2822date(&quot;now&quot;,&quot;-1 day&quot;)} looks like this: 29-Sep-2009 and is suitable for use
+with BEFORE, ON, SENTBEFORE, SENTON, SENTSINCE, and SINCE.</p>
+<p>I have seen some email clients use a different format in the Date field,
+like September 17, 2009 9:46:51 AM PDT. To specify an arbitrary format like this one, write this:</p>
+<pre>
+ $ check_imap_receive ... --template -s HEADER -s Delivery-Date -s '{date(&quot;%B %e, %Y %i:%M:%S %p %Z&quot;,&quot;now&quot;,&quot;-4 hours&quot;)}'</pre>
+<p>You can use BEFORE, ON, SENTBEFORE, SENTON, SENTSINCE, or SINCE to search for messages that arrived
+on, before, or after a given day but not on, before, or after a specific time on that day.</p>
+<p>To search for messages that arrived on, before, or after a specific time you have to use the
+Delivery-Date or another date field, like with -s HEADER -s Delivery-Date in the example above.</p>
+<p>See the Date::Manip manual for more information on the allowed expressions for date and delta strings.</p>
+</dd>
+<dt><strong><a name="hires" class="item">--hires</a></strong></dt>
+
+<dd>
+<p>Use the Time::HiRes module to measure time, if available.</p>
+</dd>
+<dt><strong><a name="verbose" class="item">--verbose</a></strong></dt>
+
+<dd>
+<p>Display additional information. Useful for troubleshooting. Use together with --version to see the default
+warning and critical timeout values.</p>
+<p>If the selected mailbox was not found, you can use verbosity level 3 (-vvv) to display a list of all
+available mailboxes on the server.</p>
+<p>Also known as: -v</p>
+</dd>
+<dt><strong><a name="version" class="item">--version</a></strong></dt>
+
+<dd>
+<p>Display plugin version and exit.
+Also known as: -V</p>
+</dd>
+<dt><strong><a name="help" class="item">--help</a></strong></dt>
+
+<dd>
+<p>Display this documentation and exit. Does not work in the ePN version.
+Also known as: -h</p>
+</dd>
+<dt><strong><a name="usage" class="item">--usage</a></strong></dt>
+
+<dd>
+<p>Display a short usage instruction and exit.</p>
+</dd>
+</dl>
+<p>
+</p>
+<hr />
+<h1><a name="examples">EXAMPLES</a></h1>
+<p>
+</p>
+<h2><a name="report_how_many_emails_are_in_the_mailbox">Report how many emails are in the mailbox</a></h2>
+<pre>
+ $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
+ -s ALL --nodelete</pre>
+<pre>
+ IMAP RECEIVE OK - 1 seconds, 7 found</pre>
+<p>
+</p>
+<h2><a name="report_the_email_with_the_highest_value">Report the email with the highest value</a></h2>
+<p>Suppose your mailbox has some emails from an automated script and that a message
+from this script typically looks like this (abbreviated):</p>
+<pre>
+ To: mailuser@server.net
+ From: autoscript@server.net
+ Subject: Results of Autoscript
+ Date: Wed, 09 Nov 2005 08:30:40 -0800
+ Message-ID: &lt;auto-000000992528@server.net&gt;</pre>
+<pre>
+ Homeruns 5</pre>
+<p>And further suppose that you are interested in reporting the message that has the
+highest number of home runs, and also to leave this message in the mailbox for future
+checks, but remove the other matching messages with lesser values:</p>
+<pre>
+ $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
+ -s SUBJECT -s &quot;Results of Autoscript&quot; --capture-max &quot;Homeruns (\d+)&quot; --nodelete-captured</pre>
+<pre>
+ IMAP RECEIVE OK - 1 seconds, 3 found, 1 captured, 5 max, 2 deleted</pre>
+<p>
+</p>
+<h2><a name="troubleshoot_your_search_parameters">Troubleshoot your search parameters</a></h2>
+<p>Add the --nodelete and --imap-retries=1 parameters to your command line.</p>
+<p>
+</p>
+<hr />
+<h1><a name="exit_codes">EXIT CODES</a></h1>
+<p><table cellspacing="0" cellpadding="0"><tr><td>Complies with the Nagios plug-in specification:
+<tr><td> 0<td>OK<td>The plugin was able to check the service and it appeared to be functioning properly
+<tr><td> 1<td>Warning<td>The plugin was able to check the service, but it appeared to be above some &quot;warning&quot; threshold or did not appear to be working properly
+<tr><td> 2<td>Critical<td>The plugin detected that either the service was not running or it was above some &quot;critical&quot; threshold
+<tr><td> 3<td>Unknown<td>Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service</table></p>
+<p>
+</p>
+<hr />
+<h1><a name="nagios_plugin_notes">NAGIOS PLUGIN NOTES</a></h1>
+<p>Nagios plugin reference: <a href="http://nagiosplug.sourceforge.net/developer-guidelines.html">http://nagiosplug.sourceforge.net/developer-guidelines.html</a></p>
+<p>This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because
+the path to utils.pm must be specified completely in this program and forces users to edit the source
+code if their install location is different (if they realize this is the problem). You can view
+the default timeout for this module by using the --verbose and --version options together. The
+short form is -vV.</p>
+<p>Other than that, it attempts to follow published guidelines for Nagios plugins.</p>
+<p>
+</p>
+<hr />
+<h1><a name="see_also">SEE ALSO</a></h1>
+<p><a href="http://nagios.org/">http://nagios.org/</a>
+<a href="http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod">http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod</a>
+<a href="http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod">http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod</a></p>
+<p>
+</p>
+<hr />
+<h1><a name="changes">CHANGES</a></h1>
+<pre>
+ Wed Oct 29 11:00:00 PST 2005
+ + version 0.1</pre>
+<pre>
+ Wed Nov 9 09:53:32 PST 2005
+ + added delete/nodelete option. deleting found messages is still default behavior.
+ + added capture-max option
+ + added nodelete-captured option
+ + added mailbox option
+ + added eval/alarm block to implement -c option
+ + now using an inline PluginReport package to generate the report
+ + copyright notice and GNU GPL
+ + version 0.2</pre>
+<pre>
+ Thu Apr 20 14:00:00 CET 2006 (by Johan Nilsson &lt;johann (at) axis.com&gt;)
+ + version 0.2.1
+ + added support for multiple polls of imap-server, with specified intervals</pre>
+<pre>
+ Tue Apr 24 21:17:53 PDT 2007
+ + now there is an alternate version (same but without embedded perl POD) that is compatible with the new new embedded-perl Nagios feature
+ + added patch from Benjamin Ritcey &lt;ben@ritcey.com&gt; for SSL support on machines that have an SSL-enabled
+ + version 0.2.3</pre>
+<pre>
+ Fri Apr 27 18:56:50 PDT 2007
+ + fixed problem that &quot;Invalid search parameters&quot; was not printed because of missing newline to flush it
+ + warnings and critical errors now try to append error messages received from the IMAP client
+ + changed connection error to display timeout only if timeout was the error
+ + documentation now mentions every command-line option accepted by the plugin, including abbreviations
+ + added abbreviations U for username, P for password, m for mailbox
+ + fixed bug that imap-check-interval applied even after the last try (imap-retries) when it was not necessary
+ + the IMAP expunge command is not sent unless at least one message is deleted
+ + fixed bug that the &quot;no messages&quot; warning was printed even if some messages were found
+ + version 0.3</pre>
+<pre>
+ Sun Oct 21 14:08:07 PDT 2007
+ + added port info to the &quot;could not connect&quot; error message
+ + fixed bug that occurred when using --ssl --port 143 which caused port to remain at the default 993 imap/ssl port
+ + added clarity shortcuts --search-subject and --search-header
+ + port is no longer a required option. defaults to 143 for regular IMAP and 993 for IMAP/SSL
+ + version 0.3.1</pre>
+<pre>
+ Sun Oct 21 20:41:56 PDT 2007
+ + reworked ssl support to use IO::Socket::SSL instead of the convenience method Mail::IMAPClient-&gt;Ssl (which is not included in the standard Mail::IMAPClient package)
+ + removed clarity shortcuts (bad idea, code bloat)
+ + version 0.4</pre>
+<pre>
+ Tue Dec 4 07:05:27 PST 2007
+ + added version check to _read_line workaround for SSL-related bug in Mail::IMAPClient version 2.2.9 ; newer versions fixed the bug
+ + added --usage option because the official nagios plugins have both --help and --usage
+ + added --timeout option to match the official nagios plugins
+ + fixed some minor pod formatting issues for perldoc
+ + version 0.4.1</pre>
+<pre>
+ Sat Dec 15 07:39:59 PST 2007
+ + improved compatibility with Nagios embedded perl (ePN)
+ + version 0.4.2</pre>
+<pre>
+ Mon Jan 7 21:35:23 PST 2008
+ + changed version check for Mail::IMAPClient version 2.2.9 to use string comparison le &quot;2.2.9&quot;
+ + fixed bug where script was dying on socket-&gt;autoflush when socket does not exist because autoflush was being called before checking the socket object
+ + version 0.4.3</pre>
+<pre>
+ Mon Feb 11 19:13:38 PST 2008
+ + fixed a bug for embedded perl version, variable &quot;%status&quot; will not stay shared in load_modules
+ + version 0.4.4</pre>
+<pre>
+ Mon May 26 08:33:27 PDT 2008
+ + fixed a bug for number captured, it now reflects number of messages captured instead of always returning &quot;1&quot;
+ + added --capture-min option to complement --capture-max
+ + added --search-critical-min to trigger a CRITICAL alert if number of messages found is less than argument, with default 1.
+ + fixed warning and critical messages to use &quot;more than&quot; or &quot;less than&quot; instead of the angle brackets, to make them more web friendly
+ + version 0.5</pre>
+<pre>
+ Wed Jul 2 14:59:05 PDT 2008
+ + fixed a bug for not finding a message after the first try, by reselecting the mailbox before each search
+ + version 0.5.1</pre>
+<pre>
+ Sat Dec 13 08:57:29 PST 2008
+ + added --download option to allow local searching of messages (useful if your server has an index that handles searching but it takes a while before new emails show up and you want immediate results), supports only the TEXT, BODY, SUBJECT, and HEADER search keys
+ + added --download-max option to set a limit on number of messages downloaded with --download
+ + version 0.6.0</pre>
+<pre>
+ Wed Sep 30 23:25:33 PDT 2009
+ + fixed --download-max option (was incorrectly looking for --download_max). currently both will work, in the future only --download-max will work
+ + added --template option to allow arbitrary substitutions for search parameters, and provided three convenience functions for working with dates
+ + added date search criteria to the --download option: SENTBEFORE, SENTON, and SENTSINCE which check the Date header and allow hours and minutes in addition to dates (whereas the IMAP standard only allows dates)
+ + added --search-critical-max to trigger a CRITICAL alert if number of messages found is more than argument, disabled by default.
+ + fixed a bug in --download --search where messages would match even though they failed the search criteria
+ + changed behavior of --download-max to look at the most recent messages first (hopefully); the IMAP protocol doesn't guarantee the order that the messages are returned but I observed that many mail servers return them in chronological order; so now --download-max reverses the order to look at the newer messages first
+ + added performance data for use with PNP4Nagios!
+ + version 0.7.0</pre>
+<pre>
+ Fri Oct 2 15:22:00 PDT 2009
+ + added --search-warning-max and --search-warning-min to trigger a WARNING alert if number of messages is more than or less than the specified number.
+ + fixed --download option not to fail with CRITICAL if mailbox is empty; now this can be configured with --search-warning-min or --search-critical-min
+ + version 0.7.1</pre>
+<pre>
+ Sat Nov 21 18:27:17 PST 2009
+ + fixed problem with using --download option on certain mail servers by turning on the IgnoreSizeErrors feature in IMAPClient
+ + added --peek option to prevent marking messages as seen
+ + version 0.7.2</pre>
+<pre>
+ Tue Jan 5 12:13:53 PST 2010
+ + added error message and exit with unknown status when an unrecognized IMAP search criteria is encountered by the --download --search option</pre>
+<pre>
+ Wed May 5 11:14:51 PDT 2010
+ + added mailbox list when mailbox is not found and verbose level 3 is on (-vvv)
+ + version 0.7.3</pre>
+<pre>
+ Tue Mar 8 18:58:14 AST 2011
+ + updated documentation for --search and --template to mention rfc5032 extensions (thanks to Stuart Henderson)</pre>
+<pre>
+ Fri May 6 08:35:09 AST 2011
+ + added --hires option to enable use of Time::Hires if available
+ + version 0.7.4</pre>
+<pre>
+ Fri Nov 11 01:51:40 AST 2011
+ + added --ssl-ca-file option to allow verifying the server certificate against a local .pem file (thanks to Alexandre Bezroutchko)
+ + added imap_ssl_cert.pl utility (not in this file) to conveniently save the server's SSL certificates into a local .pem file
+ + version 0.7.5</pre>
+<p>
+</p>
+<hr />
+<h1><a name="author">AUTHOR</a></h1>
+<p>Jonathan Buhacoff &lt;<a href="mailto:jonathan@buhacoff.net">jonathan@buhacoff.net</a>&gt;</p>
+<p>
+</p>
+<hr />
+<h1><a name="copyright_and_license">COPYRIGHT AND LICENSE</a></h1>
+<pre>
+ Copyright (C) 2005-2011 Jonathan Buhacoff</pre>
+<pre>
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.</pre>
+<pre>
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.</pre>
+<pre>
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see &lt;<a href="http://www.gnu.org/licenses/&gt">http://www.gnu.org/licenses/&gt</a>;.</pre>
+<pre>
+ <a href="http://www.gnu.org/licenses/gpl.txt">http://www.gnu.org/licenses/gpl.txt</a></pre>
+
+</body>
+
+</html>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_receive.pod b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_receive.pod
new file mode 100644
index 0000000..9e9faf9
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_imap_receive.pod
@@ -0,0 +1,507 @@
+
+
+
+=pod
+
+=head1 NAME
+
+check_imap_receive - connects to and searches an IMAP account for messages
+
+=head1 SYNOPSIS
+
+ check_imap_receive -vV
+ check_imap_receive -?
+ check_imap_receive --help
+
+=head1 OPTIONS
+
+=over
+
+=item --warning <seconds>
+
+Warn if it takes longer than <seconds> to connect to the IMAP server. Default is 15 seconds.
+Also known as: -w <seconds>
+
+=item --critical <seconds>
+
+Return a critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 30 seconds.
+See also: --capture-critical <messages>
+Also known as: -c <seconds>
+
+=item --timeout <seconds>
+
+Abort with critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 60 seconds.
+The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to
+connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer
+than 30 seconds.
+Also known as: -t <seconds>
+
+=item --imap-check-interval <seconds>
+
+How long to wait after searching for a matching message before searching again. Only takes effect
+if no messages were found. Default is 5 seconds.
+
+=item --imap-retries <number>
+
+How many times to try searching for a matching message before giving up. If you set this to 0 then
+messages will not be searched at all. Setting this to 1 means the plugin only tries once. Etc.
+Default is 10 times.
+
+=item --hostname <server>
+
+Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100
+Also known as: -H <server>
+
+=item --port <number>
+
+Service port on the IMAP server. Default is 143. If you use SSL, default is 993.
+Also known as: -p <number>
+
+=item --username <username>
+
+=item --password <password>
+
+Username and password to use when connecting to IMAP server.
+Also known as: -U <username> -P <password>
+
+=item --mailbox <mailbox>
+
+Use this option to specify the mailbox to search for messages. Default is INBOX.
+Also known as: -m <mailbox>
+
+=item --search <string>
+
+Use this option to filter the messages. Default is not to filter. You may (must) use this option
+multiple times in order to create any valid IMAP search criteria. See the examples and see also
+http://www.ietf.org/rfc/rfc2060.txt (look for section 6.4.4, the SEARCH command)
+
+This is the way to find messages matching a given subject:
+ -s SUBJECT -s "a given subject"
+
+You can use the following technique for any header, including Subject. To find "Header-Name: some value":
+ -s HEADER -s Header-Name -s "some value"
+
+Modern IMAP servers that support rfc5032 extensions allow you to search for messages
+older or younger than a number of seconds. So to find messages received in the past hour,
+you can do:
+
+ -s YOUNGER -s 3600
+
+Or to find messages received more than 5 minutes ago, you can do:
+
+ -s OLDER -s 300
+
+Also known as: -s <string>
+
+=item --download
+
+=item --nodownload
+
+This option causes all messages in the specified mailbox to be downloaded from the server
+and searched locally. See --download-max if you only want to download a few messages.
+Currently only the following RFC 2060 search criteria are supported:
+TEXT, BODY, SUBJECT, HEADER, NOT, OR, SENTBEFORE, SENTON, SENTSINCE.
+
+Requires Email::Simple to be installed. It is available on CPAN.
+
+This option may be particularly useful to you if your mail server is slow to index
+messages (like Exchange 2003), causing the plugin not to find them with IMAP SEARCH
+even though they are in the inbox.
+
+It's also useful if you're searching for messages that have been on the server for a
+specified amount of time, like some minutes or hours, because the standard IMAP search
+function only allows whole dates. For this, use the standard search keywords but you
+can specify either just a date like in RFC 2060 or a date and a time.
+
+If you use SENTBEFORE, SENTON, or SENTSINCE, you must have Date::Manip installed
+on your system.
+
+
+=item --download-max
+
+Limits the number of messages downloaded from the server when the --download option is used.
+Default is to download and search all messages.
+
+=item --search-critical-min <messages>
+
+This option will trigger a CRITICAL status if the number of messages found by the search criteria
+is below the given number. Use in conjunction with --search.
+
+This parameter defaults to 1 so that if no messages are found, the plugin will exit with a CRITICAL status.
+
+If you want the original behavior where the plugin exits with a WARNING status when no messages are found,
+set this parameter to 0.
+
+=item --search-critical-max <messages>
+
+This option will trigger a CRITICAL status if the number of messages found by the search criteria
+is above the given number. Use in conjunction with --search.
+
+This parameter defaults to -1 meaning it's disabled. If you set it to 10, the plugin will exit with
+CRITICAL if it finds 11 messages. If you set it to 1, the plugin will exit with CRITICAL if it finds
+any more than 1 message. If you set it to 0, the plugin will exit with CRITICAL if it finds any messages
+at all. If you set it to -1 it will be disabled.
+
+=item --search-warning-min <messages>
+
+This option will trigger a WARNING status if the number of messages found by the search criteria
+is below the given number. Use in conjunction with --search.
+
+This parameter defaults to 1 so that if no messages are found, the plugin will exit with a WARNING status.
+
+If you want to suppress the original behavior where the plugin exits with a WARNING status when no messages are found,
+set this parameter to 0. When this parameter is 0, it means that you expect the mailbox not to have any messages.
+
+=item --search-warning-max <messages>
+
+This option will trigger a WARNING status if the number of messages found by the search criteria
+is above the given number. Use in conjunction with --search.
+
+This parameter defaults to -1 meaning it's disabled. If you set it to 10, the plugin will exit with
+WARNING if it finds 11 messages. If you set it to 1, the plugin will exit with WARNING if it finds
+any more than 1 message. If you set it to 0, the plugin will exit with WARNING if it finds any messages
+at all. If you set it to -1 it will be disabled.
+
+=item --capture-max <regexp>
+
+In addition to specifying search arguments to filter the emails in the IMAP account, you can specify
+a "capture-max" regexp argument and the eligible emails (found with search arguments)
+will be compared to each other and the OK line will have the highest captured value.
+
+The regexp is expected to capture a numeric value.
+
+=item --capture-min <regexp>
+
+In addition to specifying search arguments to filter the emails in the IMAP account, you can specify
+a "capture-min" regexp argument and the eligible emails (found with search arguments)
+will be compared to each other and the OK line will have the lowest captured value.
+
+The regexp is expected to capture a numeric value.
+
+=item --delete
+
+=item --nodelete
+
+Use the delete option to delete messages that matched the search criteria. This is useful for
+preventing the mailbox from filling up with automated messages (from the check_smtp_send plugin, for example).
+THE DELETE OPTION IS TURNED *ON* BY DEFAULT, in order to preserve compatibility with an earlier version.
+
+Use the nodelete option to turn off the delete option.
+
+=item --nodelete-captured
+
+If you use both the capture-max and delete arguments, you can also use the nodelete-captured argument to specify that the email
+with the highest captured value should not be deleted. This leaves it available for comparison the next time this plugin runs.
+
+If you do not use the delete option, this option has no effect.
+
+=item --ssl
+
+=item --nossl
+
+Enable SSL protocol. Requires IO::Socket::SSL.
+
+Using this option automatically changes the default port from 143 to 993. You can still
+override this from the command line using the --port option.
+
+Use the nossl option to turn off the ssl option.
+
+=item --ssl-ca-file
+
+Use this to verify the server SSL certificate against a local .pem file. You'll need to
+specify the path to the .pem file as the parameter.
+
+You can use the imap_ssl_cert utility included in this distribution to connect to your IMAP
+server and save its SSL certificates into your .pem file. Usage is like this:
+
+ imap_ssl_cert -H imap.server.com > ca_file.pem
+
+Only applicable when --ssl option is enabled.
+
+=item --template
+
+=item --notemplate
+
+Enable (or disable) processing of IMAP search parameters. Requires Text::Template and Date::Manip.
+
+Use this option to apply special processing to IMAP search parameters that allows you to use the
+results of arbitrary computations as the parameter values. For example, you can use this feature
+to search for message received up to 4 hours ago.
+
+Modern IMAP servers that support rfc5032 extensions allow searching with the YOUNGER and OLDER
+criteria so a message received up to 4 hours ago is -s YOUNGER -s 14400. But if your mail server
+doesn't support that, you could use the --template option to get similar functionality.
+
+When you enable the --template option, each parameter you pass to the -s option is parsed by
+Text::Template. See the Text::Template manual for more information, but in general any expression
+written in Perl will work.
+
+A convenience function called rfc2822dateHeader is provided to you so you can easily compute properly
+formatted dates for use as search parameters. The rfc2822date function can take one or two
+parameters itself: the date to format and an optional offset. To use the current time as a
+search parameter, you can write this:
+
+ $ check_imap_receive ... --template -s HEADER -s Delivery-Date -s '{rfc2822dateHeader("now")}'
+
+The output of {rfc2822dateHeader("now")} looks like this: Wed, 30 Sep 2009 22:44:03 -0700 and
+is suitable for use with a date header, like HEADER Delivery-Date.
+
+To use a time in the past relative to the current time or day, you can use a second convenience function
+called rfc2822date and write this:
+
+ $ check_imap_receive ... --template -s SENTSINCE -s '{rfc2822date("now","-1 day")}'
+
+The output of {rfc2822date("now","-1 day")} looks like this: 29-Sep-2009 and is suitable for use
+with BEFORE, ON, SENTBEFORE, SENTON, SENTSINCE, and SINCE.
+
+I have seen some email clients use a different format in the Date field,
+like September 17, 2009 9:46:51 AM PDT. To specify an arbitrary format like this one, write this:
+
+ $ check_imap_receive ... --template -s HEADER -s Delivery-Date -s '{date("%B %e, %Y %i:%M:%S %p %Z","now","-4 hours")}'
+
+You can use BEFORE, ON, SENTBEFORE, SENTON, SENTSINCE, or SINCE to search for messages that arrived
+on, before, or after a given day but not on, before, or after a specific time on that day.
+
+To search for messages that arrived on, before, or after a specific time you have to use the
+Delivery-Date or another date field, like with -s HEADER -s Delivery-Date in the example above.
+
+See the Date::Manip manual for more information on the allowed expressions for date and delta strings.
+
+=item --hires
+
+Use the Time::HiRes module to measure time, if available.
+
+=item --verbose
+
+Display additional information. Useful for troubleshooting. Use together with --version to see the default
+warning and critical timeout values.
+
+If the selected mailbox was not found, you can use verbosity level 3 (-vvv) to display a list of all
+available mailboxes on the server.
+
+Also known as: -v
+
+=item --version
+
+Display plugin version and exit.
+Also known as: -V
+
+=item --help
+
+Display this documentation and exit. Does not work in the ePN version.
+Also known as: -h
+
+=item --usage
+
+Display a short usage instruction and exit.
+
+=back
+
+=head1 EXAMPLES
+
+=head2 Report how many emails are in the mailbox
+
+ $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
+ -s ALL --nodelete
+
+ IMAP RECEIVE OK - 1 seconds, 7 found
+
+=head2 Report the email with the highest value
+
+Suppose your mailbox has some emails from an automated script and that a message
+from this script typically looks like this (abbreviated):
+
+ To: mailuser@server.net
+ From: autoscript@server.net
+ Subject: Results of Autoscript
+ Date: Wed, 09 Nov 2005 08:30:40 -0800
+ Message-ID: <auto-000000992528@server.net>
+
+ Homeruns 5
+
+And further suppose that you are interested in reporting the message that has the
+highest number of home runs, and also to leave this message in the mailbox for future
+checks, but remove the other matching messages with lesser values:
+
+ $ check_imap_receive -H mail.server.net --username mailuser --password mailpass
+ -s SUBJECT -s "Results of Autoscript" --capture-max "Homeruns (\d+)" --nodelete-captured
+
+ IMAP RECEIVE OK - 1 seconds, 3 found, 1 captured, 5 max, 2 deleted
+
+=head2 Troubleshoot your search parameters
+
+Add the --nodelete and --imap-retries=1 parameters to your command line.
+
+=head1 EXIT CODES
+
+Complies with the Nagios plug-in specification:
+ 0 OK The plugin was able to check the service and it appeared to be functioning properly
+ 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly
+ 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold
+ 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service
+
+=head1 NAGIOS PLUGIN NOTES
+
+Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html
+
+This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because
+the path to utils.pm must be specified completely in this program and forces users to edit the source
+code if their install location is different (if they realize this is the problem). You can view
+the default timeout for this module by using the --verbose and --version options together. The
+short form is -vV.
+
+Other than that, it attempts to follow published guidelines for Nagios plugins.
+
+=head1 SEE ALSO
+
+http://nagios.org/
+http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod
+http://search.cpan.org/~markov/Mail-IMAPClient-3.00/lib/Mail/IMAPClient.pod
+
+=head1 CHANGES
+
+ Wed Oct 29 11:00:00 PST 2005
+ + version 0.1
+
+ Wed Nov 9 09:53:32 PST 2005
+ + added delete/nodelete option. deleting found messages is still default behavior.
+ + added capture-max option
+ + added nodelete-captured option
+ + added mailbox option
+ + added eval/alarm block to implement -c option
+ + now using an inline PluginReport package to generate the report
+ + copyright notice and GNU GPL
+ + version 0.2
+
+ Thu Apr 20 14:00:00 CET 2006 (by Johan Nilsson <johann (at) axis.com>)
+ + version 0.2.1
+ + added support for multiple polls of imap-server, with specified intervals
+
+ Tue Apr 24 21:17:53 PDT 2007
+ + now there is an alternate version (same but without embedded perl POD) that is compatible with the new new embedded-perl Nagios feature
+ + added patch from Benjamin Ritcey <ben@ritcey.com> for SSL support on machines that have an SSL-enabled
+ + version 0.2.3
+
+ Fri Apr 27 18:56:50 PDT 2007
+ + fixed problem that "Invalid search parameters" was not printed because of missing newline to flush it
+ + warnings and critical errors now try to append error messages received from the IMAP client
+ + changed connection error to display timeout only if timeout was the error
+ + documentation now mentions every command-line option accepted by the plugin, including abbreviations
+ + added abbreviations U for username, P for password, m for mailbox
+ + fixed bug that imap-check-interval applied even after the last try (imap-retries) when it was not necessary
+ + the IMAP expunge command is not sent unless at least one message is deleted
+ + fixed bug that the "no messages" warning was printed even if some messages were found
+ + version 0.3
+
+ Sun Oct 21 14:08:07 PDT 2007
+ + added port info to the "could not connect" error message
+ + fixed bug that occurred when using --ssl --port 143 which caused port to remain at the default 993 imap/ssl port
+ + added clarity shortcuts --search-subject and --search-header
+ + port is no longer a required option. defaults to 143 for regular IMAP and 993 for IMAP/SSL
+ + version 0.3.1
+
+ Sun Oct 21 20:41:56 PDT 2007
+ + reworked ssl support to use IO::Socket::SSL instead of the convenience method Mail::IMAPClient->Ssl (which is not included in the standard Mail::IMAPClient package)
+ + removed clarity shortcuts (bad idea, code bloat)
+ + version 0.4
+
+ Tue Dec 4 07:05:27 PST 2007
+ + added version check to _read_line workaround for SSL-related bug in Mail::IMAPClient version 2.2.9 ; newer versions fixed the bug
+ + added --usage option because the official nagios plugins have both --help and --usage
+ + added --timeout option to match the official nagios plugins
+ + fixed some minor pod formatting issues for perldoc
+ + version 0.4.1
+
+ Sat Dec 15 07:39:59 PST 2007
+ + improved compatibility with Nagios embedded perl (ePN)
+ + version 0.4.2
+
+ Mon Jan 7 21:35:23 PST 2008
+ + changed version check for Mail::IMAPClient version 2.2.9 to use string comparison le "2.2.9"
+ + fixed bug where script was dying on socket->autoflush when socket does not exist because autoflush was being called before checking the socket object
+ + version 0.4.3
+
+ Mon Feb 11 19:13:38 PST 2008
+ + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules
+ + version 0.4.4
+
+ Mon May 26 08:33:27 PDT 2008
+ + fixed a bug for number captured, it now reflects number of messages captured instead of always returning "1"
+ + added --capture-min option to complement --capture-max
+ + added --search-critical-min to trigger a CRITICAL alert if number of messages found is less than argument, with default 1.
+ + fixed warning and critical messages to use "more than" or "less than" instead of the angle brackets, to make them more web friendly
+ + version 0.5
+
+ Wed Jul 2 14:59:05 PDT 2008
+ + fixed a bug for not finding a message after the first try, by reselecting the mailbox before each search
+ + version 0.5.1
+
+ Sat Dec 13 08:57:29 PST 2008
+ + added --download option to allow local searching of messages (useful if your server has an index that handles searching but it takes a while before new emails show up and you want immediate results), supports only the TEXT, BODY, SUBJECT, and HEADER search keys
+ + added --download-max option to set a limit on number of messages downloaded with --download
+ + version 0.6.0
+
+ Wed Sep 30 23:25:33 PDT 2009
+ + fixed --download-max option (was incorrectly looking for --download_max). currently both will work, in the future only --download-max will work
+ + added --template option to allow arbitrary substitutions for search parameters, and provided three convenience functions for working with dates
+ + added date search criteria to the --download option: SENTBEFORE, SENTON, and SENTSINCE which check the Date header and allow hours and minutes in addition to dates (whereas the IMAP standard only allows dates)
+ + added --search-critical-max to trigger a CRITICAL alert if number of messages found is more than argument, disabled by default.
+ + fixed a bug in --download --search where messages would match even though they failed the search criteria
+ + changed behavior of --download-max to look at the most recent messages first (hopefully); the IMAP protocol doesn't guarantee the order that the messages are returned but I observed that many mail servers return them in chronological order; so now --download-max reverses the order to look at the newer messages first
+ + added performance data for use with PNP4Nagios!
+ + version 0.7.0
+
+ Fri Oct 2 15:22:00 PDT 2009
+ + added --search-warning-max and --search-warning-min to trigger a WARNING alert if number of messages is more than or less than the specified number.
+ + fixed --download option not to fail with CRITICAL if mailbox is empty; now this can be configured with --search-warning-min or --search-critical-min
+ + version 0.7.1
+
+ Sat Nov 21 18:27:17 PST 2009
+ + fixed problem with using --download option on certain mail servers by turning on the IgnoreSizeErrors feature in IMAPClient
+ + added --peek option to prevent marking messages as seen
+ + version 0.7.2
+
+ Tue Jan 5 12:13:53 PST 2010
+ + added error message and exit with unknown status when an unrecognized IMAP search criteria is encountered by the --download --search option
+
+ Wed May 5 11:14:51 PDT 2010
+ + added mailbox list when mailbox is not found and verbose level 3 is on (-vvv)
+ + version 0.7.3
+
+ Tue Mar 8 18:58:14 AST 2011
+ + updated documentation for --search and --template to mention rfc5032 extensions (thanks to Stuart Henderson)
+
+ Fri May 6 08:35:09 AST 2011
+ + added --hires option to enable use of Time::Hires if available
+ + version 0.7.4
+
+ Fri Nov 11 01:51:40 AST 2011
+ + added --ssl-ca-file option to allow verifying the server certificate against a local .pem file (thanks to Alexandre Bezroutchko)
+ + added imap_ssl_cert.pl utility (not in this file) to conveniently save the server's SSL certificates into a local .pem file
+ + version 0.7.5
+
+=head1 AUTHOR
+
+Jonathan Buhacoff <jonathan@buhacoff.net>
+
+=head1 COPYRIGHT AND LICENSE
+
+ Copyright (C) 2005-2011 Jonathan Buhacoff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ http://www.gnu.org/licenses/gpl.txt
+
+=cut
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_smtp_send.html b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_smtp_send.html
new file mode 100644
index 0000000..0afa438
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_smtp_send.html
@@ -0,0 +1,375 @@
+<?xml version="1.0" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>check_smtp_send - connects to an SMTP server and sends a message</title>
+<link rel="stylesheet" href="plainwhite.css" type="text/css" />
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<link rev="made" href="mailto:jonathan@greek.local" />
+</head>
+
+<body>
+
+
+<!-- INDEX BEGIN -->
+<div name="index">
+<p><a name="__index__"></a></p>
+<!--
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#options">OPTIONS</a></li>
+ <li><a href="#examples">EXAMPLES</a></li>
+ <ul>
+
+ <li><a href="#send_a_message_with_custom_headers">Send a message with custom headers</a></li>
+ </ul>
+
+ <li><a href="#exit_codes">EXIT CODES</a></li>
+ <li><a href="#nagios_plugin_notes">NAGIOS PLUGIN NOTES</a></li>
+ <li><a href="#changes">CHANGES</a></li>
+ <li><a href="#author">AUTHOR</a></li>
+ <li><a href="#copyright_and_license">COPYRIGHT AND LICENSE</a></li>
+</ul>
+
+-->
+
+
+</div>
+<!-- INDEX END -->
+
+<p>
+</p>
+<hr />
+<h1><a name="name">NAME</a></h1>
+<p>check_smtp_send - connects to an SMTP server and sends a message</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ check_smtp_send -vV
+ check_smtp_send -?
+ check_smtp_send --help</pre>
+<p>
+</p>
+<hr />
+<h1><a name="options">OPTIONS</a></h1>
+<dl>
+<dt><strong><a name="warning_seconds" class="item">--warning &lt;seconds&gt;</a></strong></dt>
+
+<dd>
+<p>Warn if it takes longer than &lt;seconds&gt; to connect to the SMTP server. Default is 15 seconds.
+Also known as: -w &lt;seconds&gt;</p>
+</dd>
+<dt><strong><a name="critical_seconds" class="item">--critical &lt;seconds&gt;</a></strong></dt>
+
+<dd>
+<p>Return a critical status if it takes longer than &lt;seconds&gt; to connect to the SMTP server. Default is 30 seconds.
+Also known as: -c &lt;seconds&gt;</p>
+</dd>
+<dt><strong><a name="timeout_seconds" class="item">--timeout &lt;seconds&gt;</a></strong></dt>
+
+<dd>
+<p>Abort with critical status if it takes longer than &lt;seconds&gt; to connect to the SMTP server. Default is 60 seconds.
+The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to
+connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer
+than 30 seconds.
+Also known as: -t &lt;seconds&gt;</p>
+</dd>
+<dt><strong><a name="hostname_server" class="item">--hostname &lt;server&gt;</a></strong></dt>
+
+<dd>
+<p>Address or name of the SMTP server. Examples: mail.server.com, localhost, 192.168.1.100</p>
+<p>If not provided, and if there is only one --mailto address, the script will automatically look up the MX record
+for the --mailto address and use that as the hostname. You can use this to check that your MX records are correct.
+When omitting the --hostname option, it doesn't really make sense to specify --port, --username, or --password
+but you can still do so and they will have their normal effect. To look up the MX records you need to have the
+module Net::DNS and Email::Address installed.</p>
+<p>Also known as: -H &lt;server&gt;</p>
+</dd>
+<dt><strong><a name="port_number" class="item">--port &lt;number&gt;</a></strong></dt>
+
+<dd>
+<p>Service port on the SMTP server. Default is 25 for regular SMTP, 465 for SSL, and 587 for TLS.
+Also known as: -p &lt;number&gt;</p>
+</dd>
+<dt><strong><a name="tls" class="item">--tls</a></strong></dt>
+
+<dt><strong><a name="notls" class="item">--notls</a></strong></dt>
+
+<dd>
+<p>Enable TLS/AUTH protocol. Requires Net::SMTP::TLS, availble on CPAN.</p>
+<p>When using this option, the default port is 587.
+You can specify a port from the command line using the --port option.</p>
+<p>Use the notls option to turn off the tls option.</p>
+<p>Also, you may need to fix your copy of Net::SMTP::TLS. Here is the diff against version 0.12:</p>
+<pre>
+ 254c254
+ &lt; $me-&gt;_command(sprintf(&quot;AUTH PLAIN %S&quot;,
+ ---
+ &gt; $me-&gt;_command(sprintf(&quot;AUTH PLAIN %s&quot;,</pre>
+</dd>
+<dt><strong><a name="ssl" class="item">--ssl</a></strong></dt>
+
+<dt><strong><a name="nossl" class="item">--nossl</a></strong></dt>
+
+<dd>
+<p>Enable SSL protocol. Requires Net::SMTP::SSL and Authen::SASL, availble on CPAN.</p>
+<p>When using this option, the default port is 465. You can override with the --port option.</p>
+<p>Use the nossl option to turn off the ssl option.</p>
+</dd>
+<dt><strong><a name="auth_method" class="item">--auth &lt;method&gt;</a></strong></dt>
+
+<dd>
+<p>Enable authentication with Net::SMTP_auth (sold separately).
+For example, try using --auth PLAIN or --auth CRAM-MD5.</p>
+</dd>
+<dt><strong><a name="username_username" class="item">--username &lt;username&gt;</a></strong></dt>
+
+<dt><strong><a name="password_password" class="item">--password &lt;password&gt;</a></strong></dt>
+
+<dd>
+<p>Username and password to use when connecting to SMTP server.
+Also known as: -U &lt;username&gt; -P &lt;password&gt;</p>
+</dd>
+<dt><strong><a name="body_message" class="item">--body &lt;message&gt;</a></strong></dt>
+
+<dd>
+<p>Use this option to specify the body of the email message. If you need newlines in your message,
+you might need to use the --stdin option instead.</p>
+</dd>
+<dt><strong><a name="header_header" class="item">--header &lt;header&gt;</a></strong></dt>
+
+<dd>
+<p>Use this option to set an arbitrary header in the message. You can use it multiple times.</p>
+</dd>
+<dt><strong><a name="stdin" class="item">--stdin</a></strong></dt>
+
+<dd>
+<p>Grab the body of the email message from stdin.</p>
+</dd>
+<dt><strong><a name="mailto_recipient_your_net" class="item">--mailto <a href="mailto:recipient@your.net">recipient@your.net</a></a></strong></dt>
+
+<dd>
+<p>You can send a message to multiple recipients by repeating this option or by separating
+the email addresses with commas (no whitespace allowed):</p>
+<p>$ check_smtp_send -H mail.server.net --mailto <a href="mailto:recipient@your.net,recipient2@your.net">recipient@your.net,recipient2@your.net</a> --mailfrom <a href="mailto:sender@your.net">sender@your.net</a></p>
+<p>SMTP SEND OK - 1 seconds</p>
+</dd>
+<dt><strong><a name="mailfrom_sender_your_net" class="item">--mailfrom <a href="mailto:sender@your.net">sender@your.net</a></a></strong></dt>
+
+<dd>
+<p>Use this option to set the &quot;from&quot; address in the email.</p>
+</dd>
+<dt><strong><a name="template" class="item">--template</a></strong></dt>
+
+<dt><strong><a name="notemplate" class="item">--notemplate</a></strong></dt>
+
+<dd>
+<p>Enable (or disable) processing of message body and headers. Requires Text::Template.</p>
+<p>Use this option to apply special processing to your message body and headers that allows you to use the
+results of arbitrary computations in the text. For example, you can use this feature to send a message
+containing the hostname of the machine that sent the message without customizing the plugin configuration
+on each machine.</p>
+<p>When you enable the --template option, the message body and headers are parsed by
+Text::Template. Even a message body provided using the --stdin option will be parsed.
+See the Text::Template manual for more information, but in general any expression
+written in Perl will work.</p>
+<p>There is one convenience function provided to you, trim, which will remove leading and trailing whitespace
+from its parameter. Here's an example:</p>
+<pre>
+ check_smtp_send -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net
+ --template --body 'hello, this message is from {use Sys::Hostname; hostname}'
+ --header 'Subject: test message from {trim(`whoami`)}'</pre>
+</dd>
+<dt><strong><a name="expect_response_code" class="item">--expect-response &lt;code&gt;</a></strong></dt>
+
+<dd>
+<p>Use this option to specify which SMTP response code should be expected from the server
+after the SMTP dialog is complete. The default is 250 (message accepted).</p>
+<p>Also known as: -E &lt;code&gt;</p>
+</dd>
+<dt><strong><a name="hires" class="item">--hires</a></strong></dt>
+
+<dd>
+<p>Use the Time::HiRes module to measure time, if available.</p>
+</dd>
+<dt><strong><a name="verbose" class="item">--verbose</a></strong></dt>
+
+<dd>
+<p>Display additional information. Useful for troubleshooting.</p>
+<p>One --verbose will show extra information for OK, WARNING, and CRITICAL status.</p>
+<p>Use one --verbose together with --version to see the default warning and critical timeout values.</p>
+<p>Three --verbose (or -vvv) will show debug information, unless you're using --tls because Net::SMTP::TLS
+does not have a Debug feature.</p>
+<p>Also known as: -v</p>
+</dd>
+<dt><strong><a name="version" class="item">--version</a></strong></dt>
+
+<dd>
+<p>Display plugin version and exit.
+Also known as: -V</p>
+</dd>
+<dt><strong><a name="help" class="item">--help</a></strong></dt>
+
+<dd>
+<p>Display this documentation and exit. Does not work in the ePN version.
+Also known as: -h</p>
+</dd>
+<dt><strong><a name="usage" class="item">--usage</a></strong></dt>
+
+<dd>
+<p>Display a short usage instruction and exit.</p>
+</dd>
+</dl>
+<p>
+</p>
+<hr />
+<h1><a name="examples">EXAMPLES</a></h1>
+<p>
+</p>
+<h2><a name="send_a_message_with_custom_headers">Send a message with custom headers</a></h2>
+<p>$ check_smtp_send -H mail.server.net --mailto <a href="mailto:recipient@your.net">recipient@your.net</a> --mailfrom <a href="mailto:sender@your.net">sender@your.net</a>
+--body 'Homeruns 5' --header 'Subject: Hello, world!' --header 'X-Your-Header: Yes'</p>
+<p>SMTP SEND OK - 1 seconds</p>
+<p>
+</p>
+<hr />
+<h1><a name="exit_codes">EXIT CODES</a></h1>
+<p><table cellspacing="0" cellpadding="0"><tr><td>Complies with the Nagios plug-in specification:
+<tr><td> 0<td>OK<td>The plugin was able to check the service and it appeared to be functioning properly
+<tr><td> 1<td>Warning<td>The plugin was able to check the service, but it appeared to be above some &quot;warning&quot; threshold or did not appear to be working properly
+<tr><td> 2<td>Critical<td>The plugin detected that either the service was not running or it was above some &quot;critical&quot; threshold
+<tr><td> 3<td>Unknown<td>Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service</table></p>
+<p>
+</p>
+<hr />
+<h1><a name="nagios_plugin_notes">NAGIOS PLUGIN NOTES</a></h1>
+<p>Nagios plugin reference: <a href="http://nagiosplug.sourceforge.net/developer-guidelines.html">http://nagiosplug.sourceforge.net/developer-guidelines.html</a></p>
+<p>This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because
+the path to utils.pm must be specified completely in this program and forces users to edit the source
+code if their install location is different (if they realize this is the problem). You can view
+the default timeout for this module by using the --verbose and --version options together. The
+short form is -vV.</p>
+<p>Other than that, it attempts to follow published guidelines for Nagios plugins.</p>
+<p>
+</p>
+<hr />
+<h1><a name="changes">CHANGES</a></h1>
+<pre>
+ Wed Oct 29 14:05:00 PST 2005
+ + version 0.1</pre>
+<pre>
+ Wed Nov 9 15:01:48 PST 2005
+ + now using an inline PluginReport package to generate the report
+ + added stdin option
+ + copyright notice and GNU GPL
+ + version 0.2</pre>
+<pre>
+ Thu Apr 20 16:00:00 PST 2006 (by Geoff Crompton &lt;geoff.crompton@strategicdata.com.au&gt;)
+ + added bailing if the $smtp-&gt;to() call fails
+ + added support for mailto recipients separated by commas
+ + version 0.2.1</pre>
+<pre>
+ Tue Apr 24 21:17:53 PDT 2007
+ + moved POD text to separate file in order to accomodate the new embedded-perl Nagios feature
+ + version 0.2.3</pre>
+<pre>
+ Fri Apr 27 20:26:42 PDT 2007
+ + documentation now mentions every command-line option accepted by the plugin, including abbreviations
+ + version 0.3
+
+ Sun Oct 21 10:34:14 PDT 2007
+ + added support for TLS and authentication via the Net::SMTP::TLS module. see --tls option.
+ + version 0.4</pre>
+<pre>
+ Sun Oct 21 13:54:26 PDT 2007
+ + added support for SSL via the Net::SMTP::SSL module. see --ssl option.
+ + port is no longer a required option. defaults to 25 for regular smtp, 465 for ssl, and 587 for tls.
+ + added port info to the &quot;could not connect&quot; error message
+ + version 0.4.1</pre>
+<pre>
+ Tue Dec 4 07:42:32 PST 2007
+ + added --usage option because the official nagios plugins have both --help and --usage
+ + added --timeout option to match the official nagios plugins
+ + fixed some minor pod formatting issues for perldoc
+ + version 0.4.2</pre>
+<pre>
+ Mon Feb 11 19:09:37 PST 2008
+ + fixed a bug for embedded perl version, variable &quot;%status&quot; will not stay shared in load_modules
+ + version 0.4.3</pre>
+<pre>
+ Mon May 26 09:12:14 PDT 2008
+ + fixed warning and critical messages to use &quot;more than&quot; or &quot;less than&quot; instead of the angle brackets, to make them more web friendly
+ + version 0.4.4
+
+ Wed Jul 2 07:12:35 PDT 2008
+ + added --expect-response option submitted by Christian Kauhaus &lt;kc@gocept.com&gt;
+ + added support for authentication via Net::SMTP_auth. see --auth option.
+ + version 0.4.5</pre>
+<pre>
+ Sun Oct 5 15:18:23 PDT 2008
+ + added error handling for smtp server disconnects ungracefully during QUIT (gmail.com does)
+ + version 0.4.6</pre>
+<pre>
+ Thu Oct 1 12:09:35 PDT 2009
+ + added --template option to allow arbitrary substitutions for body and headers, and provided one convenience function for trimming strings
+ + added performance data for use with PNP4Nagios!
+ + version 0.5.0</pre>
+<pre>
+ Thu Oct 8 11:17:04 PDT 2009
+ + added more detailed error messages when using --verbose
+ + version 0.5.1</pre>
+<pre>
+ Tue Feb 9 12:14:49 PST 2010
+ + added support for combining --auth with --tls using a subclass of Net::SMTP::TLS submitted by Brad Guillory; please note that to use the &quot;PLAIN&quot; authentication type you need to patch your Net::SMTP:TLS because it has a bug in sub auth_PLAIN (sprintf %S instead of %s)
+ + version 0.5.2</pre>
+<pre>
+ Mon Jan 3 10:39:42 PST 2011
+ + added default Date and Message-ID headers; Date header uses POSIX strftime and Message-ID header uses hostname command to get localhost name
+ + version 0.7.0</pre>
+<pre>
+ Fri May 6 08:35:09 AST 2011
+ + added --hires option to enable use of Time::Hires if available
+ + version 0.7.1</pre>
+<pre>
+ Wed Jul 6 19:18:26 AST 2011
+ + the --hostname is now optional; if not provided the plugin will lookup the MX record for the --mailto address (requires Net::DNS)
+ + version 0.7.2</pre>
+<pre>
+ Tue Dec 13 09:24:04 PST 2011
+ + separated authentication errors from connection errors
+ + version 0.7.3</pre>
+<p>
+</p>
+<hr />
+<h1><a name="author">AUTHOR</a></h1>
+<p>Jonathan Buhacoff &lt;<a href="mailto:jonathan@buhacoff.net">jonathan@buhacoff.net</a>&gt;</p>
+<p>
+</p>
+<hr />
+<h1><a name="copyright_and_license">COPYRIGHT AND LICENSE</a></h1>
+<pre>
+ Copyright (C) 2005-2011 Jonathan Buhacoff</pre>
+<pre>
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.</pre>
+<pre>
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.</pre>
+<pre>
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see &lt;<a href="http://www.gnu.org/licenses/&gt">http://www.gnu.org/licenses/&gt</a>;.</pre>
+<pre>
+ <a href="http://www.gnu.org/licenses/gpl.txt">http://www.gnu.org/licenses/gpl.txt</a></pre>
+
+</body>
+
+</html>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_smtp_send.pod b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_smtp_send.pod
new file mode 100644
index 0000000..db33549
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/check_smtp_send.pod
@@ -0,0 +1,324 @@
+
+
+=pod
+
+=head1 NAME
+
+check_smtp_send - connects to an SMTP server and sends a message
+
+=head1 SYNOPSIS
+
+ check_smtp_send -vV
+ check_smtp_send -?
+ check_smtp_send --help
+
+=head1 OPTIONS
+
+=over
+
+=item --warning <seconds>
+
+Warn if it takes longer than <seconds> to connect to the SMTP server. Default is 15 seconds.
+Also known as: -w <seconds>
+
+=item --critical <seconds>
+
+Return a critical status if it takes longer than <seconds> to connect to the SMTP server. Default is 30 seconds.
+Also known as: -c <seconds>
+
+=item --timeout <seconds>
+
+Abort with critical status if it takes longer than <seconds> to connect to the SMTP server. Default is 60 seconds.
+The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to
+connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer
+than 30 seconds.
+Also known as: -t <seconds>
+
+=item --hostname <server>
+
+Address or name of the SMTP server. Examples: mail.server.com, localhost, 192.168.1.100
+
+If not provided, and if there is only one --mailto address, the script will automatically look up the MX record
+for the --mailto address and use that as the hostname. You can use this to check that your MX records are correct.
+When omitting the --hostname option, it doesn't really make sense to specify --port, --username, or --password
+but you can still do so and they will have their normal effect. To look up the MX records you need to have the
+module Net::DNS and Email::Address installed.
+
+Also known as: -H <server>
+
+=item --port <number>
+
+Service port on the SMTP server. Default is 25 for regular SMTP, 465 for SSL, and 587 for TLS.
+Also known as: -p <number>
+
+=item --tls
+
+=item --notls
+
+Enable TLS/AUTH protocol. Requires Net::SMTP::TLS, availble on CPAN.
+
+When using this option, the default port is 587.
+You can specify a port from the command line using the --port option.
+
+Use the notls option to turn off the tls option.
+
+Also, you may need to fix your copy of Net::SMTP::TLS. Here is the diff against version 0.12:
+
+ 254c254
+ < $me->_command(sprintf("AUTH PLAIN %S",
+ ---
+ > $me->_command(sprintf("AUTH PLAIN %s",
+
+
+=item --ssl
+
+=item --nossl
+
+Enable SSL protocol. Requires Net::SMTP::SSL and Authen::SASL, availble on CPAN.
+
+When using this option, the default port is 465. You can override with the --port option.
+
+Use the nossl option to turn off the ssl option.
+
+=item --auth <method>
+
+Enable authentication with Net::SMTP_auth (sold separately).
+For example, try using --auth PLAIN or --auth CRAM-MD5.
+
+=item --username <username>
+
+=item --password <password>
+
+Username and password to use when connecting to SMTP server.
+Also known as: -U <username> -P <password>
+
+=item --body <message>
+
+Use this option to specify the body of the email message. If you need newlines in your message,
+you might need to use the --stdin option instead.
+
+=item --header <header>
+
+Use this option to set an arbitrary header in the message. You can use it multiple times.
+
+=item --stdin
+
+Grab the body of the email message from stdin.
+
+=item --mailto recipient@your.net
+
+You can send a message to multiple recipients by repeating this option or by separating
+the email addresses with commas (no whitespace allowed):
+
+$ check_smtp_send -H mail.server.net --mailto recipient@your.net,recipient2@your.net --mailfrom sender@your.net
+
+SMTP SEND OK - 1 seconds
+
+=item --mailfrom sender@your.net
+
+Use this option to set the "from" address in the email.
+
+=item --template
+
+=item --notemplate
+
+Enable (or disable) processing of message body and headers. Requires Text::Template.
+
+Use this option to apply special processing to your message body and headers that allows you to use the
+results of arbitrary computations in the text. For example, you can use this feature to send a message
+containing the hostname of the machine that sent the message without customizing the plugin configuration
+on each machine.
+
+When you enable the --template option, the message body and headers are parsed by
+Text::Template. Even a message body provided using the --stdin option will be parsed.
+See the Text::Template manual for more information, but in general any expression
+written in Perl will work.
+
+There is one convenience function provided to you, trim, which will remove leading and trailing whitespace
+from its parameter. Here's an example:
+
+ check_smtp_send -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net
+ --template --body 'hello, this message is from {use Sys::Hostname; hostname}'
+ --header 'Subject: test message from {trim(`whoami`)}'
+
+
+=item --expect-response <code>
+
+Use this option to specify which SMTP response code should be expected from the server
+after the SMTP dialog is complete. The default is 250 (message accepted).
+
+Also known as: -E <code>
+
+=item --hires
+
+Use the Time::HiRes module to measure time, if available.
+
+=item --verbose
+
+Display additional information. Useful for troubleshooting.
+
+One --verbose will show extra information for OK, WARNING, and CRITICAL status.
+
+Use one --verbose together with --version to see the default warning and critical timeout values.
+
+Three --verbose (or -vvv) will show debug information, unless you're using --tls because Net::SMTP::TLS
+does not have a Debug feature.
+
+Also known as: -v
+
+=item --version
+
+Display plugin version and exit.
+Also known as: -V
+
+=item --help
+
+Display this documentation and exit. Does not work in the ePN version.
+Also known as: -h
+
+=item --usage
+
+Display a short usage instruction and exit.
+
+=back
+
+=head1 EXAMPLES
+
+=head2 Send a message with custom headers
+
+$ check_smtp_send -H mail.server.net --mailto recipient@your.net --mailfrom sender@your.net
+--body 'Homeruns 5' --header 'Subject: Hello, world!' --header 'X-Your-Header: Yes'
+
+SMTP SEND OK - 1 seconds
+
+=head1 EXIT CODES
+
+Complies with the Nagios plug-in specification:
+ 0 OK The plugin was able to check the service and it appeared to be functioning properly
+ 1 Warning The plugin was able to check the service, but it appeared to be above some "warning" threshold or did not appear to be working properly
+ 2 Critical The plugin detected that either the service was not running or it was above some "critical" threshold
+ 3 Unknown Invalid command line arguments were supplied to the plugin or the plugin was unable to check the status of the given hosts/service
+
+=head1 NAGIOS PLUGIN NOTES
+
+Nagios plugin reference: http://nagiosplug.sourceforge.net/developer-guidelines.html
+
+This plugin does NOT use Nagios DEFAULT_SOCKET_TIMEOUT (provided by utils.pm as $TIMEOUT) because
+the path to utils.pm must be specified completely in this program and forces users to edit the source
+code if their install location is different (if they realize this is the problem). You can view
+the default timeout for this module by using the --verbose and --version options together. The
+short form is -vV.
+
+Other than that, it attempts to follow published guidelines for Nagios plugins.
+
+=head1 CHANGES
+
+ Wed Oct 29 14:05:00 PST 2005
+ + version 0.1
+
+ Wed Nov 9 15:01:48 PST 2005
+ + now using an inline PluginReport package to generate the report
+ + added stdin option
+ + copyright notice and GNU GPL
+ + version 0.2
+
+ Thu Apr 20 16:00:00 PST 2006 (by Geoff Crompton <geoff.crompton@strategicdata.com.au>)
+ + added bailing if the $smtp->to() call fails
+ + added support for mailto recipients separated by commas
+ + version 0.2.1
+
+ Tue Apr 24 21:17:53 PDT 2007
+ + moved POD text to separate file in order to accomodate the new embedded-perl Nagios feature
+ + version 0.2.3
+
+ Fri Apr 27 20:26:42 PDT 2007
+ + documentation now mentions every command-line option accepted by the plugin, including abbreviations
+ + version 0.3
+
+ Sun Oct 21 10:34:14 PDT 2007
+ + added support for TLS and authentication via the Net::SMTP::TLS module. see --tls option.
+ + version 0.4
+
+ Sun Oct 21 13:54:26 PDT 2007
+ + added support for SSL via the Net::SMTP::SSL module. see --ssl option.
+ + port is no longer a required option. defaults to 25 for regular smtp, 465 for ssl, and 587 for tls.
+ + added port info to the "could not connect" error message
+ + version 0.4.1
+
+ Tue Dec 4 07:42:32 PST 2007
+ + added --usage option because the official nagios plugins have both --help and --usage
+ + added --timeout option to match the official nagios plugins
+ + fixed some minor pod formatting issues for perldoc
+ + version 0.4.2
+
+ Mon Feb 11 19:09:37 PST 2008
+ + fixed a bug for embedded perl version, variable "%status" will not stay shared in load_modules
+ + version 0.4.3
+
+ Mon May 26 09:12:14 PDT 2008
+ + fixed warning and critical messages to use "more than" or "less than" instead of the angle brackets, to make them more web friendly
+ + version 0.4.4
+
+ Wed Jul 2 07:12:35 PDT 2008
+ + added --expect-response option submitted by Christian Kauhaus <kc@gocept.com>
+ + added support for authentication via Net::SMTP_auth. see --auth option.
+ + version 0.4.5
+
+ Sun Oct 5 15:18:23 PDT 2008
+ + added error handling for smtp server disconnects ungracefully during QUIT (gmail.com does)
+ + version 0.4.6
+
+ Thu Oct 1 12:09:35 PDT 2009
+ + added --template option to allow arbitrary substitutions for body and headers, and provided one convenience function for trimming strings
+ + added performance data for use with PNP4Nagios!
+ + version 0.5.0
+
+ Thu Oct 8 11:17:04 PDT 2009
+ + added more detailed error messages when using --verbose
+ + version 0.5.1
+
+ Tue Feb 9 12:14:49 PST 2010
+ + added support for combining --auth with --tls using a subclass of Net::SMTP::TLS submitted by Brad Guillory; please note that to use the "PLAIN" authentication type you need to patch your Net::SMTP:TLS because it has a bug in sub auth_PLAIN (sprintf %S instead of %s)
+ + version 0.5.2
+
+ Mon Jan 3 10:39:42 PST 2011
+ + added default Date and Message-ID headers; Date header uses POSIX strftime and Message-ID header uses hostname command to get localhost name
+ + version 0.7.0
+
+ Fri May 6 08:35:09 AST 2011
+ + added --hires option to enable use of Time::Hires if available
+ + version 0.7.1
+
+ Wed Jul 6 19:18:26 AST 2011
+ + the --hostname is now optional; if not provided the plugin will lookup the MX record for the --mailto address (requires Net::DNS)
+ + version 0.7.2
+
+ Tue Dec 13 09:24:04 PST 2011
+ + separated authentication errors from connection errors
+ + version 0.7.3
+
+=head1 AUTHOR
+
+Jonathan Buhacoff <jonathan@buhacoff.net>
+
+=head1 COPYRIGHT AND LICENSE
+
+ Copyright (C) 2005-2011 Jonathan Buhacoff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ http://www.gnu.org/licenses/gpl.txt
+
+=cut
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/imap_ssl_cert.html b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/imap_ssl_cert.html
new file mode 100644
index 0000000..cff7a09
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/imap_ssl_cert.html
@@ -0,0 +1,178 @@
+<?xml version="1.0" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>imap_ssl_cert - connects to an IMAP server using SSL and saves the server certificate into a .pem file</title>
+<link rel="stylesheet" href="plainwhite.css" type="text/css" />
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<link rev="made" href="mailto:jonathan@greek.local" />
+</head>
+
+<body>
+
+
+<!-- INDEX BEGIN -->
+<div name="index">
+<p><a name="__index__"></a></p>
+<!--
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#dependencies">DEPENDENCIES</a></li>
+ <li><a href="#options">OPTIONS</a></li>
+ <li><a href="#examples">EXAMPLES</a></li>
+ <ul>
+
+ <li><a href="#print_the_server_s_ssl_certificate_chain">Print the server's SSL certificate chain</a></li>
+ </ul>
+
+ <li><a href="#see_also">SEE ALSO</a></li>
+ <li><a href="#changes">CHANGES</a></li>
+ <li><a href="#author">AUTHOR</a></li>
+ <li><a href="#copyright_and_license">COPYRIGHT AND LICENSE</a></li>
+</ul>
+
+-->
+
+
+</div>
+<!-- INDEX END -->
+
+<p>
+</p>
+<hr />
+<h1><a name="name">NAME</a></h1>
+<p>imap_ssl_cert - connects to an IMAP server using SSL and saves the server certificate into a .pem file</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ imap_ssl_cert -H imap.server.com &gt; server_ca_file.pem
+ imap_ssl_cert -?
+ imap_ssl_cert --help</pre>
+<p>
+</p>
+<hr />
+<h1><a name="dependencies">DEPENDENCIES</a></h1>
+<p>This utility requires the following perl modules to be installed:</p>
+<p>Getopt::Long
+Mail::IMAPClient
+IO::Socket::SSL
+Net::SSLeay</p>
+<p>
+</p>
+<hr />
+<h1><a name="options">OPTIONS</a></h1>
+<dl>
+<dt><strong><a name="timeout_seconds" class="item">--timeout &lt;seconds&gt;</a></strong></dt>
+
+<dd>
+<p>Abort with critical status if it takes longer than &lt;seconds&gt; to connect to the IMAP server. Default is 60 seconds.
+The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to
+connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer
+than 30 seconds.
+Also known as: -t &lt;seconds&gt;</p>
+</dd>
+<dt><strong><a name="hostname_server" class="item">--hostname &lt;server&gt;</a></strong></dt>
+
+<dd>
+<p>Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100
+Also known as: -H &lt;server&gt;</p>
+</dd>
+<dt><strong><a name="port_number" class="item">--port &lt;number&gt;</a></strong></dt>
+
+<dd>
+<p>Service port on the IMAP server. Default is 143. If you use SSL, default is 993.
+Also known as: -p &lt;number&gt;</p>
+</dd>
+<dt><strong><a name="verbose" class="item">--verbose</a></strong></dt>
+
+<dd>
+<p>Display additional information. Useful for troubleshooting.</p>
+<p>Also known as: -v</p>
+</dd>
+<dt><strong><a name="version" class="item">--version</a></strong></dt>
+
+<dd>
+<p>Display plugin version and exit.
+Also known as: -V</p>
+</dd>
+<dt><strong><a name="help" class="item">--help</a></strong></dt>
+
+<dd>
+<p>Display this documentation and exit.
+Also known as: -h</p>
+</dd>
+<dt><strong><a name="usage" class="item">--usage</a></strong></dt>
+
+<dd>
+<p>Display a short usage instruction and exit.</p>
+</dd>
+</dl>
+<p>
+</p>
+<hr />
+<h1><a name="examples">EXAMPLES</a></h1>
+<p>
+</p>
+<h2><a name="print_the_server_s_ssl_certificate_chain">Print the server's SSL certificate chain</a></h2>
+<pre>
+ $ perl imap_ssl_cert.pl -H imap.server.com &gt; ca_file.pem
+ $ cat ca_file.pem</pre>
+<pre>
+ -----BEGIN CERTIFICATE-----
+ MIID1zCCAr+gAwIBAgIQPr3bVk0SkuXygjxgA7EVGDANBgkqhkiG9w0BAQUFADA8
+ [...snip...]
+ 0FF4warjskrfqaVtWeIV58LJheaM4cPJkc2M
+ -----END CERTIFICATE-----</pre>
+<pre>
+ $ openssl x509 -in ca_file.pem -text</pre>
+<p>
+</p>
+<hr />
+<h1><a name="see_also">SEE ALSO</a></h1>
+<p><a href="http://en.wikipedia.org/wiki/X.509">http://en.wikipedia.org/wiki/X.509</a>
+<a href="http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail">http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail</a>
+<a href="http://tools.ietf.org/html/rfc1422">http://tools.ietf.org/html/rfc1422</a>
+<a href="http://search.cpan.org/~mikem/Net-SSLeay-1.42/lib/Net/SSLeay.pm">http://search.cpan.org/~mikem/Net-SSLeay-1.42/lib/Net/SSLeay.pm</a>
+<a href="http://search.cpan.org/~plobbes/Mail-IMAPClient-3.29/lib/Mail/IMAPClient.pod">http://search.cpan.org/~plobbes/Mail-IMAPClient-3.29/lib/Mail/IMAPClient.pod</a></p>
+<p>
+</p>
+<hr />
+<h1><a name="changes">CHANGES</a></h1>
+<pre>
+ Fri Nov 11 03:38:13 AST 2011
+ + version 0.1</pre>
+<p>
+</p>
+<hr />
+<h1><a name="author">AUTHOR</a></h1>
+<p>Jonathan Buhacoff &lt;<a href="mailto:jonathan@buhacoff.net">jonathan@buhacoff.net</a>&gt;</p>
+<p>
+</p>
+<hr />
+<h1><a name="copyright_and_license">COPYRIGHT AND LICENSE</a></h1>
+<pre>
+ Copyright (C) 2011 Jonathan Buhacoff</pre>
+<pre>
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.</pre>
+<pre>
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.</pre>
+<pre>
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see &lt;<a href="http://www.gnu.org/licenses/&gt">http://www.gnu.org/licenses/&gt</a>;.</pre>
+<pre>
+ <a href="http://www.gnu.org/licenses/gpl.txt">http://www.gnu.org/licenses/gpl.txt</a></pre>
+
+</body>
+
+</html>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/imap_ssl_cert.pod b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/imap_ssl_cert.pod
new file mode 100644
index 0000000..dc42d5c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/docs/imap_ssl_cert.pod
@@ -0,0 +1,122 @@
+
+
+
+=pod
+
+=head1 NAME
+
+imap_ssl_cert - connects to an IMAP server using SSL and saves the server certificate into a .pem file
+
+=head1 SYNOPSIS
+
+ imap_ssl_cert -H imap.server.com > server_ca_file.pem
+ imap_ssl_cert -?
+ imap_ssl_cert --help
+
+=head1 DEPENDENCIES
+
+This utility requires the following perl modules to be installed:
+
+Getopt::Long
+Mail::IMAPClient
+IO::Socket::SSL
+Net::SSLeay
+
+=head1 OPTIONS
+
+=over
+
+=item --timeout <seconds>
+
+Abort with critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 60 seconds.
+The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to
+connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer
+than 30 seconds.
+Also known as: -t <seconds>
+
+=item --hostname <server>
+
+Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100
+Also known as: -H <server>
+
+=item --port <number>
+
+Service port on the IMAP server. Default is 143. If you use SSL, default is 993.
+Also known as: -p <number>
+
+=item --verbose
+
+Display additional information. Useful for troubleshooting.
+
+Also known as: -v
+
+=item --version
+
+Display plugin version and exit.
+Also known as: -V
+
+=item --help
+
+Display this documentation and exit.
+Also known as: -h
+
+=item --usage
+
+Display a short usage instruction and exit.
+
+=back
+
+=head1 EXAMPLES
+
+=head2 Print the server's SSL certificate chain
+
+ $ perl imap_ssl_cert.pl -H imap.server.com > ca_file.pem
+ $ cat ca_file.pem
+
+ -----BEGIN CERTIFICATE-----
+ MIID1zCCAr+gAwIBAgIQPr3bVk0SkuXygjxgA7EVGDANBgkqhkiG9w0BAQUFADA8
+ [...snip...]
+ 0FF4warjskrfqaVtWeIV58LJheaM4cPJkc2M
+ -----END CERTIFICATE-----
+
+ $ openssl x509 -in ca_file.pem -text
+
+
+=head1 SEE ALSO
+
+http://en.wikipedia.org/wiki/X.509
+http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail
+http://tools.ietf.org/html/rfc1422
+http://search.cpan.org/~mikem/Net-SSLeay-1.42/lib/Net/SSLeay.pm
+http://search.cpan.org/~plobbes/Mail-IMAPClient-3.29/lib/Mail/IMAPClient.pod
+
+=head1 CHANGES
+
+ Fri Nov 11 03:38:13 AST 2011
+ + version 0.1
+
+=head1 AUTHOR
+
+Jonathan Buhacoff <jonathan@buhacoff.net>
+
+=head1 COPYRIGHT AND LICENSE
+
+ Copyright (C) 2011 Jonathan Buhacoff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ http://www.gnu.org/licenses/gpl.txt
+
+=cut
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/imap_ssl_cert b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/imap_ssl_cert
new file mode 100644
index 0000000..a79c56e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/imap_ssl_cert
@@ -0,0 +1,236 @@
+#!/usr/bin/perl
+use strict;
+my $VERSION = '0.1';
+my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
+my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt';
+my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 );
+
+use Getopt::Long;
+use Mail::IMAPClient;
+use IO::Socket::SSL;
+use Net::SSLeay;
+
+# get options from command line
+Getopt::Long::Configure("bundling");
+my $verbose = 0;
+my $help = "";
+my $help_usage = "";
+my $show_version = "";
+my $imap_server = "";
+my $default_imap_port = "143";
+my $default_imap_ssl_port = "993";
+my $imap_port = "";
+my $timeout = 60;
+my $ok;
+$ok = Getopt::Long::GetOptions(
+ "V|version"=>\$show_version,
+ "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage,
+ # imap settings
+ "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port,
+ # time
+ "t|timeout=i"=>\$timeout
+ );
+
+if( $show_version ) {
+ print "$VERSION\n";
+ exit $status{UNKNOWN};
+}
+
+if( $help ) {
+ exec "perldoc", $0 or print "Try `perldoc $0`\n";
+ exit $status{UNKNOWN};
+}
+
+if( $help_usage
+ ||
+ ( $imap_server eq "" )
+ ) {
+ print "Usage: $0 -H host [-p port]\n";
+ exit $status{UNKNOWN};
+}
+
+my @certs = (); # we have to store the certs we get Net::SSLeay here so that we can output them in REVERSE order (server cert first, root cert last)
+
+# connect to IMAP server
+print "connecting to server $imap_server\n" if $verbose > 2;
+my $imap;
+eval {
+ local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
+ alarm $timeout;
+
+ $imap_port = $default_imap_ssl_port unless $imap_port;
+ my $socket = IO::Socket::SSL->new(
+ PeerAddr => "$imap_server:$imap_port",
+ SSL_verify_mode => 1,
+ SSL_ca_file => undef,
+ SSL_verifycn_scheme => 'imap',
+ SSL_verifycn_name => $imap_server,
+ SSL_verify_callback => \&ssl_printer
+ );
+ die IO::Socket::SSL::errstr() unless $socket;
+ $socket->autoflush(1);
+ $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 );
+ $imap->State(Mail::IMAPClient->Connected);
+ $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works
+# $imap->User($username);
+# $imap->Password($password);
+# $imap->login() or die "Cannot login: $@";
+
+ print join("\n",reverse(@certs));
+ alarm 0;
+};
+if( $@ ) {
+ chomp $@;
+ print "Could not connect to $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+unless( $imap ) {
+ print "Could not connect to $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+
+# deselect the mailbox
+$imap->close();
+
+# disconnect from IMAP server
+print "disconnecting from server\n" if $verbose > 2;
+$imap->logout();
+
+
+exit $status{OK};
+
+# see IO::Socket::SSL documentation for SSL_verify_callback:
+sub ssl_printer {
+ my ($boolOpenSSLResult, $cmemCertificateStore, $strCertIssuerOwnerAttr, $strError, $cmemPeerCertificate) = @_;
+ warn "OpenSSL says certificate is " . ( $boolOpenSSLResult ? "valid" : "invalid" ) if $verbose > 0;
+ warn "Peer certificate: $strCertIssuerOwnerAttr" if $verbose > 0;
+ warn "Errors: $strError" if $verbose > 0;
+ #print Net::SSLeay::PEM_get_string_X509($cmemPeerCertificate);
+ push @certs, $strCertIssuerOwnerAttr . "\n" . Net::SSLeay::PEM_get_string_X509($cmemPeerCertificate);
+}
+
+package main;
+1;
+
+__END__
+
+
+=pod
+
+=head1 NAME
+
+imap_ssl_cert - connects to an IMAP server using SSL and saves the server certificate into a .pem file
+
+=head1 SYNOPSIS
+
+ imap_ssl_cert -H imap.server.com > server_ca_file.pem
+ imap_ssl_cert -?
+ imap_ssl_cert --help
+
+=head1 DEPENDENCIES
+
+This utility requires the following perl modules to be installed:
+
+Getopt::Long
+Mail::IMAPClient
+IO::Socket::SSL
+Net::SSLeay
+
+=head1 OPTIONS
+
+=over
+
+=item --timeout <seconds>
+
+Abort with critical status if it takes longer than <seconds> to connect to the IMAP server. Default is 60 seconds.
+The difference between timeout and critical is that, with the default settings, if it takes 45 seconds to
+connect to the server then the connection will succeed but the plugin will return CRITICAL because it took longer
+than 30 seconds.
+Also known as: -t <seconds>
+
+=item --hostname <server>
+
+Address or name of the IMAP server. Examples: mail.server.com, localhost, 192.168.1.100
+Also known as: -H <server>
+
+=item --port <number>
+
+Service port on the IMAP server. Default is 143. If you use SSL, default is 993.
+Also known as: -p <number>
+
+=item --verbose
+
+Display additional information. Useful for troubleshooting.
+
+Also known as: -v
+
+=item --version
+
+Display plugin version and exit.
+Also known as: -V
+
+=item --help
+
+Display this documentation and exit.
+Also known as: -h
+
+=item --usage
+
+Display a short usage instruction and exit.
+
+=back
+
+=head1 EXAMPLES
+
+=head2 Print the server's SSL certificate chain
+
+ $ perl imap_ssl_cert.pl -H imap.server.com > ca_file.pem
+ $ cat ca_file.pem
+
+ -----BEGIN CERTIFICATE-----
+ MIID1zCCAr+gAwIBAgIQPr3bVk0SkuXygjxgA7EVGDANBgkqhkiG9w0BAQUFADA8
+ [...snip...]
+ 0FF4warjskrfqaVtWeIV58LJheaM4cPJkc2M
+ -----END CERTIFICATE-----
+
+ $ openssl x509 -in ca_file.pem -text
+
+
+=head1 SEE ALSO
+
+http://en.wikipedia.org/wiki/X.509
+http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail
+http://tools.ietf.org/html/rfc1422
+http://search.cpan.org/~mikem/Net-SSLeay-1.42/lib/Net/SSLeay.pm
+http://search.cpan.org/~plobbes/Mail-IMAPClient-3.29/lib/Mail/IMAPClient.pod
+
+=head1 CHANGES
+
+ Fri Nov 11 03:38:13 AST 2011
+ + version 0.1
+
+=head1 AUTHOR
+
+Jonathan Buhacoff <jonathan@buhacoff.net>
+
+=head1 COPYRIGHT AND LICENSE
+
+ Copyright (C) 2011 Jonathan Buhacoff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ http://www.gnu.org/licenses/gpl.txt
+
+=cut
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/imap_ssl_cert_epn b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/imap_ssl_cert_epn
new file mode 100644
index 0000000..dce2f32
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/imap_ssl_cert_epn
@@ -0,0 +1,114 @@
+#!/usr/bin/perl
+use strict;
+my $VERSION = '0.1';
+my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
+my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt';
+my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 );
+
+use Getopt::Long;
+use Mail::IMAPClient;
+use IO::Socket::SSL;
+use Net::SSLeay;
+
+# get options from command line
+Getopt::Long::Configure("bundling");
+my $verbose = 0;
+my $help = "";
+my $help_usage = "";
+my $show_version = "";
+my $imap_server = "";
+my $default_imap_port = "143";
+my $default_imap_ssl_port = "993";
+my $imap_port = "";
+my $timeout = 60;
+my $ok;
+$ok = Getopt::Long::GetOptions(
+ "V|version"=>\$show_version,
+ "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage,
+ # imap settings
+ "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port,
+ # time
+ "t|timeout=i"=>\$timeout
+ );
+
+if( $show_version ) {
+ print "$VERSION\n";
+ exit $status{UNKNOWN};
+}
+
+if( $help ) {
+ exec "perldoc", $0 or print "Try `perldoc $0`\n";
+ exit $status{UNKNOWN};
+}
+
+if( $help_usage
+ ||
+ ( $imap_server eq "" )
+ ) {
+ print "Usage: $0 -H host [-p port]\n";
+ exit $status{UNKNOWN};
+}
+
+my @certs = (); # we have to store the certs we get Net::SSLeay here so that we can output them in REVERSE order (server cert first, root cert last)
+
+# connect to IMAP server
+print "connecting to server $imap_server\n" if $verbose > 2;
+my $imap;
+eval {
+ local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
+ alarm $timeout;
+
+ $imap_port = $default_imap_ssl_port unless $imap_port;
+ my $socket = IO::Socket::SSL->new(
+ PeerAddr => "$imap_server:$imap_port",
+ SSL_verify_mode => 1,
+ SSL_ca_file => undef,
+ SSL_verifycn_scheme => 'imap',
+ SSL_verifycn_name => $imap_server,
+ SSL_verify_callback => \&ssl_printer
+ );
+ die IO::Socket::SSL::errstr() unless $socket;
+ $socket->autoflush(1);
+ $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 );
+ $imap->State(Mail::IMAPClient->Connected);
+ $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works
+# $imap->User($username);
+# $imap->Password($password);
+# $imap->login() or die "Cannot login: $@";
+
+ print join("\n",reverse(@certs));
+ alarm 0;
+};
+if( $@ ) {
+ chomp $@;
+ print "Could not connect to $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+unless( $imap ) {
+ print "Could not connect to $imap_server port $imap_port: $@\n";
+ exit $status{CRITICAL};
+}
+
+# deselect the mailbox
+$imap->close();
+
+# disconnect from IMAP server
+print "disconnecting from server\n" if $verbose > 2;
+$imap->logout();
+
+
+exit $status{OK};
+
+# see IO::Socket::SSL documentation for SSL_verify_callback:
+sub ssl_printer {
+ my ($boolOpenSSLResult, $cmemCertificateStore, $strCertIssuerOwnerAttr, $strError, $cmemPeerCertificate) = @_;
+ warn "OpenSSL says certificate is " . ( $boolOpenSSLResult ? "valid" : "invalid" ) if $verbose > 0;
+ warn "Peer certificate: $strCertIssuerOwnerAttr" if $verbose > 0;
+ warn "Errors: $strError" if $verbose > 0;
+ #print Net::SSLeay::PEM_get_string_X509($cmemPeerCertificate);
+ push @certs, $strCertIssuerOwnerAttr . "\n" . Net::SSLeay::PEM_get_string_X509($cmemPeerCertificate);
+}
+
+package main;
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/nagios-plugins-check_email_delivery.spec b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/nagios-plugins-check_email_delivery.spec
new file mode 100644
index 0000000..7af2882
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/check_email_delivery-0.7.1b/nagios-plugins-check_email_delivery.spec
@@ -0,0 +1,63 @@
+Summary: A Nagios plugin to check IMAP delivery times
+#Name: check_email_delivery
+Name: nagios-plugins-check_email_delivery
+Version: 0.7.1a
+Release: 0.2%{?dist}
+License: GPLv2
+Group: Applications/System
+URL: http://buhacoff.net/software/check_email_delivery/
+Source0: http://buhacoff.net/software/check_email_delivery/archive/check_email_delivery-%{version}.tar.gz
+#http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=1339&cf_id=30
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+# For handling --help options
+Requires: /usr/bin/nroff
+
+%description
+The Nagios email delivery plugin uses two other plugins
+(smtp send and imap receive), also included, to send a message
+to an email account and then check that account for the message
+and delete it. The plugin times how long it takes for the
+message to be delivered and the warning and critical thresholds
+are for this elapsed time.
+
+%prep
+#%setup -q
+%setup -n check_email_delivery-%{version}
+
+# Avoid filenames with unnecessary punction in them
+%{__mv} "./docs/check_smtp_send (Greek's conflicted copy 2011-08-24).pod" \
+ ./docs/check_smtp_send-Greeks-conflicted-copy-2011-08-24.pod
+%{__mv} "docs/How to connect to IMAP server manually.txt" \
+ docs/How-to-connect-to-IMAP-server-manually.txt
+
+%build
+# No build required, just drop in place
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__install} -d -m0755 %{buildroot}%{_libdir}/nagios/plugins
+
+# No instlalation procedure, install manually
+%{__install} -m0755 -m0755 check_* %{buildroot}%{_libdir}/nagios/plugins
+%{__install} -m0755 -m0755 imap_* %{buildroot}%{_libdir}/nagios/plugins
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-, root, root, 0755)
+%{_libdir}/nagios/plugins/check_*
+%{_libdir}/nagios/plugins/imap_*
+%doc CHANGES.txt LICENSE.txt README.txt
+%doc docs/*
+
+%changelog
+* Sun Feb 5 2012 Nico Kadel-Garcia <nkadel@nkadel-sl6.localdomain> - 0.68-0.1
+- Update to 0.7.1a
+- Add nroff dependency for --help options
+
+* Thu Nov 3 2011 Nico Kadel-Garcia <nkadel@nkadel-sl6.localdomain> - 0.68-0.1
+- Initial build.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/control
new file mode 100644
index 0000000..0976284
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/control
@@ -0,0 +1,15 @@
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Recommends: libio-socket-ssl-perl, libmail-imapclient-perl, libnet-smtp-tls-perl, libnet-smtp-ssl-perl, libnet-ssleay-perl, libnet-smtpauth-perl
+Suggests: perl-doc
+Version: 0.7.1b
+Homepage: http://buhacoff.net/software/check_email_delivery/
+Watch: http://buhacoff.net/software/check_email_delivery/ archive/check_email_delivery-(\S+)\.tar\.gz
+Description: plugin to monitor email delivery
+ Some typical uses of this plugin include:
+ - check SMTP server
+ - check messages and quota on IMAP server
+ - check email delivery loop
+ - check auto-responder function
+ - keep an eye on email lag
+ - monitor automated mailboxes
+ - check email-to-FTP or other special email gateways
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/copyright
new file mode 100644
index 0000000..bc4614a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/copyright
@@ -0,0 +1,15 @@
+Copyright (C) 2005-2011 Jonathan Buhacoff
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/email_delivery.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/email_delivery.cfg
new file mode 100644
index 0000000..1c067bd
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/email_delivery.cfg
@@ -0,0 +1,4 @@
+define command{
+ command_name check_email_delivery
+ command_line /usr/lib/nagios/plugins/check_email_delivery -p '$USER1$/check_smtp_send -H $HOSTADDRESS$ --mailfrom $ARG3$ --mailto $ARG4$ -U $ARG5$ -P $ARG6$ --header "Subject: Nagios %TOKEN1%" -w $ARG1$ -c $ARG2$' -p '$USER1$/check_imap_receive -H $HOSTADDRESS$ -U $ARG5$ -P $ARG6$ -s SUBJECT -s "Nagios %TOKEN1%" -w $ARG1$ -c $ARG2$' -w $ARG1$,$ARG1$ -c $ARG2$,$ARG2$
+ }
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/src b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/src
new file mode 120000
index 0000000..3df4986
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_email_delivery/src
@@ -0,0 +1 @@
+check_email_delivery-0.7.1b \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/Makefile
new file mode 100644
index 0000000..05be571
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/Makefile
@@ -0,0 +1,5 @@
+#/usr/bin/make -f
+
+PLUGIN = check_etc_hosts
+
+include ../common.mk
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/check_etc_hosts b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/check_etc_hosts
new file mode 100755
index 0000000..e804131
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/check_etc_hosts
@@ -0,0 +1,249 @@
+#!/usr/bin/perl -w
+#
+# Author: Petter Reinholdtsen <pere@hungry.com>
+# Date: 2002-07-08
+#
+# Check /etc/hosts, and make sure the content matches the information
+# in DNS. Lookup IP, and check if the names listed in /etc/hosts
+# maches the one in DNS. It will ignore entries with '# NAGIOSIGNORE'
+# at the end.
+
+use vars qw($use_perl_resolver $debug $returnvalue $nagiosmsg);
+
+$debug = 0;
+$returnvalue = 0; # all ok
+$nagiosmsg = "";
+
+# Report missing reverse lookup. This will ignore CNAME entries
+# pointing to the IP address, and report error in these cases.
+$use_reverse = 0;
+
+# Report missing forward-lookup. This will complain on private
+# network IP addresses using the same name as a DNS entry.
+$use_forward = 1;
+
+eval 'use Net::DNS;';
+if ($@) {
+ print "Using /etc/hosts\n" if $debug;
+ $use_perl_resolver = 0;
+} else {
+ print "Using Net::DNS\n" if $debug;
+ $use_perl_resolver = 1;
+}
+
+$host = '/usr/bin/host';
+
+# Look up ip address, and return ($error status, @DNS names, @DNS addresses)
+sub dns_lookup_ext {
+ local $address = shift;
+
+ # Stupid Tru64 Unix give me two copies of the error messages from
+ # host. Throw away one of them.
+ close(STDERR);
+
+ print "Looking up $address using $host\n" if $debug;
+
+ my @names = ();
+ my @addresses = ();
+
+ my $lookup = "";
+ # Some versions need -i to make sure it uses reverse DNS lookup,
+ # and not /etc/hosts.
+ # This option will confuse 'host' on Irix and HP/UX, and make the
+ # program loop forever. Avoiding it for now [pere 2002-08-06]
+ for $options ("") {
+ open(HOST, "$host $options $address 2>&1 |")
+ || die "Unable to execute host";
+ while (<HOST>) {
+ $lookup .= $_;
+ chomp;
+ print "host: $_\n" if $debug;
+
+ push(@names, lc($1)) if (/^Name: (.+)$/);
+ push(@names, lc($1)) if (/^Aliases: (.+)$/);
+
+ # 10.6.240.129.in-addr.arpa PTR perleporten.uio.no
+ push(@names, lc($1)) if (/\s+PTR\s+(.+)$/);
+
+ # spheniscus.uio.no has address 129.240.148.19
+ if (/^\S+ has address (\S+)$/) {
+ print "Match addr $1\n" if $debug;
+ push(@addresses, lc($1))
+ }
+
+ # 10.6.240.129.IN-ADDR.ARPA domain name pointer perleporten.uio.no
+ if (/IN-ADDR.ARPA domain name pointer\s+(.+)$/) {
+ print "Match name $1\n" if $debug;
+ push(@names, lc($1))
+ }
+
+ push(@addresses, $1) if (/^Address: (.+)$/);
+ push(@addresses, $1) if (/\s+A\s+(\d+.+)$/)
+ }
+ close(HOST);
+ if ($lookup =~ /Usage: /) {
+ # Probably unknown parameter, try again without -i
+ $lookup = "";
+ } else {
+ last;
+ }
+ }
+ return ("no/bad reply from DNS server", undef, undef)
+ if ($lookup !~ /domain name pointer/
+ && $lookup !~ /\shas address\s/
+ && $lookup !~ /\sPTR\s/
+ && $lookup !~ /Name:/);
+
+ if ( $address =~ m/^\d+\.\d+\.\d+\.\d+/
+ && ! grep /$address/, @addresses ) {
+ print "Adding $address to list of addresses\n" if $debug;
+ unshift(@addresses, $address) ;
+ }
+
+ return (undef, \@names, \@addresses);
+}
+
+sub dns_lookup_int {
+ my $address = shift;
+
+ print "Looking up $address using Net::DNS\n" if $debug;
+
+ my @names = ();
+ my @addresses = ();
+
+ my $res = new Net::DNS::Resolver;
+ my $query;
+ if ($address =~ m/\d+\.\d+\.\d+\.\d+/) {
+ $query = $res->query($address);
+ } else {
+ $query = $res->search($address);
+ }
+ if ($query) {
+ foreach $rr ($query->answer) {
+ print "Type: $rr->type\n" if $debug;
+ if ($rr->type eq "A") {
+ print $rr->address, " - A\n" if $debug;
+ push(@addresses, $rr->address);
+ }
+ if ($rr->type eq "CNAME") {
+ print $rr->cname, " - CNAME\n" if $debug;
+ push(@addresses, $rr->cname);
+ }
+ if ($rr->type eq "PTR") {
+ print $rr->ptrdname, " - PTR\n" if $debug;
+ push(@names, lc($rr->ptrdname));
+ }
+ }
+ return (undef, \@names, \@addresses);
+ }
+ else {
+ print "query failed: ", $res->errorstring, "\n" if $debug;
+ return ($res->errorstring, (), ());
+ }
+}
+
+sub dns_lookup {
+ my $entry = shift;
+
+ if ($use_perl_resolver) {
+ return dns_lookup_int($entry);
+ } else {
+ return dns_lookup_ext($entry);
+ }
+}
+
+sub error {
+ local ($level, $error) = @_;
+
+ $returnvalue = 1 if ($level =~ /^W$/ && $returnvalue <= 1);
+ $returnvalue = 2 if ($level =~ /^C$/);
+
+ $nagiosmsg = $nagiosmsg . "<br>" unless ($nagiosmsg =~ /^$/);
+ $nagiosmsg = $nagiosmsg . "$error";
+}
+
+sub is_ip_private {
+ my $ip = shift;
+
+ return 1 if ($ip =~ m/^10\./);
+ return 1 if ($ip =~ m/^192\.168\./);
+
+ return 0;
+}
+
+sub is_names_ip_matching {
+ local ($ip, @names) = @_;
+
+ my $level = "W";
+
+ # Ignore IPv6 addresses for now.
+ return if ($ip =~ m/:/);
+
+ # Ignore private network
+ return if (is_ip_private($ip));
+
+ my $name;
+ for $name (sort @names) {
+ if ($use_reverse) {
+ # Check reverse
+ my ($retval, $revnames) = dns_lookup($ip);
+
+ return if ( $retval ); # Ignore unknown IP addresses
+
+ if ( ! $retval && ! grep /$name/, @{$revnames} ) {
+ error $level, "Incorrect /etc/hosts for $ip: ".
+ "$name not in reverse DNS list";
+ }
+ }
+
+ if ($use_forward) {
+ # Check forward
+ my ($retval, $revnames, $forwip);
+
+ ($retval, $revnames) = dns_lookup($ip);
+ ($retval, undef, $forwip) = dns_lookup($name);
+
+ print "Forward DNS $name/$ip: ", join(" ", @{$forwip}), "\n"
+ if $debug;
+
+ # Ignore entry if both IP and hostname fail to resolve in DNS
+ return if ( ! defined $revnames && ! defined $forwip );
+
+ if ( ! grep /$ip/, @{$forwip} ) {
+ error $level, "Incorrect /etc/hosts for $ip: ".
+ "IP not in forward DNS list for '$name'";
+ }
+ }
+ }
+}
+
+sub check_etc_hosts {
+ open(HOSTS, "< /etc/hosts") || die "Unable to open /etc/hosts";
+ while (<HOSTS>) {
+ chomp;
+ next if (/# NAGIOSIGNORE$/); # Skip lines marked to be ignored
+ s/\#.+//; # Skip comments
+ next if (/^\s*$/); # Skip empty lines
+
+ print "Testing $_\n" if $debug;
+
+ $_ = lc($_);
+
+ local ($ip, @names) = split(/\s+/);
+
+ # Skip localhost, it is different on some platforms.
+ next if ($ip eq '127.0.0.1');
+
+ is_names_ip_matching($ip, @names);
+ }
+ close(HOSTS);
+}
+
+check_etc_hosts() if ( -f "/etc/hosts" );
+
+if ($nagiosmsg =~ /^$/) {
+ print "/etc/hosts OK\n";
+} else {
+ print $nagiosmsg . "\n";
+}
+exit $returnvalue;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/control
new file mode 100644
index 0000000..313dffc
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/control
@@ -0,0 +1,8 @@
+Uploaders: Petter Reinholdtsen <pere@hungry.com>
+Description: plugin to check /etc/hosts for DNS consistency
+ Check /etc/hosts, and make sure the content matches the information
+ in DNS. Lookup IP, and check if the names listed in /etc/hosts
+ maches the one in DNS. It will ignore entries with '# NAGIOSIGNORE'
+ at the end.
+Recommends: libnet-dns-perl
+Version: ?
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/copyright
new file mode 100644
index 0000000..49c53a6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/copyright
@@ -0,0 +1,14 @@
+Copyright (C) 2002 Petter Reinholdtsen <pere@hungry.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, see <http://www.gnu.org/licenses/>.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/tests b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/tests
new file mode 100644
index 0000000..026679d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_hosts/tests
@@ -0,0 +1,3 @@
+Depends: libnet-dns-perl
+Test-Command: echo "127.0.0.1 localhost" > /etc/hosts && /usr/lib/nagios/plugins/check_etc_hosts
+Restrictions: needs-root, breaks-testbed
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/Makefile
new file mode 100644
index 0000000..cac655c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/Makefile
@@ -0,0 +1,5 @@
+#/usr/bin/make -f
+
+PLUGIN = check_etc_resolv
+
+include ../common.mk
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/check_etc_resolv b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/check_etc_resolv
new file mode 100755
index 0000000..e94b72e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/check_etc_resolv
@@ -0,0 +1,139 @@
+#!/usr/bin/perl -w
+#
+# Author: Petter Reinholdtsen <pere@hungry.com>
+# Date: 2001-11-09
+#
+# Check /etc/resolv.conf, and make sure the name servers listed are
+# working. It will ignore entries with '# NAGIOSIGNORE' at the end.
+
+use Socket;
+
+use vars qw($host $debug $mincount $trycount $testhost $retval $nagiosmsg);
+
+$retval = 0;
+$nagiosmsg = "";
+
+$host = '/usr/bin/host';
+
+$debug = 0;
+
+# There should be at least this many servers in the list
+$mincount = 1;
+
+# Try to call host this many times before reporting any bugs
+$trycount = 3;
+
+# Which DNS name to look up
+$testhost = "www.uio.no";
+
+# Stolen from Logwatch.pm
+sub canonical_ipv6_address {
+ my @a = split /:/, shift;
+ my @b = qw(0 0 0 0 0 0 0 0);
+ my $i = 0;
+ # comparison is numeric, so we use hex function
+ while (defined $a[0] and $a[0] ne '') {$b[$i++] = hex(shift @a);}
+ @a = reverse @a;
+ $i = 7;
+ while (defined $a[0] and $a[0] ne '') {$b[$i--] = hex(shift @a);}
+ @b;
+}
+
+sub error_with_dns {
+ local ($count, $ip, $error) = @_;
+
+ # Count 1 = Error
+ # Count 2 = Problem
+ # Count 3-> = Warning
+ if (1 == $count) {
+ $retval = 2;
+ } elsif (2 == $count) {
+ $retval = 1 unless ($retval > 0);
+ }
+
+ $nagiosmsg .= "<br>" unless ($nagiosmsg =~ /^$/);
+ $nagiosmsg .= "/etc/resolv.conf: nameserver #$count $ip: $error";
+}
+
+# Check if there is a DNS server running on the given IP address
+sub test_dns_server {
+ local ($ip) = @_;
+ local ($name) = "";
+
+ print "Checking $1\n" if $debug;
+
+ # there are other module functions that do this more gracefully
+ # (such as inet_pton), but we can't guarantee that they are available
+ # in every system, so we use the built-in gethostbyaddr.
+ if ($ip =~ /^[\d\.]*$/) {
+ $PackedAddr = pack('C4', split /\./,$ip);
+ $name = gethostbyaddr($PackedAddr,AF_INET());
+ } elsif ($ip =~ /^[0-9a-zA-Z:]*/) {
+ $PackedAddr = pack('n8', canonical_ipv6_address($ip));
+ $name = gethostbyaddr($PackedAddr, AF_INET6());
+ }
+
+ return "missing in DNS" if ( ! defined $name );
+
+ my $try = $trycount;
+ my $delay = 1; # Exponensial backoff
+ for ($try = $trycount; $try; --$try) {
+ print "Running '$host $testhost $ip 2>/dev/null'\n" if $debug;
+ local $lookup = `$host $testhost $ip 2>/dev/null`;
+
+ print "Reply from host (try=$try):\n $lookup\n" if $debug;
+
+ if ($lookup =~ /\sA\s+\d/ || $lookup =~ /has address/ ||
+ $lookup =~ /domain name pointer/ || $lookup =~ /Name: /) {
+ return undef; # true
+ }
+ print "Sleeping $delay\n" if $debug;
+ sleep $delay;
+ $delay += $delay;
+ }
+
+ return "no/bad reply from DNS server";
+}
+
+sub check_etc_resolv_conf {
+ open(RESOLV, "< /etc/resolv.conf") || die "Unable to open /etc/resolv.conf";
+ local $count = 0;
+ while (<RESOLV>) {
+ chomp;
+ if (/# NAGIOSIGNORE$/) { # Skip lines marked to be ignored
+ $count++ if (m/^nameserver\s+/); # Count ignored nameservers
+ next;
+ }
+ s/\#.+//; # Skip comments
+ next if (/^\s*$/); # Skip empty lines
+ if (/^nameserver\s+(\S+)/) {
+ $count++;
+ local ($error) = test_dns_server($1);
+ if ( defined $error ) {
+ error_with_dns($count, $1, $error);
+ }
+ }
+ }
+ close(RESOLV);
+
+ if ($count < $mincount) {
+ $retval = 1 unless $retval > 0;
+ $nagiosmsg .= "<br>" unless ($nagiosmsg =~ /^$/);
+ $nagiosmsg .= "/etc/resolv.conf: Only $count nameservers in " .
+ "/etc/resolv.conf (low-limit is $mincount)";
+ }
+}
+
+check_etc_resolv_conf() if ( -f "/etc/resolv.conf" && -x $host );
+
+unless ( -x $host ) {
+ $nagiosmsg .= "$host is missing or not executable, please fix..";
+ $retval = 1;
+}
+
+if ($nagiosmsg =~ /^$/) {
+ print "/etc/resolv.conf OK\n";
+} else {
+ print $nagiosmsg . "\n";
+}
+exit $retval;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/control
new file mode 100644
index 0000000..8f4a735
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/control
@@ -0,0 +1,5 @@
+Uploaders: Petter Reinholdtsen <pere@hungry.com>
+Description: plugin to check /etc/resolv.conf
+ Check /etc/resolv.conf, and make sure the name servers listed are
+ working. It will ignore entries with '# NAGIOSIGNORE' at the end.
+Recommends: bind9-host | knot-host
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/copyright
new file mode 100644
index 0000000..ed4b2a9
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/copyright
@@ -0,0 +1,14 @@
+Copyright (C) 2001 Petter Reinholdtsen <pere@hungry.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, see <http://www.gnu.org/licenses/>.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/tests b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/tests
new file mode 100644
index 0000000..1349860
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_etc_resolv/tests
@@ -0,0 +1,2 @@
+Test-Command: /usr/lib/nagios/plugins/check_etc_resolv
+Depends: bind9-host | knot-host
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/Makefile
new file mode 100644
index 0000000..7ae74f4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/Makefile
@@ -0,0 +1,10 @@
+PLUGIN := check_graphite
+CLEANFILES := check_graphite
+DOCFILES := README.md
+
+include ../common.mk
+
+check_graphite:
+ cp $@.py $@
+ chmod 755 $@
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/README.md b/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/README.md
new file mode 100644
index 0000000..0d86ab9
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/README.md
@@ -0,0 +1,34 @@
+# Disqus Nagios plugins
+
+This is a collection of Nagios plugins written at Disqus.
+
+## Scripts
+
+* check_graphite.py
+
+## check_graphite.py
+
+ % ./check_graphite.py -h
+ Usage: check_graphite.py [options]
+
+ Options:
+ -h, --help show this help message and exit
+ -U URL, --graphite-url=URL
+ Graphite URL [http://localhost/]
+ -t TARGET, --target=TARGET
+ Target to check
+ --compare=SERIES Compare TARGET against SERIES
+ --from=_FROM From timestamp/date
+ --until=_UNTIL Until timestamp/date [now]
+ -c COUNT, --count=COUNT
+ Alert on at least COUNT metrics [0]
+ --percentile=PERCENT Use nPercentile Graphite function on the target
+ (returns one datapoint)
+ --confidence Use holtWintersConfidenceBands Graphite function on
+ the target
+ --over Over specified WARNING or CRITICAL threshold [True]
+ --under Under specified WARNING or CRITICAL threshold [False]
+ -W VALUE Warning if datapoints beyond VALUE
+ -C VALUE Critical if datapoints beyond VALUE
+
+Mandatory arguments: -U, [-t|--target], --from
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/check_graphite.py b/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/check_graphite.py
new file mode 100755
index 0000000..bedb7c1
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/check_graphite.py
@@ -0,0 +1,286 @@
+#!/usr/bin/env python
+"""
+check_graphite.py
+~~~~~~~
+
+:copyright: (c) 2012 DISQUS.
+:license: Apache License 2.0, see LICENSE for more details.
+"""
+
+import json
+import optparse
+import urllib
+import urllib2
+import sys
+
+from numbers import Real
+
+NAGIOS_STATUSES = {
+ 'OK': 0,
+ 'WARNING': 1,
+ 'CRITICAL': 2,
+ 'UNKNOWN': 3
+}
+
+class Graphite(object):
+
+ def __init__(self, url, targets, _from, _until):
+ self.url = url.rstrip('/')
+ self.targets = targets
+ self._from = _from
+ self._until = _until
+ params = [('target', t) for t in self.targets] +\
+ [('from', self._from)] +\
+ [('until', self._until)] +\
+ [('format', 'json')]
+ self.full_url = self.url + '/render?' +\
+ urllib.urlencode(params)
+
+ def check_datapoints(self, datapoints, check_func, **kwargs):
+ """Find alerting datapoints
+
+ Args:
+ datapoints (list): The list of datapoints to check
+
+ Kwargs:
+ check_func (function): The function to find out of bounds datapoints
+ bounds (list): Compare against `datapoints` to find out of bounds list
+ compare (list): Used for comparison if `datapoints` is out of bounds
+ threshold (float): `check_func` is called for each datapoint against `threshold`
+ beyond (float): Return datapoint if `beyond` value in bounds list (percentage).
+
+ Returns:
+ The list of out of bounds datapoints
+ """
+ if 'threshold' in kwargs:
+ return [x for x in datapoints if isinstance(x, Real) and check_func(x, kwargs['threshold'])]
+ elif 'bounds' in kwargs:
+ if 'compare' in kwargs:
+ return [datapoints[x] for x in xrange(len(datapoints)) if all([datapoints[x], kwargs['bounds'][x], kwargs['compare'][x]]) and check_func(datapoints[x] / kwargs['bounds'][x], kwargs['beyond']) and check_func(datapoints[x], kwargs['compare'][x])]
+ else:
+ return [datapoints[x] for x in xrange(len(datapoints)) if all([datapoints[x], kwargs['bounds'][x]]) and check_func(datapoints[x], kwargs['bounds'][x])]
+
+ def fetch_metrics(self):
+ try:
+ response = urllib2.urlopen(self.full_url)
+
+ if response.code != 200:
+ return None
+ else:
+ return json.loads(response.read())
+ except urllib2.URLError, TypeError:
+ return None
+
+ def generate_output(self, datapoints, *args, **kwargs):
+ """Generate check output
+
+ Args:
+ datapoints (list): The list of datapoints to check
+ warn_oob (list): Optional list of datapoints considered in warning state
+ crit_oob (list): Mandatory list of datapoints considered in warning state
+
+ Kwargs:
+ count (int): Number of metrics that would generate an alert
+ warning (float): The check's warning threshold
+ critical (float): The check's critical threshold
+ target (str): The target for `datapoints`
+
+ Returns:
+ A dictionary of datapoints grouped by their status ('CRITICAL', 'WARNING', 'OK')
+ """
+ check_output = dict(OK=[], WARNING=[], CRITICAL=[])
+ count = kwargs['count']
+ warning = kwargs.get('warning', 0)
+ critical = kwargs.get('critical', 0)
+ target = kwargs.get('target', 'timeseries')
+
+ if len(args) > 1:
+ (warn_oob, crit_oob) = args
+ else:
+ crit_oob = [x for x in args[0] if isinstance(x, Real)]
+ warn_oob = []
+
+ if self.has_numbers(crit_oob) and len(crit_oob) >= count:
+ check_output['CRITICAL'].append('%s [crit=%f|datapoints=%s]' %\
+ (target, critical, ','.join(['%s' % str(x) for x in crit_oob])))
+ elif self.has_numbers(warn_oob) and len(warn_oob) >= count:
+ check_output['WARNING'].append('%s [warn=%f|datapoints=%s]' %\
+ (target, warning, ','.join(['%s' % str(x) for x in warn_oob])))
+ else:
+ check_output['OK'].append('%s [warn=%0.3f|crit=%f|datapoints=%s]' %\
+ (target, warning, critical, ','.join(['%s' % str(x) for x in datapoints])))
+
+ return check_output
+
+ def has_numbers(self, lst):
+ try:
+ return any([isinstance(x, Real) for x in lst])
+ except TypeError:
+ return False
+
+
+if __name__ == '__main__':
+ parser = optparse.OptionParser()
+ parser.add_option('-U', '--graphite-url', dest='graphite_url',
+ default='http://localhost/',
+ metavar='URL',
+ help='Graphite URL [%default]')
+ parser.add_option('-t', '--target', dest='target',
+ action='append',
+ help='Target to check')
+ parser.add_option('--compare', dest='compare',
+ metavar='SERIES',
+ help='Compare TARGET against SERIES')
+ parser.add_option('--from', dest='_from',
+ help='From timestamp/date')
+ parser.add_option('--until', dest='_until',
+ default='now',
+ help='Until timestamp/date [%default]')
+ parser.add_option('-c', '--count', dest='count',
+ default=0,
+ type='int',
+ help='Alert on at least COUNT metrics [%default]')
+ parser.add_option('--beyond', dest='beyond',
+ default=0.7,
+ type='float',
+ help='Alert if metric is PERCENTAGE beyond comparison value [%default]')
+ parser.add_option('--percentile', dest='percentile',
+ default=0,
+ type='int',
+ metavar='PERCENT',
+ help='Use nPercentile Graphite function on the target (returns one datapoint)')
+ parser.add_option('--empty-ok', dest='empty_ok',
+ default=False,
+ action='store_true',
+ help='Empty data from Graphite is OK')
+ parser.add_option('--confidence', dest='confidence_bands',
+ default=False,
+ action='store_true',
+ help='Use holtWintersConfidenceBands Graphite function on the target')
+ parser.add_option('--over', dest='over',
+ default=True,
+ action='store_true',
+ help='Over specified WARNING or CRITICAL threshold [%default]')
+ parser.add_option('--under', dest='under',
+ default=False,
+ action='store_true',
+ help='Under specified WARNING or CRITICAL threshold [%default]')
+ parser.add_option('-W', dest='warning',
+ type='float',
+ metavar='VALUE',
+ help='Warning if datapoints beyond VALUE')
+ parser.add_option('-C', dest='critical',
+ type='float',
+ metavar='VALUE',
+ help='Critical if datapoints beyond VALUE')
+
+ (options, args) = parser.parse_args()
+
+ if not all([getattr(options, option) for option in ('_from', 'target')]):
+ parser.print_help()
+ sys.exit(NAGIOS_STATUSES['UNKNOWN'])
+
+ real_from = options._from
+
+ if options.under:
+ check_func = lambda x, y: x < y
+ options.over = False
+ else:
+ check_func = lambda x, y: x > y
+
+ if options.confidence_bands:
+ targets = [options.target[0], 'holtWintersConfidenceBands(%s)' % options.target[0]]
+ check_threshold = None
+ from_slice = int(options._from) * -1
+ real_from = '-2w'
+
+ if options.compare:
+ targets.append(options.compare)
+ else:
+ if not all([getattr(options, option) for option in ('critical', 'warning')]):
+ parser.print_help()
+ sys.exit(NAGIOS_STATUSES['UNKNOWN'])
+
+ if options.percentile:
+ targets = ['nPercentile(%s, %d)' % (options.target[0], options.percentile)]
+ else:
+ targets = options.target
+
+ try:
+ warn = float(options.warning)
+ crit = float(options.critical)
+ except ValueError:
+ print 'ERROR: WARNING or CRITICAL threshold is not a number\n'
+ parser.print_help()
+ sys.exit(NAGIOS_STATUSES['UNKNOWN'])
+
+ check_output = {}
+ graphite = Graphite(options.graphite_url, targets, real_from, options._until)
+ metric_data = graphite.fetch_metrics()
+
+ if metric_data:
+ if options.confidence_bands:
+ actual = [x[0] for x in metric_data[0].get('datapoints', [])][from_slice:]
+ target_name = metric_data[0]['target']
+ kwargs = {}
+ kwargs['beyond'] = options.beyond
+
+ if options.over:
+ kwargs['bounds'] = [x[0] for x in metric_data[1].get('datapoints', [])][from_slice:]
+ elif options.under:
+ kwargs['bounds'] = [x[0] for x in metric_data[2].get('datapoints', [])][from_slice:]
+
+ if options.compare:
+ kwargs['compare'] = [x[0] for x in metric_data[3].get('datapoints', [])][from_slice:]
+
+ if not graphite.has_numbers(kwargs['compare']):
+ print 'CRITICAL: No compare target output from Graphite!'
+ sys.exit(NAGIOS_STATUSES['CRITICAL'])
+
+ if graphite.has_numbers(actual) and graphite.has_numbers(kwargs['bounds']):
+ points_oob = graphite.check_datapoints(actual, check_func, **kwargs)
+ check_output[target_name] = graphite.generate_output(actual,
+ points_oob,
+ count=options.count,
+ target=target_name)
+
+ else:
+ print 'CRITICAL: No output from Graphite for target(s): %s' % ', '.join(targets)
+ sys.exit(NAGIOS_STATUSES['CRITICAL'])
+ else:
+ for target in metric_data:
+ datapoints = [x[0] for x in target.get('datapoints', []) if isinstance(x[0], Real)]
+ if not graphite.has_numbers(datapoints) and not options.empty_ok:
+ print 'CRITICAL: No output from Graphite for target(s): %s' % ', '.join(targets)
+ sys.exit(NAGIOS_STATUSES['CRITICAL'])
+
+ crit_oob = graphite.check_datapoints(datapoints, check_func, threshold=crit)
+ warn_oob = graphite.check_datapoints(datapoints, check_func, threshold=warn)
+ check_output[target['target']] = graphite.generate_output(datapoints,
+ warn_oob,
+ crit_oob,
+ count=options.count,
+ target=target['target'],
+ warning=warn,
+ critical=crit)
+ else:
+ if options.empty_ok and isinstance(metric_data, list):
+ print 'OK: No output from Graphite for target(s): %s' % ', '.join(targets)
+ sys.exit(NAGIOS_STATUSES['OK'])
+
+ print 'CRITICAL: No output from Graphite for target(s): %s' % ', '.join(targets)
+ sys.exit(NAGIOS_STATUSES['CRITICAL'])
+
+ for target, messages in check_output.iteritems():
+ if messages['CRITICAL']:
+ exit_code = NAGIOS_STATUSES['CRITICAL']
+ elif messages['WARNING']:
+ exit_code = NAGIOS_STATUSES['WARNING']
+ else:
+ exit_code = NAGIOS_STATUSES['OK']
+
+ for status_code in ['CRITICAL', 'WARNING', 'OK']:
+ if messages[status_code]:
+ print '\n'.join(['%s: %s' % (status_code, status) for status in messages[status_code]])
+
+ sys.exit(exit_code)
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/control
new file mode 100644
index 0000000..f871084
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/control
@@ -0,0 +1,4 @@
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: Plugin to monitor graphite metrics
+Homepage: https://github.com/disqus/nagios-plugins
+Recommends: python
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/copyright
new file mode 100644
index 0000000..beddebf
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_graphite/copyright
@@ -0,0 +1,5 @@
+Copyright: (c) 2012 DISQUS.
+License: Apache License 2.0
+
+On Debian systems, a copy of the Apache License 2.0 can be found in
+/usr/share/common-licenses/Apache-2.0
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/Makefile
new file mode 100644
index 0000000..52de70c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/Makefile
@@ -0,0 +1,4 @@
+#/usr/bin/make -f
+
+include ../common.mk
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/check_haproxy b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/check_haproxy
new file mode 100644
index 0000000..1da4240
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/check_haproxy
@@ -0,0 +1,321 @@
+#!/usr/bin/perl -w
+#
+# Copyright (c) 2010 Stéphane Urbanovski <stephane.urbanovski@ac-nancy-metz.fr>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# you should have received a copy of the GNU General Public License
+# along with this program (or with Nagios); if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA
+#
+# $Id: $
+
+use strict; # should never be differently :-)
+use warnings;
+
+
+use Locale::gettext;
+use File::Basename; # get basename()
+
+use POSIX qw(setlocale);
+use Time::HiRes qw(time); # get microtime
+use POSIX qw(mktime);
+
+use Nagios::Plugin ;
+
+use LWP::UserAgent; # http client
+use HTTP::Request; # used by LWP::UserAgent
+use HTTP::Status; # to get http err msg
+
+
+use Data::Dumper;
+
+
+my $PROGNAME = basename($0);
+'$Revision: 1.0 $' =~ /^.*(\d+\.\d+) \$$/; # Use The Revision from RCS/CVS/SVN
+my $VERSION = $1;
+
+my $DEBUG = 0;
+my $TIMEOUT = 9;
+
+# i18n :
+setlocale(LC_MESSAGES, '');
+textdomain('nagios-plugins-perl');
+
+
+my $np = Nagios::Plugin->new(
+ version => $VERSION,
+ blurb => _gt('Plugin to check HAProxy stats url'),
+ usage => "Usage: %s [ -v|--verbose ] -u <url> [-t <timeout>] [-U <username>] [-P <password>] [ -c|--critical=<threshold> ] [ -w|--warning=<threshold> ]",
+ timeout => $TIMEOUT+1
+);
+$np->add_arg (
+ spec => 'debug|d',
+ help => _gt('Debug level'),
+ default => 0,
+);
+$np->add_arg (
+ spec => 'username|U=s',
+ help => _gt('Username for HTTP Auth'),
+ required => 0,
+);
+$np->add_arg (
+ spec => 'password|P=s',
+ help => _gt('Password for HTTP Auth'),
+ required => 0,
+);
+$np->add_arg (
+ spec => 'w=f',
+ help => _gt('Warning request time threshold (in seconds)'),
+ default => 2,
+ label => 'FLOAT'
+);
+$np->add_arg (
+ spec => 'c=f',
+ help => _gt('Critical request time threshold (in seconds)'),
+ default => 10,
+ label => 'FLOAT'
+);
+$np->add_arg (
+ spec => 'url|u=s',
+ help => _gt('URL of the HAProxy csv statistics page.'),
+ required => 1,
+);
+
+
+$np->getopts;
+
+$DEBUG = $np->opts->get('debug');
+my $verbose = $np->opts->get('verbose');
+my $username = $np->opts->get('username');
+my $password = $np->opts->get('password');
+
+# Thresholds :
+# time
+my $warn_t = $np->opts->get('w');
+my $crit_t = $np->opts->get('c');
+
+my $url = $np->opts->get('url');
+
+
+# Create a LWP user agent object:
+my $ua = new LWP::UserAgent(
+ 'env_proxy' => 0,
+ 'timeout' => $TIMEOUT,
+ );
+$ua->agent(basename($0));
+
+# Workaround for LWP bug :
+$ua->parse_head(0);
+
+if ( defined($ENV{'http_proxy'}) ) {
+ # Normal http proxy :
+ $ua->proxy(['http'], $ENV{'http_proxy'});
+ # Https must use Crypt::SSLeay https proxy (to use CONNECT method instead of GET)
+ $ENV{'HTTPS_PROXY'} = $ENV{'http_proxy'};
+}
+
+# Build and submit an http request :
+my $request = HTTP::Request->new('GET', $url);
+# Authenticate if username and password are supplied
+if ( defined($username) && defined($password) ) {
+ $request->authorization_basic($username, $password);
+}
+my $timer = time();
+my $http_response = $ua->request( $request );
+$timer = time()-$timer;
+
+
+
+my $status = $np->check_threshold(
+ 'check' => $timer,
+ 'warning' => $warn_t,
+ 'critical' => $crit_t,
+);
+
+$np->add_perfdata(
+ 'label' => 't',
+ 'value' => sprintf('%.6f',$timer),
+ 'min' => 0,
+ 'uom' => 's',
+ 'threshold' => $np->threshold()
+);
+
+if ( $status > OK ) {
+ $np->add_message($status, sprintf(_gt("Response time degraded: %.6fs !"),$timer) );
+}
+
+
+my $message = 'msg';
+
+
+if ( $http_response->is_error() ) {
+ my $err = $http_response->code." ".status_message($http_response->code)." (".$http_response->message.")";
+ $np->add_message(CRITICAL, _gt("HTTP error: ").$err );
+
+} elsif ( ! $http_response->is_success() ) {
+ my $err = $http_response->code." ".status_message($http_response->code)." (".$http_response->message.")";
+ $np->add_message(CRITICAL, _gt("Internal error: ").$err );
+}
+
+
+($status, $message) = $np->check_messages();
+
+if ( $http_response->is_success() ) {
+
+ # Get xml content ...
+ my $stats = $http_response->content;
+ if ($DEBUG) {
+ print "------------------===http output===------------------\n$stats\n-----------------------------------------------------\n";
+ print "t=".$timer."s\n";
+ };
+
+ my @fields = ();
+ my @rows = split(/\n/,$stats);
+ if ( $rows[0] =~ /#\ \w+/ ) {
+ $rows[0] =~ s/#\ //;
+ @fields = split(/\,/,$rows[0]);
+ } else {
+ $np->nagios_exit(UNKNOWN, _gt("Can't find csv header !") );
+ }
+
+ my %stats = ();
+ for ( my $y = 1; $y < $#rows; $y++ ) {
+ my @values = split(/\,/,$rows[$y]);
+ if ( !defined($stats{$values[0]}) ) {
+ $stats{$values[0]} = {};
+ }
+ if ( !defined($stats{$values[0]}{$values[1]}) ) {
+ $stats{$values[0]}{$values[1]} = {};
+ }
+ for ( my $x = 2,; $x <= $#values; $x++ ) {
+ # $stats{pxname}{svname}{valuename}
+ $stats{$values[0]}{$values[1]}{$fields[$x]} = $values[$x];
+ }
+ }
+# print Dumper(\%stats);
+ my %stats2 = ();
+ my $okMsg = '';
+ foreach my $pxname ( keys(%stats) ) {
+ $stats2{$pxname} = {
+ 'act' => 0,
+ 'acttot' => 0,
+ 'bck' => 0,
+ 'bcktot' => 0,
+ 'scur' => 0,
+ 'slim' => 0,
+ };
+ foreach my $svname ( keys(%{$stats{$pxname}}) ) {
+ if ( $stats{$pxname}{$svname}{'type'} eq '2' ) {
+ my $svstatus = $stats{$pxname}{$svname}{'status'} eq 'UP';
+ my $active = $stats{$pxname}{$svname}{'act'} eq '1';
+ my $activeDescr = $active ? _gt("Active service") :_gt("Backup service") ;
+ if ( $stats{$pxname}{$svname}{'status'} eq 'UP' ) {
+ logD( sprintf(_gt("%s '%s' is up on '%s' proxy."),$activeDescr,$svname,$pxname) );
+ } elsif ( $stats{$pxname}{$svname}{'status'} eq 'DOWN' ) {
+ $np->add_message(CRITICAL, sprintf(_gt("%s '%s' is DOWN on '%s' proxy !"),$activeDescr,$svname,$pxname) );
+ }
+ if ( $stats{$pxname}{$svname}{'act'} eq '1' ) {
+ $stats2{$pxname}{'acttot'}++;
+ $stats2{$pxname}{'act'} += $svstatus;
+
+ } elsif ($stats{$pxname}{$svname}{'bck'} eq '1') {
+ $stats2{$pxname}{'bcktot'}++;
+ $stats2{$pxname}{'bck'} += $svstatus;
+ }
+ $stats2{$pxname}{'scur'} += $stats{$pxname}{$svname}{'scur'};
+ logD( "Current sessions : ".$stats{$pxname}{$svname}{'scur'} );
+
+ } elsif ( $stats{$pxname}{$svname}{'type'} eq '0' ) {
+ $stats2{$pxname}{'slim'} = $stats{$pxname}{$svname}{'slim'};
+ }
+ }
+ if ( $stats2{$pxname}{'acttot'} > 0 ) {
+ $okMsg .= ' '.$pxname.' (Active: '.$stats2{$pxname}{'act'}.'/'.$stats2{$pxname}{'acttot'};
+ if ( $stats2{$pxname}{'bcktot'} > 0 ) {
+ $okMsg .= ' , Backup: '.$stats2{$pxname}{'bck'}.'/'.$stats2{$pxname}{'bcktot'};
+ }
+ $okMsg .= ')';
+ $np->add_perfdata(
+ 'label' => 'sess_'.$pxname,
+ 'value' => $stats2{$pxname}{'scur'},
+ 'min' => 0,
+ 'uom' => 'sessions',
+ 'max' => $stats2{$pxname}{'slim'},
+ );
+ }
+ }
+
+# print Dumper(\%stats2);
+ ($status, $message) = $np->check_messages('join' => ' ');
+
+ if ( $status == OK ) {
+ $message = $okMsg;
+
+ }
+
+}
+# if ( $verbose ) {
+# ($status, $message) = $np->check_messages('join' => '<br/>','join_all' => '<br/>');
+# } else {
+# ($status, $message) = $np->check_messages('join' => '<br/>');
+# }
+
+
+$np->nagios_exit($status, $message );
+
+
+sub logD {
+ print STDERR 'DEBUG: '.$_[0]."\n" if ($DEBUG);
+}
+sub logW {
+ print STDERR 'WARNING: '.$_[0]."\n" if ($DEBUG);
+}
+# Gettext wrapper
+sub _gt {
+ return gettext($_[0]);
+}
+
+
+__END__
+
+=head1 NAME
+
+This Nagios plugins check the statistics url provided by HAProxy (http://haproxy.1wt.eu/).
+
+
+=head1 NAGIOS CONGIGURATIONS
+
+In F<checkcommands.cfg> you have to add :
+
+ define command {
+ command_name check_haproxy
+ command_line $USER1$/check_haproxy.pl -u $ARG1$
+ }
+
+
+In F<services.cfg> you just have to add something like :
+
+ define service {
+ host_name haproxy.exemple.org
+ normal_check_interval 10
+ retry_check_interval 5
+ contact_groups linux-admins
+ service_description HAProxy
+ check_command check_haproxy!http://haproxy.exemple.org/haproxy?stats;csv
+ }
+
+=head1 AUTHOR
+
+Stéphane Urbanovski <stephane.urbanovski@ac-nancy-metz.fr>
+
+=cut \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/control
new file mode 100644
index 0000000..85fbbc5
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/control
@@ -0,0 +1,6 @@
+Homepage: http://cvs.orion.education.fr/viewvc/viewvc.cgi/nagios-plugins-perl/trunk/plugins/check_haproxy.pl?view=log
+Watch: http://cvs.orion.education.fr/viewvc/viewvc.cgi/nagios-plugins-perl/trunk/plugins/check_haproxy.pl?view=log <a name="(rev[^"]+)"></a>
+Recommends: liblocale-gettext-perl, liblwp-useragent-determined-perl, libmonitoring-plugin-perl | libnagios-plugin-perl
+Version: rev135
+Uploaders: Jan Wagner <waja@cyconet.org>
+Description: plugin to check the HAProxy statistics url
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/copyright
new file mode 100644
index 0000000..d48a8e3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/copyright
@@ -0,0 +1,8 @@
+2010 Stéphane Urbanovski <stephane.urbanovski@ac-nancy-metz.fr>
+
+License: GPL v2
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/haproxy.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/haproxy.cfg
new file mode 100644
index 0000000..ecf54b2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy/haproxy.cfg
@@ -0,0 +1,5 @@
+# 'check_haproxy' command definition
+define command{
+ command_name check_haproxy
+ command_line /usr/lib/nagios/plugins/check_haproxy -u '$ARG1$'
+ }
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/Makefile
new file mode 100644
index 0000000..c074838
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/Makefile
@@ -0,0 +1,12 @@
+#/usr/bin/make -f
+
+PLUGIN := check_haproxy_stats
+CLEANEXTRAFILES := $(PLUGIN)
+
+
+include ../common.mk
+
+check_haproxy_stats: check_haproxy_stats.pl
+ cp $< $@
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/check_haproxy_stats.pl b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/check_haproxy_stats.pl
new file mode 100644
index 0000000..9698f78
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/check_haproxy_stats.pl
@@ -0,0 +1,225 @@
+#!/usr/bin/env perl
+# vim: se et ts=4:
+
+#
+# Copyright (C) 2012, Giacomo Montagner <giacomo@entirelyunlike.net>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the same terms as Perl 5.10.1.
+# For more details, see http://dev.perl.org/licenses/artistic.html
+#
+# This program is distributed in the hope that it will be
+# useful, but without any warranty; without even the implied
+# warranty of merchantability or fitness for a particular purpose.
+#
+
+our $VERSION = "1.0.1";
+
+# CHANGELOG:
+# 1.0.0 - first release
+# 1.0.1 - fixed empty message if all proxies are OK
+#
+
+use strict;
+use warnings;
+use 5.010.001;
+use File::Basename qw/basename/;
+use IO::Socket::UNIX;
+use Getopt::Long;
+
+sub usage {
+ my $me = basename $0;
+ print <<EOU;
+NAME
+ $me - check haproxy stats for errors, using UNIX socket interface
+
+SYNOPSIS
+ $me [OPTIONS]
+
+DESCRIPTION
+ Get haproxy statistics via UNIX socket and parse information searching for errors.
+
+ OPTIONS
+ -c, --critical
+ Set critical threshold for sessions number (chacks current number of sessions
+ against session limit, if enforced) to the specified percentage.
+ If no session limit (slim) was specified for the given proxy, this option has
+ no effect.
+
+ -d, --dump
+ Just dump haproxy stats and exit;
+
+ -h, --help
+ Print this message.
+
+ -p, --proxy
+ Check only named proxies, not every one. Use comma to separate proxies
+ in list.
+
+ -s, --sock, --socket
+ Use named UNIX socket instead of default (/var/run/haproxy.sock)
+
+ -w, --warning
+ Set warning threshold for sessions number to the specified percentage (see -c)
+
+CHECKS AND OUTPUT
+ $me checks every proxy (or the named ones, if -p was given)
+ for status. It returns an error if any of the checked FRONTENDs is not OPEN,
+ any of the checked BACKENDs is not UP, or any of the checkes servers is not UP;
+ $me reports any problem it found.
+
+EXAMPLES
+ $me -s /var/spool/haproxy/sock
+ Use /var/spool/haproxy/sock to communicate with haproxy.
+
+ $me -p proxy1,proxy2 -w 60 -c 80
+ Check only proxies named "proxy1" and "proxy2", and set sessions number
+ thresholds to 60% and 80%.
+
+AUTHOR
+ Written by Giacomo Montagner
+
+REPORTING BUGS
+ Please report any bug to bugs\@entirelyunlike.net
+
+COPYRIGHT
+ Copyright (C) 2012 Giacomo Montagner <giacomo\@entirelyunlike.net>.
+ $me is distributed under GPL and the Artistic License 2.0
+
+SEE ALSO
+ Check out online haproxy documentation at <http://haproxy.1wt.eu/>
+
+EOU
+}
+
+my %check_statuses = (
+ UNK => "unknown",
+ INI => "initializing",
+ SOCKERR => "socket error",
+ L4OK => "layer 4 check OK",
+ L4CON => "connection error",
+ L4TMOUT => "layer 1-4 timeout",
+ L6OK => "layer 6 check OK",
+ L6TOUT => "layer 6 (SSL) timeout",
+ L6RSP => "layer 6 protocol error",
+ L7OK => "layer 7 check OK",
+ L7OKC => "layer 7 conditionally OK",
+ L7TOUT => "layer 7 (HTTP/SMTP) timeout",
+ L7RSP => "layer 7 protocol error",
+ L7STS => "layer 7 status error",
+);
+
+my @status_names = (qw/OK WARNING CRITICAL UNKNOWN/);
+
+# Defaults
+my $swarn = 80.0;
+my $scrit = 90.0;
+my $sock = "/var/run/haproxy.sock";
+my $dump;
+my $proxy;
+my $help;
+
+# Read command line
+Getopt::Long::Configure ("bundling");
+GetOptions (
+ "c|critical=i" => \$scrit,
+ "d|dump" => \$dump,
+ "h|help" => \$help,
+ "p|proxy=s" => \$proxy,
+ "s|sock|socket=s" => \$sock,
+ "w|warning=i" => \$swarn,
+);
+
+# Want help?
+if ($help) {
+ usage;
+ exit 3;
+}
+
+# Connect to haproxy socket and get stats
+my $haproxy = new IO::Socket::UNIX (
+ Peer => $sock,
+ Type => SOCK_STREAM,
+);
+die "Unable to connect to haproxy socket: $@" unless $haproxy;
+print $haproxy "show stat\n" or die "Print to socket failed: $!";
+
+# Dump stats and exit if requested
+if ($dump) {
+ while (<$haproxy>) {
+ print;
+ }
+ exit 0;
+}
+
+# Get labels from first output line and map them to their position in the line
+my $labels = <$haproxy>;
+chomp($labels);
+$labels =~ s/^# // or die "Data format not supported.";
+my @labels = split /,/, $labels;
+{
+ no strict "refs";
+ my $idx = 0;
+ map { $$_ = $idx++ } @labels;
+}
+
+# Variables I will use from here on:
+our $pxname;
+our $svname;
+our $status;
+
+my @proxies = split ',', $proxy if $proxy;
+my $exitcode = 0;
+my $msg;
+my $checked = 0;
+while (<$haproxy>) {
+ chomp;
+ next if /^[[:space:]]*$/;
+ my @data = split /,/, $_;
+ if (@proxies) { next unless grep {$data[$pxname] eq $_} @proxies; };
+
+ # Is session limit enforced?
+ our $slim;
+ if ($data[$slim]) {
+ # Check current session # against limit
+ our $scur;
+ my $sratio = $data[$scur]/$data[$slim];
+ if ($sratio >= $scrit || $sratio >= $swarn) {
+ $exitcode = $sratio >= $scrit ? 2 :
+ $exitcode < 2 ? 1 : $exitcode;
+ $msg .= sprintf "%s:%s sessions: %.2f%%; ", $data[$pxname], $data[$svname], $sratio;
+ }
+ }
+
+ # Check of BACKENDS
+ if ($data[$svname] eq 'BACKEND') {
+ if ($data[$status] ne 'UP') {
+ $msg .= sprintf "BACKEND: %s is %s; ", $data[$pxname], $data[$status];
+ $exitcode = 2;
+ }
+ # Check of FRONTENDS
+ } elsif ($data[$svname] eq 'FRONTEND') {
+ if ($data[$status] ne 'OPEN') {
+ $msg .= sprintf "FRONTEND: %s is %s; ", $data[$pxname], $data[$status];
+ $exitcode = 2;
+ }
+ # Check of servers
+ } else {
+ if ($data[$status] ne 'UP') {
+ next if $data[$status] eq 'no check'; # Ignore server if no check is configured to be run
+ $exitcode = 2;
+ our $check_status;
+ $msg .= sprintf "server: %s:%s is %s", $data[$pxname], $data[$svname], $data[$status];
+ $msg .= sprintf " (check status: %s)", $check_statuses{$data[$check_status]} if $check_statuses{$data[$check_status]};
+ $msg .= "; ";
+ }
+ }
+ ++$checked;
+}
+
+unless ($msg) {
+ $msg = @proxies ? sprintf("checked proxies: %s", join ', ', sort @proxies) : "checked $checked proxies.";
+}
+say "Check haproxy $status_names[$exitcode] - $msg";
+exit $exitcode;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/control
new file mode 100644
index 0000000..595d483
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/control
@@ -0,0 +1,7 @@
+Homepage: http://exchange.nagios.org/directory/Plugins/Clustering-and-High-2DAvailability/check_haproxy_stats-2Epl/details
+Watch: http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=4089&cf_id=24 VERSION = "([0-9.]+)"
+Version: 1.0.1
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: check haproxy via admin socket
+ Different from check_haproxy this plugin is able to check
+ haproxy via the unix admin socket.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/copyright
new file mode 100644
index 0000000..1efcc91
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_haproxy_stats/copyright
@@ -0,0 +1,13 @@
+Copyright (C) 2012, Giacomo Montagner <giacomo@entirelyunlike.net>
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl 5.10.1.
+For more details, see http://dev.perl.org/licenses/artistic.html
+
+This program is distributed in the hope that it will be
+useful, but without any warranty; without even the implied
+warranty of merchantability or fitness for a particular purpose.
+
+On Debian systems a copy of the Artistic license can be found
+in /usr/share/common-licenses/Artistic.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/Makefile
new file mode 100644
index 0000000..f961263
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/Makefile
@@ -0,0 +1,11 @@
+PLUGIN := check_hp_bladechassis
+MANPAGES := check_hp_bladechassis.8
+
+CLEANFILES := check_hp_bladechassis check_hp_bladechassis.8
+
+include ../common.mk
+
+
+check_hp_%: src/check_hp_%
+ cp $< $@
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/CHANGES b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/CHANGES
new file mode 100644
index 0000000..fa49813
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/CHANGES
@@ -0,0 +1,15 @@
+1.0.1 2010-01-22
+------------------
+
+* Ignore components that are absent, such as power supplies and
+ fans. If your chassis isn't fully stacked with blades, it may not be
+ fully stacked with power supplies and fans either.
+* Collect perl warnings and output them in a Nagios friendly way
+* Plugin version information is now available in the debug output
+* Manpage moved from section 3 to section 8
+* Plugin now installs in <libdir>/nagios, not <libdir>/nagios/contrib
+
+1.0.0 2009-08-04
+------------------
+
+* Initial release
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/COPYING b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/INSTALL b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/INSTALL
new file mode 100644
index 0000000..54c9078
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/INSTALL
@@ -0,0 +1,23 @@
+Automatic installation
+----------------------
+
+Run the script install.sh to install automatically. The install.sh
+script will ask where to install the files, unless given the '-q'
+option, which will install the files in the default location.
+
+
+Manual installation
+-------------------
+
+To install check_hp_bladechassis, copy the file check_hp_bladechassis to the
+Nagios plugin directory (usually /usr/lib/nagios/plugins):
+
+ cp check_hp_bladechassis /usr/lib/nagios/plugins
+
+To install the manual page:
+
+ cp check_hp_bladechassis.8 /usr/share/man/man8
+
+This is all.
+
+-trond
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/README b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/README
new file mode 100644
index 0000000..0e81b9f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/README
@@ -0,0 +1,16 @@
+Files in this directory:
+
+ check_hp_bladechassis - The plugin
+ check_hp_bladechassis.8 - Man page
+ check_hp_bladechassis.pod - POD (raw man page)
+ check_hp_bladechassis.php - PNP4Nagios template
+ COPYING - License information
+ INSTALL - Install HOWTO
+ CHANGES - Changelog
+ install.sh - Linux/UNIX install script
+ README - This file
+
+More information avilable online:
+
+ http://folk.uio.no/trondham/software/check_hp_bladechassis.html
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis
new file mode 100755
index 0000000..02e0d5a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis
@@ -0,0 +1,1004 @@
+#!/usr/bin/perl
+#
+# DESCRIPTION: Nagios plugin for checking the status of HP
+# blade chassis via SNMP.
+#
+# AUTHOR: Trond H. Amundsen <t.h.amundsen@usit.uio.no>
+#
+# $Id: check_hp_bladechassis 16304 2010-01-22 11:20:34Z trondham $
+#
+# Copyright (C) 2010 Trond H. Amundsen
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# HP ASN.1 prefix: 1.3.6.1.4.1.232
+
+use strict;
+use warnings;
+use POSIX qw(isatty);
+use Getopt::Long qw(:config no_ignore_case);
+
+# Global (package) variables used throughout the code
+use vars qw( $NAME $VERSION $AUTHOR $CONTACT $E_OK $E_WARNING $E_CRITICAL
+ $E_UNKNOWN $USAGE $HELP $LICENSE $original_sigwarn
+ $snmp_session $snmp_error $linebreak $exit_code
+ $count_ioms $count_blades $global $total_wattage
+ %opt %reverse_exitcode %status2nagios %snmp_status %sysinfo
+ %nagios_alert_count %present_map
+ @reports @perfdata @perl_warnings
+ );
+
+#---------------------------------------------------------------------
+# Initialization and global variables
+#---------------------------------------------------------------------
+
+# Small subroutine to collect any perl warnings during execution
+sub collect_perl_warning {
+ push @perl_warnings, [@_];
+}
+
+# Set the WARN signal to use our collect subroutine above
+$original_sigwarn = $SIG{__WARN__};
+$SIG{__WARN__} = \&collect_perl_warning;
+
+# Version and similar info
+$NAME = 'check_hp_bladechassis';
+$VERSION = '1.0.1';
+$AUTHOR = 'Trond H. Amundsen';
+$CONTACT = 't.h.amundsen@usit.uio.no';
+
+# Exit codes
+$E_OK = 0;
+$E_WARNING = 1;
+$E_CRITICAL = 2;
+$E_UNKNOWN = 3;
+
+# Usage text
+$USAGE = <<"END_USAGE";
+Usage: $NAME -H <HOSTNAME> [OPTION]...
+END_USAGE
+
+# Help text
+$HELP = <<'END_HELP';
+
+OPTIONS:
+ -H, --hostname Hostname or IP of the enclosure
+ -C, --community SNMP community string
+ -P, --protocol SNMP protocol version
+ --port SNMP port number
+ -p, --perfdata Output performance data
+ -t, --timeout Plugin timeout in seconds
+ -i, --info Prefix alerts with the enclosure's serial number
+ -v, --verbose Append extra info to alerts (part no. etc.)
+ -e, --extinfo Append system info to alerts
+ -s, --state Prefix alerts with alert state
+ --short-state Prefix alerts with alert state (abbreviated)
+ -d, --debug Debug output, reports everything
+ -h, --help Display this help text
+ -V, --version Display version info
+
+For more information and advanced options, see the manual page or URL:
+ http://folk.uio.no/trondham/software/check_hp_bladechassis.html
+END_HELP
+
+# Version text
+$LICENSE = <<"END_LICENSE";
+$NAME $VERSION
+Copyright (C) 2010 $AUTHOR
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Written by $AUTHOR <$CONTACT>
+END_LICENSE
+
+# Options with default values
+%opt
+ = (
+ 'port' => 161, # default SNMP port
+ 'hostname' => undef,
+ 'community' => 'public', # SMNP v1 or v2c
+ 'protocol' => 2, # default is SNMPv2c
+ 'username' => undef, # SMNP v3
+ 'authpassword' => undef, # SMNP v3
+ 'authkey' => undef, # SMNP v3
+ 'authprotocol' => undef, # SMNP v3
+ 'privpassword' => undef, # SMNP v3
+ 'privkey' => undef, # SMNP v3
+ 'privprotocol' => undef, # SMNP v3
+ 'timeout' => 30, # default timeout is 30 seconds
+ 'verbose' => 0,
+ 'info' => 0,
+ 'extinfo' => 0,
+ 'help' => 0,
+ 'version' => 0,
+ 'state' => 0,
+ 'short-state' => 0,
+ 'linebreak' => undef,
+ 'perfdata' => undef,
+ 'debug' => 0,
+ );
+
+# Get options
+GetOptions('H|hostname=s' => \$opt{hostname},
+ 'C|community=s' => \$opt{community},
+ 'P|protocol=i' => \$opt{protocol},
+ 'port=i' => \$opt{port},
+ 'U|username=s' => \$opt{username},
+ 'authpassword=s' => \$opt{authpassword},
+ 'authkey=s' => \$opt{authkey},
+ 'authprotocol=s' => \$opt{authprotocol},
+ 'privpassword=s' => \$opt{privpassword},
+ 'privkey=s' => \$opt{privkey},
+ 'privprotocol=s' => \$opt{privprotocol},
+ 't|timeout=i' => \$opt{timeout},
+ 'v|verbose' => \$opt{verbose},
+ 'i|info' => \$opt{info},
+ 'e|extinfo' => \$opt{extinfo},
+ 'h|help' => \$opt{help},
+ 'V|version' => \$opt{version},
+ 's|state' => \$opt{state},
+ 'short-state' => \$opt{shortstate},
+ 'linebreak=s' => \$opt{linebreak},
+ 'p|perfdata:s' => \$opt{perfdata},
+ 'd|debug' => \$opt{debug},
+ ) or do { print $USAGE; exit $E_UNKNOWN; };
+
+# If user requested help
+if ($opt{'help'}) {
+ print $USAGE, $HELP;
+ exit $E_OK;
+}
+
+# If user requested version info
+if ($opt{'version'}) {
+ print $LICENSE;
+ exit $E_OK;
+}
+
+# Error if hostname option is not present
+if (!defined $opt{hostname}) {
+ print "ERROR: No hostname or address given on command line. Use the '-H' or '--hostname' option\n";
+ exit $E_UNKNOWN;
+}
+
+# Nagios error levels reversed
+%reverse_exitcode
+ = (
+ 0 => 'OK',
+ 1 => 'WARNING',
+ 2 => 'CRITICAL',
+ 3 => 'UNKNOWN',
+ );
+
+# HP SNMP status (condition)
+%status2nagios
+ = (
+ 'Other' => $E_CRITICAL,
+ 'Ok' => $E_OK,
+ 'Degraded' => $E_WARNING,
+ 'Failed' => $E_CRITICAL,
+ );
+
+# Status via SNMP
+%snmp_status
+ = (
+ 1 => 'Other',
+ 2 => 'Ok',
+ 3 => 'Degraded',
+ 4 => 'Failed',
+ );
+
+# Present map
+%present_map
+ = (
+ 1 => 'other',
+ 2 => 'absent',
+ 3 => 'present',
+ 4 => 'OMG!WTF!BUG!', # for blades it can return 4, which is NOT spesified in MIB
+ );
+
+# Reports (messages) are gathered in this array
+@reports = ();
+
+# Setting timeout
+$SIG{ALRM} = sub {
+ print "PLUGIN TIMEOUT: $NAME timed out after $opt{timeout} seconds\n";
+ exit $E_UNKNOWN;
+};
+alarm $opt{timeout};
+
+# Default line break
+$linebreak = isatty(*STDOUT) ? "\n" : '<br/>';
+
+# Line break from option
+if (defined $opt{linebreak}) {
+ if ($opt{linebreak} eq 'REG') {
+ $linebreak = "\n";
+ }
+ elsif ($opt{linebreak} eq 'HTML') {
+ $linebreak = '<br/>';
+ }
+ else {
+ $linebreak = $opt{linebreak};
+ }
+}
+
+# System information gathered
+%sysinfo
+ = (
+ 'serial' => 'N/A', # serial number (service tag)
+ 'model' => 'N/A', # system model
+ 'firmware' => 'N/A', # firmware version
+ );
+
+# Counter variable
+%nagios_alert_count
+ = (
+ 'OK' => 0,
+ 'WARNING' => 0,
+ 'CRITICAL' => 0,
+ 'UNKNOWN' => 0,
+ );
+
+# Number of blades
+$count_blades = 0;
+
+# Number of IO modules
+$count_ioms = 0;
+
+# Overall health status
+$global = 'Ok';
+
+# Initialize SNMP
+snmp_initialize();
+
+# Check that SNMP works
+snmp_check();
+
+#---------------------------------------------------------------------
+# Functions
+#---------------------------------------------------------------------
+
+#
+# Store a message in the message array
+#
+sub report {
+ my ($msg, $exval, $part, $spare, $serial) = @_;
+ return push @reports, [ $msg, $exval, $part, $spare, $serial ];
+}
+
+#
+# Give an error and exit with unknown state
+#
+sub unknown_error {
+ my $msg = shift;
+ print "ERROR: $msg\n";
+ exit $E_UNKNOWN;
+}
+
+#
+# Initialize SNMP
+#
+sub snmp_initialize {
+ # Legal SNMP v3 protocols
+ my $snmp_v3_privprotocol = qr{\A des|aes|aes128|3des|3desde \z}xms;
+ my $snmp_v3_authprotocol = qr{\A md5|sha \z}xms;
+
+ # Parameters to Net::SNMP->session()
+ my %param
+ = (
+ '-port' => $opt{port},
+ '-hostname' => $opt{hostname},
+ '-version' => $opt{protocol},
+ );
+
+ # Parameters for SNMP v3
+ if ($opt{protocol} == 3) {
+
+ # Username is mandatory
+ if (defined $opt{username}) {
+ $param{'-username'} = $opt{username};
+ }
+ else {
+ print "SNMP ERROR: With SNMPv3 the username must be specified\n";
+ exit $E_UNKNOWN;
+ }
+
+ # Authpassword is optional
+ if (defined $opt{authpassword}) {
+ $param{'-authpassword'} = $opt{authpassword};
+ }
+
+ # Authkey is optional
+ if (defined $opt{authkey}) {
+ $param{'-authkey'} = $opt{authkey};
+ }
+
+ # Privpassword is optional
+ if (defined $opt{privpassword}) {
+ $param{'-privpassword'} = $opt{privpassword};
+ }
+
+ # Privkey is optional
+ if (defined $opt{privkey}) {
+ $param{'-privkey'} = $opt{privkey};
+ }
+
+ # Privprotocol is optional
+ if (defined $opt{privprotocol}) {
+ if ($opt{privprotocol} =~ m/$snmp_v3_privprotocol/xms) {
+ $param{'-privprotocol'} = $opt{privprotocol};
+ }
+ else {
+ print "SNMP ERROR: Unknown privprotocol '$opt{privprotocol}', "
+ . "must be one of [des|aes|aes128|3des|3desde]\n";
+ exit $E_UNKNOWN;
+ }
+ }
+
+ # Authprotocol is optional
+ if (defined $opt{authprotocol}) {
+ if ($opt{authprotocol} =~ m/$snmp_v3_authprotocol/xms) {
+ $param{'-authprotocol'} = $opt{authprotocol};
+ }
+ else {
+ print "SNMP ERROR: Unknown authprotocol '$opt{authprotocol}', "
+ . "must be one of [md5|sha]\n";
+ exit $E_UNKNOWN;
+ }
+ }
+ }
+ # Parameters for SNMP v2c or v1
+ elsif ($opt{protocol} == 2 or $opt{protocol} == 1) {
+ $param{'-community'} = $opt{community};
+ }
+ else {
+ print "SNMP ERROR: Unknown SNMP version '$opt{protocol}'\n";
+ exit $E_UNKNOWN;
+ }
+
+ # Try to initialize the SNMP session
+ if ( eval { require Net::SNMP; 1 } ) {
+ ($snmp_session, $snmp_error) = Net::SNMP->session( %param );
+ if (!defined $snmp_session) {
+ printf "SNMP: %s\n", $snmp_error;
+ exit $E_UNKNOWN;
+ }
+ }
+ else {
+ print "ERROR: Required perl module Net::SNMP not found\n";
+ exit $E_UNKNOWN;
+ }
+ return;
+}
+
+#
+# Checking if SNMP works by probing for "EnclosureModel", which all
+# enclosures should have
+#
+sub snmp_check {
+ my $cpqRackCommonEnclosureModel = '1.3.6.1.4.1.232.22.2.3.1.1.1.3.1';
+ my $result = $snmp_session->get_request(-varbindlist => [$cpqRackCommonEnclosureModel]);
+
+ # Typically if remote host isn't responding
+ if (!defined $result) {
+ printf "SNMP CRITICAL: %s\n", $snmp_session->error;
+ exit $E_CRITICAL;
+ }
+
+ # If OpenManage isn't installed or is not working
+ if ($result->{$cpqRackCommonEnclosureModel} =~ m{\A noSuch (Instance|Object) \z}xms) {
+ print "SNMP ERROR: Can't determine model name\n";
+ exit $E_UNKNOWN;
+ }
+
+ # Store the model name
+ $sysinfo{model} = $result->{$cpqRackCommonEnclosureModel};
+ $sysinfo{model} =~ s{\s+\z}{}xms; # remove trailing whitespace
+
+ return;
+}
+
+# Gets the output from SNMP result according to the OIDs checked
+sub get_snmp_output {
+ my ($result,$oidref) = @_;
+ my @output = ();
+
+ foreach my $oid (keys %{ $result }) {
+ my @dummy = split m{\.}xms, $oid;
+ my $id = pop @dummy;
+ --$id;
+ my $foo = join q{.}, @dummy;
+ if (exists $oidref->{$foo}) {
+ $output[$id]{$oidref->{$foo}} = $result->{$oid};
+ }
+ }
+ return \@output;
+}
+
+# Get enclosure status and firmware info
+sub get_enclosure_status {
+ my @output = ();
+
+ my $part = undef; # part number
+ my $spare = undef; # spare part number
+ my $serial = undef; # serial
+ my $condition = undef; # enclosure condition
+
+ # OIDs we are interested in
+ my %oid
+ = (
+ '1.3.6.1.4.1.232.22.2.3.1.1.1.5' => 'cpqRackCommonEnclosurePartNumber', # part number
+ '1.3.6.1.4.1.232.22.2.3.1.1.1.6' => 'cpqRackCommonEnclosureSparePartNumber', # spare
+ '1.3.6.1.4.1.232.22.2.3.1.1.1.7' => 'cpqRackCommonEnclosureSerialNum', # serial no.
+ '1.3.6.1.4.1.232.22.2.3.1.1.1.8' => 'cpqRackCommonEnclosureFWRev', # firmware rev.
+ '1.3.6.1.4.1.232.22.2.3.1.1.1.16' => 'cpqRackCommonEnclosureCondition', # condition
+ );
+
+ my $result = $snmp_session->get_entries(-columns => [keys %oid]);
+
+ # Error if we don't get anything
+ if (!defined $result) {
+ printf "SNMP CRITICAL: [enclosure table] %s\n", $snmp_session->error;
+ exit $E_CRITICAL;
+ }
+
+ @output = @{ get_snmp_output($result, \%oid) };
+
+ ENCL:
+ foreach my $out (@output) {
+ $sysinfo{'serial'} = $out->{cpqRackCommonEnclosureSerialNum};
+ $sysinfo{'firmware'} = $out->{cpqRackCommonEnclosureFWRev};
+
+ $part = $out->{cpqRackCommonEnclosurePartNumber};
+ $spare = $out->{cpqRackCommonEnclosureSparePartNumber};
+ $serial = $out->{cpqRackCommonEnclosureSerialNum};
+ $condition = $out->{cpqRackCommonEnclosureCondition};
+ }
+
+ # report global enclosure condition
+ report( (sprintf q{Enclosure overall health condition is %s}, $snmp_status{$condition}),
+ $status2nagios{$snmp_status{$condition}}, $part, $spare, $serial );
+
+ $global = $snmp_status{$condition};
+
+ return;
+}
+
+# Check the enclosure managers
+sub check_managers {
+ my @output = ();
+
+ my $index = undef; # index
+ my $part = undef; # part number
+ my $spare = undef; # spare part number
+ my $serial = undef; # serial number
+ my $role = undef; # manager role (primary / secondary)
+ my $condition = undef; # condition
+
+ # OIDs we are interested in
+ my %oid
+ = (
+ '1.3.6.1.4.1.232.22.2.3.1.6.1.3' => 'cpqRackCommonEnclosureManagerIndex',
+ '1.3.6.1.4.1.232.22.2.3.1.6.1.6' => 'cpqRackCommonEnclosureManagerPartNumber',
+ '1.3.6.1.4.1.232.22.2.3.1.6.1.7' => 'cpqRackCommonEnclosureManagerSparePartNumber',
+ '1.3.6.1.4.1.232.22.2.3.1.6.1.8' => 'cpqRackCommonEnclosureManagerSerialNum',
+ '1.3.6.1.4.1.232.22.2.3.1.6.1.9' => 'cpqRackCommonEnclosureManagerRole',
+ '1.3.6.1.4.1.232.22.2.3.1.6.1.12' => 'cpqRackCommonEnclosureManagerCondition',
+ );
+
+ my $default_timeout = $snmp_session->timeout(); # get existing session timeout
+ $snmp_session->timeout(20); # set new session timeout
+ my $result = $snmp_session->get_entries(-columns => [keys %oid]); # get entries
+ $snmp_session->timeout($default_timeout); # reset session timeout
+
+ # Error if we don't get anything
+ if (!defined $result) {
+ printf "ERROR: [manager table] %s\n", $snmp_session->error;
+ exit $E_UNKNOWN;
+ }
+
+ @output = @{ get_snmp_output($result, \%oid) };
+
+ my %map_role
+ = (
+ 1 => 'Standby',
+ 2 => 'Active',
+ );
+
+ MANAGER:
+ foreach my $out (@output) {
+ $index = $out->{cpqRackCommonEnclosureManagerIndex};
+ $part = $out->{cpqRackCommonEnclosureManagerPartNumber};
+ $spare = $out->{cpqRackCommonEnclosureManagerSparePartNumber};
+ $serial = $out->{cpqRackCommonEnclosureManagerSerialNum};
+ $role = $out->{cpqRackCommonEnclosureManagerRole};
+ $condition = $out->{cpqRackCommonEnclosureManagerCondition};
+
+ # report manager condition
+ if (exists $snmp_status{$condition}) {
+ report( (sprintf q{Enclosure management module %d is %s, status is %s},
+ $index, $map_role{$role}, $snmp_status{$condition}),
+ $status2nagios{$snmp_status{$condition}}, $part, $spare, $serial );
+ }
+ else {
+ report( (sprintf q{Enclosure management module %d is %s, status is Unknown},
+ $index, $map_role{$role}),
+ $E_OK, $part, $spare, $serial );
+ }
+ }
+
+ return;
+}
+
+
+# Check the enclosure fans
+sub check_fans {
+ my @output = ();
+
+ my $index = undef; # index
+ my $present = undef; # if device is present
+ my $part = undef; # part number
+ my $spare = undef; # spare part number
+ my $condition = undef; # condition
+
+ # OIDs we are interested in
+ my %oid
+ = (
+ '1.3.6.1.4.1.232.22.2.3.1.3.1.3' => 'cpqRackCommonEnclosureFanIndex',
+ '1.3.6.1.4.1.232.22.2.3.1.3.1.6' => 'cpqRackCommonEnclosureFanPartNumber',
+ '1.3.6.1.4.1.232.22.2.3.1.3.1.7' => 'cpqRackCommonEnclosureFanSparePartNumber',
+ '1.3.6.1.4.1.232.22.2.3.1.3.1.8' => 'cpqRackCommonEnclosureFanPresent',
+ '1.3.6.1.4.1.232.22.2.3.1.3.1.11' => 'cpqRackCommonEnclosureFanCondition',
+ );
+
+ my $result = $snmp_session->get_entries(-columns => [keys %oid]);
+
+ # Error if we don't get anything
+ if (!defined $result) {
+ printf "SNMP ERROR: [fan table] %s\n", $snmp_session->error;
+ exit $E_UNKNOWN;
+ }
+
+ @output = @{ get_snmp_output($result, \%oid) };
+
+ FAN:
+ foreach my $out (@output) {
+ $index = $out->{cpqRackCommonEnclosureFanIndex};
+ $present = $out->{cpqRackCommonEnclosureFanPresent};
+ $part = $out->{cpqRackCommonEnclosureFanPartNumber};
+ $spare = $out->{cpqRackCommonEnclosureFanSparePartNumber};
+ $condition = $out->{cpqRackCommonEnclosureFanCondition};
+
+ next FAN if $present_map{$present} ne 'present';
+
+ # report fan condition
+ report( (sprintf q{Fan %d condition is %s}, $index, $snmp_status{$condition}),
+ $status2nagios{$snmp_status{$condition}}, $part, $spare, q{} );
+ }
+
+ return;
+}
+
+
+# Check the blades
+sub check_blades {
+ my @output = ();
+
+ my $index = undef; # index
+ my $name = undef; # blade name
+ my $part = undef; # part number
+ my $spare = undef; # spare part number
+ my $serial = undef; # serial number
+ my $position = undef; # blade position
+ my $present = undef; # if device is present
+ my $product = undef; # product id
+ my $status = undef; # blade status
+ my $major = undef; # major fault
+ my $minor = undef; # minor fault
+ my $diag = undef; # blade fault diagnostic string
+ my $power = undef; # if blade is powered up
+
+ # OIDs we are interested in
+ my %oid
+ = (
+ '1.3.6.1.4.1.232.22.2.4.1.1.1.3' => 'cpqRackServerBladeIndex',
+ '1.3.6.1.4.1.232.22.2.4.1.1.1.4' => 'cpqRackServerBladeName',
+ '1.3.6.1.4.1.232.22.2.4.1.1.1.6' => 'cpqRackServerBladePartNumber',
+ '1.3.6.1.4.1.232.22.2.4.1.1.1.7' => 'cpqRackServerBladeSparePartNumber',
+ '1.3.6.1.4.1.232.22.2.4.1.1.1.8' => 'cpqRackServerBladePosition',
+ '1.3.6.1.4.1.232.22.2.4.1.1.1.12' => 'cpqRackServerBladePresent',
+ '1.3.6.1.4.1.232.22.2.4.1.1.1.16' => 'cpqRackServerBladeSerialNum',
+ '1.3.6.1.4.1.232.22.2.4.1.1.1.17' => 'cpqRackServerBladeProductId',
+ '1.3.6.1.4.1.232.22.2.4.1.1.1.21' => 'cpqRackServerBladeStatus',
+ '1.3.6.1.4.1.232.22.2.4.1.1.1.22' => 'cpqRackServerBladeFaultMajor',
+ '1.3.6.1.4.1.232.22.2.4.1.1.1.23' => 'cpqRackServerBladeFaultMinor',
+ '1.3.6.1.4.1.232.22.2.4.1.1.1.24' => 'cpqRackServerBladeFaultDiagnosticString',
+ '1.3.6.1.4.1.232.22.2.4.1.1.1.25' => 'cpqRackServerBladePowered',
+ );
+
+ my $result = $snmp_session->get_entries(-columns => [keys %oid]);
+
+ # Error if we don't get anything
+ if (!defined $result) {
+ printf "SNMP ERROR: [blade table] %s\n", $snmp_session->error;
+ exit $E_UNKNOWN;
+ }
+
+ @output = @{ get_snmp_output($result, \%oid) };
+
+ sub get {
+ my ($hash, $val) = @_;
+ return exists $hash->{$val} ? $hash->{$val} : undef;
+ }
+
+ BLADE:
+ foreach my $out (@output) {
+ $index = get($out, 'cpqRackServerBladeIndex');
+ $name = get($out, 'cpqRackServerBladeName');
+ $part = get($out, 'cpqRackServerBladePartNumber');
+ $spare = get($out, 'cpqRackServerBladeSparePartNumber');
+ $serial = get($out, 'cpqRackServerBladeSerialNum');
+ $position = get($out, 'cpqRackServerBladePosition');
+ $present = get($out, 'cpqRackServerBladePresent');
+ $product = get($out, 'cpqRackServerBladeProductId');
+ $status = get($out, 'cpqRackServerBladeStatus');
+ $major = get($out, 'cpqRackServerBladeFaultMajor');
+ $minor = get($out, 'cpqRackServerBladeFaultMinor');
+ $diag = get($out, 'cpqRackServerBladeFaultDiagnosticString');
+ $power = get($out, 'cpqRackServerBladePowered');
+
+ next BLADE if $present_map{$present} ne 'present';
+ ++$count_blades;
+
+ $part =~ s{\s+\z}{}xms; # remove trailing whitespace
+
+ # report blade condition
+ if (!defined $status) {
+ report( (sprintf q{Blade %d is a %s with name: %s},
+ $index, $product, $name),
+ $E_OK, $part, $spare, $serial );
+ }
+ else {
+ report( (sprintf q{Blade %d (%s, %s) status is %s},
+ $index, $name, $product, $snmp_status{$status}),
+ $status2nagios{$snmp_status{$status}}, $part, $spare, $serial );
+ }
+ }
+
+ return;
+}
+
+
+# Check the enclosure power supplies
+sub check_psu {
+ my @output = ();
+
+ my $index = undef; # index
+ my $serial = undef; # serial number
+ my $present = undef; # if device is present
+ my $part = undef; # part number
+ my $spare = undef; # spare part number
+ my $currpwr = undef; # The current power output of the power supply in watts
+ my $status = undef; # The status of the power supply
+ my $inputline = undef; # The status of line input power
+ my $condition = undef; # The condition of the power supply
+
+ # OIDs we are interested in
+ my %oid
+ = (
+ '1.3.6.1.4.1.232.22.2.5.1.1.1.3' => 'cpqRackPowerSupplyIndex',
+ '1.3.6.1.4.1.232.22.2.5.1.1.1.5' => 'cpqRackPowerSupplySerialNum',
+ '1.3.6.1.4.1.232.22.2.5.1.1.1.6' => 'cpqRackPowerSupplyPartNumber',
+ '1.3.6.1.4.1.232.22.2.5.1.1.1.7' => 'cpqRackPowerSupplySparePartNumber',
+ '1.3.6.1.4.1.232.22.2.5.1.1.1.10' => 'cpqRackPowerSupplyCurPwrOutput',
+ '1.3.6.1.4.1.232.22.2.5.1.1.1.14' => 'cpqRackPowerSupplyStatus',
+ '1.3.6.1.4.1.232.22.2.5.1.1.1.15' => 'cpqRackPowerSupplyInputLineStatus',
+ '1.3.6.1.4.1.232.22.2.5.1.1.1.16' => 'cpqRackPowerSupplyPresent',
+ '1.3.6.1.4.1.232.22.2.5.1.1.1.17' => 'cpqRackPowerSupplyCondition',
+ );
+
+ my $result = $snmp_session->get_entries(-columns => [keys %oid]);
+
+ # Error if we don't get anything
+ if (!defined $result) {
+ printf "SNMP ERROR: [psu table] %s\n", $snmp_session->error;
+ exit $E_UNKNOWN;
+ }
+
+ @output = @{ get_snmp_output($result, \%oid) };
+
+ my %psu_status
+ = (
+ 1 => 'noError',
+ 2 => 'generalFailure',
+ 3 => 'bistFailure',
+ 4 => 'fanFailure',
+ 5 => 'tempFailure',
+ 6 => 'interlockOpen',
+ 7 => 'epromFailed',
+ 8 => 'vrefFailed',
+ 9 => 'dacFailed',
+ 10 => 'ramTestFailed',
+ 11 => 'voltageChannelFailed',
+ 12 => 'orringdiodeFailed',
+ 13 => 'brownOut',
+ 14 => 'giveupOnStartup',
+ 15 => 'nvramInvalid',
+ 16 => 'calibrationTableInvalid',
+ );
+
+ my %inputline_status
+ = (
+ 1 => 'noError',
+ 2 => 'lineOverVoltage',
+ 3 => 'lineUnderVoltage',
+ 4 => 'lineHit',
+ 5 => 'brownOut',
+ 6 => 'linePowerLoss',
+ );
+
+ $total_wattage = 0;
+
+ PSU:
+ foreach my $out (@output) {
+ $index = $out->{cpqRackPowerSupplyIndex};
+ $present = $out->{cpqRackPowerSupplyPresent};
+ $part = $out->{cpqRackPowerSupplyPartNumber};
+ $spare = $out->{cpqRackPowerSupplySparePartNumber};
+ $condition = $out->{cpqRackPowerSupplyCondition};
+ $serial = $out->{cpqRackPowerSupplySerialNum};
+ $currpwr = $out->{cpqRackPowerSupplyCurPwrOutput};
+ $status = $out->{cpqRackPowerSupplyStatus};
+ $inputline = $out->{cpqRackPowerSupplyInputLineStatus};
+
+ next PSU if $present_map{$present} ne 'present';
+
+ # Calculate total power consumption
+ $total_wattage += $currpwr;
+
+ # Report PSU condition
+ if ($snmp_status{$condition} eq 'Ok') {
+ report( (sprintf q{PSU %d is %s, output: %d W},
+ $index, $snmp_status{$condition}, $currpwr),
+ $status2nagios{$snmp_status{$condition}}, $part, $spare, $serial );
+ }
+ else {
+ my $msg = sprintf q{PSU %d is %s},
+ $index, $snmp_status{$condition};
+ $msg .= " ($psu_status{$status})" if $status >= 1;
+ $msg .= ", input line status: $inputline_status{$inputline}" if $inputline >= 1;
+
+ report( $msg, $status2nagios{$snmp_status{$condition}}, $part, $spare, $serial );
+ }
+ }
+
+ # Collect performance data
+ if (defined $opt{perfdata}) {
+ push @perfdata, "'total_watt'=${total_wattage}W;0;0";
+ }
+
+ return;
+}
+
+
+# Check the IO modules
+sub check_iom {
+ my @output = ();
+
+ my $index = undef; # index
+ my $present = undef; # if device is present
+ my $part = undef; # part number
+ my $spare = undef; # spare part number
+ my $serial = undef; # serial number
+ my $model = undef; # The model name of the network connector
+ my $location = undef; # The location of the network connector within the enclosure
+ my $devtype = undef; # The type of interrconnect in the enclosure
+
+ # OIDs we are interested in
+ my %oid
+ = (
+ '1.3.6.1.4.1.232.22.2.6.1.1.1.3' => 'cpqRackNetConnectorIndex',
+ '1.3.6.1.4.1.232.22.2.6.1.1.1.6' => 'cpqRackNetConnectorModel',
+ '1.3.6.1.4.1.232.22.2.6.1.1.1.7' => 'cpqRackNetConnectorSerialNum',
+ '1.3.6.1.4.1.232.22.2.6.1.1.1.8' => 'cpqRackNetConnectorPartNumber',
+ '1.3.6.1.4.1.232.22.2.6.1.1.1.9' => 'cpqRackNetConnectorSparePartNumber',
+ '1.3.6.1.4.1.232.22.2.6.1.1.1.12' => 'cpqRackNetConnectorLocation',
+ '1.3.6.1.4.1.232.22.2.6.1.1.1.13' => 'cpqRackNetConnectorPresent',
+ '1.3.6.1.4.1.232.22.2.6.1.1.1.17' => 'cpqRackNetConnectorDeviceType',
+ );
+
+ my $result = $snmp_session->get_entries(-columns => [keys %oid]);
+
+ # Error if we don't get anything
+ if (!defined $result) {
+ printf "SNMP ERROR: [fan table] %s\n", $snmp_session->error;
+ exit $E_UNKNOWN;
+ }
+
+ @output = @{ get_snmp_output($result, \%oid) };
+
+ my %device_type
+ = (
+ 1 => 'noconnect',
+ 2 => 'network',
+ 3 => 'fibrechannel',
+ 4 => 'sas',
+ 5 => 'inifiband',
+ 6 => 'pciexpress',
+ );
+
+ IOM:
+ foreach my $out (@output) {
+ $index = $out->{cpqRackNetConnectorIndex};
+ $present = $out->{cpqRackNetConnectorPresent};
+ $part = $out->{cpqRackNetConnectorPartNumber};
+ $model = $out->{cpqRackNetConnectorModel};
+ $location = $out->{cpqRackNetConnectorLocation};
+ $devtype = $out->{cpqRackNetConnectorDeviceType};
+
+ next IOM if $present_map{$present} ne 'present';
+ ++$count_ioms;
+
+ # report IOM
+ report( (sprintf q{I/O module %d is type %s: %s},
+ $index, $device_type{$devtype}, $model),
+ $E_OK, $part, $spare, $serial );
+ }
+
+ return;
+}
+
+
+# Default plugin output
+sub output_default {
+ my $c = 0; # counter to determine linebreaks
+
+ # Run through each message, sorted by severity level
+ ALERT:
+ foreach (sort {$a->[1] < $b->[1]} @reports) {
+ my ($msg, $level, $part, $spare, $serial) = @{ $_ };
+ next ALERT if $level == $E_OK;
+
+ # Prefix with service tag if specified with option '-i|--info'
+ if ($opt{info}) {
+ $msg = "[$sysinfo{serial}] " . $msg;
+ }
+
+ # Prefix with nagios level if specified with option '--state'
+ $msg = $reverse_exitcode{$level} . ": $msg" if $opt{state};
+
+ # Prefix with one-letter nagios level if specified with option '--short-state'
+ $msg = (substr $reverse_exitcode{$level}, 0, 1) . ": $msg" if $opt{shortstate};
+
+ if ($opt{verbose} and $msg !~ m/overall health condition/) {
+ $msg .= sprintf q{ [part: %s, spare: %s, sn: %s]},
+ $part eq q{} ? 'n/a' : $part,
+ $spare eq q{} ? 'n/a' : $spare,
+ $serial eq q{} ? 'n/a' : $serial;
+ }
+
+ ($c++ == 0) ? print $msg : print $linebreak, $msg;
+
+ $nagios_alert_count{$reverse_exitcode{$level}}++;
+ }
+
+ return;
+}
+
+# Debug plugin output
+sub output_debug {
+ print " System: $sysinfo{model}\n";
+ print " ServiceTag: $sysinfo{serial}\n";
+ print " Firmware: $sysinfo{firmware}";
+ print q{ } x (25 - length "$sysinfo{firmware}"), "Plugin version: $VERSION\n";
+ if ($#reports >= 0) {
+ print "-----------------------------------------------------------------------------\n";
+ print " System Component Status \n";
+ print "=============================================================================\n";
+ print " STATE | PART NO. | MESSAGE TEXT \n";
+ print "---------+----------------+--------------------------------------------------\n";
+ foreach (@reports) {
+ my ($msg, $level, $part, $spare, $serial) = @{$_};
+ print q{ } x (8 - length $reverse_exitcode{$level}) . "$reverse_exitcode{$level} | "
+ . q{ } x (14 - length $part) . "$part | $msg\n";
+ $nagios_alert_count{$reverse_exitcode{$level}}++;
+ }
+ }
+
+ # Print system power readings
+ print "-----------------------------------------------------------------------------\n";
+ print " System Power Readings \n";
+ print "=============================================================================\n";
+ print " Total power consumption: $total_wattage W\n";
+
+ return;
+}
+
+# Performance data output
+sub output_perfdata {
+ my $lb = $opt{perfdata} eq 'multiline' ? "\n" : q{ }; # line break for perfdata
+ print q{|};
+ print join $lb, @perfdata;
+ return;
+}
+
+
+#=====================================================================
+# Main program
+#=====================================================================
+
+# Probe the blade chassis via SNMP
+get_enclosure_status();
+
+# Only check managers if global health is not Ok, or debug
+if ($global ne 'Ok' or $opt{debug}) {
+ check_managers();
+}
+
+# Always these
+check_fans();
+check_blades();
+check_iom();
+check_psu();
+
+# Print output
+if ($opt{debug}) {
+ output_debug();
+}
+else {
+ output_default();
+}
+
+# Determine our exit code
+$exit_code = $E_OK;
+if ($nagios_alert_count{UNKNOWN} > 0) { $exit_code = $E_UNKNOWN; }
+if ($nagios_alert_count{WARNING} > 0) { $exit_code = $E_WARNING; }
+if ($nagios_alert_count{CRITICAL} > 0) { $exit_code = $E_CRITICAL; }
+
+# Print any perl warnings that have occured
+if (@perl_warnings) {
+ foreach (@perl_warnings) {
+ chop @$_;
+ print "${linebreak}INTERNAL ERROR: @$_";
+ }
+ $exit_code = $E_UNKNOWN;
+}
+
+# Reset the WARN signal
+$SIG{__WARN__} = $original_sigwarn;
+
+# OK message
+if ($exit_code == $E_OK && !$opt{debug}) {
+ printf q{OK - System: '%s', SN: '%s', Firmware: '%s', hardware working fine, %d blades, %d i/o modules},
+ $sysinfo{model}, $sysinfo{serial}, $sysinfo{firmware}, $count_blades, $count_ioms;
+}
+
+# Extended info output
+if ($opt{extinfo} && !$opt{debug} && $exit_code != $E_OK) {
+ print $linebreak;
+ printf '------ SYSTEM: %s, SN: %s, FW: %s',
+ $sysinfo{model}, $sysinfo{serial}, $sysinfo{firmware};
+}
+
+# Print performance data
+if (defined $opt{perfdata} && !$opt{debug} && @perfdata) {
+ output_perfdata();
+}
+
+print "\n" if !$opt{debug};
+
+# Exit with proper exit code
+exit $exit_code;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.8 b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.8
new file mode 100644
index 0000000..2c872cb
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.8
@@ -0,0 +1,325 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. | will give a
+.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.\"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "CHECK_HP_BLADECHASSIS 8"
+.TH CHECK_HP_BLADECHASSIS 8 "2009-08-20" "check_hp_bladechassis 1.0.1" "Nagios plugin"
+.SH "NAME"
+check_hp_bladechassis \- Nagios plugin for checking the status of HP
+blade enclosures via SNMP
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+check_hp_bladechassis \-H <\fI\s-1HOSTNAME\s0\fR> [\fI\s-1OPTION\s0\fR]...
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+check_hp_bladechassis is a plugin for the Nagios monitoring software
+that checks the hardware health status of a \s-1HP\s0 blade
+enclosure/chassis. The plugin is only tested with the c7000 enclosure.
+.SH "COMMON OPTIONS"
+.IX Header "COMMON OPTIONS"
+.IP "\-H, \-\-hostname \fI\s-1HOSTNAME\s0\fR" 4
+.IX Item "-H, --hostname HOSTNAME"
+The transport address (hostname or \s-1IP\s0) of the blade enclosure you want
+to monitor. This option is mandatory.
+.IP "\-C, \-\-community \fI\s-1COMMUNITY\s0\fR" 4
+.IX Item "-C, --community COMMUNITY"
+This option expects a string that is to be used as the \s-1SNMP\s0 community
+name when using \s-1SNMP\s0 version 1 or 2c. By default the community name
+is set to \f(CW\*(C`public\*(C'\fR if the option is not present.
+.IP "\-p, \-\-perfdata" 4
+.IX Item "-p, --perfdata"
+Collect performance data. Performance data collected is total
+power usage.
+.IP "\-t, \-\-timeout \fI\s-1SECONDS\s0\fR" 4
+.IX Item "-t, --timeout SECONDS"
+The number of seconds after which the plugin will abort. Default
+timeout is 30 seconds if the option is not present.
+.IP "\-i, \-\-info" 4
+.IX Item "-i, --info"
+Prefix any alerts with the enclosure serial number.
+.IP "\-v, \-\-verbose" 4
+.IX Item "-v, --verbose"
+In case of an alert, the part number, spare part number and serial
+number of the failed component is appended to the alert message.
+.IP "\-e, \-\-extinfo" 4
+.IX Item "-e, --extinfo"
+Display a short summary of system information (product, serial number,
+firmware and the number of blades and I/O modules) in case of an
+alert.
+.IP "\-s, \-\-state" 4
+.IX Item "-s, --state"
+Prefix each alert with its corresponding service state (i.e. warning,
+critical etc.). This is useful in case of several alerts from the same
+monitored system.
+.IP "\-\-short\-state" 4
+.IX Item "--short-state"
+Same as the \fB\-\-state\fR option above, except that the state is
+abbreviated to a single letter (W=warning, C=critical etc.).
+.IP "\-d, \-\-debug" 4
+.IX Item "-d, --debug"
+Debug output. Will report status on all monitored subsystems,
+regardless of their alert state. Will also report total power usage.
+.IP "\-h, \-\-help" 4
+.IX Item "-h, --help"
+Display help text.
+.IP "\-V, \-\-version" 4
+.IX Item "-V, --version"
+Display version info.
+.SH "ADVANCED OPTIONS"
+.IX Header "ADVANCED OPTIONS"
+.IP "\-P, \-\-protocol \fI\s-1PROTOCOL\s0\fR" 4
+.IX Item "-P, --protocol PROTOCOL"
+\&\s-1SNMP\s0 protocol version. This option is optional and expects a digit
+(i.e. \f(CW1\fR, \f(CW2\fR or \f(CW3\fR) to define the \s-1SNMP\s0 version. The default is
+\&\f(CW2\fR, i.e. \s-1SNMP\s0 version 2c.
+.IP "\-\-port \fI\s-1PORT\s0\fR" 4
+.IX Item "--port PORT"
+\&\s-1SNMP\s0 port of the remote (monitored) system. Defaults to the well-known
+\&\s-1SNMP\s0 port 161.
+.IP "\-U, \-\-username \fI\s-1SECURITYNAME\s0\fR" 4
+.IX Item "-U, --username SECURITYNAME"
+[SNMPv3] The User-based Security Model (\s-1USM\s0) used by SNMPv3 requires
+that a securityName be specified. This option is required when using
+\&\s-1SNMP\s0 version 3, and expects a string 1 to 32 octets in lenght.
+.IP "\-\-authpassword \fI\s-1PASSWORD\s0\fR, \-\-authkey \fI\s-1KEY\s0\fR" 4
+.IX Item "--authpassword PASSWORD, --authkey KEY"
+[SNMPv3] By default a securityLevel of \f(CW\*(C`noAuthNoPriv\*(C'\fR is assumed. If
+the \-\-authpassword option is specified, the securityLevel becomes
+\&\f(CW\*(C`authNoPriv\*(C'\fR. The \-\-authpassword option expects a string which is at
+least 1 octet in length as argument.
+.Sp
+Optionally, instead of the \-\-authpassword option, the \-\-authkey option
+can be used so that a plain text password does not have to be
+specified in a script. The \-\-authkey option expects a hexadecimal
+string produced by localizing the password with the
+authoritativeEngineID for the specific destination device. The
+\&\f(CW\*(C`snmpkey\*(C'\fR utility included with the Net::SNMP distribution can be
+used to create the hexadecimal string (see snmpkey).
+.IP "\-\-authprotocol \fI\s-1ALGORITHM\s0\fR" 4
+.IX Item "--authprotocol ALGORITHM"
+[SNMPv3] Two different hash algorithms are defined by SNMPv3 which can
+be used by the Security Model for authentication. These algorithms are
+\&\s-1HMAC\-MD5\-96\s0 \f(CW\*(C`MD5\*(C'\fR (\s-1RFC\s0 1321) and \s-1HMAC\-SHA\-96\s0 \f(CW\*(C`SHA\-1\*(C'\fR (\s-1NIST\s0 \s-1FIPS\s0 \s-1PUB\s0
+180\-1). The default algorithm used by the plugin is \s-1HMAC\-MD5\-96\s0. This
+behavior can be changed by using this option. The option expects
+either the string \f(CW\*(C`md5\*(C'\fR or \f(CW\*(C`sha\*(C'\fR to be passed as argument to modify
+the hash algorithm.
+.IP "\-\-privpassword \fI\s-1PASSWORD\s0\fR, \-\-privkey \fI\s-1KEY\s0\fR" 4
+.IX Item "--privpassword PASSWORD, --privkey KEY"
+[SNMPv3] By specifying the options \-\-privkey or \-\-privpassword, the
+securityLevel associated with the object becomes
+\&\f(CW\*(C`authPriv\*(C'\fR. According to SNMPv3, privacy requires the use of
+authentication. Therefore, if either of these two options are present
+and the \-\-authkey or \-\-authpassword arguments are missing, the
+creation of the object fails. The \-\-privkey and \-\-privpassword
+options expect the same input as the \-\-authkey and \-\-authpassword
+options respectively.
+.IP "\-\-privprotocol \fI\s-1ALGORITHM\s0\fR" 4
+.IX Item "--privprotocol ALGORITHM"
+[SNMPv3] The User-based Security Model described in \s-1RFC\s0 3414 defines a
+single encryption protocol to be used for privacy. This protocol,
+CBC-DES \f(CW\*(C`DES\*(C'\fR (\s-1NIST\s0 \s-1FIPS\s0 \s-1PUB\s0 46\-1), is used by default or if the
+string \f(CW\*(C`des\*(C'\fR is passed to the \-\-privprotocol option. The Net::SNMP
+module also supports \s-1RFC\s0 3826 which describes the use of
+\&\s-1CFB128\-AES\-128\s0 \f(CW\*(C`AES\*(C'\fR (\s-1NIST\s0 \s-1FIPS\s0 \s-1PUB\s0 197) in the \s-1USM\s0. The \s-1AES\s0
+encryption protocol can be selected by passing \f(CW\*(C`aes\*(C'\fR or \f(CW\*(C`aes128\*(C'\fR to
+the \-\-privprotocol option.
+.Sp
+One of the following arguments are required: des, aes, aes128, 3des,
+3desde
+.IP "\-\-linebreak=\fI\s-1STRING\s0\fR" 4
+.IX Item "--linebreak=STRING"
+check_hp_bladechassis will sometimes report more than one line,
+e.g. if there are several alerts. If the script has a \s-1TTY\s0, it will use
+regular linebreaks. If not (which is the case with \s-1NRPE\s0) it will use
+\&\s-1HTML\s0 linebreaks. Sometimes it can be useful to control what the plugin
+uses as a line separator, and this option provides that control.
+.Sp
+The argument is the exact string to be used as the line
+separator. There are two exceptions, i.e. two keywords that translates
+to the following:
+.RS 4
+.IP "\fB\s-1REG\s0\fR" 4
+.IX Item "REG"
+Regular linebreaks, i.e. \*(L"\en\*(R".
+.IP "\fB\s-1HTML\s0\fR" 4
+.IX Item "HTML"
+\&\s-1HTML\s0 linebreaks, i.e. \*(L"<br/>\*(R".
+.RE
+.RS 4
+.Sp
+This is a rather special option that is normally not needed. The
+default behaviour should be sufficient for most users.
+.SH "DIAGNOSTICS"
+.IX Header "DIAGNOSTICS"
+The option \f(CW\*(C`\-\-debug\*(C'\fR (or \f(CW\*(C`\-d\*(C'\fR) can be specified to display status
+of all components.
+.SH "DEPENDENCIES"
+.IX Header "DEPENDENCIES"
+The perl module Net::SNMP is required on the Nagios host.
+.SH "EXIT STATUS"
+.IX Header "EXIT STATUS"
+If no errors are discovered, a value of 0 (\s-1OK\s0) is returned. An exit
+value of 1 (\s-1WARNING\s0) signifies one or more non-critical errors, while
+2 (\s-1CRITICAL\s0) signifies one or more critical errors.
+.Sp
+The exit value 3 (\s-1UNKNOWN\s0) is reserved for errors within the script,
+or errors getting values via \s-1SNMP\s0.
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Written by Trond H. Amundsen <t.h.amundsen@usit.uio.no>
+.SH "BUGS AND LIMITATIONS"
+.IX Header "BUGS AND LIMITATIONS"
+None known at present.
+.SH "INCOMPATIBILITIES"
+.IX Header "INCOMPATIBILITIES"
+None known at present.
+.Sp
+Note that as of this writing, the plugin is only tested against the
+c7000 enclosure.
+.SH "REPORTING BUGS"
+.IX Header "REPORTING BUGS"
+Report bugs to <t.h.amundsen@usit.uio.no>
+.SH "LICENSE AND COPYRIGHT"
+.IX Header "LICENSE AND COPYRIGHT"
+This program is free software: you can redistribute it and/or modify
+it under the terms of the \s-1GNU\s0 General Public License as published by
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
+.Sp
+This program is distributed in the hope that it will be useful, but
+\&\s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of
+\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the \s-1GNU\s0
+General Public License for more details.
+.Sp
+You should have received a copy of the \s-1GNU\s0 General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+<http://folk.uio.no/trondham/software/check_hp_bladechassis.html>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.php b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.php
new file mode 100644
index 0000000..b3525fc
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.php
@@ -0,0 +1,42 @@
+<?php
+#
+# PNP4Nagios template for check_hp_bladechassis
+# http://folk.uio.no/trondham/software/check_hp_bladechassis.html
+#
+# $Id: check_hp_bladechassis.php 15736 2009-11-06 14:10:38Z trondham $
+#
+
+# Color for power usage in watts
+$PWRcolor = "66FF00";
+
+# Counters
+$count = 0; # general counter
+
+# Title
+$def_title = 'HP Blade Enclosure';
+
+# Loop through the performance data
+foreach ($DS as $i) {
+
+ # Total Wattage
+ if(preg_match('/^total_watt/',$NAME[$i]) && $UNIT[$i] == 'W') {
+ $NAME[$i] = 'Total Power Usage';
+
+ ++$count;
+ $ds_name[$count] = "Total Power Consumption";
+ $vlabel = "Watt";
+
+ $title = $ds_name[$count];
+
+ $opt[$count] = "--slope-mode --vertical-label \"$vlabel\" --title \"$def_title: $title\" ";
+
+ $def[$count] = "DEF:var$i=$rrdfile:$DS[$i]:AVERAGE " ;
+ $def[$count] .= "AREA:var$i#$PWRcolor:\"$NAME[$i]\" " ;
+ $def[$count] .= "LINE:var$i#000000: " ;
+ $def[$count] .= "GPRINT:var$i:LAST:\"%6.0lf $UNIT[$i] last \" ";
+ $def[$count] .= "GPRINT:var$i:MAX:\"%6.0lf $UNIT[$i] max \" ";
+ $def[$count] .= "GPRINT:var$i:AVERAGE:\"%6.2lf $UNIT[$i] avg \\n\" ";
+ }
+
+}
+?>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.pod b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.pod
new file mode 100644
index 0000000..ada33e1
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.pod
@@ -0,0 +1,245 @@
+# Man page for check_hp_bladechassis
+
+# Man page created with:
+#
+# pod2man -s 3pm -r "`./check_hp_bladechassis -V | head -n 1`" -c 'Nagios plugin' check_hp_bladechassis.pod check_hp_bladechassis.3pm
+#
+
+
+=head1 NAME
+
+check_hp_bladechassis - Nagios plugin for checking the status of HP
+blade enclosures via SNMP
+
+=head1 SYNOPSIS
+
+check_hp_bladechassis -H <I<HOSTNAME>> [I<OPTION>]...
+
+=head1 DESCRIPTION
+
+check_hp_bladechassis is a plugin for the Nagios monitoring software
+that checks the hardware health status of a HP blade
+enclosure/chassis. The plugin is only tested with the c7000 enclosure.
+
+=head1 COMMON OPTIONS
+
+=over 4
+
+=item -H, --hostname I<HOSTNAME>
+
+The transport address (hostname or IP) of the blade enclosure you want
+to monitor. This option is mandatory.
+
+=item -C, --community I<COMMUNITY>
+
+This option expects a string that is to be used as the SNMP community
+name when using SNMP version 1 or 2c. By default the community name
+is set to C<public> if the option is not present.
+
+=item -p, --perfdata
+
+Collect performance data. Performance data collected is total
+power usage.
+
+=item -t, --timeout I<SECONDS>
+
+The number of seconds after which the plugin will abort. Default
+timeout is 30 seconds if the option is not present.
+
+=item -i, --info
+
+Prefix any alerts with the enclosure serial number.
+
+=item -v, --verbose
+
+In case of an alert, the part number, spare part number and serial
+number of the failed component is appended to the alert message.
+
+=item -e, --extinfo
+
+Display a short summary of system information (product, serial number,
+firmware and the number of blades and I/O modules) in case of an
+alert.
+
+=item -s, --state
+
+Prefix each alert with its corresponding service state (i.e. warning,
+critical etc.). This is useful in case of several alerts from the same
+monitored system.
+
+=item --short-state
+
+Same as the B<--state> option above, except that the state is
+abbreviated to a single letter (W=warning, C=critical etc.).
+
+=item -d, --debug
+
+Debug output. Will report status on all monitored subsystems,
+regardless of their alert state. Will also report total power usage.
+
+=item -h, --help
+
+Display help text.
+
+=item -V, --version
+
+Display version info.
+
+=back
+
+=head1 ADVANCED OPTIONS
+
+=over 4
+
+=item -P, --protocol I<PROTOCOL>
+
+SNMP protocol version. This option is optional and expects a digit
+(i.e. C<1>, C<2> or C<3>) to define the SNMP version. The default is
+C<2>, i.e. SNMP version 2c.
+
+=item --port I<PORT>
+
+SNMP port of the remote (monitored) system. Defaults to the well-known
+SNMP port 161.
+
+=item -U, --username I<SECURITYNAME>
+
+[SNMPv3] The User-based Security Model (USM) used by SNMPv3 requires
+that a securityName be specified. This option is required when using
+SNMP version 3, and expects a string 1 to 32 octets in lenght.
+
+=item --authpassword I<PASSWORD>, --authkey I<KEY>
+
+[SNMPv3] By default a securityLevel of C<noAuthNoPriv> is assumed. If
+the --authpassword option is specified, the securityLevel becomes
+C<authNoPriv>. The --authpassword option expects a string which is at
+least 1 octet in length as argument.
+
+Optionally, instead of the --authpassword option, the --authkey option
+can be used so that a plain text password does not have to be
+specified in a script. The --authkey option expects a hexadecimal
+string produced by localizing the password with the
+authoritativeEngineID for the specific destination device. The
+C<snmpkey> utility included with the Net::SNMP distribution can be
+used to create the hexadecimal string (see L<snmpkey>).
+
+=item --authprotocol I<ALGORITHM>
+
+[SNMPv3] Two different hash algorithms are defined by SNMPv3 which can
+be used by the Security Model for authentication. These algorithms are
+HMAC-MD5-96 C<MD5> (RFC 1321) and HMAC-SHA-96 C<SHA-1> (NIST FIPS PUB
+180-1). The default algorithm used by the plugin is HMAC-MD5-96. This
+behavior can be changed by using this option. The option expects
+either the string C<md5> or C<sha> to be passed as argument to modify
+the hash algorithm.
+
+=item --privpassword I<PASSWORD>, --privkey I<KEY>
+
+[SNMPv3] By specifying the options --privkey or --privpassword, the
+securityLevel associated with the object becomes
+C<authPriv>. According to SNMPv3, privacy requires the use of
+authentication. Therefore, if either of these two options are present
+and the --authkey or --authpassword arguments are missing, the
+creation of the object fails. The --privkey and --privpassword
+options expect the same input as the --authkey and --authpassword
+options respectively.
+
+=item --privprotocol I<ALGORITHM>
+
+[SNMPv3] The User-based Security Model described in RFC 3414 defines a
+single encryption protocol to be used for privacy. This protocol,
+CBC-DES C<DES> (NIST FIPS PUB 46-1), is used by default or if the
+string C<des> is passed to the --privprotocol option. The Net::SNMP
+module also supports RFC 3826 which describes the use of
+CFB128-AES-128 C<AES> (NIST FIPS PUB 197) in the USM. The AES
+encryption protocol can be selected by passing C<aes> or C<aes128> to
+the --privprotocol option.
+
+One of the following arguments are required: des, aes, aes128, 3des,
+3desde
+
+=item --linebreak=I<STRING>
+
+check_hp_bladechassis will sometimes report more than one line,
+e.g. if there are several alerts. If the script has a TTY, it will use
+regular linebreaks. If not (which is the case with NRPE) it will use
+HTML linebreaks. Sometimes it can be useful to control what the plugin
+uses as a line separator, and this option provides that control.
+
+The argument is the exact string to be used as the line
+separator. There are two exceptions, i.e. two keywords that translates
+to the following:
+
+=over 4
+
+=item B<REG>
+
+Regular linebreaks, i.e. "\n".
+
+=item B<HTML>
+
+HTML linebreaks, i.e. "<br/>".
+
+=back
+
+This is a rather special option that is normally not needed. The
+default behaviour should be sufficient for most users.
+
+
+=head1 DIAGNOSTICS
+
+The option C<--debug> (or C<-d>) can be specified to display status
+of all components.
+
+=head1 DEPENDENCIES
+
+The perl module Net::SNMP is required on the Nagios host.
+
+=head1 EXIT STATUS
+
+If no errors are discovered, a value of 0 (OK) is returned. An exit
+value of 1 (WARNING) signifies one or more non-critical errors, while
+2 (CRITICAL) signifies one or more critical errors.
+
+The exit value 3 (UNKNOWN) is reserved for errors within the script,
+or errors getting values via SNMP.
+
+=head1 AUTHOR
+
+Written by Trond H. Amundsen <t.h.amundsen@usit.uio.no>
+
+=head1 BUGS AND LIMITATIONS
+
+None known at present.
+
+=head1 INCOMPATIBILITIES
+
+None known at present.
+
+Note that as of this writing, the plugin is only tested against the
+c7000 enclosure.
+
+=head1 REPORTING BUGS
+
+Report bugs to <t.h.amundsen@usit.uio.no>
+
+=head1 LICENSE AND COPYRIGHT
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see L<http://www.gnu.org/licenses/>.
+
+=head1 SEE ALSO
+
+L<http://folk.uio.no/trondham/software/check_hp_bladechassis.html>
+
+=cut
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.spec b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.spec
new file mode 100644
index 0000000..76f3490
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/check_hp_bladechassis.spec
@@ -0,0 +1,52 @@
+Summary: A Nagios plugin to check HP blade enclosures
+Name: check_hp_bladechassis
+Version: 1.0.1
+Release: 1%{?dist}
+License: GPL
+Packager: Trond Hasle Amundsen <t.h.amundsen@usit.uio.no>
+Group: Applications/System
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+URL: http://folk.uio.no/trondham/software/%{name}.html
+Source0: http://folk.uio.no/trondham/software/%{name}-%{version}.tar.gz
+BuildRequires: perl
+
+Requires: perl >= 5.6.0
+Requires: perl(Net::SNMP)
+Requires: perl(Getopt::Long)
+
+%description
+check_hp_bladechassis is a plugin for the Nagios monitoring
+software which checks the hardware health of HP blade enclosures via
+SNMP. The plugin is only tested with the c7000 enclosure.
+
+%prep
+%setup -q
+
+%build
+pod2man -s 8 -r "%{name} %{version}" -c "Nagios plugin" %{name}.pod %{name}.8
+gzip %{name}.8
+
+%install
+mkdir -p %{buildroot}/%{_libdir}/nagios/plugins
+mkdir -p %{buildroot}/%{_mandir}/man8
+install -p -m 0755 %{name} %{buildroot}/%{_libdir}/nagios/plugins
+install -m 0644 %{name}.8.gz %{buildroot}/%{_mandir}/man8
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-, root, root, -)
+%doc README COPYING CHANGES
+%{_libdir}/nagios/plugins/%{name}
+%attr(0755, root, root) %{_mandir}/man8/%{name}.8.gz
+
+
+%changelog
+* Fri Jan 22 2010 Trond H. Amundsen <t.h.amundsen@usit.uio.no> - 1.0.1-1
+- Version 1.0.1
+- Added buildrequires perl, fixed requires for perl modules
+- New location of script and manpage
+
+* Fri Aug 14 2009 Trond H. Amundsen <t.h.amundsen@usit.uio.no> - 1.0.0-1
+- Initial release
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/install.sh b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/install.sh
new file mode 100755
index 0000000..bbad493
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/install.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+if [ "`uname -m`" = "x86_64" ]; then
+ def_install_dir=/usr/lib64/nagios/plugins
+else
+ def_install_dir=/usr/lib/nagios/plugins
+fi
+def_mandir=/usr/share/man/man8
+
+if [ "$1" = "-q" ]; then
+ install_dir=$def_install_dir
+ mandir=$def_mandir
+else
+ echo -n "Plugin dir [$def_install_dir]: "
+ read install_dir
+ if [ "$install_dir" = "" ]; then
+ install_dir=$def_install_dir
+ fi
+ echo -n "Man page dir [$def_mandir]: "
+ read mandir
+ if [ "$mandir" = "" ]; then
+ mandir=$def_mandir
+ fi
+fi
+
+if [ -d $install_dir ]; then
+ :
+else
+ echo "ERROR: Plugin directory $install_dir doesn't exist,"
+ echo "ERROR: or is not a directory"
+ exit 1
+fi
+
+if [ -d $mandir ]; then
+ :
+else
+ echo "ERROR: Man page directory $mandir doesn't exist,"
+ echo "ERROR: or is not a directory"
+ exit 1
+fi
+
+# The script and symlinks
+cp check_hp_bladechassis $install_dir
+
+# The man page
+cp check_hp_bladechassis.8 $mandir
+
+# Done
+echo "done."
+exit 0
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis.cfg
new file mode 100644
index 0000000..458af00
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis.cfg
@@ -0,0 +1,6 @@
+# HP blade enclosure check
+define command {
+ command_name check_hp_bladechassis
+ command_line /usr/lib/nagios/plugins/check_hp_bladechassis -H $HOSTADDRESS$
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/control
new file mode 100644
index 0000000..1c71876
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/control
@@ -0,0 +1,8 @@
+Homepage: http://folk.uio.no/trondham/software/check_hp_bladechassis.html
+Watch: http://folk.uio.no/trondham/software/check_hp_bladechassis.html .*href="files/check_hp_bladechassis-([0-9.]+)\.tar\.gz
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to check the hardware health of
+ HP blade enclosures via SNMP.
+ The plugin is only tested with the c7000 enclosure.
+Recommends: libnet-snmp-perl
+Version: 1.0.1
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/copyright
new file mode 100644
index 0000000..d2e757a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/copyright
@@ -0,0 +1,15 @@
+AUTHOR: Trond H. Amundsen <t.h.amundsen@usit.uio.no>
+
+
+Copyright (C) 2010 Trond H. Amundsen
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/src b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/src
new file mode 120000
index 0000000..51429e6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/src
@@ -0,0 +1 @@
+check_hp_bladechassis-1.0.1 \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/Makefile
new file mode 100644
index 0000000..0fcfdce
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/Makefile
@@ -0,0 +1,15 @@
+PLUGIN := check_hpasm
+CLEANFILES := check_hpasm
+
+include ../common.mk
+
+check_hpasm:
+ set -e; for i in guess sub; do if [ ! -e src/config.$$i.bak ]; then cp src/config.$$i src/config.$$i.bak; fi; done
+ cp /usr/share/misc/config.* src
+ cd src && ./configure --prefix=/usr --enable-perfdata --enable-extendedinfo --with-nagios-user=nagios --with-nagios-group=nagios --with-degrees=celsius
+ make -C src
+ sed '2s,^,# nagios: -epn\n,' src/plugins-scripts/check_hpasm > $@
+
+clean::
+ [ ! -f src/Makefile ] || make -C src distclean
+ set -e; for i in guess sub; do if [ -e src/config.$$i.bak ]; then mv src/config.$$i.bak src/config.$$i; fi; done
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/AUTHORS b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/AUTHORS
new file mode 100755
index 0000000..6206f02
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/AUTHORS
@@ -0,0 +1 @@
+Gerhard Lausser <gerhard.lausser@consol.de>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/COPYING b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/COPYING
new file mode 100755
index 0000000..60549be
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/ChangeLog b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/ChangeLog
new file mode 100755
index 0000000..9370df3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/ChangeLog
@@ -0,0 +1,226 @@
+* 4.8 2018-09-24
+ check proliant cpqHeSysBatteryTable
+* 4.7.5.5 2018-04-19
+ add HPE Synergy
+* 4.7.5.4 2017-02-01
+ allow snmpv3 in a flat community-string
+* 4.7.5.3 2016-12-05
+ reorder cpqHoMibStatusArray
+* 4.7.5.2 2016-12-02
+ Detect more MSA devices (P2000)
+* 4.7.5.1 2016-11-18
+ Merge pull request # 15 Use HP::StorageWorks for HP MSA systems
+* 4.7.5 2016-09-19
+ better error message for hpasmcli on dl160 (Thanks Matthias Bethke)
+ better error detection for da accelerators
+ Merge pull request #6 from fredricj/master (Add support for proliant DA subsystem Disk enclosures)
+* 4.7.4 2016-06-16
+ allow tcp connects. state other for fans is like ok. (Thanks fredericve)
+* 4.7.3.1 2016-05-01
+ add blacklisting for ide. (Thanks Tommi)
+* 4.7.3 2016-02-15
+ add hp superdome 2
+* 4.7.2 2016-02-01
+ search for hpssacli if hpacucli was not found
+* 4.7.1.1 2015-06-08
+ bugfix for gen9 with broken SysRomVer string
+* 4.7.1 2015-03-23
+ interpret other status for fcal as ok
+* 4.7.0.2 2014-03-18
+ add another storageworks detection
+ add StoreEasy detection (thanks Alexander Laimer)
+* 4.7.0.1 2014-03-04
+ bugfix in blacklisting (Thanks Ingvar Hagelund)
+* 4.7 2014-02-21
+ add StorageWorks
+* 4.6.3.4 2013-05-15
+ fix a bug in fan perfdata (absent fans were shown with 0%)
+* 4.6.3.3 2013-04-10
+ fix a bug in snmp overall nic condition
+ sort events by id numerically
+* 4.6.3.2 2013-03-19
+ fix a bug in proliant/gen8/ilo temperature thresholds (Thanks Kai Benninghoff and Stephane Loeuillet)
+* 4.6.3.1 2013-01-10
+ fix a bug in da disk in local mode
+ fix a bux in overall_init proliant nics (Thanks Fanming Jen)
+* 4.6.3 2012-11-25
+ gen8 should work now
+ fix the problem with -99 degrees
+ fix the problem with binary zero EventUpdateTime
+* 4.6.2.1 2012-11-09
+ some bugfixes in bladecenter temperatures (Thanks Thomas Reichel)
+* 4.6.2 2012-08-20
+ fix some bugs in snmpget where the system responded with undef values
+* 4.6.1 2012-08-14
+ fix a small bug in boottime
+ skip pagination in long "show iml" lists
+ make bulk requests if possible
+* 4.6 2012-06-07
+ output power consumption as performance data (only newer proliant models)
+ support older <=7 versions of hpacucli
+ add another error log: Uncorrectable Memory Error
+ raise the default timeout from 15 to 60 seconds
+* 4.5.3.1 2012-04-19
+ change the way --snmpwalk reads oids from a file
+* 4.5.3 2012-03-26
+ fix a bug in snmp-eventlogs
+* 4.5.2 2012-03-06
+ add another error log: Main Memory - Corrected Memory Error threshold exceeded
+* 4.5.1 2012-02
+ add another error log: 210 - Quick Path Interconnect (QPI) Link Degradation
+ remove watt percent for blade center power supply
+ make the snmp oid collection phase shorter for blade center
+* 4.5 2012-01-26
+ output power consumption perfdata for BladeCenters
+ correctly identify dl388g7 (Thanks lilei8)
+* 4.4 2011-12-16
+ add checks for power converters
+ add checks for nic teaming (experimental!!, must be enabled with --eval-nics)
+ fix a bug with invalid date/time from iml
+ fix a bug in blade enclosure manager verbose output
+ add msa2xxx storage sensors
+* 4.3 2011-10-14
+ add monitoring of IML events (Thanks Klaus)
+ esp. Memory initialization error... The OS may not have access to all of the memory installed in the system
+* 4.2.5
+ G2 series of X1660 storage systems are now correctly detected. (Thanks Andre Zaborowski)
+ blacklisting for SAS controller & disks was added (Thanks Jewi)
+* 4.2.4.1 2011-08-09
+ dimm output of G7 hpasmcli (under Solaris) is now handled (Thanks Ron Waffle)
+* 4.2.4 2011-07-21
+add a check for asr (Thanks Ingmar Verheij http://www.ingmarverheij.com/)
+* 4.2.3 2011-07-21
+ add a global temperature check when no temperature sensors are found
+ check power converters if no fault tolerant power supplies are found
+* 4.2.2.1 2011-04-17
+ fix a bug when a wrong --hostname was used (Thanks Wim Savenberg)
+* 4.2.2 2011-01-21
+ add support for msa500 and hpasmcli (Thanks Kalle Andersson)
+* 4.2.1.1
+ added support for x1** nas storage, which was detected as storage but in fact is like a proliant (Thanks Maik Schulz)
+* 4.2.1
+ added timeout handling
+ better hpacucli da controller handling
+ fix a bug in memory detection (0 dimms were shown) (Thanks Anthony Cano)
+ better handling for failed and disabled controller batteries. warning only.
+* 4.2 2010-03-20
+ added temperatures for bladesystems (although not implemented by HP)
+ added fuses for bladesystems
+ added enclosure managers for bladesystems
+ added blacklisting for scsi devices (scco,scld,scpd) (Thanks Marco Hill)
+ added blacklisting for overall fan status (ofs) (Thanks Thomas Jampen)
+* 4.1.2.1 2010-03-03
+ fixed a harmless bug in BladeCenter::Powersupply output
+* 4.1.2 2010-02-09
+ fixed a severe bug in detecting multiple logical drives with hpacucli (Thanks Trond Hasle)
+* 4.1.1 2010-01-07
+ detect more smart array types when run in local mode (Thanks Trond Hasle)
+* 4.1 2009-12-07
+ added more details for bladecenters (power suppl., server blades)
+ fixed a bug in powersupply checks with hpasmcli (Thanks Guillaume)
+* 4.0.1 2009-12-02
+ added the missing output for --help
+ non-redundant fans are now tolerated if the global fan status says "ok"
+ added detection for servers with a hidden model description
+ fixed a bug in celsius-fahrenheit-conversion
+* 4.0 2009-11-30
+ added support for the new g6-models
+ complete rewrite of the code
+ autodetection for proliant, bladecenter and storage
+ detailed dump of the hardware with -vvv
+ new format for blacklist
+* 3.5.1 2009-04-22
+ fixed a bug where the server didn't reveal serial no. and rom rev. (thanks Daniel Rich)
+ fixed a bug in the snmpv3 code.
+* 3.5 2009-03-20
+ added support for SNMPv3
+ added new parameter --port
+* 3.2.1 2009-02-26
+ fixed a bug which showed degraded dimms as missing. (thanks matt at adicio.com)
+* 3.2 2009-02-20
+ added support for external disk arrays. (M. M. has a MSA20)
+* 3.1.1.1 2009-02-13
+ added an error message when sudo was configured with requiretty=yes. (thanks Jeff The Riffer)
+* 3.1.1 2009-02-06
+ fixed a bug which caused ugly perl warnings. (thanks Martin Hofmann and Bill Katz)
+* 3.1 2009-01-21
+ added support for sas and ide controllers/disks (only with snmp)
+* 3.0.7.2 2009-01-16
+ minor bugfix for dl320g5+hpasmcli+fan+n/a. (thanks Bruce Jackson)
+* 3.0.7.1 2008-12-05
+ minor bugfix. snmpwalk now uses -On
+* 3.0.7 2008-11-29
+ bugfix in controller blacklists (thanks Maurice Moric)
+ no need for Net::SNMP with --snmpwalk /usr/bin/snmpwalk
+* 3.0.6 2008-10-30
+ buxfix in ignore-dimms (thanks tumtliw)
+* 3.0.5 2008-10-23
+ higher speed through decreased amount of transferred oids (thanks Yannick Gravel)
+ new switch --ignore-fan-redundancy for old boxes without double fans
+* 3.0.4 2008-09-18
+ rewrote snmp memory checking for better handling of missing health info
+ new configure option --enable-extendedinfo (outputs lots of crap)
+* 3.0.3.2 2008-09-11
+ --protocol ist now optional (this was a bug)
+* 3.0.3.1 2008-09-10
+ Only accept 1, 2 or 2c as SNMP protocol
+ Try both bulk walk and get-next
+* 3.0.3 2008-08-11
+ cpqSiMem instead of cpqHeResMem
+ new parameter --protocol (default: 2c)
+ cpqHeComponents are fetched with get-next instead of get-bulk (Net::SNMP grr)
+* 3.0.2 2008-08-01
+ skip memory checking if snmp returns garbage
+ bugfix in numbering of snmp table indexes
+* 3.0.1 2008-07-31
+ bugfix in customthresholds&snmp (thanks TheCry)
+ broke up the snmpwalk into smaller pieces.
+* 3.0 2008-07-20
+ first release with snmp support for remote checks (thanks Matthias Flacke)
+ simulation is possible with --snmpwalk or --hpasmcli
+* 2.0.3.3 - 2008-05-22 Brangerdog
+ support fan partner# 0 with proliant support pack 8.0 (thanks Mark Wagner)
+* 2.0.3.2 - 2008-05-03
+ fixed a typo in README
+* 2.0.3.1 - 2008-04-16
+ fixed a bug in path to perl binary
+ fixed a bug in --enable-perfdata (thanks Birk Bohne)
+* 2.0.3 - 2008-04-09
+ fixed a bug in dimm code
+ added blacklisting for raid controllers (thanks Andreas Schrogl)
+ added blacklisting for cache&battery (thanks Harrold Nabben)
+* 2.0.2 - 2008-02-11
+ empty cpu&fan sockets are now properly handled
+* 2.0.1 - 2008-02-08
+ multiline output for nagios 3.x
+* 2.0 - 2008-02-08
+ complete code redesign
+ integrated raid checking with hpacucli
+ (thanks Kelly Kristiaan van Vliet who was the first to propose this feature)
+ (thanks Mess for calling me "FAULE SAU!!!")
+* 1.6.2.2 - 2008-01-18
+ added debian 3.1 to the osses where multiple hpasmd are considered normal.
+* 1.6.2.1 - 2007-12-12
+ fixed a bug which caused overlooked fans. Thanks Michael Krebs.
+ such unknown patterns which might be important will be reported now.
+* 1.6.2 - 2007-11-16
+ Marcus Fleige contributed the -i and a more meaningful ok output
+* 1.6.1 - 2007-11-07
+ fixed a bug which caused overlooked failed fans
+* 1.6 - 2007-07-27
+ added performance data for fan speed and temperatures
+* 1.5.1 - 2007-07-11
+ hpasmcli can also be a link
+ fixed a bug, so more fan locations can be found
+* 1.5 - 2007-06-14
+ added support for userdefined temperature thresholds (Kelly Kristiaan van Vliet)
+* 1.4 - 2007-05-22
+ added support for hpasmxld und hpasmlited
+* 1.3 - 2007-04-17
+ added --with-degree to configure (celsius or fahrenheit output)
+ added -b/--blacklist
+ added trustix 2.2 to the osses where multipel hpasmd are considered normal.
+* 1.2 - 2007-04-16
+ added --with-noinst-level
+* 1.1 - 2007-04-14
+ First public release
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/INSTALL b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/INSTALL
new file mode 100755
index 0000000..54caf7c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/INSTALL
@@ -0,0 +1,229 @@
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Foundation, Inc.
+
+ This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory. After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.am b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.am
new file mode 100755
index 0000000..23522dc
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.am
@@ -0,0 +1,6 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = plugins-scripts
+
+dist-hook:
+ make
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.in
new file mode 100644
index 0000000..2a5a026
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.in
@@ -0,0 +1,764 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog \
+ INSTALL NEWS README TODO config.guess config.sub install-sh \
+ missing
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CELSIUS = @CELSIUS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EXTENDEDINFO = @EXTENDEDINFO@
+HPACUCLI = @HPACUCLI@
+HWINFO = @HWINFO@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_OPTS = @INSTALL_OPTS@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NOINSTLEVEL = @NOINSTLEVEL@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERFDATA = @PERFDATA@
+PERL = @PERL@
+RELEASE = @RELEASE@
+SET_MAKE = @SET_MAKE@
+SH = @SH@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SUPPORT = @SUPPORT@
+VERSION = @VERSION@
+WARRANTY = @WARRANTY@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+with_nagios_group = @with_nagios_group@
+with_nagios_user = @with_nagios_user@
+SUBDIRS = plugins-scripts
+all: all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
+
+dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__post_remove_distdir)
+
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__post_remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
+ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \
+ dist-zip distcheck distclean distclean-generic distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+dist-hook:
+ make
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/NEWS b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/NEWS
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/NEWS
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/README b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/README
new file mode 100755
index 0000000..43fceac
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/README
@@ -0,0 +1,346 @@
+check_hpasm Nagios Plugin README
+---------------------
+
+This plugin checks the hardware health of HP Proliant servers with the
+hpasm software installed. It uses the hpasmcli command to acquire the
+condition of the system's critical components like cpus, power supplies,
+temperatures, fans and memory modules. Newer versions also use SNMP.
+
+* For instructions on installing this plugin for use with Nagios,
+ see below. In addition, generic instructions for the GNU toolchain
+ can be found in the INSTALL file.
+
+* For major changes between releases, read the CHANGES file.
+
+* For information on detailed changes that have been made,
+ read the Changelog file.
+
+* This plugins is self documenting. All plugins that comply with
+ the basic guidelines for development will provide detailed help when
+ invoked with the '-h' or '--help' options.
+
+You can check for the latest plugin at:
+ http://www.consol.de/opensource/nagios/check-hpasm
+
+Send mail to gerhard.lausser@consol.de for assistance.
+Please include the OS type and version that you are using.
+Also, run the plugin with the '-v' option and provide the resulting
+version information. Of course, there may be additional diagnostic information
+required as well. Use good judgment.
+
+
+How to "compile" the check_hpasm script.
+--------------------------------------------------------
+
+1) Run the configure script to initialize variables and create a Makefile, etc.
+
+ ./configure --prefix=BASEDIRECTORY --with-nagios-user=SOMEUSER --with-nagios-group=SOMEGROUP --with-perl=PATH_TO_PERL --with-noinst-level=LEVEL --with-degrees=UNIT --with-perfdata --with-hpacucli
+
+ a) Replace BASEDIRECTORY with the path of the directory under which Nagios
+ is installed (default is '/usr/local/nagios')
+ b) Replace SOMEUSER with the name of a user on your system that will be
+ assigned permissions to the installed plugins (default is 'nagios')
+ c) Replace SOMEGRP with the name of a group on your system that will be
+ assigned permissions to the installed plugins (default is 'nagios')
+ d) Replace PATH_TO_PERL with the path where a perl binary can be found.
+ Besides the system wide perl you might have installed a private perl
+ just for the nagios plugins (default is the perl in your path).
+ e) Replace LEVEL with one of ok, warning, critical or unknown.
+ If the required hpasm-rpm is not installed, the check_hpasm plugin
+ will exit with the level specified. If you chose ok, the message
+ will say "ok - .... hpasm is not installed". This is different from
+ the "ok - hardware working fine" if hpasm was found.
+ The default is to treat a missing hpasm package as ok.
+ f) Replace UNIT with one of celsius or fahrenheit. The hpasmcli "show temp"
+ prints temperatures both in units of celsius and fahrenheit. With the
+ --with-degrees option you can decide which units will be shown in an
+ alarm message.
+ The default is "celsius".
+ g) You can tell check_hpasm to output performance data by default if
+ you call configure with the --enable-perfdata option.
+ h) You can tell check_hpasm to check the raid status with the hpacucli command
+ if you call configure with the --enable-hpacucli option.
+ You need the hpacucli rpm.
+
+2) "Compile" the plugin with the following command:
+
+ make
+
+ This will produce a "check_hpasm" script. You will also find
+ a "check_hpasm.pl" which you better ignore. It is the base for
+ the compilation filled with placeholders. These will be replaced during
+ the make process.
+
+
+3) Install the compiled plugin script with the following command:
+
+ make install
+
+ The installation procedure will attempt to place the plugin in a
+ 'libexec/' subdirectory in the base directory you specified with
+ the --prefix argument to the configure script.
+
+
+4) Verify that your configuration files for Nagios contains
+ the correct paths to the new plugin.
+
+
+5) Add this line to /etc/sudoers:
+ nagios ALL=NOPASSWD: /sbin/hpasmcli
+ or ths, if you also installed the hpacu package
+ nagios ALL=NOPASSWD: /sbin/hpasmcli, /usr/sbin/hpacucli
+
+
+
+Command line parameters
+-----------------------
+
+-v, --verbose
+ Increased verbosity will print how check_hpasm communicates with the
+ hpasm daemon and which values were acquired.
+
+-t, --timeout
+ The number of seconds after which the plugin will abort.
+
+-b, --blacklist
+ If some components of your system are missing (mostly the secondary
+ power supply bay is empty) and you tolerate this, then blacklist the
+ missing/failed component to avoid false alarms.
+ The value for this option is a slash-separated list of components to
+ ignore.
+ Example: -b p:1,2/f:2/t:3,4/c:1/d:0-1,0-2
+ means: ignore power supplies #1 and #2, fan #2, temperature #3 and #4,
+ cpu #1 and dimms #1 and #2 in cartridge #0.
+
+-c, --customthresh
+ Override the machine-default temperature thresholds.
+ Example: -c 1:60/4:80/5:50
+ Sets limit for temperature 1 to 60 degrees, temperature 4 to 80 degrees
+ and temperature 5 to 50 degrees. You get the consecutive numbers by
+ calling check_hpasm -v
+ ...
+ checking temperatures
+ 1 processor_zone temperature is 46 (62 max)
+ 2 cpu#1 temperature is 43 (73 max)
+ 3 i/o_zone temperature is 54 (68 max)
+ 4 cpu#2 temperature is 46 (73 max)
+ 5 power_supply_bay temperature is 38 (55 max)
+
+-p, --perfdata
+ Add performance data to the output even if you did not compile check_hpasm
+ with --with-perfdata in step 1.
+
+
+
+SNMP and Memory Modules
+-----------------------
+Older hardware does not always show valuable information when queried for
+the health of memory modules. Maybe it's because older modules do not support
+error checking at all.
+
+
+1. no cpqHeResMemModule
+---------------------------------------------------------------------------
+
+2. collapsed cpqHeResMemModule
+---------------------------------------------------------------------------
+
+Some (older) systems do not support the cpqHeResMemModuleEntry table.
+Either there is no oid with 1.3.6.1.4.1.232.6.2.14.11.1 at all
+or there is a single oid like
+
+Example:
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.1 = INTEGER: 524288
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.2 = INTEGER: 262144
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.3 = INTEGER: 0
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.4 = INTEGER: 524288
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.5 = INTEGER: 262144
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.6 = INTEGER: 0
+
+ ^-- module number
+ ^-- cartridge number (0 = system board)
+ ^-- size
+
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.6 = INTEGER: 0
+
+I compared 300 systems and found out that with
+1.3.6.1.4.1.232.6.2.14.11.1.<no1>.<no2>.<no3> = <no4>
+no1 is always 1
+no2 is always 0
+no3 is the number of memory slots (including the empty ones).
+no4 is always 0. It is probably the health status of the
+overall memory subsystem. I don't know.
+I will implement 0 = ok, not 0 = ask compaq
+
+cpqSiMemECCStatus provides no usable information. All my test systems
+showed 0 which is an undocumented value.
+
+function get_size(cpqHeResMemModuleEntry) will return 1.
+
+3. cpqHeResMemModule containing crap
+---------------------------------------------------------------------------
+
+grepping for cpqSiMemBoardSize shows 4 modules
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.1 = INTEGER: 262144
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.2 = INTEGER: 262144
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.3 = INTEGER: 0
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.4 = INTEGER: 262144
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.5 = INTEGER: 262144
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.6 = INTEGER: 0
+
+grepping for cpqHeResMemEntry shows one module with zero values
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.0 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.2.0.0 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.3.0.0 = ""
+iso.3.6.1.4.1.232.6.2.14.11.1.4.0.0 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.5.0.0 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.6.0.0 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+
+
+4. cpqHeResMemModuleEntry and cpqSiMemModuleEntry use different table indexes
+---------------------------------------------------------------------------
+
+cpqSiMemBoardIndex 1.3.6.1.4.1.232.2.2.4.5.1.1
+cpqSiMemModuleIndex 1.3.6.1.4.1.232.2.2.4.5.1.2
+
+cpqHeResMemBoardIndex 1.3.6.1.4.1.232.6.2.14.11.1.1
+cpqHeResMemModuleIndex 1.3.6.1.4.1.232.6.2.14.11.1.2
+
+
+cpqSiMemBoardIndex
+SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.1 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.2 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.3 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.4 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.5 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.6 = INTEGER: 0
+
+cpqHeResMemBoardIndex
+SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.1 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.2 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.3 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.4 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.5 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.6 = INTEGER: 0
+
+It is not possible to use the SNMP-table-indices to identify the
+corresponding he-entry. Matching is done with nested loops.
+
+5. even worse: cpqHeResMemBoardIndex and cpqSiMemBoardIndex don't match
+---------------------------------------------------------------------------
+
+cpqSiMemBoardIndex
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.1 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.2 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.3 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.4 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.5 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.6 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.7 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.8 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.1 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.2 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.3 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.4 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.5 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.6 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.7 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.8 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.3.1 = INTEGER: 3
+
+cpqHeResMemBoardIndex
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.1 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.2 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.3 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.4 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.5 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.6 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.7 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.8 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.1 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.2 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.3 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.4 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.5 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.6 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.7 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.8 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.2.1 = INTEGER: 2
+
+
+Redundant fans
+-----------------------
+I saw one old server which had only half of the possible fans installed.
+
+Fan# 1 2 3 4 5 6
+
+cpqHeFltTolFanPresent yes no yes no yes no
+cpqHeFltTolFanRedundant no no no no no no
+cpqHeFltTolFanRedundantPartner 2 1 4 3 6 5
+cpqHeFltTolFanCondition ok other ok other ok other
+cpqHeFltTolFanLocation cpu cpu cpu cpu io io
+
+Normally this would result in
+...
+fan #1 (cpu) is not redundant
+fan #2 (cpu) is not redundant
+fan #3 (cpu) is not redundant
+fan #4 (cpu) is not redundant
+fan #5 (ioboard) is not redundant
+fan #6 (ioboard) is not redundant
+WARNING - fan #1 (cpu) is not redundant, fan #2 (cpu) is not redundant, fan #3 (cpu) is not redundant, fan #4 (cpu) is not redundant, fan #5 (ioboard) is not redundant, fan #6 (ioboard) is not redundant
+
+However it was the server's owner decision not to install fan pairs but only one fan per location, so for him this is a false alert.
+
+By using --ignore-fan-redundancy check_hpasm only looks at the cpqHeFltTolFanCondition and ignores dependencies between two fans, so the result is:
+
+fan 1 speed is normal, pctmax is 50%, location is cpu, redundance is no, partner is 2
+fan 3 speed is normal, pctmax is 50%, location is cpu, redundance is no, partner is 4
+fan 5 speed is normal, pctmax is 50%, location is ioboard, redundance is no, partner is 6
+OK - System: 'proliant ml370 g3', ...
+
+
+A snmp forwarding trick
+-----------------------
+local - where check_hpasm runs
+remote - where a proliant can be reached
+proliant - where the snmp agent runs
+
+remote:
+ssh -R6667:localhost:6667 local
+socat tcp4-listen:6667,reuseaddr,fork UDP:proliant:161
+
+local:
+socat udp4-listen:161,reuseaddr,fork tcp:localhost:6667
+check_hpasm --hostname 127.0.0.1
+
+
+Sample data from real machines
+------------------------------
+
+hpasmcli=$(which hpasmcli)
+hpacucli=$(which hpacucli)
+for i in server powersupply fans temp dimm
+do
+ $hpasmcli -s "show $i" | while read line
+ do
+ printf "%s %s\n" $i "$line"
+ done
+done
+if [ -x "$hpacucli" ]; then
+ for i in config status
+ do
+ $hpacucli ctrl all show $i | while read line
+ do
+ printf "%s %s\n" $i "$line"
+ done
+ done
+fi
+
+If you think check_hpasm is not working correctly, please run the above script
+and send me the output. It's also helpful to see the output of snmpwalk
+snmpwalk .... 1.3.6.1.4.1.232
+
+
+--
+Gerhard Lausser <gerhard.lausser@consol.de>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/TODO b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/TODO
new file mode 100755
index 0000000..64291ca
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/TODO
@@ -0,0 +1,71 @@
+"1.3.6.1.4.1.232.6.2.9.3.1.4.0"; /* PSU Table */
+warning = 3, critical = 4
+
+"1.3.6.1.4.1.232.6.2.6.4.0"; /* Fan status */
+oder auch .... 7
+warning = 3, critical = 4
+3=non-required fan im arsch
+4=required fan im arsch
+
+
+"1.3.6.1.4.1.232.3.2.5.1.1.5"; /* Location Table */
+"1.3.6.1.4.1.232.3.2.5.1.1.6"; /* Drive Table */
+"1.3.6.1.4.1.232.3.2.5.1.1.50"; /* Drive Bus */
+
+
+"1.3.6.1.4.1.232.6.2.6.8.1.4.1"; /* Temperature table */
+
+ml370g4
+ "Processor zone",
+ "CPU 1",
+ "I/O zone",
+ "CPU 2"
+ 57.0, 80.0, 53.0, 80.0
+
+dl385g1
+ "CPU 1",
+ "I/O zone",
+ "CPU 2",
+ "Processor zone",
+ "PSU bay"
+ 100.0, 62.0, 100.0, 60.0, 51.0
+
+dl380g4
+ "Processor zone",
+ "CPU 1",
+ "I/O zone",
+ "CPU 2",
+ "PSU bay"
+ 62.0, 80.0, 60.0, 80.0, 50.0
+
+dl380g3
+ "Processor zone",
+ "CPU 1",
+ "I/O zone",
+ "CPU 2",
+ "PSU bay"
+ 62.0, 73.0, 68.0, 73.0, 53.0
+
+dl360g4
+ "I/O zone",
+ "CPU 1",
+ "CPU 2",
+ "PSU bay",
+ "System board"
+ 63.0, 85.0, 85.0, 48.0, 41.0
+
+dl360g3
+ "Processor zone",
+ "CPU 1",
+ "I/O zone",
+ "CPU 2"
+ 56.0, 67.0, 57.0, 67.0
+
+dl329g3
+ "Processor zone",
+ "CPU 1",
+ "I/O zone"
+ 41.0, 85.0, 52.0
+
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/acinclude.m4 b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/acinclude.m4
new file mode 100755
index 0000000..788d68e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/acinclude.m4
@@ -0,0 +1,78 @@
+dnl @synopsis ACX_WHICH_GETHOSTBYNAME_R
+dnl
+dnl Provides a test to determine the correct way to call gethostbyname_r
+dnl
+dnl defines HAVE_GETHOSTBYNAME_R to the number of arguments required
+dnl
+dnl e.g. 6 arguments (linux)
+dnl e.g. 5 arguments (solaris)
+dnl e.g. 3 arguments (osf/1)
+dnl
+dnl @version $Id: acinclude.m4,v 1.5 2004/02/18 14:56:34 kdebisschop Exp $
+dnl @author Brian Stafford <brian@stafford.uklinux.net>
+dnl
+dnl based on version by Caolan McNamara <caolan@skynet.ie>
+dnl based on David Arnold's autoconf suggestion in the threads faq
+dnl
+AC_DEFUN([ACX_WHICH_GETHOSTBYNAME_R],
+[AC_CACHE_CHECK(number of arguments to gethostbyname_r,
+ acx_which_gethostbyname_r, [
+ AC_TRY_COMPILE([
+# include <netdb.h>
+ ], [
+
+ char *name;
+ struct hostent *he;
+ struct hostent_data data;
+ (void) gethostbyname_r(name, he, &data);
+
+ ],acx_which_gethostbyname_r=3,
+ [
+dnl acx_which_gethostbyname_r=0
+ AC_TRY_COMPILE([
+# include <netdb.h>
+ ], [
+ char *name;
+ struct hostent *he, *res;
+ char *buffer = NULL;
+ int buflen = 2048;
+ int h_errnop;
+ (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
+ ],acx_which_gethostbyname_r=6,
+
+ [
+dnl acx_which_gethostbyname_r=0
+ AC_TRY_COMPILE([
+# include <netdb.h>
+ ], [
+ char *name;
+ struct hostent *he;
+ char *buffer = NULL;
+ int buflen = 2048;
+ int h_errnop;
+ (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
+ ],acx_which_gethostbyname_r=5,acx_which_gethostbyname_r=0)
+
+ ]
+
+ )
+ ]
+ )
+ ])
+
+if test $acx_which_gethostbyname_r -gt 0 ; then
+ AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYNAME_R], $acx_which_gethostbyname_r,
+ [Number of parameters to gethostbyname_r or 0 if not available])
+fi
+
+])
+
+dnl @synopsis ACX_HELP_STRING(OPTION,DESCRIPTION)
+AC_DEFUN([ACX_HELP_STRING],
+ [ $1 builtin([substr],[ ],len($1))[$2]])
+
+
+dnl @synopsis ACX_FEATURE(ENABLE_OR_WITH,NAME[,VALUE])
+AC_DEFUN([ACX_FEATURE],
+ [echo "builtin([substr],[ ],len(--$1-$2))--$1-$2: ifelse($3,,[$]translit($1-$2,-,_),$3)"])
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/aclocal.m4 b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/aclocal.m4
new file mode 100644
index 0000000..247ef18
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/aclocal.m4
@@ -0,0 +1,758 @@
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.15'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.15], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.15])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.65])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([acinclude.m4])
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.guess b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.guess
new file mode 100755
index 0000000..b79252d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.guess
@@ -0,0 +1,1558 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-06-10'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ or1k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+esac
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.sub b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.sub
new file mode 100755
index 0000000..8b612ab
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.sub
@@ -0,0 +1,1788 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-04-24'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
+ | ns16k | ns32k \
+ | open8 \
+ | or1k | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* | -plan9* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or1k-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure
new file mode 100755
index 0000000..821e463
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure
@@ -0,0 +1,4028 @@
+#! /bin/sh
+# From configure.in .
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for check_hpasm 4.8.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='check_hpasm'
+PACKAGE_TARNAME='check_hpasm'
+PACKAGE_VERSION='4.8'
+PACKAGE_STRING='check_hpasm 4.8'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_default_prefix=/usr/local/nagios
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+PERL
+SH
+HPACUCLI
+HWINFO
+EXTENDEDINFO
+PERFDATA
+CELSIUS
+NOINSTLEVEL
+INSTALL_OPTS
+with_nagios_group
+with_nagios_user
+SUPPORT
+WARRANTY
+INSTALL
+RELEASE
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+runstatedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+with_nagios_user
+with_nagios_group
+with_noinst_level
+with_degrees
+enable_perfdata
+enable_extendedinfo
+enable_hwinfo
+enable_hpacucli
+with_perl
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir runstatedir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures check_hpasm 4.8 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/check_hpasm]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of check_hpasm 4.8:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-perfdata wether to output perfdata (default=no)
+ --enable-extendedinfo wether to output extended info (default=no)
+ --disable-hwinfo wether to output model desc., serial no., bios version (default=yes)
+ --enable-hpacucli wether to check raid status with hpacucli (default=no)
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-nagios-user=USER set user name to run nagios
+ --with-nagios-group=GROUP set group name to run nagios
+ --with-noinst-level=LEVEL error level if hpasm is not installed
+ --with-degrees=UNIT which temperature unit to use. (celsius or fahrenheit)
+ --with-perl=PATH sets path to perl executable
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+check_hpasm configure 4.8
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by check_hpasm $as_me 4.8, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+am__api_version='1.15'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='check_hpasm'
+ VERSION='4.8'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5
+$as_echo_n "checking how to create a pax tar archive... " >&6; }
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_pax-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ { echo "$as_me:$LINENO: $_am_tar --version" >&5
+ ($_am_tar --version) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && break
+ done
+ am__tar="$_am_tar --format=posix -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=posix -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x pax -w "$$tardir"'
+ am__tar_='pax -L -x pax -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H pax -L'
+ am__tar_='find "$tardir" -print | cpio -o -H pax -L'
+ am__untar='cpio -i -H pax -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_pax}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
+ (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
+ ($am__untar <conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
+ (cat conftest.dir/file) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ if ${am_cv_prog_tar_pax+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ am_cv_prog_tar_pax=$_am_tool
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5
+$as_echo "$am_cv_prog_tar_pax" >&6; }
+
+
+
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+RELEASE=1
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+
+WARRANTY="This plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugin under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n"
+
+
+SUPPORT="Send email to gerhard.lausser@consol.de if you have questions\nregarding use of this software.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n"
+
+
+
+# Check whether --with-nagios_user was given.
+if test "${with_nagios_user+set}" = set; then :
+ withval=$with_nagios_user; with_nagios_user=$withval
+else
+ with_nagios_user=nagios
+fi
+
+
+# Check whether --with-nagios_group was given.
+if test "${with_nagios_group+set}" = set; then :
+ withval=$with_nagios_group; with_nagios_group=$withval
+else
+ with_nagios_group=nagios
+fi
+
+
+
+INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group"
+
+
+# Check whether --with-noinst_level was given.
+if test "${with_noinst_level+set}" = set; then :
+ withval=$with_noinst_level; with_noinst_level=$withval
+else
+ with_noinst_level=unknown
+fi
+
+NOINSTLEVEL=$with_noinst_level
+
+
+# Check whether --with-degrees was given.
+if test "${with_degrees+set}" = set; then :
+ withval=$with_degrees; with_degrees=$withval
+else
+ with_degrees=unknown
+fi
+
+case "$with_degrees" in
+ fahrenheit)
+ CELSIUS=0
+
+ ;;
+ *)
+ CELSIUS=1
+
+ ;;
+esac
+# Check whether --enable-perfdata was given.
+if test "${enable_perfdata+set}" = set; then :
+ enableval=$enable_perfdata;
+else
+ enable_perfdata=no
+fi
+
+if test x"$enable_perfdata" = xyes ; then
+ PERFDATA=1
+
+else
+ PERFDATA=0
+
+fi
+# Check whether --enable-extendedinfo was given.
+if test "${enable_extendedinfo+set}" = set; then :
+ enableval=$enable_extendedinfo;
+else
+ enable_extendedinfo=no
+fi
+
+if test x"$enable_extendedinfo" = xyes ; then
+ EXTENDEDINFO=1
+
+else
+ EXTENDEDINFO=0
+
+fi
+# Check whether --enable-hwinfo was given.
+if test "${enable_hwinfo+set}" = set; then :
+ enableval=$enable_hwinfo;
+else
+ enable_hwinfo=yes
+fi
+
+
+if test x"$enable_hwinfo" = xyes ; then
+ HWINFO=1
+
+else
+ HWINFO=0
+
+fi
+# Check whether --enable-hpacucli was given.
+if test "${enable_hpacucli+set}" = set; then :
+ enableval=$enable_hpacucli;
+else
+ enable_hpacucli=no
+fi
+
+
+if test x"$enable_hpacucli" = xyes ; then
+ HPACUCLI=1
+
+elif test x"$enable_hpacucli" = xmaybe ; then
+ HPACUCLI=2
+
+else
+ HPACUCLI=0
+
+fi
+
+
+
+
+
+case "$host_os" in
+ *hp*)
+ defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin:/usr/contrib/bin
+ ;;
+ *)
+ defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin
+ ;;
+esac
+
+EXTRAS=
+
+# Extract the first word of "sh", so it can be a program name with args.
+set dummy sh; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SH+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $SH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SH="$SH" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+SH=$ac_cv_path_SH
+if test -n "$SH"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
+$as_echo "$SH" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PERL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+# Check whether --with-perl was given.
+if test "${with_perl+set}" = set; then :
+ withval=$with_perl; with_perl=$withval
+else
+ with_perl=$PERL
+fi
+
+PERL=$with_perl
+
+
+ac_config_files="$ac_config_files Makefile plugins-scripts/Makefile plugins-scripts/subst"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by check_hpasm $as_me 4.8, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+check_hpasm config.status 4.8
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "plugins-scripts/Makefile") CONFIG_FILES="$CONFIG_FILES plugins-scripts/Makefile" ;;
+ "plugins-scripts/subst") CONFIG_FILES="$CONFIG_FILES plugins-scripts/subst" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES "
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+
+ esac
+
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+echo " --with-perl: $with_perl"
+echo " --with-nagios-user: $with_nagios_user"
+echo " --with-nagios-group: $with_nagios_group"
+echo " --with-noinst-level: $with_noinst_level"
+echo " --with-degrees: $with_degrees"
+echo " --enable-perfdata: $enable_perfdata"
+echo " --enable-extendedinfo: $enable_extendedinfo"
+echo " --enable-hwinfo: $enable_hwinfo"
+echo " --enable-hpacucli: $enable_hpacucli"
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure.in
new file mode 100755
index 0000000..ba41d6e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure.in
@@ -0,0 +1,133 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_REVISION ($Revision: 1.150 $)
+AC_PREREQ(2.58)
+AC_INIT(check_hpasm,4.8)
+AM_INIT_AUTOMAKE([1.9 tar-pax])
+AC_CANONICAL_HOST
+
+RELEASE=1
+AC_SUBST(RELEASE)
+
+AC_PREFIX_DEFAULT(/usr/local/nagios)
+
+dnl Figure out how to invoke "install" and what install options to use.
+AC_PROG_INSTALL
+AC_SUBST(INSTALL)
+
+AC_PROG_MAKE_SET
+AC_PROG_AWK
+
+WARRANTY="This plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugin under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n"
+AC_SUBST(WARRANTY)
+
+SUPPORT="Send email to gerhard.lausser@consol.de if you have questions\nregarding use of this software.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n"
+AC_SUBST(SUPPORT)
+
+AC_ARG_WITH(nagios_user,
+ ACX_HELP_STRING([--with-nagios-user=USER],
+ [set user name to run nagios]),
+ with_nagios_user=$withval,
+ with_nagios_user=nagios)
+AC_ARG_WITH(nagios_group,
+ ACX_HELP_STRING([--with-nagios-group=GROUP],
+ [set group name to run nagios]),
+ with_nagios_group=$withval,
+ with_nagios_group=nagios)
+AC_SUBST(with_nagios_user)
+AC_SUBST(with_nagios_group)
+INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group"
+AC_SUBST(INSTALL_OPTS)
+AC_ARG_WITH(noinst_level,
+ ACX_HELP_STRING([--with-noinst-level=LEVEL],
+ [error level if hpasm is not installed]),
+ with_noinst_level=$withval,
+ with_noinst_level=unknown)
+AC_SUBST(NOINSTLEVEL, $with_noinst_level)
+AC_ARG_WITH(degrees,
+ ACX_HELP_STRING([--with-degrees=UNIT],
+ [which temperature unit to use. (celsius or fahrenheit)]),
+ with_degrees=$withval,
+ with_degrees=unknown)
+case "$with_degrees" in
+ fahrenheit)
+ AC_SUBST(CELSIUS, 0)
+ ;;
+ *)
+ AC_SUBST(CELSIUS, 1)
+ ;;
+esac
+AC_ARG_ENABLE([perfdata],
+[ --enable-perfdata wether to output perfdata (default=no)], ,enable_perfdata=no)
+if test x"$enable_perfdata" = xyes ; then
+ AC_SUBST(PERFDATA, 1)
+else
+ AC_SUBST(PERFDATA, 0)
+fi
+AC_ARG_ENABLE([extendedinfo],
+[ --enable-extendedinfo wether to output extended info (default=no)], ,enable_extendedinfo=no)
+if test x"$enable_extendedinfo" = xyes ; then
+ AC_SUBST(EXTENDEDINFO, 1)
+else
+ AC_SUBST(EXTENDEDINFO, 0)
+fi
+AC_ARG_ENABLE([hwinfo],
+[ --disable-hwinfo wether to output model desc., serial no., bios version (default=yes)], ,enable_hwinfo=yes)
+
+if test x"$enable_hwinfo" = xyes ; then
+ AC_SUBST(HWINFO, 1)
+else
+ AC_SUBST(HWINFO, 0)
+fi
+AC_ARG_ENABLE([hpacucli],
+[ --enable-hpacucli wether to check raid status with hpacucli (default=no)], ,enable_hpacucli=no)
+
+if test x"$enable_hpacucli" = xyes ; then
+ AC_SUBST(HPACUCLI, 1)
+elif test x"$enable_hpacucli" = xmaybe ; then
+ AC_SUBST(HPACUCLI, 2)
+else
+ AC_SUBST(HPACUCLI, 0)
+fi
+
+
+
+
+
+case "$host_os" in
+ *hp*)
+ defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin:/usr/contrib/bin
+ ;;
+ *)
+ defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin
+ ;;
+esac
+
+EXTRAS=
+dnl PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH
+
+dnl Checks for programs.
+AC_PATH_PROG(SH,sh)
+AC_PATH_PROG(PERL,perl)
+
+dnl allow them to override the path of perl
+AC_ARG_WITH(perl,
+ ACX_HELP_STRING([--with-perl=PATH],
+ [sets path to perl executable]),
+ with_perl=$withval,with_perl=$PERL)
+AC_SUBST(PERL, $with_perl)
+
+AC_OUTPUT(
+ Makefile
+ plugins-scripts/Makefile
+ plugins-scripts/subst
+)
+
+ACX_FEATURE([with],[perl])
+ACX_FEATURE([with],[nagios-user])
+ACX_FEATURE([with],[nagios-group])
+ACX_FEATURE([with],[noinst-level])
+ACX_FEATURE([with],[degrees])
+ACX_FEATURE([enable],[perfdata])
+ACX_FEATURE([enable],[extendedinfo])
+ACX_FEATURE([enable],[hwinfo])
+ACX_FEATURE([enable],[hpacucli])
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/install-sh b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/install-sh
new file mode 100755
index 0000000..377bb86
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/install-sh
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-11-20.07; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call 'install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for 'test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/missing b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/missing
new file mode 100755
index 0000000..cdea514
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2012-06-26.16; # UTC
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+fi
+
+case $1 in
+
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
+
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
+
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'automa4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem.pm
new file mode 100755
index 0000000..64e69e6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem.pm
@@ -0,0 +1,240 @@
+package HP::BladeSystem;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+use Data::Dumper;
+
+our @ISA = qw(HP::Server HP::Proliant::Component::SNMP);
+
+sub init {
+ my $self = shift;
+ $self->{components} = {
+ common_enclosure_subsystem => undef,
+ power_enclosure_subsystem => undef,
+ power_supply_subsystem => undef,
+ net_connector_subsystem => undef,
+ server_blade_subsystem => undef,
+ };
+ $self->{serial} = 'unknown';
+ $self->{product} = 'unknown';
+ $self->{romversion} = 'unknown';
+ $self->trace(3, 'BladeSystem identified');
+ $self->collect();
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ $self->set_serial();
+ $self->analyze_common_enclosures();
+ $self->analyze_power_enclosures();
+ $self->analyze_power_supplies();
+ $self->analyze_net_connectors();
+ $self->analyze_server_blades();
+ $self->check_common_enclosures();
+ $self->check_power_enclosures();
+ $self->check_power_supplies();
+ $self->check_net_connectors();
+ $self->check_server_blades();
+ }
+}
+
+sub identify {
+ my $self = shift;
+ return sprintf "System: '%s', S/N: '%s'",
+ $self->{product}, $self->{serial};
+}
+
+sub dump {
+ my $self = shift;
+ printf STDERR "serial %s\n", $self->{serial};
+ printf STDERR "product %s\n", $self->{product};
+ printf STDERR "romversion %s\n", $self->{romversion};
+ printf STDERR "%s\n", Data::Dumper::Dumper($self->{enclosures});
+}
+
+sub analyze_common_enclosures {
+ my $self = shift;
+ $self->{components}->{common_enclosure_subsystem} =
+ HP::BladeSystem::Component::CommonEnclosureSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_power_enclosures {
+ my $self = shift;
+ $self->{components}->{power_enclosure_subsystem} =
+ HP::BladeSystem::Component::PowerEnclosureSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_power_supplies {
+ my $self = shift;
+ $self->{components}->{power_supply_subsystem} =
+ HP::BladeSystem::Component::PowerSupplySubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_net_connectors {
+ my $self = shift;
+ $self->{components}->{net_connector_subsystem} =
+ HP::BladeSystem::Component::NetConnectorSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_server_blades {
+ my $self = shift;
+ $self->{components}->{server_blade_subsystem} =
+ HP::BladeSystem::Component::ServerBladeSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub check_common_enclosures {
+ my $self = shift;
+ $self->{components}->{common_enclosure_subsystem}->check();
+ $self->{components}->{common_enclosure_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_power_enclosures {
+ my $self = shift;
+ $self->{components}->{power_enclosure_subsystem}->check();
+ $self->{components}->{power_enclosure_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_power_supplies {
+ my $self = shift;
+ $self->{components}->{power_supply_subsystem}->check();
+ $self->{components}->{power_supply_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_net_connectors {
+ my $self = shift;
+ $self->{components}->{net_connector_subsystem}->check();
+ $self->{components}->{net_connector_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_server_blades {
+ my $self = shift;
+ $self->{components}->{server_blade_subsystem}->check();
+ $self->{components}->{server_blade_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub collect {
+ my $self = shift;
+ if ($self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $cpqRackMibCondition = '1.3.6.1.4.1.232.22.1.3.0';
+ $self->trace(3, 'getting cpqRackMibCondition');
+ if (! exists $self->{rawdata}->{$cpqRackMibCondition}) {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqrack-mib)');
+ }
+ } else {
+ my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000
+ #$params{'-translate'} = [
+ # -all => 0x0
+ #];
+ my ($session, $error) =
+ Net::SNMP->session(%{$self->{runtime}->{snmpparams}});
+ if (! defined $session) {
+ $self->{plugin}->add_message(CRITICAL, 'cannot create session object');
+ $self->trace(1, Data::Dumper::Dumper($self->{runtime}->{snmpparams}));
+ } else {
+ # revMajor is often used for discovery of hp devices
+ my $cpqSeMibRev = '1.3.6.1.4.1.232.22.1';
+ my $cpqSeMibRevMajor = '1.3.6.1.4.1.232.22.1.1.0';
+ my $cpqRackMibCondition = '1.3.6.1.4.1.232.22.1.3.0';
+ $self->trace(3, 'getting cpqRackMibCondition');
+ my $result = $session->get_request(
+ -varbindlist => [$cpqRackMibCondition]
+ );
+ if (!defined($result) ||
+ $result->{$cpqRackMibCondition} eq 'noSuchInstance' ||
+ $result->{$cpqRackMibCondition} eq 'noSuchObject' ||
+ $result->{$cpqRackMibCondition} eq 'endOfMibView') {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqrack-mib)');
+ $session->close;
+ } else {
+ $self->trace(3, 'getting cpqRackMibCondition done');
+ }
+ }
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ # snmp peer is alive
+ $self->trace(2, sprintf "Protocol is %s",
+ $self->{runtime}->{snmpparams}->{'-version'});
+ my $oidtrees = [
+ ["cpqSiComponent", "1.3.6.1.4.1.232.2.2"],
+ ["cpqSiAsset", "1.3.6.1.4.1.232.2.2.2"],
+ #["cpqRackInfo", "1.3.6.1.4.1.232.22"],
+ ['cpqRackCommonEnclosureEntry', '1.3.6.1.4.1.232.22.2.3.1.1.1'],
+ ['cpqRackCommonEnclosureTempEntry', '1.3.6.1.4.1.232.22.2.3.1.2.1'],
+ ['cpqRackCommonEnclosureFanEntry', '1.3.6.1.4.1.232.22.2.3.1.3.1'],
+ ['cpqRackCommonEnclosureFuseEntry', '1.3.6.1.4.1.232.22.2.3.1.4.1'],
+ ['cpqRackCommonEnclosureManagerEntry', '1.3.6.1.4.1.232.22.2.3.1.6.1'],
+ ['cpqRackPowerEnclosureEntry', '1.3.6.1.4.1.232.22.2.3.3.1.1'],
+ ['cpqRackServerBladeEntry', '1.3.6.1.4.1.232.22.2.4.1.1.1'],
+ ['cpqRackPowerSupplyEntry', '1.3.6.1.4.1.232.22.2.5.1.1.1'],
+ ['cpqRackNetConnectorEntry', '1.3.6.1.4.1.232.22.2.6.1.1.1'],
+ ['cpqRackMibCondition', '1.3.6.1.4.1.232.22.1.3.0'],
+ ];
+ my $cpqSiComponent = "1.3.6.1.4.1.232.2.2";
+ my $cpqSiAsset = "1.3.6.1.4.1.232.2.2.2";
+ my $cpqRackInfo = "1.3.6.1.4.1.232.22";
+ $session->translate;
+ my $response = {}; #break the walk up in smaller pieces
+ foreach my $subtree (@{$oidtrees}) {
+ my $tic = time; my $tac = $tic;
+ my $response0 = $session->get_table(
+ -baseoid => $subtree->[1]);
+ if (scalar (keys %{$response0}) == 0) {
+ $self->trace(2, sprintf "maxrepetitions failed. fallback");
+ $response0 = $session->get_table(
+ -maxrepetitions => 1,
+ -baseoid => $subtree->[1]);
+ }
+ $tac = time;
+ $self->trace(2, sprintf "%03d seconds for walk %s (%d oids)",
+ $tac - $tic, $subtree->[0], scalar(keys %{$response0}));
+ map { $response->{$_} = $response0->{$_} } keys %{$response0};
+ }
+ $session->close;
+ map { $response->{$_} =~ s/^\s+//; $response->{$_} =~ s/\s+$//; }
+ keys %$response;
+ $self->{rawdata} = $response;
+ }
+ }
+ return $self->{runtime}->{plugin}->check_messages();
+}
+
+sub set_serial {
+ my $self = shift;
+
+ my $cpqSiSysSerialNum = "1.3.6.1.4.1.232.2.2.2.1.0";
+ my $cpqSiProductName = "1.3.6.1.4.1.232.2.2.4.2.0";
+
+ $self->{serial} =
+ SNMP::Utils::get_object($self->{rawdata}, $cpqSiSysSerialNum);
+ $self->{product} =
+ SNMP::Utils::get_object($self->{rawdata}, $cpqSiProductName);
+ $self->{serial} = $self->{serial};
+ $self->{product} = lc $self->{product};
+ $self->{romversion} = 'unknown';
+#####################################################################
+$self->{runtime}->{product} = $self->{product};
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component.pm
new file mode 100755
index 0000000..15fa213
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component.pm
@@ -0,0 +1,7 @@
+package HP::BladeSystem::Component;
+
+use strict;
+
+our @ISA = qw(HP::BladeSystem);
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem.pm
new file mode 100755
index 0000000..37cec73
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem.pm
@@ -0,0 +1,176 @@
+package HP::BladeSystem::Component::CommonEnclosureSubsystem;
+our @ISA = qw(HP::BladeSystem::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ common_enclosures => [],
+ common_enclosure_temp_subsys => undef,
+ common_enclosure_fan_subsys => undef,
+ common_enclosure_fuse_subsys => undef,
+ common_enclosure_manager_subsys => undef,
+ common_enclosure_frus => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ # jeweils ein block fuer
+ # enclosures, temps, fans, fuses
+ # loop ueber oids und entspr. new
+ my $oids = {
+ cpqRackCommonEnclosureEntry => '1.3.6.1.4.1.232.22.2.3.1.1.1',
+ cpqRackCommonEnclosureRack => '1.3.6.1.4.1.232.22.2.3.1.1.1.1',
+ cpqRackCommonEnclosureIndex => '1.3.6.1.4.1.232.22.2.3.1.1.1.2',
+ cpqRackCommonEnclosureModel => '1.3.6.1.4.1.232.22.2.3.1.1.1.3',
+ cpqRackCommonEnclosureSparePartNumber => '1.3.6.1.4.1.232.22.2.3.1.1.1.6',
+ cpqRackCommonEnclosureSerialNum => '1.3.6.1.4.1.232.22.2.3.1.1.1.7',
+ cpqRackCommonEnclosureFWRev => '1.3.6.1.4.1.232.22.2.3.1.1.1.8',
+ cpqRackCommonEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.1.1.9',
+ cpqRackCommonEnclosureCondition => '1.3.6.1.4.1.232.22.2.3.1.1.1.16',
+ cpqRackCommonEnclosureHasServerBlades => '1.3.6.1.4.1.232.22.2.3.1.1.1.17',
+ cpqRackCommonEnclosureHasPowerBlades => '1.3.6.1.4.1.232.22.2.3.1.1.1.18',
+ cpqRackCommonEnclosureHasNetConnectors => '1.3.6.1.4.1.232.22.2.3.1.1.1.19',
+ cpqRackCommonEnclosureHasTempSensors => '1.3.6.1.4.1.232.22.2.3.1.1.1.20',
+ cpqRackCommonEnclosureHasFans => '1.3.6.1.4.1.232.22.2.3.1.1.1.21',
+ cpqRackCommonEnclosureHasFuses => '1.3.6.1.4.1.232.22.2.3.1.1.1.22',
+ cpqRackCommonEnclosureConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ cpqRackCommonEnclosureHasServerBladesValue => {
+ 1 => 'false',
+ 2 => 'true',
+ },
+ };
+ $oids->{cpqRackCommonEnclosureHasPowerBladesValue} =
+ $oids->{cpqRackCommonEnclosureHasServerBladesValue};
+ $oids->{cpqRackCommonEnclosureHasNetConnectorsValue} =
+ $oids->{cpqRackCommonEnclosureHasServerBladesValue};
+ $oids->{cpqRackCommonEnclosureHasTempSensorsValue} =
+ $oids->{cpqRackCommonEnclosureHasServerBladesValue};
+ $oids->{cpqRackCommonEnclosureHasFansValue} =
+ $oids->{cpqRackCommonEnclosureHasServerBladesValue};
+ $oids->{cpqRackCommonEnclosureHasServerBladesValue} =
+ $oids->{cpqRackCommonEnclosureHasServerBladesValue};
+ # INDEX { cpqRackCommonEnclosureRack cpqRackCommonEnclosureIndex }
+ foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureEntry')) {
+ push(@{$self->{common_enclosures}},
+ HP::BladeSystem::Component::CommonEnclosureSubsystem::CommonEnclosure->new(%{$_}));
+ }
+
+ $self->{common_enclosure_fan_subsys} = HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+ $self->{common_enclosure_temp_subsys} = HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+ $self->{common_enclosure_fuse_subsys} = HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+ $self->{common_enclosure_manager_subsys} = HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{common_enclosures}}) {
+ $_->check();
+ }
+ $self->{common_enclosure_fan_subsys}->check();
+ $self->{common_enclosure_temp_subsys}->check();
+ $self->{common_enclosure_fuse_subsys}->check();
+ $self->{common_enclosure_manager_subsys}->check();
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{common_enclosures}}) {
+ $_->dump();
+ }
+ $self->{common_enclosure_fan_subsys}->dump();
+ $self->{common_enclosure_temp_subsys}->dump();
+ $self->{common_enclosure_fuse_subsys}->dump();
+ $self->{common_enclosure_manager_subsys}->dump();
+}
+
+
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::CommonEnclosure;
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosure/, keys %params;
+ $self->{name} = $self->{cpqRackCommonEnclosureRack}.':'.$self->{cpqRackCommonEnclosureIndex};
+ $self->{serfw} = sprintf "Ser: %s, FW: %s", $self->{cpqRackCommonEnclosureSerialNum},
+ $self->{cpqRackCommonEnclosureFWRev};
+ bless $self, $class;
+ return $self;
+}
+
+
+sub check {
+ my $self = shift;
+ $self->blacklist('ce', $self->{cpqRackCommonEnclosureName});
+ my $info = sprintf 'common enclosure %s condition is %s (%s)',
+ $self->{cpqRackCommonEnclosureName}, $self->{cpqRackCommonEnclosureCondition}, $self->{serfw};
+ $self->add_info($info);
+ if ($self->{cpqRackCommonEnclosureCondition} eq 'failed') {
+ $info .= sprintf " (SparePartNum %s)", $self->{cpqRackCommonEnclosureSparePartNumber};
+ $self->add_message(CRITICAL, $info);
+ } elsif ($self->{cpqRackCommonEnclosureCondition} eq 'degraded') {
+ $info .= sprintf " (SparePartNum %s)", $self->{cpqRackCommonEnclosureSparePartNumber};
+ $self->add_message(WARNING, $info);
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[COMMON_ENCLOSURE_%s]\n", $self->{cpqRackCommonEnclosureName};
+ foreach (qw(cpqRackCommonEnclosureRack cpqRackCommonEnclosureIndex cpqRackCommonEnclosureModel
+ cpqRackCommonEnclosureSerialNum cpqRackCommonEnclosureFWRev cpqRackCommonEnclosureFWRev
+ cpqRackCommonEnclosureName
+ cpqRackCommonEnclosureCondition cpqRackCommonEnclosureHasServerBlades
+ cpqRackCommonEnclosureHasPowerBlades cpqRackCommonEnclosureHasNetConnectors
+ cpqRackCommonEnclosureHasTempSensors cpqRackCommonEnclosureHasFans cpqRackCommonEnclosureHasFuses)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm
new file mode 100755
index 0000000..c28b921
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm
@@ -0,0 +1,139 @@
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem;
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ fans => [],
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $oids = {
+ cpqRackCommonEnclosureFanEntry => '1.3.6.1.4.1.232.22.2.3.1.3.1',
+ cpqRackCommonEnclosureFanRack => '1.3.6.1.4.1.232.22.2.3.1.3.1.1',
+ cpqRackCommonEnclosureFanChassis => '1.3.6.1.4.1.232.22.2.3.1.3.1.2',
+ cpqRackCommonEnclosureFanIndex => '1.3.6.1.4.1.232.22.2.3.1.3.1.3',
+ cpqRackCommonEnclosureFanEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.3.1.4',
+ cpqRackCommonEnclosureFanLocation => '1.3.6.1.4.1.232.22.2.3.1.3.1.5',
+ cpqRackCommonEnclosureFanPartNumber => '1.3.6.1.4.1.232.22.2.3.1.3.1.6',
+ cpqRackCommonEnclosureFanSparePartNumber => '1.3.6.1.4.1.232.22.2.3.1.3.1.7',
+ cpqRackCommonEnclosureFanPresent => '1.3.6.1.4.1.232.22.2.3.1.3.1.8',
+ cpqRackCommonEnclosureFanRedundant => '1.3.6.1.4.1.232.22.2.3.1.3.1.9',
+ cpqRackCommonEnclosureFanRedundantGroupId => '1.3.6.1.4.1.232.22.2.3.1.3.1.10',
+ cpqRackCommonEnclosureFanCondition => '1.3.6.1.4.1.232.22.2.3.1.3.1.11',
+ cpqRackCommonEnclosureFanEnclosureSerialNum => '1.3.6.1.4.1.232.22.2.3.1.3.1.12',
+ cpqRackCommonEnclosureFanPresentValue => {
+ 1 => 'other',
+ 2 => 'absent',
+ 3 => 'present',
+ },
+ cpqRackCommonEnclosureFanRedundantValue => {
+ 0 => 'other', # meiner phantasie entsprungen, da sich hp nicht aeussert
+ 1 => 'other',
+ 2 => 'notRedundant',
+ 3 => 'redundant',
+ },
+ cpqRackCommonEnclosureFanConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ }
+ };
+ # INDEX { cpqRackCommonEnclosureFanRack, cpqRackCommonEnclosureFanChassis, cpqRackCommonEnclosureFanIndex }
+ foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureFanEntry')) {
+ push(@{$self->{fans}},
+ HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem::Fan->new(%{$_}));
+ }
+
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{fans}}) {
+ $_->check() if $_->{cpqRackCommonEnclosureFanPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{fans}}) {
+ $_->dump() if $_->{cpqRackCommonEnclosureFanPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem::Fan;
+
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosureFan/, keys %params;
+ $self->{name} = $self->{cpqRackCommonEnclosureFanRack}.':'.$self->{cpqRackCommonEnclosureFanChassis}.':'.$self->{cpqRackCommonEnclosureFanIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('f', $self->{name});
+ $self->add_info(sprintf 'fan %s is %s, location is %s, redundance is %s, condition is %s',
+ $self->{name}, $self->{cpqRackCommonEnclosureFanPresent},
+ $self->{cpqRackCommonEnclosureFanLocation},
+ $self->{cpqRackCommonEnclosureFanRedundant},
+ $self->{cpqRackCommonEnclosureFanCondition});
+ if ($self->{cpqRackCommonEnclosureFanCondition} eq 'degraded') {
+ $self->{info} .= sprintf ", (SparePartNum: %s)", $self->{cpqRackCommonEnclosureFanSparePartNumber};
+ $self->add_message(WARNING, $self->{info});
+ } elsif ($self->{cpqRackCommonEnclosureFanCondition} eq 'failed') {
+ $self->{info} .= sprintf ", (SparePartNum: %s)", $self->{cpqRackCommonEnclosureFanSparePartNumber};
+ $self->add_message(CRITICAL, $self->{info});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FAN_%s]\n", $self->{name};
+ foreach (qw(cpqRackCommonEnclosureFanRack cpqRackCommonEnclosureFanChassis
+ cpqRackCommonEnclosureFanIndex cpqRackCommonEnclosureFanEnclosureName
+ cpqRackCommonEnclosureFanLocation cpqRackCommonEnclosureFanPartNumber
+ cpqRackCommonEnclosureFanSparePartNumber cpqRackCommonEnclosureFanPresent
+ cpqRackCommonEnclosureFanRedundant cpqRackCommonEnclosureFanRedundantGroupId
+ cpqRackCommonEnclosureFanCondition cpqRackCommonEnclosureFanEnclosureSerialNum)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm
new file mode 100755
index 0000000..bc67e3b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm
@@ -0,0 +1,121 @@
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem;
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ fuses => [],
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $oids = {
+ cpqRackCommonEnclosureFuseEntry => '1.3.6.1.4.1.232.22.2.3.1.4.1',
+ cpqRackCommonEnclosureFuseRack => '1.3.6.1.4.1.232.22.2.3.1.4.1.1',
+ cpqRackCommonEnclosureFuseChassis => '1.3.6.1.4.1.232.22.2.3.1.4.1.2',
+ cpqRackCommonEnclosureFuseIndex => '1.3.6.1.4.1.232.22.2.3.1.4.1.3',
+ cpqRackCommonEnclosureFuseEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.4.1.4',
+ cpqRackCommonEnclosureFuseLocation => '1.3.6.1.4.1.232.22.2.3.1.4.1.5',
+ cpqRackCommonEnclosureFusePresent => '1.3.6.1.4.1.232.22.2.3.1.4.1.8',
+ cpqRackCommonEnclosureFuseCondition => '1.3.6.1.4.1.232.22.2.3.1.4.1.11',
+ cpqRackCommonEnclosureFusePresentValue => {
+ 1 => 'other',
+ 2 => 'absent',
+ 3 => 'present',
+ },
+ cpqRackCommonEnclosureFuseConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 4 => 'failed',
+ }
+ };
+ # INDEX { cpqRackCommonEnclosureFuseRack, cpqRackCommonEnclosureFuseChassis, cpqRackCommonEnclosureFuseIndex }
+ foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureFuseEntry')) {
+ push(@{$self->{fuses}},
+ HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem::Fuse->new(%{$_}));
+ }
+
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{fuses}}) {
+ $_->check() if $_->{cpqRackCommonEnclosureFusePresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{fuses}}) {
+ $_->dump() if $_->{cpqRackCommonEnclosureFusePresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem::Fuse;
+
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosureFuse/, keys %params;
+ $self->{name} = $self->{cpqRackCommonEnclosureFuseRack}.':'.$self->{cpqRackCommonEnclosureFuseChassis}.':'.$self->{cpqRackCommonEnclosureFuseIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('fu', $self->{name});
+ $self->add_info(sprintf 'fuse %s is %s, location is %s, condition is %s',
+ $self->{name}, $self->{cpqRackCommonEnclosureFusePresent},
+ $self->{cpqRackCommonEnclosureFuseLocation}, $self->{cpqRackCommonEnclosureFuseCondition});
+ if ($self->{cpqRackCommonEnclosureFuseCondition} eq 'failed') {
+ $self->add_message(CRITICAL, $self->{info});
+ } elsif ($self->{cpqRackCommonEnclosureFuseCondition} ne 'ok') {
+ $self->add_message(WARNING, $self->{info});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FUSE_%s]\n", $self->{name};
+ foreach (qw(cpqRackCommonEnclosureFuseRack cpqRackCommonEnclosureFuseChassis
+ cpqRackCommonEnclosureFuseIndex cpqRackCommonEnclosureFuseEnclosureName
+ cpqRackCommonEnclosureFuseLocation cpqRackCommonEnclosureFusePresent
+ cpqRackCommonEnclosureFuseCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm
new file mode 100755
index 0000000..1c2e15b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm
@@ -0,0 +1,154 @@
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem;
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ managers => [],
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $oids = {
+ cpqRackCommonEnclosureManagerEntry => '1.3.6.1.4.1.232.22.2.3.1.6.1',
+ cpqRackCommonEnclosureManagerRack => '1.3.6.1.4.1.232.22.2.3.1.6.1.1',
+ cpqRackCommonEnclosureManagerChassis => '1.3.6.1.4.1.232.22.2.3.1.6.1.2',
+ cpqRackCommonEnclosureManagerIndex => '1.3.6.1.4.1.232.22.2.3.1.6.1.3',
+ cpqRackCommonEnclosureManagerEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.6.1.4',
+ cpqRackCommonEnclosureManagerLocation => '1.3.6.1.4.1.232.22.2.3.1.6.1.5',
+ cpqRackCommonEnclosureManagerPartNumber => '1.3.6.1.4.1.232.22.2.3.1.6.1.6',
+ cpqRackCommonEnclosureManagerSparePartNumber => '1.3.6.1.4.1.232.22.2.3.1.6.1.7',
+ cpqRackCommonEnclosureManagerSerialNum => '1.3.6.1.4.1.232.22.2.3.1.6.1.8',
+ cpqRackCommonEnclosureManagerRole => '1.3.6.1.4.1.232.22.2.3.1.6.1.9',
+ cpqRackCommonEnclosureManagerPresent => '1.3.6.1.4.1.232.22.2.3.1.6.1.10',
+ cpqRackCommonEnclosureManagerRedundant => '1.3.6.1.4.1.232.22.2.3.1.6.1.11',
+ cpqRackCommonEnclosureManagerCondition => '1.3.6.1.4.1.232.22.2.3.1.6.1.12',
+ cpqRackCommonEnclosureManagerFWRev => '1.3.6.1.4.1.232.22.2.3.1.6.1.15',
+ cpqRackCommonEnclosureManagerRoleValue => {
+ 1 => 'standby',
+ 2 => 'active',
+ },
+ cpqRackCommonEnclosureManagerPresentValue => {
+ 1 => 'other',
+ 2 => 'absent', # mit vorsicht zu geniessen!
+ 3 => 'present',
+ },
+ cpqRackCommonEnclosureManagerRedundantValue => {
+ 0 => 'other', # meiner phantasie entsprungen, da sich hp nicht aeussert
+ 1 => 'other',
+ 2 => 'notRedundant',
+ 3 => 'redundant',
+ },
+ cpqRackCommonEnclosureManagerConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ }
+ };
+ # INDEX { cpqRackCommonEnclosureManagerRack, cpqRackCommonEnclosureManagerChassis, cpqRackCommonEnclosureManagerIndex }
+ foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureManagerEntry')) {
+ push(@{$self->{managers}},
+ HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem::Manager->new(%{$_}));
+ }
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{managers}}) {
+ $_->check() if $_->{cpqRackCommonEnclosureManagerPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{managers}}) {
+ $_->dump() if $_->{cpqRackCommonEnclosureManagerPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem::Manager;
+
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosureManager/, keys %params;
+ $self->{name} = $self->{cpqRackCommonEnclosureManagerRack}.
+ ':'.$self->{cpqRackCommonEnclosureManagerChassis}.
+ ':'.$self->{cpqRackCommonEnclosureManagerIndex};
+ if ($self->{cpqRackCommonEnclosureManagerPresent} eq "absent" &&
+ defined $self->{cpqRackCommonEnclosureManagerEnclosureName}) {
+ $self->{cpqRackCommonEnclosureManagerPresent} = "present";
+ }
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('em', $self->{name});
+ my $info = sprintf 'manager %s is %s, location is %s, redundance is %s, condition is %s, role is %s',
+ $self->{name}, $self->{cpqRackCommonEnclosureManagerPresent},
+ $self->{cpqRackCommonEnclosureManagerLocation},
+ $self->{cpqRackCommonEnclosureManagerRedundant},
+ $self->{cpqRackCommonEnclosureManagerCondition},
+ $self->{cpqRackCommonEnclosureManagerRole};
+ $self->add_info($info) if $self->{cpqRackCommonEnclosureManagerPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent managers nur bei -vvv
+ if ($self->{cpqRackCommonEnclosureManagerCondition} eq 'degraded') {
+ $self->{info} .= sprintf ' (SparePartNum: %s)',
+ $self->{cpqRackCommonEnclosureManagerSparePartNumber};
+ $self->add_message(WARNING, $self->{info});
+ } elsif ($self->{cpqRackCommonEnclosureManagerCondition} eq 'failed') {
+ $self->{info} .= sprintf ' (SparePartNum: %s)',
+ $self->{cpqRackCommonEnclosureManagerSparePartNumber};
+ $self->add_message(CRITICAL, $self->{info});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[ENCLOSURE_MANAGER_%s]\n", $self->{name};
+ foreach (qw(cpqRackCommonEnclosureManagerRack cpqRackCommonEnclosureManagerChassis
+ cpqRackCommonEnclosureManagerIndex cpqRackCommonEnclosureManagerEnclosureName
+ cpqRackCommonEnclosureManagerLocation cpqRackCommonEnclosureManagerPartNumber
+ cpqRackCommonEnclosureManagerSparePartNumber cpqRackCommonEnclosureManagerPresent
+ cpqRackCommonEnclosureManagerRedundant
+ cpqRackCommonEnclosureManagerCondition cpqRackCommonEnclosureManagerFWRev)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm
new file mode 100755
index 0000000..3e004f1
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm
@@ -0,0 +1,177 @@
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem;
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ temperatures => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($params{runtime}->{options}->{customthresholds}) {
+ if (-f $params{runtime}->{options}->{customthresholds}) {
+ open CT, $params{runtime}->{options}->{customthresholds};
+ $params{runtime}->{options}->{customthresholds} = <CT>;
+ close CT;
+ }
+ foreach my $ct_items
+ (split(/\//, $params{runtime}->{options}->{customthresholds})) {
+ if ($ct_items =~ /^(\d+):(\d+)$/) {
+ my $temp = $2;
+ $params{runtime}->{options}->{thresholds}->{$1} = $temp;
+ } else {
+ die sprintf "invalid threshold %s", $ct_items;
+ }
+ }
+ }
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqRackCommonEnclosureTempEntry => '1.3.6.1.4.1.232.22.2.3.1.2.1',
+ cpqRackCommonEnclosureTempRack => '1.3.6.1.4.1.232.22.2.3.1.2.1.1',
+ cpqRackCommonEnclosureTempChassis => '1.3.6.1.4.1.232.22.2.3.1.2.1.2',
+ cpqRackCommonEnclosureTempSensorIndex => '1.3.6.1.4.1.232.22.2.3.1.2.1.3',
+ cpqRackCommonEnclosureTempSensorEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.2.1.4',
+ cpqRackCommonEnclosureTempLocation => '1.3.6.1.4.1.232.22.2.3.1.2.1.5',
+ cpqRackCommonEnclosureTempCurrent => '1.3.6.1.4.1.232.22.2.3.1.2.1.6',
+ cpqRackCommonEnclosureTempThreshold => '1.3.6.1.4.1.232.22.2.3.1.2.1.7',
+ cpqRackCommonEnclosureTempCondition => '1.3.6.1.4.1.232.22.2.3.1.2.1.8',
+ cpqRackCommonEnclosureTempType => '1.3.6.1.4.1.232.22.2.3.1.2.1.9',
+ cpqRackCommonEnclosureTempConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ cpqRackCommonEnclosureTempTypeValue => {
+ 1 => 'other',
+ 5 => 'blowout',
+ 9 => 'caution',
+ 15 => 'critical',
+ },
+ };
+ # INDEX { cpqRackCommonEnclosureTempRack cpqRackCommonEnclosureTempChassis
+ # cpqRackCommonEnclosureTempSensorIndex }
+ foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureTempEntry')) {
+ push(@{$self->{temperatures}},
+ HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem::Temp->new(%{$_})) if (($_->{cpqRackCommonEnclosureTempCurrent} != -1 && $_->{cpqRackCommonEnclosureTempThreshold} != -1) && ($_->{cpqRackCommonEnclosureTempThreshold} != 0));
+ }
+
+}
+
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ if (scalar (@{$self->{temperatures}}) == 0) {
+ #$self->overall_check();
+ } else {
+ foreach (@{$self->{temperatures}}) {
+ $_->check();
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{temperatures}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem::Temp;
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosureTemp/, keys %params;
+ $self->{name} = $params{cpqRackCommonEnclosureTempRack}.':'.
+ $params{cpqRackCommonEnclosureTempChassis}.':'.
+ $params{cpqRackCommonEnclosureTempSensorIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('t', $self->{name});
+ if ($self->{cpqRackCommonEnclosureTempCurrent} > $self->{cpqRackCommonEnclosureTempThreshold}) {
+ $self->add_info(sprintf "%s temperature too high (%d%s)",
+ $self->{cpqRackCommonEnclosureTempLocation},
+ $self->{cpqRackCommonEnclosureTempCurrent},
+ $self->{runtime}->{options}->{celsius} ? "C" : "F");
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ $self->add_info(sprintf "%s temperature is %d%s (%d max)",
+ $self->{cpqRackCommonEnclosureTempLocation},
+ $self->{cpqRackCommonEnclosureTempCurrent},
+ $self->{runtime}->{options}->{celsius} ? "C" : "F",
+ $self->{cpqRackCommonEnclosureTempThreshold});
+ }
+ if ($self->{runtime}->{options}->{perfdata} == 2) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('temp_%s', $self->{name}),
+ value => $self->{cpqRackCommonEnclosureTempCurrent},
+ warning => $self->{cpqRackCommonEnclosureTempThreshold},
+ critical => $self->{cpqRackCommonEnclosureTempThreshold}
+ );
+ } elsif ($self->{runtime}->{options}->{perfdata} == 1) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('temp_%s_%s', $self->{name},
+ $self->{cpqRackCommonEnclosureTempLocation}),
+ value => $self->{cpqRackCommonEnclosureTempCurrent},
+ warning => $self->{cpqRackCommonEnclosureTempThreshold},
+ critical => $self->{cpqRackCommonEnclosureTempThreshold}
+ );
+ }
+ $self->add_extendedinfo(sprintf "temp_%s=%d",
+ $self->{name}, $self->{cpqRackCommonEnclosureTempCurrent});
+
+}
+
+
+sub dump {
+ my $self = shift;
+ printf "[TEMP_%s]\n", $self->{name};
+ foreach (qw(cpqRackCommonEnclosureTempRack cpqRackCommonEnclosureTempChassis
+ cpqRackCommonEnclosureTempSensorIndex cpqRackCommonEnclosureTempSensorEnclosureName
+ cpqRackCommonEnclosureTempLocation
+ cpqRackCommonEnclosureTempCurrent cpqRackCommonEnclosureTempThreshold
+ cpqRackCommonEnclosureTempCondition cpqRackCommonEnclosureTempType)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n\n", $self->{info};
+}
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/NetConnectorSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/NetConnectorSubsystem.pm
new file mode 100755
index 0000000..9fbd4d0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/NetConnectorSubsystem.pm
@@ -0,0 +1,134 @@
+package HP::BladeSystem::Component::NetConnectorSubsystem;
+our @ISA = qw(HP::BladeSystem::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ net_connectors => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $oids = {
+ cpqRackNetConnectorEntry => '1.3.6.1.4.1.232.22.2.6.1.1.1',
+ cpqRackNetConnectorRack => '1.3.6.1.4.1.232.22.2.6.1.1.1.1',
+ cpqRackNetConnectorChassis => '1.3.6.1.4.1.232.22.2.6.1.1.1.2',
+ cpqRackNetConnectorIndex => '1.3.6.1.4.1.232.22.2.6.1.1.1.3',
+ cpqRackNetConnectorEnclosureName => '1.3.6.1.4.1.232.22.2.6.1.1.1.4',
+ cpqRackNetConnectorName => '1.3.6.1.4.1.232.22.2.6.1.1.1.5',
+ cpqRackNetConnectorModel => '1.3.6.1.4.1.232.22.2.6.1.1.1.6',
+ cpqRackNetConnectorSerialNum => '1.3.6.1.4.1.232.22.2.6.1.1.1.7',
+ cpqRackNetConnectorPartNumber => '1.3.6.1.4.1.232.22.2.6.1.1.1.8',
+ cpqRackNetConnectorSparePartNumber => '1.3.6.1.4.1.232.22.2.6.1.1.1.9',
+ cpqRackNetConnectorFWRev => '1.3.6.1.4.1.232.22.2.6.1.1.1.10',
+ cpqRackNetConnectorType => '1.3.6.1.4.1.232.22.2.6.1.1.1.11',
+ cpqRackNetConnectorLocation => '1.3.6.1.4.1.232.22.2.6.1.1.1.12',
+ cpqRackNetConnectorPresent => '1.3.6.1.4.1.232.22.2.6.1.1.1.13',
+ cpqRackNetConnectorHasFuses => '1.3.6.1.4.1.232.22.2.6.1.1.1.14',
+ cpqRackNetConnectorEnclosureSerialNum => '1.3.6.1.4.1.232.22.2.6.1.1.1.15',
+ cpqRackNetConnectorTypeValue => {
+ 0 => 'other', # undefined
+ 1 => 'other',
+ 2 => 'active',
+ 3 => 'passive',
+ },
+ cpqRackNetConnectorPresentValue => {
+ 1 => 'other',
+ 2 => 'absent',
+ 3 => 'present',
+ },
+ cpqRackNetConnectorHasFusesValue => {
+ -1 => 'false', # wird geliefert, also vermute ich false
+ 1 => 'false',
+ 2 => 'true',
+ },
+ };
+
+
+ # INDEX { cpqRackNetConnectorRack, cpqRackNetConnectorChassis, cpqRackNetConnectorIndex }
+ # dreckada dreck, dreckada
+ foreach ($self->get_entries($oids, 'cpqRackNetConnectorEntry')) {
+ push(@{$self->{net_connectors}},
+ HP::BladeSystem::Component::NetConnectorSubsystem::NetConnector->new(%{$_}));
+ }
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{net_connectors}}) {
+ $_->check() if $_->{cpqRackNetConnectorPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{net_connectors}}) {
+ $_->dump() if $_->{cpqRackNetConnectorPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+
+package HP::BladeSystem::Component::NetConnectorSubsystem::NetConnector;
+our @ISA = qw(HP::BladeSystem::Component::NetConnectorSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackNetConnector/, keys %params;
+ $self->{name} = $params{cpqRackNetConnectorRack}.
+ ':'.$params{cpqRackNetConnectorChassis}.
+ ':'.$params{cpqRackNetConnectorIndex};
+ $self->{serfw} = sprintf "Ser: %s, FW: %s", $self->{cpqRackNetConnectorSerialNum}, $self->{cpqRackNetConnectorFWRev};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('nc', $self->{name});
+ my $info = sprintf 'net connector %s is %s, model is %s (%s)',
+ $self->{name}.($self->{cpqRackNetConnectorName} ? ' \''.$self->{cpqRackNetConnectorName}.'\'' : ''),
+ $self->{cpqRackNetConnectorPresent}, $self->{cpqRackNetConnectorModel}, $self->{serfw};
+ $self->add_info($info);
+ # hat weder status noch condition, vielleicht spaeter mal
+ $info .= sprintf " (SparePartNum %s)", $self->{cpqRackNetConnectorSparePartNumber};
+}
+
+sub dump {
+ my $self = shift;
+ printf "[NET_CONNECTOR_%s]\n", $self->{cpqRackNetConnectorName};
+ foreach (qw(cpqRackNetConnectorRack cpqRackNetConnectorChassis cpqRackNetConnectorIndex cpqRackNetConnectorEnclosureName cpqRackNetConnectorName cpqRackNetConnectorModel cpqRackNetConnectorSerialNum cpqRackNetConnectorPartNumber cpqRackNetConnectorSparePartNumber cpqRackNetConnectorFWRev cpqRackNetConnectorType cpqRackNetConnectorLocation cpqRackNetConnectorPresent cpqRackNetConnectorHasFuses cpqRackNetConnectorEnclosureSerialNum)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerEnclosureSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerEnclosureSubsystem.pm
new file mode 100755
index 0000000..82445d3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerEnclosureSubsystem.pm
@@ -0,0 +1,136 @@
+package HP::BladeSystem::Component::PowerEnclosureSubsystem;
+our @ISA = qw(HP::BladeSystem::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ power_enclosures => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+
+# cpqRackPowerEnclosureTable
+ my $oids = {
+ cpqRackPowerEnclosureEntry => '1.3.6.1.4.1.232.22.2.3.3.1.1',
+ cpqRackPowerEnclosureRack => '1.3.6.1.4.1.232.22.2.3.3.1.1.1',
+ cpqRackPowerEnclosureIndex => '1.3.6.1.4.1.232.22.2.3.3.1.1.2',
+ cpqRackPowerEnclosureName => '1.3.6.1.4.1.232.22.2.3.3.1.1.3',
+ cpqRackPowerEnclosureMgmgtBoardSerialNum => '1.3.6.1.4.1.232.22.2.3.3.1.1.4',
+ cpqRackPowerEnclosureRedundant => '1.3.6.1.4.1.232.22.2.3.3.1.1.5',
+ cpqRackPowerEnclosureLoadBalanced => '1.3.6.1.4.1.232.22.2.3.3.1.1.6',
+ cpqRackPowerEnclosureInputPwrType => '1.3.6.1.4.1.232.22.2.3.3.1.1.7',
+ cpqRackPowerEnclosurePwrFeedMax => '1.3.6.1.4.1.232.22.2.3.3.1.1.8',
+ cpqRackPowerEnclosureCondition => '1.3.6.1.4.1.232.22.2.3.3.1.1.9',
+ cpqRackPowerEnclosureRedundantValue => {
+ 1 => 'other',
+ 2 => 'notRedundant',
+ 3 => 'redundant',
+ },
+ cpqRackPowerEnclosureLoadBalancedValue => {
+ 0 => 'aechz',
+ 1 => 'other',
+ 2 => 'notLoadBalanced',
+ 3 => 'loadBalanced',
+ },
+ cpqRackPowerEnclosureInputPwrTypeValue => {
+ 1 => 'other',
+ 2 => 'singlePhase',
+ 3 => 'threePhase',
+ 4 => 'directCurrent',
+ },
+ cpqRackPowerEnclosureConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ },
+ };
+
+
+ # INDEX { cpqRackPowerEnclosureRack, cpqRackPowerEnclosureIndex }
+ # dreckada dreck, dreckada
+ foreach ($self->get_entries($oids, 'cpqRackPowerEnclosureEntry')) {
+ push(@{$self->{power_enclosures}},
+ HP::BladeSystem::Component::PowerEnclosureSubsystem::PowerEnclosure->new(%{$_}));
+ }
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{power_enclosures}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{power_enclosures}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::BladeSystem::Component::PowerEnclosureSubsystem::PowerEnclosure;
+our @ISA = qw(HP::BladeSystem::Component::PowerEnclosureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackPowerEnclosure/, keys %params;
+ $self->{name} = $self->{cpqRackPowerEnclosureRack}.':'.$self->{cpqRackPowerEnclosureIndex};
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('pe', $self->{name});
+ my $info = sprintf 'power enclosure %s \'%s\' condition is %s',
+ $self->{name}, $self->{cpqRackPowerEnclosureName}, $self->{cpqRackPowerEnclosureCondition};
+ $self->add_info($info);
+ if ($self->{cpqRackPowerEnclosureCondition} eq 'degraded') {
+ $self->add_message(WARNING, $info);
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[POWER_ENCLOSURE_%s]\n", $self->{cpqRackPowerEnclosureName};
+ foreach (qw(cpqRackPowerEnclosureRack cpqRackPowerEnclosureIndex
+ cpqRackPowerEnclosureName cpqRackPowerEnclosureMgmgtBoardSerialNum
+ cpqRackPowerEnclosureRedundant cpqRackPowerEnclosureLoadBalanced
+ cpqRackPowerEnclosureInputPwrType cpqRackPowerEnclosurePwrFeedMax
+ cpqRackPowerEnclosureCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerSupplySubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerSupplySubsystem.pm
new file mode 100755
index 0000000..261ce19
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerSupplySubsystem.pm
@@ -0,0 +1,238 @@
+package HP::BladeSystem::Component::PowerSupplySubsystem;
+our @ISA = qw(HP::BladeSystem::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ power_supplies => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $oids = {
+ cpqRackPowerSupplyEntry => '1.3.6.1.4.1.232.22.2.5.1.1.1',
+ cpqRackPowerSupplyRack => '1.3.6.1.4.1.232.22.2.5.1.1.1.1',
+ cpqRackPowerSupplyChassis => '1.3.6.1.4.1.232.22.2.5.1.1.1.2',
+ cpqRackPowerSupplyIndex => '1.3.6.1.4.1.232.22.2.5.1.1.1.3',
+ cpqRackPowerSupplyEnclosureName => '1.3.6.1.4.1.232.22.2.5.1.1.1.4',
+ cpqRackPowerSupplySerialNum => '1.3.6.1.4.1.232.22.2.5.1.1.1.5',
+ cpqRackPowerSupplySparePartNumber => '1.3.6.1.4.1.232.22.2.5.1.1.1.7',
+ cpqRackPowerSupplyFWRev => '1.3.6.1.4.1.232.22.2.5.1.1.1.8',
+ cpqRackPowerSupplyMaxPwrOutput => '1.3.6.1.4.1.232.22.2.5.1.1.1.9',
+ cpqRackPowerSupplyCurPwrOutput => '1.3.6.1.4.1.232.22.2.5.1.1.1.10',
+ cpqRackPowerSupplyIntakeTemp => '1.3.6.1.4.1.232.22.2.5.1.1.1.12',
+ cpqRackPowerSupplyExhaustTemp => '1.3.6.1.4.1.232.22.2.5.1.1.1.13',
+ cpqRackPowerSupplyStatus => '1.3.6.1.4.1.232.22.2.5.1.1.1.14',
+ cpqRackPowerSupplySupplyInputLineStatus => '1.3.6.1.4.1.232.22.2.5.1.1.1.15',
+ cpqRackPowerSupplyPresent => '1.3.6.1.4.1.232.22.2.5.1.1.1.16',
+ cpqRackPowerSupplyCondition => '1.3.6.1.4.1.232.22.2.5.1.1.1.17',
+ cpqRackPowerSupplySupplyInputLineStatusValue => {
+ 1 => 'noError',
+ 2 => 'lineOverVoltage',
+ 3 => 'lineUnderVoltage',
+ 4 => 'lineHit',
+ 5 => 'brownOut',
+ 6 => 'linePowerLoss',
+ },
+ cpqRackPowerSupplyStatusValue => {
+ 1 => 'noError',
+ 2 => 'generalFailure',
+ 3 => 'bistFailure',
+ 4 => 'fanFailure',
+ 5 => 'tempFailure',
+ 6 => 'interlockOpen',
+ 7 => 'epromFailed',
+ 8 => 'vrefFailed',
+ 9 => 'dacFailed',
+ 10 => 'ramTestFailed',
+ 11 => 'voltageChannelFailed',
+ 12 => 'orringdiodeFailed',
+ 13 => 'brownOut',
+ 14 => 'giveupOnStartup',
+ 15 => 'nvramInvalid',
+ 16 => 'calibrationTableInvalid',
+ },
+ cpqRackPowerSupplyPresentValue => {
+ 1 => 'other',
+ 2 => 'absent',
+ 3 => 'present',
+ },
+ cpqRackPowerSupplyConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ };
+
+
+ # INDEX { cpqRackPowerSupplyRack, cpqRackPowerSupplyChassis, cpqRackPowerSupplyIndex }
+ foreach ($self->get_entries($oids, 'cpqRackPowerSupplyEntry')) {
+ push(@{$self->{power_supplies}},
+ HP::BladeSystem::Component::PowerSupplySubsystem::PowerSupply->new(%{$_}));
+ }
+}
+
+sub check {
+ my $self = shift;
+ my $total_current_watt = 0;
+ my $total_max_watt = 0;
+ my $total_in_temp = 0;
+ my $total_out_temp = 0;
+ my $num_ps = 0;
+ foreach (@{$self->{power_supplies}}) {
+ $_->check() if $_->{cpqRackPowerSupplyPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ if ($_->{cpqRackPowerSupplyPresent} eq 'present') {
+ $total_max_watt += $_->{cpqRackPowerSupplyMaxPwrOutput};
+ $total_current_watt += $_->{cpqRackPowerSupplyCurPwrOutput};
+ $total_in_temp += $_->{cpqRackPowerSupplyIntakeTemp}
+ if $_->{cpqRackPowerSupplyIntakeTemp} != -1;
+ $total_out_temp += $_->{cpqRackPowerSupplyExhaustTemp}
+ if $_->{cpqRackPowerSupplyExhaustTemp} != -1;
+ $num_ps++;
+ }
+ }
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => 'watt_total',
+ value => $total_current_watt,
+ warning => $total_max_watt,
+ critical => $total_max_watt,
+ );
+ #$self->{runtime}->{plugin}->add_perfdata(
+ # label => 'watt_total_pct',
+ # value => ($total_current_watt == 0 ? 0 :
+ # sprintf("%.2f",
+ # ($total_current_watt / $total_max_watt * 100))),
+ # warning => 100,
+ # critical => 100,
+ # uom => '%',
+ #);
+ if ($total_in_temp) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => 'in_temp',
+ value => $total_in_temp / $num_ps,
+ );
+ }
+ if ($total_out_temp) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => 'out_temp',
+ value => $total_out_temp / $num_ps,
+ );
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{power_supplies}}) {
+ $_->dump() if $_->{cpqRackPowerSupplyPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+
+package HP::BladeSystem::Component::PowerSupplySubsystem::PowerSupply;
+our @ISA = qw(HP::BladeSystem::Component::PowerSupplySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackPowerSupply/, keys %params;
+ $self->{name} = $params{cpqRackPowerSupplyRack}.
+ ':'.$params{cpqRackPowerSupplyChassis}.
+ ':'.$params{cpqRackPowerSupplyIndex};
+ $self->{serfw} = sprintf "Ser: %s, FW: %s", $self->{cpqRackPowerSupplySerialNum}, $self->{cpqRackPowerSupplyFWRev};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('ps', $self->{name});
+ my $info = sprintf 'power supply %s is %s, condition is %s (%s)',
+ $self->{name}, $self->{cpqRackPowerSupplyPresent},
+ $self->{cpqRackPowerSupplyCondition}, $self->{serfw};
+ $self->add_info($info);
+ if ($self->{cpqRackPowerSupplyPresent} eq 'present') {
+ if ($self->{cpqRackPowerSupplyCondition} eq 'degraded') {
+ $info .= sprintf " (SparePartNum %s)", $self->{cpqRackPowerSupplySparePartNumber};
+ $self->add_message(WARNING, $info);
+ $self->add_info(sprintf 'power supply %s status is %s, inp.line status is %s',
+ $self->{name}, $self->{cpqRackPowerSupplyStatus},
+ $self->{cpqRackPowerSupplySupplyInputLineStatus});
+ } elsif ($self->{cpqRackPowerSupplyCondition} eq 'failed') {
+ $info .= sprintf " (SparePartNum %s)", $self->{cpqRackPowerSupplySparePartNumber};
+ $self->add_message(CRITICAL, $info);
+ $self->add_info(sprintf 'power supply %s status is %s, inp.line status is %s',
+ $self->{name}, $self->{cpqRackPowerSupplyStatus},
+ $self->{cpqRackPowerSupplySupplyInputLineStatus});
+ }
+ if ($self->{runtime}->{options}->{perfdata} != 2) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('watt_%s', $self->{name}),
+ value => $self->{cpqRackPowerSupplyCurPwrOutput},
+ warning => $self->{cpqRackPowerSupplyMaxPwrOutput},
+ critical => $self->{cpqRackPowerSupplyMaxPwrOutput}
+ );
+ #$self->{runtime}->{plugin}->add_perfdata(
+ # label => sprintf('watt_pct_%s', $self->{name}),
+ # value => ($self->{cpqRackPowerSupplyCurPwrOutput} == 0 ? 0 :
+ # sprintf ("%.2f",
+ # ($self->{cpqRackPowerSupplyCurPwrOutput} /
+ # $self->{cpqRackPowerSupplyMaxPwrOutput} * 100))),
+ # warning => 100,
+ # critical => 100,
+ # uom => '%',
+ #);
+ if ($self->{cpqRackPowerSupplyIntakeTemp} != -1) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('in_temp_%s', $self->{name}),
+ value => $self->{cpqRackPowerSupplyIntakeTemp},
+ );
+ }
+ if ($self->{cpqRackPowerSupplyExhaustTemp} != -1) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('out_temp_%s', $self->{name}),
+ value => $self->{cpqRackPowerSupplyExhaustTemp},
+ );
+ }
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[POWER_SUPPLY%s]\n", $self->{name};
+ foreach (qw(cpqRackPowerSupplyRack cpqRackPowerSupplyChassis cpqRackPowerSupplyIndex cpqRackPowerSupplyEnclosureName cpqRackPowerSupplySerialNum cpqRackPowerSupplySparePartNumber cpqRackPowerSupplyFWRev cpqRackPowerSupplyMaxPwrOutput cpqRackPowerSupplyCurPwrOutput cpqRackPowerSupplyIntakeTemp cpqRackPowerSupplyExhaustTemp cpqRackPowerSupplyStatus cpqRackPowerSupplySupplyInputLineStatus cpqRackPowerSupplyPresent cpqRackPowerSupplyCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/ServerBladeSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/ServerBladeSubsystem.pm
new file mode 100755
index 0000000..2b41f7c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/ServerBladeSubsystem.pm
@@ -0,0 +1,158 @@
+package HP::BladeSystem::Component::ServerBladeSubsystem;
+our @ISA = qw(HP::BladeSystem::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ server_blades => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $oids = {
+ cpqRackServerBladeEntry => '1.3.6.1.4.1.232.22.2.4.1.1.1',
+ cpqRackServerBladeRack => '1.3.6.1.4.1.232.22.2.4.1.1.1.1',
+ cpqRackServerBladeChassis => '1.3.6.1.4.1.232.22.2.4.1.1.1.2',
+ cpqRackServerBladeIndex => '1.3.6.1.4.1.232.22.2.4.1.1.1.3',
+ cpqRackServerBladeName => '1.3.6.1.4.1.232.22.2.4.1.1.1.4',
+ cpqRackServerBladeEnclosureName => '1.3.6.1.4.1.232.22.2.4.1.1.1.5',
+ cpqRackServerBladePartNumber => '1.3.6.1.4.1.232.22.2.4.1.1.1.6',
+ cpqRackServerBladeSparePartNumber => '1.3.6.1.4.1.232.22.2.4.1.1.1.7',
+ cpqRackServerBladePosition => '1.3.6.1.4.1.232.22.2.4.1.1.1.8',
+ cpqRackServerBladeHeight => '1.3.6.1.4.1.232.22.2.4.1.1.1.9',
+ cpqRackServerBladeWidth => '1.3.6.1.4.1.232.22.2.4.1.1.1.10',
+ cpqRackServerBladeDepth => '1.3.6.1.4.1.232.22.2.4.1.1.1.11',
+ cpqRackServerBladePresent => '1.3.6.1.4.1.232.22.2.4.1.1.1.12',
+ cpqRackServerBladeHasFuses => '1.3.6.1.4.1.232.22.2.4.1.1.1.13',
+ cpqRackServerBladeEnclosureSerialNum => '1.3.6.1.4.1.232.22.2.4.1.1.1.14',
+ cpqRackServerBladeSlotsUsed => '1.3.6.1.4.1.232.22.2.4.1.1.1.15',
+ cpqRackServerBladeStatus => '1.3.6.1.4.1.232.22.2.4.1.1.1.21',
+ cpqRackServerBladeDiagnosticString => '1.3.6.1.4.1.232.22.2.4.1.1.1.24',
+ cpqRackServerBladePowered => '1.3.6.1.4.1.232.22.2.4.1.1.1.25',
+ cpqRackServerBladePOSTStatus => '1.3.6.1.4.1.232.22.2.4.1.1.1.35',
+ cpqRackServerBladePresentValue => {
+ 1 => 'other',
+ 2 => 'absent',
+ 3 => 'present',
+ },
+ cpqRackServerBladeStatusValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ cpqRackServerBladePoweredValue => {
+ 0 => 'aechz',
+ 1 => 'other',
+ 2 => 'on',
+ 3 => 'off',
+ 4 => 'powerStagedOff',
+ 5 => 'reboot',
+ },
+ cpqRackServerBladePOSTStatusValue => {
+ 1 => 'other',
+ 2 => 'started',
+ 3 => 'completed',
+ 4 => 'failed',
+ },
+ };
+
+
+ # INDEX { cpqRackServerBladeRack, cpqRackServerBladeChassis, cpqRackServerBladeIndex }
+ # dreckada dreck, dreckada
+ foreach ($self->get_entries($oids, 'cpqRackServerBladeEntry')) {
+ push(@{$self->{server_blades}},
+ HP::BladeSystem::Component::ServerBladeSubsystem::ServerBlade->new(%{$_}));
+ }
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{server_blades}}) {
+ $_->check() if $_->{cpqRackServerBladePresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent blades nur bei -vvv
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{server_blades}}) {
+ $_->dump() if $_->{cpqRackServerBladePresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent blades nur bei -vvv
+ }
+}
+
+
+package HP::BladeSystem::Component::ServerBladeSubsystem::ServerBlade;
+our @ISA = qw(HP::BladeSystem::Component::ServerBladeSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackServerBlade/, keys %params;
+ $self->{cpqRackServerBladeDiagnosticString} ||= '';
+ $self->{name} = $self->{cpqRackServerBladeRack}.
+ ':'.$self->{cpqRackServerBladeChassis}.
+ ':'.$self->{cpqRackServerBladeIndex};
+ bless $self, $class;
+ $self->init();
+#printf "%s\n", Data::Dumper::Dumper(\%params);
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('sb', $self->{name});
+ my $info = sprintf 'server blade %s \'%s\' is %s, status is %s, powered is %s',
+ $self->{name}, $self->{cpqRackServerBladeName}, $self->{cpqRackServerBladePresent},
+ $self->{cpqRackServerBladeStatus}, $self->{cpqRackServerBladePowered};
+ $self->add_info($info);
+ if ($self->{cpqRackServerBladePowered} eq 'on') {
+ if ($self->{cpqRackServerBladeStatus} eq 'degraded') {
+ $self->add_message(WARNING, sprintf 'server blade %s diag is \'%s\', post status is %s',
+ $self->{cpqRackServerBladeName}, $self->{cpqRackServerBladeDiagnosticString},
+ $self->{cpqRackServerBladePOSTStatus});
+ } elsif ($self->{cpqRackServerBladeStatus} eq 'failed') {
+ $self->add_message(CRITICAL, sprintf 'server blade %s diag is \'%s\', post status is %s',
+ $self->{cpqRackServerBladeName}, $self->{cpqRackServerBladeDiagnosticString},
+ $self->{cpqRackServerBladePOSTStatus});
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[SERVER_BLADE_%s]\n", $self->{cpqRackServerBladeName};
+ foreach (qw(cpqRackServerBladeRack cpqRackServerBladeChassis cpqRackServerBladeIndex cpqRackServerBladeName cpqRackServerBladeEnclosureName cpqRackServerBladePartNumber cpqRackServerBladeSparePartNumber cpqRackServerBladePosition cpqRackServerBladeHeight cpqRackServerBladeWidth cpqRackServerBladeDepth cpqRackServerBladePresent cpqRackServerBladeHasFuses cpqRackServerBladeEnclosureSerialNum cpqRackServerBladeSlotsUsed cpqRackServerBladeStatus cpqRackServerBladeDiagnosticString cpqRackServerBladePowered cpqRackServerBladePOSTStatus)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant.pm
new file mode 100755
index 0000000..6b0f1ac
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant.pm
@@ -0,0 +1,771 @@
+package HP::Proliant;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+use Data::Dumper;
+
+our @ISA = qw(HP::Server);
+
+sub init {
+ my $self = shift;
+ $self->{components} = {
+ powersupply_subsystem => undef,
+ fan_subsystem => undef,
+ temperature_subsystem => undef,
+ cpu_subsystem => undef,
+ memory_subsystem => undef,
+ nic_subsystem => undef,
+ disk_subsystem => undef,
+ asr_subsystem => undef,
+ event_subsystem => undef,
+ battery_subsystem => undef,
+ };
+ $self->{serial} = 'unknown';
+ $self->{product} = 'unknown';
+ $self->{romversion} = 'unknown';
+ $self->collect();
+ if (! $self->{runtime}->{plugin}->check_messages() &&
+ ! exists $self->{noinst_hint}) {
+ $self->set_serial();
+ $self->check_for_buggy_firmware();
+ $self->analyze_cpus();
+ $self->analyze_powersupplies();
+ $self->analyze_fan_subsystem();
+ $self->analyze_temperatures();
+ $self->analyze_memory_subsystem();
+ $self->analyze_nic_subsystem();
+ $self->analyze_disk_subsystem();
+ $self->analyze_asr_subsystem();
+ $self->analyze_event_subsystem();
+ $self->analyze_battery_subsystem();
+ $self->auto_blacklist();
+ $self->check_cpus();
+ $self->check_powersupplies();
+ $self->check_fan_subsystem();
+ $self->check_temperatures();
+ $self->check_memory_subsystem();
+ $self->check_nic_subsystem();
+ $self->check_disk_subsystem();
+ $self->check_asr_subsystem();
+ $self->check_event_subsystem();
+ $self->check_battery_subsystem();
+ }
+}
+
+sub identify {
+ my $self = shift;
+ foreach (qw(product serial romversion)) {
+ $self->{$_} =~ s/^\s+//;
+ $self->{$_} =~ s/\s+$//;
+ }
+ return sprintf "System: '%s', S/N: '%s', ROM: '%s'",
+ $self->{product}, $self->{serial}, $self->{romversion};
+}
+
+sub check_for_buggy_firmware {
+ my $self = shift;
+ my @buggyfirmwares = (
+ "P24 12/11/2001",
+ "P24 11/15/2002",
+ "D13 06/03/2003",
+ "D13 09/15/2004",
+ "P20 12/17/2002"
+ );
+ if ($self->{romversion} =~ /^\w+ \d+\/\d+\/\d+$/) {
+ $self->{runtime}->{options}->{buggy_firmware} =
+ grep /^$self->{romversion}/, @buggyfirmwares;
+ } else {
+ # nicht parsbarer schrott in cpqSeSysRomVer, gesehen bei Gen9
+ $self->{runtime}->{options}->{buggy_firmware} = undef;
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf STDERR "serial %s\n", $self->{serial};
+ printf STDERR "product %s\n", $self->{product};
+ printf STDERR "romversion %s\n", $self->{romversion};
+ printf STDERR "%s\n", Data::Dumper::Dumper($self->{components});
+}
+
+sub analyze_powersupplies {
+ my $self = shift;
+ $self->{components}->{powersupply_subsystem} =
+ HP::Proliant::Component::PowersupplySubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_fan_subsystem {
+ my $self = shift;
+ $self->{components}->{fan_subsystem} =
+ HP::Proliant::Component::FanSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_temperatures {
+ my $self = shift;
+ $self->{components}->{temperature_subsystem} =
+ HP::Proliant::Component::TemperatureSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_cpus {
+ my $self = shift;
+ $self->{components}->{cpu_subsystem} =
+ HP::Proliant::Component::CpuSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_memory_subsystem {
+ my $self = shift;
+ $self->{components}->{memory_subsystem} =
+ HP::Proliant::Component::MemorySubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_nic_subsystem {
+ my $self = shift;
+ return if $self->{method} ne "snmp";
+ $self->{components}->{nic_subsystem} =
+ HP::Proliant::Component::NicSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_disk_subsystem {
+ my $self = shift;
+ $self->{components}->{disk_subsystem} =
+ HP::Proliant::Component::DiskSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_asr_subsystem {
+ my $self = shift;
+ $self->{components}->{asr_subsystem} =
+ HP::Proliant::Component::AsrSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_event_subsystem {
+ my $self = shift;
+ $self->{components}->{event_subsystem} =
+ HP::Proliant::Component::EventSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_battery_subsystem {
+ my $self = shift;
+ $self->{components}->{battery_subsystem} =
+ HP::Proliant::Component::BatterySubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub check_cpus {
+ my $self = shift;
+ $self->{components}->{cpu_subsystem}->check();
+ $self->{components}->{cpu_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_powersupplies {
+ my $self = shift;
+ $self->{components}->{powersupply_subsystem}->check();
+ $self->{components}->{powersupply_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_fan_subsystem {
+ my $self = shift;
+ $self->{components}->{fan_subsystem}->check();
+ $self->{components}->{fan_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_temperatures {
+ my $self = shift;
+ $self->{components}->{temperature_subsystem}->check();
+ $self->{components}->{temperature_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_memory_subsystem {
+ my $self = shift;
+ $self->{components}->{memory_subsystem}->check();
+ $self->{components}->{memory_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_nic_subsystem {
+ my $self = shift;
+ return if $self->{method} ne "snmp";
+ if ($self->{runtime}->{plugin}->{opts}->get('eval-nics')) {
+ $self->{components}->{nic_subsystem}->check();
+ $self->{components}->{nic_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+ }
+}
+sub check_disk_subsystem {
+ my $self = shift;
+ $self->{components}->{disk_subsystem}->check();
+ $self->{components}->{disk_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+ # zum anhaengen an die normale ausgabe... da: 2 logical drives, 5 physical...
+ $self->{runtime}->{plugin}->add_message(OK,
+ $self->{components}->{disk_subsystem}->{summary})
+ if $self->{components}->{disk_subsystem}->{summary};
+}
+
+sub check_asr_subsystem {
+ my $self = shift;
+ $self->{components}->{asr_subsystem}->check();
+ $self->{components}->{asr_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_event_subsystem {
+ my $self = shift;
+ $self->{components}->{event_subsystem}->check();
+ $self->{components}->{event_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_battery_subsystem {
+ my $self = shift;
+ $self->{components}->{battery_subsystem}->check();
+ $self->{components}->{battery_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub auto_blacklist() {
+ my $self = shift;
+ if ($self->{product} =~ /380 g6/) {
+ # http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c01723408/c01723408.pdf seite 19
+ if ($self->{components}->{cpu_subsystem}->num_cpus() == 1) {
+ $self->add_blacklist('ff/f:5,6');
+ }
+ } elsif ($self->{product} =~ /380 g6/) {
+ # http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c01704762/c01704762.pdf Fan 2 is only required when processor 2 is installed in the server.
+ }
+}
+
+
+package HP::Proliant::CLI;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+our @ISA = qw(HP::Proliant);
+
+sub collect {
+ my $self = shift;
+ my $hpasmcli = undef;
+ if (($self->{runtime}->{plugin}->opts->hpasmcli) &&
+ (-f $self->{runtime}->{plugin}->opts->hpasmcli) &&
+ (! -x $self->{runtime}->{plugin}->opts->hpasmcli)) {
+ no strict 'refs';
+ open(BIRK, $self->{runtime}->{plugin}->opts->hpasmcli);
+ # all output in one file prefixed with server|powersupply|fans|temp|dimm
+ while(<BIRK>) {
+ chomp;
+ $self->{rawdata} .= $_."\n";
+ }
+ close BIRK;
+ # If you run this script and redirect it's output to a file
+ # you can use it for testing purposes with
+ # --hpasmcli <output>
+ # It must not be executable. (chmod 644)
+ my $diag = <<'EOEO';
+ hpasmcli=$(which hpasmcli)
+ hpacucli=$(which hpacucli)
+ for i in server powersupply fans temp dimm
+ do
+ $hpasmcli -s "show $i" | while read line
+ do
+ printf "%s %s\n" $i "$line"
+ done
+ done
+ if [ -x "$hpacucli" ]; then
+ for i in config status
+ do
+ $hpacucli ctrl all show $i | while read line
+ do
+ printf "%s %s\n" $i "$line"
+ done
+ done
+ fi
+EOEO
+ } else {
+ #die "exec hpasmcli";
+ # alles einsammeln und in rawdata stecken
+ my $hpasmcli = undef;
+ $hpasmcli = $self->{runtime}->{plugin}->opts->hpasmcli ?
+ $self->{runtime}->{plugin}->opts->hpasmcli : '/sbin/hpasmcli';
+# check if this exists at all
+# descend the directory
+ if ($self->{runtime}->{plugin}->opts->hpasmcli &&
+ -e $self->{runtime}->{plugin}->opts->hpasmcli) {
+ $hpasmcli = $self->{runtime}->{plugin}->opts->hpasmcli;
+ } elsif (-e '/sbin/hpasmcli') {
+ $hpasmcli = '/sbin/hpasmcli';
+ } else {
+ $hpasmcli = undef;
+ }
+ if ($hpasmcli) {
+ if ($< != 0) {
+ close STDIN;
+ $hpasmcli = "sudo -S ".$hpasmcli;
+ }
+ $self->trace(2, sprintf "calling %s\n", $hpasmcli);
+ $self->check_daemon();
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ $self->check_hpasm_client($hpasmcli);
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ foreach my $component (qw(server fans temp dimm powersupply iml)) {
+ if (open HPASMCLI, "$hpasmcli -s \"show $component\" </dev/null |") {
+ my @output = <HPASMCLI>;
+ close HPASMCLI;
+ $self->{rawdata} .= join("\n", map {
+ $component.' '.$_;
+ } @output);
+ }
+ }
+ if ($self->{runtime}->{options}->{hpacucli}) {
+ #1 oder 0. pfad selber finden
+ my $hpacucli = undef;
+ if (-e '/usr/sbin/hpssacli') {
+ $hpacucli = '/usr/sbin/hpssacli';
+ } elsif (-e '/usr/local/sbin/hpssacli') {
+ $hpacucli = '/usr/local/sbin/hpssacli';
+ } elsif (-e '/usr/sbin/hpacucli') {
+ $hpacucli = '/usr/sbin/hpacucli';
+ } elsif (-e '/usr/local/sbin/hpacucli') {
+ $hpacucli = '/usr/local/sbin/hpacucli';
+ } elsif (-e '/usr/sbin/hpssacli') {
+ $hpacucli = '/usr/sbin/hpssacli';
+ } elsif (-e '/usr/local/sbin/hpssacli') {
+ $hpacucli = '/usr/local/sbin/hpssacli';
+ } else {
+ $hpacucli = $hpasmcli;
+ $hpacucli =~ s/^sudo\s*//;
+ $hpacucli =~ s/hpasmcli/hpacucli/;
+ $hpacucli = -e $hpacucli ? $hpacucli : undef;
+ if (! $hpacucli) {
+ $hpacucli = $hpasmcli;
+ $hpacucli =~ s/^sudo\s*//;
+ $hpacucli =~ s/hpasmcli/hpssacli/;
+ $hpacucli = -e $hpacucli ? $hpacucli : undef;
+ }
+ }
+ if ($hpacucli) {
+ if ($< != 0) {
+ close STDIN;
+ $hpacucli = "sudo -S ".$hpacucli;
+ }
+ $self->trace(2, sprintf "calling %s\n", $hpacucli);
+ $self->check_hpacu_client($hpacucli);
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ if (open HPACUCLI, "$hpacucli ctrl all show status 2>&1|") {
+ my @output = <HPACUCLI>;
+ close HPACUCLI;
+ $self->{rawdata} .= join("\n", map {
+ 'status '.$_;
+ } @output);
+ }
+ if (open HPACUCLI, "$hpacucli ctrl all show config 2>&1|") {
+ my @output = <HPACUCLI>;
+ close HPACUCLI;
+ $self->{rawdata} .= join("\n", map {
+ 'config '.$_;
+ } @output);
+ if (grep /Syntax error at "config"/, @output) {
+ # older version of hpacucli CLI 7.50.18.0
+ foreach my $slot (0..10) {
+ if (open HPACUCLI, "$hpacucli ctrl slot=$slot logicaldrive all show 2>&1|") {
+ my @output = <HPACUCLI>;
+ close HPACUCLI;
+ $self->{rawdata} .= join("\n", map {
+ 'config '.$_;
+ } @output);
+ }
+ if (open HPACUCLI, "$hpacucli ctrl slot=$slot physicaldrive all show 2>&1|") {
+ my @output = <HPACUCLI>;
+ close HPACUCLI;
+ $self->{rawdata} .= join("\n", map {
+ 'config '.$_;
+ } @output);
+ }
+ }
+ }
+ }
+ } elsif ($self->{runtime}->{options}->{hpacucli} == 2) {
+ # we probably don't have sudo-privileges, but we were compiled with
+ # --enable-hpacucli=maybe
+ # so we cover it up in silence
+ $self->remove_message(UNKNOWN);
+ $self->trace(2, sprintf "calling %s seems to have failed, but nobody cares\n", $hpacucli);
+ }
+ } else {
+ if ($self->{runtime}->{options}->{noinstlevel} eq 'ok') {
+ $self->add_message(OK,
+ 'hpacucli is not installed. let\'s hope the best...');
+ } else {
+ $self->add_message(
+ uc $self->{runtime}->{options}->{noinstlevel},
+ 'hpacucli is not installed.');
+ }
+ }
+ }
+ }
+ }
+ } else {
+ if ($self->{runtime}->{options}->{noinstlevel} eq 'ok') {
+ $self->add_message(OK,
+ 'hpasm is not installed, i can only guess');
+ $self->{noinst_hint} = 1;
+ } else {
+ $self->add_message(
+ uc $self->{runtime}->{options}->{noinstlevel},
+ 'hpasmcli is not installed.');
+ }
+ }
+ }
+}
+
+
+sub check_daemon {
+ my $self = shift;
+ my $multiproc_os_signatures_files = {
+ '/etc/SuSE-release' => 'VERSION\s*=\s*8',
+ '/etc/trustix-release' => '.*',
+ '/etc/redhat-release' => '.*Pensacola.*',
+ '/etc/debian_version' => '3\.1',
+ '/etc/issue' => '.*Kernel 2\.4\.9-vmnix2.*', # VMware ESX Server 2.5.4
+ };
+ if (open PS, "/bin/ps -e -ocmd|") {
+ my $numprocs = 0;
+ my $numcliprocs = 0;
+ my @procs = <PS>;
+ close PS;
+ $numprocs = grep /hpasm.*d$/, map { (split /\s+/, $_)[0] } @procs;
+ $numcliprocs = grep /hpasmcli/, grep !/check_hpasm/, @procs;
+ if (! $numprocs ) {
+ $self->add_message(CRITICAL, 'hpasmd needs to be restarted');
+ } elsif ($numprocs > 1) {
+ my $known = 0;
+ foreach my $osfile (keys %{$multiproc_os_signatures_files}) {
+ if (-f $osfile) {
+ open OSSIG, $osfile;
+ if (grep /$multiproc_os_signatures_files->{$osfile}/, <OSSIG>) {
+ $known = 1;
+ }
+ close OSSIG;
+ }
+ }
+ if (! $known) {
+ $self->add_message(UNKNOWN, 'multiple hpasmd procs');
+ }
+ }
+ if ($numcliprocs == 1) {
+ $self->add_message(UNKNOWN, 'another hpasmcli is running');
+ } elsif ($numcliprocs > 1) {
+ $self->add_message(UNKNOWN, 'hanging hpasmcli processes');
+ }
+ }
+}
+
+sub check_hpasm_client {
+ my $self = shift;
+ my $hpasmcli = shift;
+ if (open HPASMCLI, "$hpasmcli -s help 2>&1 |") {
+ my @output = <HPASMCLI>;
+ close HPASMCLI;
+ if (grep /Could not communicate with hpasmd/, @output) {
+ $self->add_message(CRITICAL, 'hpasmd needs to be restarted');
+ } elsif (grep /(asswor[dt]:)|(You must be root)/, @output) {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpasmcli);
+ } elsif (grep /must have a tty/, @output) {
+ $self->add_message(CRITICAL,
+ 'sudo must be configured with requiretty=no (man sudo)');
+ } elsif (grep /ERROR: hpasmcli only runs on HPE Proliant Servers/, @output) {
+ $self->add_message(UNKNOWN, "hpasmcli detected incompatible hardware");
+ } elsif (! grep /CLEAR/, @output) {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpasmcli);
+ }
+ } else {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpasmcli);
+ }
+}
+
+sub check_hpacu_client {
+ my $self = shift;
+ my $hpacucli = shift;
+ if (open HPACUCLI, "$hpacucli help 2>&1 |") {
+ my @output = <HPACUCLI>;
+ close HPACUCLI;
+ if (grep /Another instance of hpacucli is running/, @output) {
+ $self->add_message(UNKNOWN, 'another hpacucli is running');
+ } elsif (grep /You need to have administrator rights/, @output) {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpacucli);
+ } elsif (grep /(asswor[dt]:)|(You must be root)/, @output) {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpacucli);
+ } elsif (! grep /(CLI Syntax)|(ACU CLI)/, @output) {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpacucli);
+ }
+ } else {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpacucli);
+ }
+}
+
+sub set_serial {
+ my $self = shift;
+ foreach (grep(/^server/, split(/\n/, $self->{rawdata}))) {
+ if (/System\s+:\s+(.*[^\s])/) {
+ $self->{product} = lc $1;
+ } elsif (/Serial No\.\s+:\s+(\w+)/) {
+ $self->{serial} = $1;
+ } elsif (/ROM version\s+:\s+(.*[^\s])/) {
+ $self->{romversion} = $1;
+ }
+ }
+ $self->{serial} = $self->{serial};
+ $self->{product} = lc $self->{product};
+ $self->{romversion} = $self->{romversion};
+ foreach (qw(serial product romversion)) {
+ $self->{$_} =~ s/\s+$//g;
+ }
+}
+
+
+package HP::Proliant::SNMP;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+our @ISA = qw(HP::Proliant);
+
+sub collect {
+ my $self = shift;
+ my %oidtables = (
+ system => "1.3.6.1.2.1.1",
+ cpqSeProcessor => "1.3.6.1.4.1.232.1.2.2",
+ cpqHePWSComponent => "1.3.6.1.4.1.232.6.2.9",
+ cpqHeThermal => "1.3.6.1.4.1.232.6.2.6",
+ cpqHeMComponent => "1.3.6.1.4.1.232.6.2.14",
+ cpqDaComponent => "1.3.6.1.4.1.232.3.2",
+ cpqSiComponent => "1.3.6.1.4.1.232.2.2",
+ cpqSeRom => "1.3.6.1.4.1.232.1.2.6",
+ cpqSasComponent => "1.3.6.1.4.1.232.5",
+ cpqIdeComponent => "1.3.6.1.4.1.232.14",
+ cpqFcaComponent => "1.3.6.1.4.1.232.16.2",
+ cpqHeAsr => "1.3.6.1.4.1.232.6.2.5",
+ cpqNic => "1.3.6.1.4.1.232.18.2",
+ cpqHeEventLog => "1.3.6.1.4.1.232.6.2.11",
+ cpqHeSysBackupBattery => "1.3.6.1.4.1.232.6.2.17",
+
+ # cpqHeComponent => "1.3.6.1.4.1.232.6.2",
+ # cpqHeFComponent => "1.3.6.1.4.1.232.6.2.6.7",
+ # cpqHeTComponent => "1.3.6.1.4.1.232.6.2.6.8",
+ );
+ my %oidvalues = (
+ cpqHeEventLogSupported => "1.3.6.1.4.1.232.6.2.11.1.0",
+ cpqHeEventLogCondition => "1.3.6.1.4.1.232.6.2.11.2.0",
+ cpqNicIfLogMapOverallCondition => "1.3.6.1.4.1.232.18.2.2.2.0",
+ cpqHeThermalTempStatus => "1.3.6.1.4.1.232.6.2.6.3.0",
+ cpqHeThermalSystemFanStatus => "1.3.6.1.4.1.232.6.2.6.4.0",
+ cpqHeThermalCpuFanStatus => "1.3.6.1.4.1.232.6.2.6.5.0",
+ cpqHeAsrStatus => "1.3.6.1.4.1.232.6.2.5.1.0",
+ cpqHeAsrCondition => "1.3.6.1.4.1.232.6.2.5.17.0",
+ );
+ if ($self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $cpqSeMibCondition = '1.3.6.1.4.1.232.1.1.3.0'; # 2=ok
+ my $cpqHeMibCondition = '1.3.6.1.4.1.232.6.1.3.0'; # hat nicht jeder
+ if ($self->{productname} =~ /4LEE/) {
+ # rindsarsch!
+ $self->{rawdata}->{$cpqHeMibCondition} = 0;
+ }
+ if (! exists $self->{rawdata}->{$cpqHeMibCondition} &&
+ ! exists $self->{rawdata}->{$cpqSeMibCondition}) { # vlt. geht doch was
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqhlth-mib)');
+ }
+ $self->{fullrawdata} = {};
+ %{$self->{fullrawdata}} = %{$self->{rawdata}};
+ $self->{rawdata} = {};
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ # for a better simulation, only put those oids into
+ # rawdata which would also be put by a real snmp agent.
+ foreach my $table (keys %oidtables) {
+ my $oid = $oidtables{$table};
+ $oid =~ s/\./\\./g;
+ my $tmpoids = {};
+ my $tic = time;
+ map { $tmpoids->{$_} = $self->{fullrawdata}->{$_} }
+ grep /^$oid/, %{$self->{fullrawdata}};
+ my $tac = time;
+ $self->trace(2, sprintf "%03d seconds for walk %s (%d oids)",
+ $tac - $tic, $table, scalar(keys %{$tmpoids}));
+ map { $self->{rawdata}->{$_} = $tmpoids->{$_} } keys %{$tmpoids};
+ }
+ my @oids = values %oidvalues;
+ map { $self->{rawdata}->{$_} = $self->{fullrawdata}->{$_} } @oids;
+ }
+ } else {
+ my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000
+ #$params{'-translate'} = [
+ # -all => 0x0
+ #];
+ my ($session, $error) =
+ Net::SNMP->session(%{$self->{runtime}->{snmpparams}});
+ if (! defined $session) {
+ $self->{plugin}->add_message(CRITICAL, 'cannot create session object');
+ $self->trace(1, Data::Dumper::Dumper($self->{runtime}->{snmpparams}));
+ } else {
+ $session->translate(['-timeticks' => 0]);
+ # revMajor is often used for discovery of hp devices
+ my $cpqHeMibRev = '1.3.6.1.4.1.232.6.1';
+ my $cpqHeMibRevMajor = '1.3.6.1.4.1.232.6.1.1.0';
+ my $cpqHeMibCondition = '1.3.6.1.4.1.232.6.1.3.0';
+ my $result = $session->get_request(
+ -varbindlist => [$cpqHeMibCondition]
+ );
+ if ($self->{productname} =~ /4LEE/) {
+ # rindsarsch!
+ $result->{$cpqHeMibCondition} = 0;
+ }
+ if (!defined($result) ||
+ $result->{$cpqHeMibCondition} eq 'noSuchInstance' ||
+ $result->{$cpqHeMibCondition} eq 'noSuchObject' ||
+ $result->{$cpqHeMibCondition} eq 'endOfMibView') {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqhlth-mib)');
+ $session->close;
+ } else {
+ # this is not reliable. many agents return 4=failed
+ #if ($result->{$cpqHeMibCondition} != 2) {
+ # $obstacle = "cmapeerstart";
+ #}
+ }
+ }
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ # snmp peer is alive
+ $self->trace(2, sprintf "Protocol is %s",
+ $self->{runtime}->{snmpparams}->{'-version'});
+ $session->translate;
+ my $response = {}; #break the walk up in smaller pieces
+ foreach my $table (keys %oidtables) {
+ my $oid = $oidtables{$table};
+ my $tic = time;
+ my $tmpresponse = $session->get_table(
+ -baseoid => $oid);
+ if (scalar (keys %{$tmpresponse}) == 0) {
+ $self->trace(2, sprintf "maxrepetitions failed. fallback");
+ $tmpresponse = $session->get_table(
+ -maxrepetitions => 1,
+ -baseoid => $oid);
+ }
+ my $tac = time;
+ $self->trace(2, sprintf "%03d seconds for walk %s (%d oids)",
+ $tac - $tic, $table, scalar(keys %{$tmpresponse}));
+ map { $response->{$_} = $tmpresponse->{$_} } keys %{$tmpresponse};
+ }
+ my @oids = values %oidvalues;
+ my $tic = time;
+ my $tmpresponse = $session->get_request(
+ -varbindlist => \@oids,
+ );
+ my $tac = time;
+ $self->trace(2, sprintf "%03d seconds for get various (%d oids)",
+ $tac - $tic, scalar(keys %{$tmpresponse}));
+ map { $response->{$_} = $tmpresponse->{$_} } keys %{$tmpresponse};
+ $session->close();
+ $self->{rawdata} = $response;
+ }
+ }
+ return $self->{runtime}->{plugin}->check_messages();
+}
+
+sub set_serial {
+ my $self = shift;
+
+ my $cpqSiSysSerialNum = "1.3.6.1.4.1.232.2.2.2.1.0";
+ my $cpqSiProductName = "1.3.6.1.4.1.232.2.2.4.2.0";
+ my $cpqSeSysRomVer = "1.3.6.1.4.1.232.1.2.6.1.0";
+ my $cpqSeRedundantSysRomVer = "1.3.6.1.4.1.232.1.2.6.4.0";
+
+ $self->{serial} =
+ SNMP::Utils::get_object($self->{rawdata}, $cpqSiSysSerialNum);
+ $self->{product} =
+ SNMP::Utils::get_object($self->{rawdata}, $cpqSiProductName);
+ $self->{romversion} =
+ SNMP::Utils::get_object($self->{rawdata}, $cpqSeSysRomVer);
+ $self->{redundantromversion} =
+ SNMP::Utils::get_object($self->{rawdata}, $cpqSeRedundantSysRomVer);
+ if ($self->{romversion} && $self->{romversion} =~
+ #/(\d{2}\/\d{2}\/\d{4}).*?([ADP]{1}\d{2}).*/) {
+ /(\d{2}\/\d{2}\/\d{4}).*?Family.*?([A-Z]{1})(\d+).*/) {
+ $self->{romversion} = sprintf("%s%02d %s", $2, $3, $1);
+ } elsif ($self->{romversion} && $self->{romversion} =~
+ /([ADP]{1}\d{2})\-(\d{2}\/\d{2}\/\d{4})/) {
+ $self->{romversion} = sprintf("%s %s", $1, $2);
+ } else {
+ # fallback if romversion is broken, redundantromversion not
+ #.1.3.6.1.4.1.232.1.2.6.1.0 = STRING: "4), Family "
+ #.1.3.6.1.4.1.232.1.2.6.3.0 = ""
+ #.1.3.6.1.4.1.232.1.2.6.4.0 = STRING: "v1.20 (08/26/2014), Family "
+ if ($self->{redundantromversion} && $self->{redundantromversion} =~
+ /(\d{2}\/\d{2}\/\d{4}).*?Family.*?([A-Z]{1})(\d+).*/) {
+ $self->{romversion} = sprintf("%s%02d %s", $2, $3, $1);
+ } elsif ($self->{redundantromversion} && $self->{redundantromversion} =~
+ /([ADP]{1}\d{2})\-(\d{2}\/\d{2}\/\d{4})/) {
+ $self->{romversion} = sprintf("%s %s", $1, $2);
+ }
+ }
+ if (!$self->{serial} && $self->{romversion}) {
+ # this probably is a very, very old server.
+ $self->{serial} = "METHUSALEM";
+ $self->{runtime}->{scrapiron} = 1;
+ }
+ $self->{serial} = $self->{serial};
+ $self->{product} = lc $self->{product};
+ $self->{romversion} = $self->{romversion};
+ $self->{runtime}->{product} = $self->{product};
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component.pm
new file mode 100755
index 0000000..cefab99
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component.pm
@@ -0,0 +1,5 @@
+package HP::Proliant::Component;
+our @ISA = qw(HP::Proliant);
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem.pm
new file mode 100755
index 0000000..fccfb3d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem.pm
@@ -0,0 +1,45 @@
+package HP::Proliant::Component::AsrSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ temperatures => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::AsrSubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::AsrSubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking ASR');
+ $self->overall_check();
+}
+
+sub dump {
+ my $self = shift;
+}
+
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/CLI.pm
new file mode 100755
index 0000000..68dad8a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/CLI.pm
@@ -0,0 +1,32 @@
+package HP::Proliant::Component::AsrSubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::AsrSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+}
+
+sub overall_check {
+ my $self = shift;
+ my %params = @_;
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/SNMP.pm
new file mode 100755
index 0000000..823ccf4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/SNMP.pm
@@ -0,0 +1,68 @@
+package HP::Proliant::Component::AsrSubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::AsrSubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->overall_init(%params);
+ return $self;
+}
+
+sub overall_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $params{rawdata};
+ my $cpqHeAsrStatus = "1.3.6.1.4.1.232.6.2.5.1.0";
+ my $cpqHeAsrStatusValue = {
+ 1 => "other",
+ 2 => "notAvailable",
+ 3 => "disabled",
+ 4 => "enabled",
+ };
+ my $cpqHeAsrCondition = "1.3.6.1.4.1.232.6.2.5.17.0";
+ my $cpqHeAsrConditionValue = {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ };
+ $self->{asrcondition} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeAsrCondition,
+ $cpqHeAsrConditionValue);
+ $self->{asrstatus} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeAsrStatus,
+ $cpqHeAsrStatusValue);
+ $self->{asrcondition} |= lc $self->{asrcondition};
+ $self->{asrstatus} |= lc $self->{asrstatus};
+}
+
+sub overall_check {
+ my $self = shift;
+ my $result = 0;
+ $self->blacklist('asr', '');
+ if ($self->{asrstatus} and $self->{asrstatus} eq "enabled") {
+ my $info = sprintf 'ASR overall condition is %s', $self->{asrcondition};
+ if ($self->{asrcondition} eq "degraded") {
+ $self->add_message(WARNING, $info);
+ } elsif ($self->{asrcondition} eq "failed") {
+ $self->add_message(CRITICAL, $info);
+ }
+ $self->add_info($info);
+ } else {
+ $self->add_info('This system does not have ASR.');
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem.pm
new file mode 100755
index 0000000..82da78d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem.pm
@@ -0,0 +1,124 @@
+package HP::Proliant::Component::BatterySubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ sysbatteries => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::BatterySubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ #return HP::Proliant::Component::BatterySubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking sysbatteries');
+ if (scalar (@{$self->{sysbatteries}}) == 0) {
+ #$self->overall_check();
+ $self->add_info('no sysbatteries found');
+ } else {
+ foreach (sort { $a->{cpqHeSysBatteryIndex} <=> $b->{cpqHeSysBatteryIndex}}
+ @{$self->{sysbatteries}}) {
+ $_->check();
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{sysbatteries}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::BatterySubsystem::Battery;
+our @ISA = qw(HP::Proliant::Component::BatterySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqHeSysBatteryChassis => $params{cpqHeSysBatteryChassis},
+ cpqHeSysBatteryIndex => $params{cpqHeSysBatteryIndex},
+ cpqHeSysBatteryPresent => $params{cpqHeSysBatteryPresent},
+ cpqHeSysBatteryCondition => $params{cpqHeSysBatteryCondition},
+ cpqHeSysBatteryStatus => $params{cpqHeSysBatteryStatus},
+ cpqHeSysBatteryCapacityMaximum => $params{cpqHeSysBatteryCapacityMaximum},
+ cpqHeSysBatteryProductName => $params{cpqHeSysBatteryProductName},
+ cpqHeSysBatteryModel => $params{cpqHeSysBatteryModel},
+ cpqHeSysBatterySerialNumber => $params{cpqHeSysBatterySerialNumber},
+ cpqHeSysBatteryFirmwareRev => $params{cpqHeSysBatteryFirmwareRev},
+ cpqHeSysBatterySparePartNum => $params{cpqHeSysBatterySparePartNum},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ $self->{name} = $params{name} ||
+ $self->{cpqHeSysBatteryChassis}.':'.$self->{cpqHeSysBatteryIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('sba', $self->{name});
+ my $info = sprintf "battery %s/%s has condition %s and status %s",
+ $self->{cpqHeSysBatteryChassis},
+ $self->{cpqHeSysBatteryIndex},
+ $self->{cpqHeSysBatteryCondition},
+ $self->{cpqHeSysBatteryStatus};
+ if ($self->{cpqHeSysBatteryCondition} eq "ok") {
+ } elsif ($self->{cpqHeSysBatteryCondition} eq "degraded") {
+ $self->add_info($info);
+ $self->add_message(WARNING, $self->{info});
+ } elsif ($self->{cpqHeSysBatteryCondition} eq "failed") {
+ $self->add_info($info);
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ $self->add_info($info);
+ $self->add_message(UNKNOWN, $self->{info});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[SYSBATTERY_%s_%s]\n", $self->{cpqHeSysBatteryChassis},
+ $self->{cpqHeSysBatteryIndex};
+ foreach (qw(cpqHeSysBatteryChassis cpqHeSysBatteryIndex
+ cpqHeSysBatteryPresent cpqHeSysBatteryCondition cpqHeSysBatteryStatus
+ cpqHeSysBatteryCapacityMaximum cpqHeSysBatteryProductName
+ cpqHeSysBatteryModel cpqHeSysBatterySerialNumber
+ cpqHeSysBatteryFirmwareRev cpqHeSysBatterySparePartNum)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n\n", $self->{info};
+}
+
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/CLI.pm
new file mode 100755
index 0000000..46211e6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/CLI.pm
@@ -0,0 +1,27 @@
+package HP::Proliant::Component::BatterySubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::BatterySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/SNMP.pm
new file mode 100755
index 0000000..2fb23df
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/SNMP.pm
@@ -0,0 +1,78 @@
+package HP::Proliant::Component::BatterySubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::BatterySubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ sysbatteries => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeSysBatteryTable => '1.3.6.1.4.1.232.6.2.17.2',
+ cpqHeSysBatteryEntry => '1.3.6.1.4.1.232.6.2.17.2.1',
+ cpqHeSysBatteryChassis => '1.3.6.1.4.1.232.6.2.17.2.1.1',
+ cpqHeSysBatteryIndex => '1.3.6.1.4.1.232.6.2.17.2.1.2',
+ cpqHeSysBatteryPresent => '1.3.6.1.4.1.232.6.2.17.2.1.3',
+ cpqHeSysBatteryPresentValue => {
+ '1' => 'other',
+ '2' => 'absent',
+ '3' => 'present',
+ },
+ cpqHeSysBatteryCondition => '1.3.6.1.4.1.232.6.2.17.2.1.4',
+ cpqHeSysBatteryConditionValue => {
+ '1' => 'other',
+ '2' => 'ok',
+ '3' => 'degraded',
+ '4' => 'failed',
+ },
+ cpqHeSysBatteryStatus => '1.3.6.1.4.1.232.6.2.17.2.1.5',
+ cpqHeSysBatteryStatusValue => {
+ '1' => 'noError',
+ '2' => 'generalFailure',
+ '3' => 'shutdownHighResistance',
+ '4' => 'shutdownLowVoltage',
+ '5' => 'shutdownShortCircuit',
+ '6' => 'shutdownChargeTimeout',
+ '7' => 'shutdownOverTemperature',
+ '8' => 'shutdownDischargeMinVoltage',
+ '9' => 'shutdownDischargeCurrent',
+ '10' => 'shutdownLoadCountHigh',
+ '11' => 'shutdownEnablePin',
+ '12' => 'shutdownOverCurrent',
+ '13' => 'shutdownPermanentFailure',
+ '14' => 'shutdownBackupTimeExceeded',
+ },
+ cpqHeSysBatteryCapacityMaximum => '1.3.6.1.4.1.232.6.2.17.2.1.6',
+ cpqHeSysBatteryProductName => '1.3.6.1.4.1.232.6.2.17.2.1.7',
+ cpqHeSysBatteryModel => '1.3.6.1.4.1.232.6.2.17.2.1.8',
+ cpqHeSysBatterySerialNumber => '1.3.6.1.4.1.232.6.2.17.2.1.9',
+ cpqHeSysBatteryFirmwareRev => '1.3.6.1.4.1.232.6.2.17.2.1.10',
+ cpqHeSysBatterySparePartNum => '1.3.6.1.4.1.232.6.2.17.2.1.11',
+ };
+ # INDEX { cpqHeSysBatteryChassis, cpqHeSysBatteryIndex }
+ foreach ($self->get_entries($oids, 'cpqHeSysBatteryEntry')) {
+ next if ! $_->{cpqHeSysBatteryPresent} eq "present";
+ push(@{$self->{sysbatteries}},
+ HP::Proliant::Component::BatterySubsystem::Battery->new(%{$_}));
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem.pm
new file mode 100755
index 0000000..0486fd9
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem.pm
@@ -0,0 +1,112 @@
+package HP::Proliant::Component::CpuSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+################################## scrapiron ##########
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ cpus => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::CpuSubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::CpuSubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking cpus');
+ if (scalar (@{$self->{cpus}}) == 0) {
+ # sachen gibts.....
+ # $self->overall_check(); # sowas ist mir nur einmal untergekommen
+ } else {
+ foreach (@{$self->{cpus}}) {
+ $_->check();
+ }
+ }
+}
+
+sub num_cpus {
+ my $self = shift;
+ return scalar @{$self->{cpus}};
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{cpus}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::CpuSubsystem::Cpu;
+our @ISA = qw(HP::Proliant::Component::CpuSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqSeCpuSlot => $params{cpqSeCpuSlot},
+ cpqSeCpuUnitIndex => $params{cpqSeCpuUnitIndex},
+ cpqSeCpuName => $params{cpqSeCpuName},
+ cpqSeCpuStatus => $params{cpqSeCpuStatus},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('c', $self->{cpqSeCpuUnitIndex});
+ if ($self->{cpqSeCpuStatus} ne "ok") {
+ if ($self->{runtime}->{options}{scrapiron} &&
+ ($self->{cpqSeCpuStatus} eq "unknown")) {
+ $self->add_info(sprintf "cpu %d probably ok (%s)",
+ $self->{cpqSeCpuUnitIndex}, $self->{cpqSeCpuStatus});
+ } else {
+ $self->add_info(sprintf "cpu %d needs attention (%s)",
+ $self->{cpqSeCpuUnitIndex}, $self->{cpqSeCpuStatus});
+ $self->add_message(CRITICAL, $self->{info});
+ }
+ } else {
+ $self->add_info(sprintf "cpu %d is %s",
+ $self->{cpqSeCpuUnitIndex}, $self->{cpqSeCpuStatus});
+ }
+ $self->add_extendedinfo(sprintf "cpu_%s=%s",
+ $self->{cpqSeCpuUnitIndex}, $self->{cpqSeCpuStatus});
+}
+
+sub dump {
+ my $self = shift;
+ printf "[CPU_%s]\n", $self->{cpqSeCpuUnitIndex};
+ foreach (qw(cpqSeCpuSlot cpqSeCpuUnitIndex cpqSeCpuName cpqSeCpuStatus)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/CLI.pm
new file mode 100755
index 0000000..8953417
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/CLI.pm
@@ -0,0 +1,57 @@
+package HP::Proliant::Component::CpuSubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::CpuSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ cpus => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my %tmpcpu = (
+ runtime => $params{runtime},
+ );
+ my $inblock = 0;
+ foreach (grep(/^server/, split(/\n/, $self->{rawdata}))) {
+ if (/Processor:\s+(\d+)/) {
+ $tmpcpu{cpqSeCpuUnitIndex} = $1;
+ $inblock = 1;
+ } elsif (/Name\s*:\s+(.+?)\s*$/) {
+ $tmpcpu{cpqSeCpuName} = $1;
+ } elsif (/Status\s*:\s+(.+?)\s*$/) {
+ $tmpcpu{cpqSeCpuStatus} = lc $1;
+ } elsif (/Socket\s*:\s+(.+?)\s*$/) {
+ $tmpcpu{cpqSeCpuSlot} = $1;
+ } elsif (/^server\s*$/) {
+ if ($inblock) {
+ $inblock = 0;
+ push(@{$self->{cpus}},
+ HP::Proliant::Component::CpuSubsystem::Cpu->new(%tmpcpu));
+ %tmpcpu = (
+ runtime => $params{runtime},
+ );
+ }
+ }
+ }
+ if ($inblock) {
+ push(@{$self->{cpus}},
+ HP::Proliant::Component::CpuSubsystem::Cpu->new(%tmpcpu));
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/SNMP.pm
new file mode 100755
index 0000000..0824d04
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/SNMP.pm
@@ -0,0 +1,50 @@
+package HP::Proliant::Component::CpuSubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::CpuSubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ cpus => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ # CPQSTDEQ-MIB
+ my $oids = {
+ cpqSeCpuEntry => '1.3.6.1.4.1.232.1.2.2.1.1',
+ cpqSeCpuUnitIndex => '1.3.6.1.4.1.232.1.2.2.1.1.1',
+ cpqSeCpuSlot => '1.3.6.1.4.1.232.1.2.2.1.1.2',
+ cpqSeCpuName => '1.3.6.1.4.1.232.1.2.2.1.1.3',
+ cpqSeCpuStatus => '1.3.6.1.4.1.232.1.2.2.1.1.6',
+ cpqSeCpuStatusValue => {
+ 1 => "unknown",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ 5 => "disabled",
+ },
+ };
+
+ # INDEX { cpqSeCpuUnitIndex }
+ foreach ($self->get_entries($oids, 'cpqSeCpuEntry')) {
+ push(@{$self->{cpus}},
+ HP::Proliant::Component::CpuSubsystem::Cpu->new(%{$_}));
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem.pm
new file mode 100755
index 0000000..bd50a87
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem.pm
@@ -0,0 +1,159 @@
+package HP::Proliant::Component::DiskSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ da_subsystem => undef,
+ sas_da_subsystem => undef,
+ ide_da_subsystem => undef,
+ fca_da_subsystem => undef,
+ scsi_da_subsystem => undef,
+ condition => $params{condition},
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ $self->{da_subsystem} = HP::Proliant::Component::DiskSubsystem::Da->new(
+ runtime => $self->{runtime},
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ );
+ $self->{sas_subsystem} = HP::Proliant::Component::DiskSubsystem::Sas->new(
+ runtime => $self->{runtime},
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ );
+ $self->{scsi_subsystem} = HP::Proliant::Component::DiskSubsystem::Scsi->new(
+ runtime => $self->{runtime},
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ );
+ $self->{ide_subsystem} = HP::Proliant::Component::DiskSubsystem::Ide->new(
+ runtime => $self->{runtime},
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ );
+ $self->{fca_subsystem} = HP::Proliant::Component::DiskSubsystem::Fca->new(
+ runtime => $self->{runtime},
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ );
+}
+
+sub check {
+ my $self = shift;
+ $self->add_info('checking disk subsystem');
+ $self->{da_subsystem}->check();
+ $self->{sas_subsystem}->check();
+ $self->{scsi_subsystem}->check();
+ $self->{ide_subsystem}->check();
+ $self->{fca_subsystem}->check();
+ $self->disk_summary();
+}
+
+sub dump {
+ my $self = shift;
+ $self->{da_subsystem}->dump();
+ $self->{sas_subsystem}->dump();
+ $self->{scsi_subsystem}->dump();
+ $self->{ide_subsystem}->dump();
+ $self->{fca_subsystem}->dump();
+}
+
+sub disk_summary {
+ my $self = shift;
+ foreach my $subsys (qw(da sas scsi ide fca)) {
+ if (my $pd = $self->{$subsys.'_subsystem'}->has_physical_drives()) {
+ my $ld = $self->{$subsys.'_subsystem'}->has_logical_drives();
+ $self->add_summary(sprintf '%s: %d logical drives, %d physical drives',
+ $subsys, $ld, $pd);
+ }
+ }
+}
+
+sub assemble {
+ my $self = shift;
+ $self->trace(3, sprintf "%s controllers und platten zusammenfuehren",
+ ref($self));
+ $self->trace(3, sprintf "has %d controllers",
+ scalar(@{$self->{controllers}}));
+ $self->trace(3, sprintf "has %d accelerators",
+ scalar(@{$self->{accelerators}})) if exists $self->{accelerators};
+ $self->trace(3, sprintf "has %d enclosures",
+ scalar(@{$self->{enclosures}}));
+ $self->trace(3, sprintf "has %d physical_drives",
+ scalar(@{$self->{physical_drives}}));
+ $self->trace(3, sprintf "has %d logical_drives",
+ scalar(@{$self->{logical_drives}}));
+ $self->trace(3, sprintf "has %d spare_drives",
+ scalar(@{$self->{spare_drives}}));
+ my $found = {
+ accelerators => {},
+ enclosures => {},
+ logical_drives => {},
+ physical_drives => {},
+ spare_drives => {},
+ };
+ # found->{komponente}->{controllerindex} ist ein array
+ # von teilen, die zu einem controller gehoeren
+ foreach my $item (qw(accelerators enclosures logical_drives physical_drives spare_drives)) {
+ next if ($item eq "enclosures" && ! exists $self->{$item});
+ foreach (@{$self->{$item}}) {
+ $found->{item}->{$_->{controllerindex}} = []
+ unless exists $found->{$item}->{$_->{controllerindex}};
+ push(@{$found->{$item}->{$_->{controllerindex}}}, $_);
+ }
+ }
+ foreach my $item (qw(accelerators enclosures logical_drives physical_drives spare_drives)) {
+ foreach (@{$self->{controllers}}) {
+ if (exists $found->{$item}->{$_->{controllerindex}}) {
+ $_->{$item} = $found->{$item}->{$_->{controllerindex}};
+ delete $found->{$item}->{$_->{controllerindex}};
+ } else {
+ $_->{$item} = []; # z.b. ein leerer controller: physical_drives = []
+ }
+ }
+ }
+ # was jetzt noch in $found uebrig ist, gehoert zu keinem controller
+ # d.h. komponenten mit ungueltigen cnrtlindex wurden gefunden
+}
+
+sub has_controllers {
+ my $self = shift;
+ return scalar(@{$self->{controllers}});
+}
+
+sub has_accelerators {
+ my $self = shift;
+ return exists $self->{accelerators} ? scalar(@{$self->{accelerators}}) : 0;
+}
+
+sub has_physical_drives {
+ my $self = shift;
+ return scalar(@{$self->{physical_drives}});
+}
+
+sub has_logical_drives {
+ my $self = shift;
+ return scalar(@{$self->{logical_drives}});
+}
+
+sub has_enclosures {
+ my $self = shift;
+ return scalar(@{$self->{enclosures}});
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da.pm
new file mode 100755
index 0000000..5dbc5ef
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da.pm
@@ -0,0 +1,407 @@
+package HP::Proliant::Component::DiskSubsystem::Da;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ condition => undef,
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Da::SNMP';
+ } else {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Da::CLI';
+ }
+ $self->init();
+ $self->assemble();
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->dump();
+ }
+}
+
+package HP::Proliant::Component::DiskSubsystem::Da::Controller;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqDaCntlrIndex => $params{cpqDaCntlrIndex},
+ cpqDaCntlrSlot => $params{cpqDaCntlrSlot},
+ cpqDaCntlrModel => $params{cpqDaCntlrModel},
+ cpqDaCntlrCondition => $params{cpqDaCntlrCondition},
+ cpqDaCntlrBoardCondition => $params{cpqDaCntlrBoardCondition},
+ blacklisted => 0,
+ };
+ $self->{name} = $params{name} || $self->{cpqDaCntlrSlot};
+ $self->{controllerindex} = $self->{cpqDaCntlrIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+#$self->dumper($self);
+ $self->blacklist('daco', $self->{cpqDaCntlrIndex});
+ foreach (@{$self->{accelerators}}) {
+ $_->check();
+ }
+ foreach (@{$self->{enclosures}}) {
+ $_->check();
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->check();
+ }
+ if ($self->{cpqDaCntlrCondition} eq 'other') {
+ if (scalar(@{$self->{physical_drives}})) {
+ $self->add_message(CRITICAL,
+ sprintf 'da controller %s in slot %s needs attention',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ $self->add_info(sprintf 'da controller %s in slot %s needs attention',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ } else {
+ $self->add_info(sprintf 'da controller %s in slot %s is ok and unused',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ $self->{blacklisted} = 1;
+ }
+ } elsif ($self->{cpqDaCntlrCondition} eq 'degraded') {
+ # maybe only the battery has failed and is disabled, no problem
+ if (scalar(grep {
+ $_->has_failed() && $_->is_disabled()
+ } @{$self->{accelerators}})) {
+ # message was already written in the accel code
+ } else {
+ $self->add_message(CRITICAL,
+ sprintf 'da controller %s in slot %s needs attention',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ $self->add_info(sprintf 'da controller %s in slot %s needs attention',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ }
+ } elsif ($self->{cpqDaCntlrCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf 'da controller %s in slot %s needs attention',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ $self->add_info(sprintf 'da controller %s in slot %s needs attention',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ } else {
+ $self->add_info(sprintf 'da controller %s in slot %s is ok',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[DA_CONTROLLER_%s]\n", $self->{name};
+ foreach (qw(cpqDaCntlrSlot cpqDaCntlrIndex cpqDaCntlrCondition
+ cpqDaCntlrModel)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+ foreach (@{$self->{accelerators}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{enclosures}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Da::Accelerator;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqDaAccelCntlrIndex => $params{cpqDaAccelCntlrIndex},
+ cpqDaAccelBattery => $params{cpqDaAccelBattery} || 'notPresent',
+ cpqDaAccelCondition => $params{cpqDaAccelCondition},
+ cpqDaAccelStatus => $params{cpqDaAccelStatus},
+ cpqDaAccelErrCode => $params{cpqDaAccelErrCode},
+ blacklisted => 0,
+ failed => 0,
+ };
+ $self->{controllerindex} = $self->{cpqDaAccelCntlrIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('daac', $self->{cpqDaAccelCntlrIndex});
+ $self->add_info(sprintf 'controller accelerator is %s',
+ $self->{cpqDaAccelCondition});
+ if ($self->{cpqDaAccelCondition} eq "failed" || $self->{cpqDaAccelCondition} eq "degraded") {
+ $self->add_message(CRITICAL, sprintf
+ "controller accelerator is %s (reason: %s) and needs attention",
+ $self->{cpqDaAccelCondition}, $self->{cpqDaAccelErrCode});
+ }
+ $self->blacklist('daacb', $self->{cpqDaAccelCntlrIndex});
+ $self->add_info(sprintf 'controller accelerator battery is %s',
+ $self->{cpqDaAccelBattery});
+ if ($self->{cpqDaAccelBattery} eq "notPresent") {
+ } elsif ($self->{cpqDaAccelBattery} eq "recharging") {
+ $self->add_message(WARNING, "controller accelerator battery recharging");
+ } elsif ($self->{cpqDaAccelBattery} eq "failed" &&
+ $self->{cpqDaAccelStatus} eq "tmpDisabled") {
+ $self->add_message(WARNING, "controller accelerator battery needs attention");
+ } elsif ($self->{cpqDaAccelBattery} ne "ok") {
+ # (other) failed degraded
+ $self->add_message(CRITICAL, "controller accelerator battery needs attention");
+ }
+}
+
+sub has_failed {
+ my $self = shift;
+ return $self->{cpqDaAccelStatus} =~ /Disabled/ ? 1 : 0;
+}
+
+sub is_disabled {
+ my $self = shift;
+ return $self->{cpqDaAccelStatus} =~ /Disabled/ ? 1 : 0;
+}
+
+sub dump {
+ my $self = shift;
+ printf "[ACCELERATOR]\n";
+ foreach (qw(cpqDaAccelCntlrIndex cpqDaAccelBattery
+ cpqDaAccelStatus cpqDaAccelCondition cpqDaAccelErrCode)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+package HP::Proliant::Component::DiskSubsystem::Da::Enclosure;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ name => $params{name},
+ cpqDaEnclCntlrIndex => $params{cpqDaEnclCntlrIndex},
+ cpqDaEnclIndex => $params{cpqDaEnclIndex},
+ cpqDaEnclPort => $params{cpqDaEnclPort},
+ cpqDaEnclBox => $params{cpqDaEnclBox},
+ cpqDaEnclCondition => $params{cpqDaEnclCondition},
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ $self->{name} = $params{name} ||
+ $self->{cpqDaEnclPort}.':'.$self->{cpqDaEnclBox}; ##vorerst
+ $self->{controllerindex} = $self->{cpqDaEnclCntlrIndex};
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('dae', $self->{name});
+ $self->add_info(
+ sprintf "disk enclosure %s is %s",
+ $self->{name}, $self->{cpqDaEnclCondition});
+ if ($self->{cpqDaEnclCondition} !~ /^OK/) {
+ $self->add_message(CRITICAL,
+ sprintf "disk enclosure %s is %s",
+ $self->{name}, $self->{cpqDaEnclCondition});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[Disk Enclosure]\n";
+ foreach (qw(cpqDaEnclCntlrIndex cpqDaEnclIndex cpqDaEnclPort
+ cpqDaEnclBox cpqDaEnclCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+package HP::Proliant::Component::DiskSubsystem::Da::LogicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqDaLogDrvIndex => $params{cpqDaLogDrvIndex},
+ cpqDaLogDrvCntlrIndex => $params{cpqDaLogDrvCntlrIndex},
+ cpqDaLogDrvSize => $params{cpqDaLogDrvSize},
+ cpqDaLogDrvFaultTol => $params{cpqDaLogDrvFaultTol},
+ cpqDaLogDrvPercentRebuild => $params{cpqDaLogDrvPercentRebuild},
+ cpqDaLogDrvStatus => $params{cpqDaLogDrvStatus},
+ cpqDaLogDrvCondition => $params{cpqDaLogDrvCondition},
+ cpqDaLogDrvPhyDrvIDs => $params{cpqDaLogDrvPhyDrvIDs},
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ $self->{name} = $params{name} ||
+ $self->{cpqDaLogDrvCntlrIndex}.':'.$self->{cpqDaLogDrvIndex}; ##vorerst
+ $self->{controllerindex} = $self->{cpqDaLogDrvCntlrIndex};
+ if (! $self->{cpqDaLogDrvPercentRebuild} ||
+ $self->{cpqDaLogDrvPercentRebuild} == 4294967295) {
+ $self->{cpqDaLogDrvPercentRebuild} = 100;
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('dald', $self->{name});
+ $self->add_info(sprintf "logical drive %s is %s (%s)",
+ $self->{name}, $self->{cpqDaLogDrvStatus},
+ $self->{cpqDaLogDrvFaultTol});
+ if ($self->{cpqDaLogDrvCondition} ne "ok") {
+ if ($self->{cpqDaLogDrvStatus} =~
+ /rebuild|recovering|recovery|expanding|queued/) {
+ $self->add_message(WARNING,
+ sprintf "logical drive %s is %s",
+ $self->{name}, $self->{cpqDaLogDrvStatus});
+ } else {
+ $self->add_message(CRITICAL,
+ sprintf "logical drive %s is %s",
+ $self->{name}, $self->{cpqDaLogDrvStatus});
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[LOGICAL_DRIVE]\n";
+ foreach (qw(cpqDaLogDrvCntlrIndex cpqDaLogDrvIndex cpqDaLogDrvSize
+ cpqDaLogDrvFaultTol cpqDaLogDrvStatus cpqDaLogDrvCondition
+ cpqDaLogDrvPercentRebuild cpqDaLogDrvPhyDrvIDs)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Da::PhysicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ name => $params{name},
+ cpqDaPhyDrvCntlrIndex => $params{cpqDaPhyDrvCntlrIndex},
+ cpqDaPhyDrvIndex => $params{cpqDaPhyDrvIndex},
+ cpqDaPhyDrvBay => $params{cpqDaPhyDrvBay},
+ cpqDaPhyDrvBusNumber => $params{cpqDaPhyDrvBusNumber},
+ cpqDaPhyDrvSize => $params{cpqDaPhyDrvSize},
+ cpqDaPhyDrvStatus => $params{cpqDaPhyDrvStatus},
+ cpqDaPhyDrvCondition => $params{cpqDaPhyDrvCondition},
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ $self->{name} = $params{name} ||
+ $self->{cpqDaPhyDrvCntlrIndex}.':'.$self->{cpqDaPhyDrvIndex}; ##vorerst
+ $self->{controllerindex} = $self->{cpqDaPhyDrvCntlrIndex};
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('dapd', $self->{name});
+ $self->add_info(
+ sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqDaPhyDrvCondition});
+ if ($self->{cpqDaPhyDrvCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqDaPhyDrvCondition});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[PHYSICAL_DRIVE]\n";
+ foreach (qw(cpqDaPhyDrvCntlrIndex cpqDaPhyDrvIndex cpqDaPhyDrvBay
+ cpqDaPhyDrvBusNumber cpqDaPhyDrvSize cpqDaPhyDrvStatus
+ cpqDaPhyDrvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Da::SpareDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub dump {
+ my $self = shift;
+ printf "[SPARE_DRIVE]\n";
+ foreach (qw(cpqDaPhyDrvCntlrIndex cpqDaPhyDrvIndex cpqDaPhyDrvBay
+ cpqDaPhyDrvBusNumber cpqDaPhyDrvSize cpqDaPhyDrvStatus
+ cpqDaPhyDrvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/CLI.pm
new file mode 100755
index 0000000..75d3181
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/CLI.pm
@@ -0,0 +1,239 @@
+package HP::Proliant::Component::DiskSubsystem::Da::CLI;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $hpacucli = $self->{rawdata};
+ my $slot = 0;
+ my $type = "unkn";
+ my @lines = ();
+ my $thistype = 0;
+ my $tmpcntl = {};
+ my $tmpaccel = {};
+ my $tmpld = {};
+ my $tmppd = {};
+ my $tmpencl = {};
+ my $cntlindex = 0;
+ my $enclosureindex = 0;
+ my $ldriveindex = 0;
+ my $pdriveindex = 0;
+ my $incontroller = 0;
+ foreach (split(/\n/, $hpacucli)) {
+ next unless /^status/;
+ next if /^status\s*$/;
+ s/^status\s*//;
+ if (/(MSA[\s\w]+)\s+in\s+(\w+)/) {
+ $incontroller = 1;
+ $slot = $2;
+ $cntlindex++;
+ $tmpcntl->{$slot}->{cpqDaCntlrIndex} = $cntlindex;
+ $tmpcntl->{$slot}->{cpqDaCntlrModel} = $1;
+ $tmpcntl->{$slot}->{cpqDaCntlrSlot} = $slot;
+ } elsif (/([\s\w]+) in Slot\s+(\d+)/) {
+ $incontroller = 1;
+ $slot = $2;
+ $cntlindex++;
+ $tmpcntl->{$slot}->{cpqDaCntlrIndex} = $cntlindex;
+ $tmpcntl->{$slot}->{cpqDaCntlrModel} = $1;
+ $tmpcntl->{$slot}->{cpqDaCntlrSlot} = $slot;
+ } elsif (/Controller Status: (\w+)/) {
+ $tmpcntl->{$slot}->{cpqDaCntlrBoardCondition} = lc $1;
+ $tmpcntl->{$slot}->{cpqDaCntlrCondition} = lc $1;
+ } elsif (/Cache Status: ([\w\s]+?)\s*$/) {
+ # Cache Status: OK
+ # Cache Status: Not Configured
+ # Cache Status: Temporarily Disabled
+ $tmpaccel->{$slot}->{cpqDaAccelCntlrIndex} = $cntlindex;
+ $tmpaccel->{$slot}->{cpqDaAccelSlot} = $slot;
+ #condition: other,ok,degraded,failed
+ #status: other,invalid,enabled,tmpDisabled,permDisabled
+ $tmpaccel->{$slot}->{cpqDaAccelCondition} = lc $1;
+ if ($tmpaccel->{$slot}->{cpqDaAccelCondition} eq 'ok') {
+ $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'enabled';
+ } elsif ($tmpaccel->{$slot}->{cpqDaAccelCondition} eq 'not configured') {
+ $tmpaccel->{$slot}->{cpqDaAccelCondition} = 'ok';
+ $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'enabled';
+ } elsif ($tmpaccel->{$slot}->{cpqDaAccelCondition} eq 'temporarily disabled') {
+ $tmpaccel->{$slot}->{cpqDaAccelCondition} = 'ok';
+ $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'tmpDisabled';
+ } elsif ($tmpaccel->{$slot}->{cpqDaAccelCondition} eq 'permanently disabled') {
+ $tmpaccel->{$slot}->{cpqDaAccelCondition} = 'ok';
+ $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'permDisabled';
+ } else {
+ $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'enabled';
+ }
+ } elsif (/Battery.* Status: (\w+)/) {
+ # sowas gibts auch Battery/Capacitor Status: OK
+ $tmpaccel->{$slot}->{cpqDaAccelBattery} = lc $1;
+ } elsif (/^\s*$/) {
+ }
+ }
+ $slot = 0;
+ $cntlindex = 0;
+ $enclosureindex = 0;
+ $ldriveindex = 0;
+ $pdriveindex = 0;
+ foreach (split(/\n/, $hpacucli)) {
+ next unless /^config/;
+ next if /^config\s*$/;
+ s/^config\s*//;
+ if (/(MSA[\s\w]+)\s+in\s+(\w+)/) {
+ $slot = $2;
+ $cntlindex++;
+ $pdriveindex = 1;
+ } elsif (/([\s\w]+) in Slot\s+(\d+)/) {
+ #if ($slot ne $2 || ! $slot) {
+ $cntlindex++;
+ # 2012-12-15 das passt nicht zur oberen schleife
+ # ich habe keine ahnung, was der hintergrund fuer dieses if ist
+ #}
+ $slot = $2;
+ $pdriveindex = 1;
+ } elsif (/([\s\w]+) at Port ([\w]+), Box (\d+), (.*)/) {
+ $enclosureindex++;
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclCntlrIndex} = $cntlindex;
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclIndex} = $enclosureindex;
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclPort} = $2;
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclBox} = $3;
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclCondition} = $4;
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclStatus} =
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclCondition};
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaLogDrvPhyDrvIDs} = 'unknown';
+ } elsif (/logicaldrive\s+(.+?)\s+\((.*)\)/) {
+ # logicaldrive 1 (683.5 GB, RAID 5, OK)
+ # logicaldrive 1 (683.5 GB, RAID 5, OK)
+ # logicaldrive 2 (442 MB, RAID 1+0, OK)
+ $ldriveindex = $1;
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvCntlrIndex} = $cntlindex;
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvIndex} = $ldriveindex;
+ ($tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvSize},
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvFaultTol},
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvCondition}) =
+ map { lc $_ } split(/,\s*/, $2);
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvStatus} =
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvCondition};
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvPhyDrvIDs} = 'unknown';
+ } elsif (/physicaldrive\s+(.+?)\s+\((.*)\)/) {
+ # physicaldrive 2:0 (port 2:id 0 , Parallel SCSI, 36.4 GB, OK)
+ # physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 146 GB, OK)
+ # physicaldrive 1:1 (box 1:bay 1, Parallel SCSI, 146 GB, OK)
+ my $name = $1;
+ my($location, $type, $size, $status) = split(/,/, $2);
+ $status =~ s/^\s+//g;
+ $status =~ s/\s+$//g;
+ $status = lc $status;
+ my %location = ();
+ foreach (split(/:/, $location)) {
+ $location{$1} = $2 if /(\w+)\s+(\w+)/;
+ }
+ $location{box} ||= 0;
+ $location{id} ||= $pdriveindex;
+ $location{bay} ||= $location{id};
+ $location{port} ||= $location{bay};
+ $tmppd->{$slot}->{$name}->{name} = lc $name;
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvCntlrIndex} = $cntlindex;
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvIndex} = $location{id};
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvBay} = $location{bay};
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvBusNumber} = $location{port};
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvSize} = $size;
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvStatus} = $status;
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvCondition} = $status;
+ $tmppd->{$slot}->{$name}->{ldriveindex} = $ldriveindex || -1;
+ foreach (keys %{$tmppd->{$slot}->{$name}}) {
+ $tmppd->{$slot}->{$name}->{$_} =~ s/^\s+//g;
+ $tmppd->{$slot}->{$name}->{$_} =~ s/\s+$//g;
+ $tmppd->{$slot}->{$name}->{$_} = lc $tmppd->{$slot}->{$name}->{$_};
+ }
+ $pdriveindex++;
+ }
+ }
+
+ foreach my $slot (keys %{$tmpcntl}) {
+ if (exists $tmpcntl->{$slot}->{cpqDaCntlrModel} &&
+ ! $self->identified($tmpcntl->{$slot}->{cpqDaCntlrModel})) {
+ delete $tmpcntl->{$slot};
+ delete $tmpaccel->{$slot};
+ delete $tmpencl->{$slot};
+ delete $tmpld->{$slot};
+ delete $tmppd->{$slot};
+ }
+ }
+
+#printf "%s\n", Data::Dumper::Dumper($tmpcntl);
+#printf "%s\n", Data::Dumper::Dumper($tmpaccel);
+#printf "%s\n", Data::Dumper::Dumper($tmpld);
+#printf "%s\n", Data::Dumper::Dumper($tmppd);
+ foreach my $slot (sort {
+ $tmpcntl->{$a}->{cpqDaCntlrIndex} <=> $tmpcntl->{$b}->{cpqDaCntlrIndex}
+ }keys %{$tmpcntl}) {
+ $tmpcntl->{$slot}->{runtime} = $self->{runtime};
+ push(@{$self->{controllers}},
+ HP::Proliant::Component::DiskSubsystem::Da::Controller->new(
+ %{$tmpcntl->{$slot}}));
+ }
+ foreach my $slot (sort {
+ $tmpaccel->{$a}->{cpqDaAccelCntlrIndex} <=> $tmpaccel->{$b}->{cpqDaAccelCntlrIndex}
+ } keys %{$tmpaccel}) {
+ $tmpaccel->{$slot}->{runtime} = $self->{runtime};
+ push(@{$self->{accelerators}},
+ HP::Proliant::Component::DiskSubsystem::Da::Accelerator->new(
+ %{$tmpaccel->{$slot}}));
+ }
+ foreach my $slot (keys %{$tmpencl}) {
+ foreach my $enclosureindex (keys %{$tmpencl->{$slot}}) {
+ $tmpencl->{$slot}->{$enclosureindex}->{runtime} = $self->{runtime};
+ push(@{$self->{enclosures}},
+ HP::Proliant::Component::DiskSubsystem::Da::Enclosure->new(
+ %{$tmpencl->{$slot}->{$enclosureindex}}));
+ }
+ }
+ foreach my $slot (keys %{$tmpld}) {
+ foreach my $ldriveindex (keys %{$tmpld->{$slot}}) {
+ $tmpld->{$slot}->{$ldriveindex}->{runtime} = $self->{runtime};
+ push(@{$self->{logical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Da::LogicalDrive->new(
+ %{$tmpld->{$slot}->{$ldriveindex}}));
+ }
+ foreach my $pdriveindex (sort {
+ (split ':', $a, 2)[0] cmp (split ':', $b, 2)[0] ||
+ (split ':', $a, 2)[1] cmp (split ':', $b, 2)[1] ||
+ (split ':', $a, 2)[2] <=> (split ':', $b, 2)[2]
+ } keys %{$tmppd->{$slot}}) {
+ $tmppd->{$slot}->{$pdriveindex}->{runtime} = $self->{runtime};
+ push(@{$self->{physical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Da::PhysicalDrive->new(
+ %{$tmppd->{$slot}->{$pdriveindex}}));
+ }
+ }
+}
+
+sub identified {
+ my $self = shift;
+ my $info = shift;
+ return 1 if $info =~ /Parallel SCSI/;
+ return 1 if $info =~ /Smart Array/; # Trond: works fine on E200i, P400, E400
+ return 1 if $info =~ /MSA500/;
+ #return 1 if $info =~ /Smart Array (5|6)/;
+ #return 1 if $info =~ /Smart Array P400i/; # snmp sagt Da, trotz SAS in cli
+ #return 1 if $info =~ /Smart Array P410i/; # dto
+ return 0;
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm
new file mode 100755
index 0000000..629fe29
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm
@@ -0,0 +1,232 @@
+package HP::Proliant::Component::DiskSubsystem::Da::SNMP;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+
+ # CPQIDA-MIB
+ my $oids = {
+ cpqDaCntlrEntry => "1.3.6.1.4.1.232.3.2.2.1.1",
+ cpqDaCntlrIndex => "1.3.6.1.4.1.232.3.2.2.1.1.1",
+ cpqDaCntlrModel => "1.3.6.1.4.1.232.3.2.2.1.1.2",
+ cpqDaCntlrSlot => "1.3.6.1.4.1.232.3.2.2.1.1.5",
+ cpqDaCntlrCondition => "1.3.6.1.4.1.232.3.2.2.1.1.6",
+ cpqDaCntlrBoardCondition => "1.3.6.1.4.1.232.3.2.2.1.1.12",
+ cpqDaCntlrModelValue => {
+ 1 => 'other',
+ 2 => 'ida',
+ 3 => 'idaExpansion',
+ 4 => 'ida-2',
+ 5 => 'smart',
+ 6 => 'smart-2e',
+ 7 => 'smart-2p',
+ 8 => 'smart-2sl',
+ 9 => 'smart-3100es',
+ 10 => 'smart-3200',
+ 11 => 'smart-2dh',
+ 12 => 'smart-221',
+ 13 => 'sa-4250es',
+ 14 => 'sa-4200',
+ 15 => 'sa-integrated',
+ 16 => 'sa-431',
+ 17 => 'sa-5300',
+ 18 => 'raidLc2',
+ 19 => 'sa-5i',
+ 20 => 'sa-532',
+ 21 => 'sa-5312',
+ 22 => 'sa-641',
+ 23 => 'sa-642',
+ 24 => 'sa-6400',
+ 25 => 'sa-6400em',
+ 26 => 'sa-6i',
+ },
+ cpqDaCntlrConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqDaCntlrBoardConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+
+ # INDEX { cpqDaCntlrIndex }
+ foreach ($self->get_entries($oids, 'cpqDaCntlrEntry')) {
+ push(@{$self->{controllers}},
+ HP::Proliant::Component::DiskSubsystem::Da::Controller->new(%{$_}));
+ }
+
+ $oids = {
+ cpqDaAccelEntry => "1.3.6.1.4.1.232.3.2.2.2.1",
+ cpqDaAccelCntlrIndex => "1.3.6.1.4.1.232.3.2.2.2.1.1",
+ cpqDaAccelStatus => "1.3.6.1.4.1.232.3.2.2.2.1.2",
+ cpqDaAccelErrCode => "1.3.6.1.4.1.232.3.2.2.2.1.5",
+ cpqDaAccelBattery => "1.3.6.1.4.1.232.3.2.2.2.1.6",
+ cpqDaAccelCondition => "1.3.6.1.4.1.232.3.2.2.2.1.9",
+ cpqDaAccelBatteryValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'recharging',
+ 4 => 'failed',
+ 5 => 'degraded',
+ 6 => 'notPresent',
+ },
+ cpqDaAccelConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqDaAccelStatusValue => {
+ 1 => "other",
+ 2 => "invalid",
+ 3 => "enabled",
+ 4 => "tmpDisabled",
+ 5 => "permDisabled",
+ },
+ cpqDaAccelErrCodeValue => {
+ 1 => 'other',
+ 2 => 'invalid',
+ 3 => 'badConfig',
+ 4 => 'lowBattery',
+ 5 => 'disableCmd',
+ 6 => 'noResources',
+ 7 => 'notConnected',
+ 8 => 'badMirrorData',
+ 9 => 'readErr',
+ 10 => 'writeErr',
+ 11 => 'configCmd',
+ 12 => 'expandInProgress',
+ 13 => 'snapshotInProgress',
+ 14 => 'redundantLowBattery',
+ 15 => 'redundantSizeMismatch',
+ 16 => 'redundantCacheFailure',
+ 17 => 'excessiveEccErrors',
+ 18 => 'adgEnablerMissing',
+ 19 => 'postEccErrors',
+ 20 => 'batteryHotRemoved',
+ 21 => 'capacitorChargeLow',
+ 22 => 'notEnoughBatteries',
+ 23 => 'cacheModuleNotSupported',
+ 24 => 'batteryNotSupported',
+ 25 => 'noCapacitorAttached',
+ 26 => 'capBasedBackupFailed',
+ 27 => 'capBasedRestoreFailed',
+ 28 => 'capBasedModuleHWFailure',
+ 29 => 'capacitorFailedToCharge',
+ 30 => 'capacitorBasedHWMemBeingErased',
+ 31 => 'incompatibleCacheModule',
+ 32 => 'fbcmChargerCircuitFailure',
+ },
+ };
+
+ # INDEX { cpqDaAccelCntlrIndex }
+ foreach ($self->get_entries($oids, 'cpqDaAccelEntry')) {
+ push(@{$self->{accelerators}},
+ HP::Proliant::Component::DiskSubsystem::Da::Accelerator->new(%{$_}));
+ }
+
+ $oids = {
+ cpqDaLogDrvEntry => "1.3.6.1.4.1.232.3.2.3.1.1",
+ cpqDaLogDrvCntlrIndex => "1.3.6.1.4.1.232.3.2.3.1.1.1",
+ cpqDaLogDrvIndex => "1.3.6.1.4.1.232.3.2.3.1.1.2",
+ cpqDaLogDrvFaultTol => "1.3.6.1.4.1.232.3.2.3.1.1.3",
+ cpqDaLogDrvStatus => "1.3.6.1.4.1.232.3.2.3.1.1.4",
+ cpqDaLogDrvSize => "1.3.6.1.4.1.232.3.2.3.1.1.9",
+ cpqDaLogDrvPhyDrvIDs => "1.3.6.1.4.1.232.3.2.3.1.1.10",
+ cpqDaLogDrvCondition => "1.3.6.1.4.1.232.3.2.3.1.1.11",
+ cpqDaLogDrvPercentRebuild => "1.3.6.1.4.1.232.3.2.3.1.1.12",
+ cpqDaLogDrvFaultTolValue => {
+ 1 => "other",
+ 2 => "none",
+ 3 => "mirroring",
+ 4 => "dataGuard",
+ 5 => "distribDataGuard",
+ 7 => "advancedDataGuard",
+ },
+ cpqDaLogDrvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqDaLogDrvStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ 4 => "unconfigured",
+ 5 => "recovering",
+ 6 => "readyForRebuild",
+ 7 => "rebuilding",
+ 8 => "wrongDrive",
+ 9 => "badConnect",
+ 10 => "overheating",
+ 11 => "shutdown",
+ 12 => "expanding",
+ 13 => "notAvailable",
+ 14 => "queuedForExpansion",
+ },
+ };
+
+ # INDEX { cpqDaLogDrvCntlrIndex, cpqDaLogDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqDaLogDrvEntry')) {
+ $_->{cpqDaLogDrvPhyDrvIDs} ||= 'empty';
+ push(@{$self->{logical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Da::LogicalDrive->new(%{$_}));
+ }
+
+ $oids = {
+ cpqDaPhyDrvEntry => "1.3.6.1.4.1.232.3.2.5.1.1",
+ cpqDaPhyDrvCntlrIndex => "1.3.6.1.4.1.232.3.2.5.1.1.1",
+ cpqDaPhyDrvIndex => "1.3.6.1.4.1.232.3.2.5.1.1.2",
+ cpqDaPhyDrvBay => "1.3.6.1.4.1.232.3.2.5.1.1.5",
+ cpqDaPhyDrvStatus => "1.3.6.1.4.1.232.3.2.5.1.1.6",
+ cpqDaPhyDrvSize => "1.3.6.1.4.1.232.3.2.5.1.1.9",
+ cpqDaPhyDrvCondition => "1.3.6.1.4.1.232.3.2.5.1.1.37",
+ cpqDaPhyDrvBusNumber => "1.3.6.1.4.1.232.3.2.5.1.1.50",
+ cpqDaPhyDrvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqDaPhyDrvStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ 4 => "predictiveFailure",
+ },
+ };
+
+ # INDEX { cpqDaPhyDrvCntlrIndex, cpqDaPhyDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqDaPhyDrvEntry')) {
+ push(@{$self->{physical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Da::PhysicalDrive->new(%{$_}));
+ }
+
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca.pm
new file mode 100755
index 0000000..2014697
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca.pm
@@ -0,0 +1,433 @@
+package HP::Proliant::Component::DiskSubsystem::Fca;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ host_controllers => [],
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ global_status => undef,
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Fca::SNMP';
+ } else {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Fca::CLI';
+ }
+ $self->init();
+ $self->assemble();
+ return $self;
+}
+
+sub assemble {
+ my $self = shift;
+ $self->trace(3, sprintf "%s controllers und platten zusammenfuehren",
+ ref($self));
+ $self->trace(3, sprintf "has %d host controllers",
+ scalar(@{$self->{host_controllers}}));
+ $self->trace(3, sprintf "has %d controllers",
+ scalar(@{$self->{controllers}}));
+ $self->trace(3, sprintf "has %d physical_drives",
+ scalar(@{$self->{physical_drives}}));
+ $self->trace(3, sprintf "has %d logical_drives",
+ scalar(@{$self->{logical_drives}}));
+ $self->trace(3, sprintf "has %d spare_drives",
+ scalar(@{$self->{spare_drives}}));
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{host_controllers}}) {
+ $_->check();
+ }
+ foreach (@{$self->{controllers}}) {
+ $_->check();
+ }
+ foreach (@{$self->{accelerators}}) {
+ $_->check();
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->check();
+ }
+ # wozu eigentlich?
+ #if (! $self->has_controllers()) {
+ #$self->{global_status}->check();
+ #}
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{host_controllers}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{controllers}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{accelerators}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->dump();
+ }
+ #$self->{global_status}->dump();
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::GlobalStatus;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqFcaMibCondition => $params{cpqFcaMibCondition},
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ if ($self->{cpqFcaMibCondition} eq 'other') {
+ $self->add_message(OK,
+ sprintf 'fcal overall condition is other, update your drivers, please');
+ } elsif ($self->{cpqFcaMibCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf 'fcal overall condition is %s', $self->{cpqFcaMibCondition});
+ }
+ $self->{info} =
+ sprintf 'fcal overall condition is %s', $self->{cpqFcaMibCondition};
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FCAL]\n";
+ foreach (qw(cpqFcaMibCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::HostController;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqFcaHostCntlr/, keys %params;
+ $self->{name} = $params{name} || $self->{cpqFcaHostCntlrIndex};
+ $self->{controllerindex} = $self->{cpqFcaHostCntlrIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('fcahc', $self->{name});
+ my $info = sprintf 'fcal host controller %s in slot %s is %s',
+ $self->{name}, $self->{cpqFcaHostCntlrSlot}, $self->{cpqFcaHostCntlrCondition};
+ if ($self->{cpqFcaHostCntlrCondition} eq 'other') {
+ #$info .= sprintf ' and needs attention (%s)', $self->{cpqFcaHostCntlrStatus};
+ # let's assume other=ok
+ $self->add_message(OK, $info);
+ $self->add_info($info);
+ } elsif ($self->{cpqFcaHostCntlrCondition} ne 'ok') {
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } else {
+ $self->add_info($info);
+ }
+ $self->blacklist('fcahco', $self->{name});
+ $info = sprintf 'fcal host controller %s overall condition is %s',
+ $self->{name}, $self->{cpqFcaHostCntlrOverallCondition};
+ if ($self->{cpqFcaHostCntlrOverallCondition} eq 'other') {
+ $self->add_message(OK, $info);
+ } elsif ($self->{cpqFcaHostCntlrOverallCondition} ne 'ok') {
+ $self->add_message(WARNING, $info);
+ }
+ $self->add_info($info);
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FCAL_HOST_CONTROLLER_%s]\n", $self->{name};
+ foreach (qw(cpqFcaHostCntlrIndex cpqFcaHostCntlrSlot
+ cpqFcaHostCntlrModel cpqFcaHostCntlrStatus cpqFcaHostCntlrCondition
+ cpqFcaHostCntlrOverallCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::Controller;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqFcaCntlr/, keys %params;
+ $self->{name} = $params{name} ||
+ $self->{cpqFcaCntlrBoxIndex}.':'.$self->{cpqFcaCntlrBoxIoSlot};
+ $self->{controllerindex} = $self->{cpqFcaCntlrBoxIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('fcaco', $self->{name});
+ my $info = sprintf 'fcal controller %s in box %s/slot %s is %s',
+ $self->{name}, $self->{cpqFcaCntlrBoxIndex}, $self->{cpqFcaCntlrBoxIoSlot},
+ $self->{cpqFcaCntlrCondition};
+ if ($self->{cpqFcaCntlrCondition} eq 'other') {
+ if (1) { # was ist mit phys. drives?
+ $info .= ' needs attention';
+ $info .= sprintf(' (%s)', $self->{cpqFcaCntlrStatus}) unless $self->{cpqFcaCntlrStatus} eq 'ok';
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } else {
+ $self->add_info($info);
+ $self->{blacklisted} = 1;
+ }
+ } elsif ($self->{cpqFcaCntlrCondition} ne 'ok') {
+ $info .= ' needs attention';
+ $info .= sprintf(' (%s)', $self->{cpqFcaCntlrStatus}) unless $self->{cpqFcaCntlrStatus} eq 'ok';
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } else {
+ $self->add_info($info);
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FCAL_CONTROLLER_%s]\n", $self->{name};
+ foreach (qw(cpqFcaCntlrBoxIndex cpqFcaCntlrBoxIoSlot cpqFcaCntlrModel
+ cpqFcaCntlrStatus cpqFcaCntlrCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::Accelerator;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqFcaAccel/, keys %params;
+ $self->{name} = $params{name} ||
+ $self->{cpqFcaAccelBoxIndex}.':'.$self->{cpqFcaAccelBoxIoSlot};
+ $self->{controllerindex} = $self->{cpqFcaAccelBoxIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ # !!! cpqFcaAccelStatus
+ $self->blacklist('fcaac', $self->{name});
+ my $info = sprintf 'fcal accelerator %s in box %s/slot %s is ',
+ $self->{name}, $self->{cpqFcaAccelBoxIndex}, $self->{cpqFcaAccelBoxIoSlot};
+ if ($self->{cpqFcaAccelStatus} eq 'invalid') {
+ $info .= 'not installed';
+ $self->add_info($info);
+ } elsif ($self->{cpqFcaAccelStatus} eq 'tmpDisabled') {
+ $info .= 'temp disabled';
+ $self->add_info($info);
+ } elsif ($self->{cpqFcaAccelCondition} eq 'other') {
+ $info .= sprintf '%s and needs attention (%s)',
+ $self->{cpqFcaAccelCondition}, $self->{cpqFcaAccelErrCode};
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } elsif ($self->{cpqFcaAccelCondition} ne 'ok') {
+ $info .= sprintf '%s and needs attention (%s)',
+ $self->{cpqFcaAccelCondition}, $self->{cpqFcaAccelErrCode};
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } else {
+ $info .= sprintf '%s', $self->{cpqFcaAccelCondition};
+ $self->add_info($info);
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FCAL_ACCELERATOR_%s]\n", $self->{name};
+ foreach (qw(cpqFcaAccelBoxIndex cpqFcaAccelBoxIoSlot cpqFcaAccelStatus
+ cpqFcaAccelErrCode cpqFcaAccelBatteryStatus cpqFcaAccelCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::LogicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqFcaLogDrv/, keys %params;
+ bless $self, $class;
+ $self->{name} = $params{name} ||
+ $self->{cpqFcaLogDrvBoxIndex}.':'.
+ $self->{cpqFcaLogDrvIndex};
+ $self->{controllerindex} = $self->{cpqFcaLogDrvBoxIndex};
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('fcald', $self->{name});
+ my $info = sprintf 'logical drive %s (%s) is %s',
+ $self->{name}, $self->{cpqFcaLogDrvFaultTol}, $self->{cpqFcaLogDrvCondition};
+ if ($self->{cpqFcaLogDrvCondition} ne "ok") {
+ $info .= sprintf ' (%s)', $self->{cpqFcaLogDrvStatus};
+ if ($self->{cpqFcaLogDrvStatus} =~
+ /rebuild|recovering|expand/) {
+ $info .= sprintf ' (%s)', $self->{cpqFcaLogDrvStatus};
+ $self->add_message(WARNING, $info);
+ } else {
+ $self->add_message(CRITICAL, $info);
+ }
+ }
+ $self->add_info($info);
+}
+
+sub dump {
+ my $self = shift;
+ printf "[LOGICAL_DRIVE_%s]\n", $self->{name};
+ foreach (qw(cpqFcaLogDrvBoxIndex cpqFcaLogDrvIndex cpqFcaLogDrvFaultTol
+ cpqFcaLogDrvStatus cpqFcaLogDrvPercentRebuild cpqFcaLogDrvSize
+ cpqFcaLogDrvPhyDrvIDs cpqFcaLogDrvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::PhysicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqFcaPhyDrv/, keys %params;
+ $self->{name} = $params{name} ||
+ $self->{cpqFcaPhyDrvBoxIndex}.':'.$self->{cpqFcaPhyDrvIndex}; ####vorerst
+ $self->{controllerindex} = $self->{cpqScsiPhyDrvCntlrIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('fcapd', $self->{name});
+ my $info = sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqFcaPhyDrvStatus};
+ if ($self->{cpqFcaPhyDrvStatus} eq 'unconfigured') {
+ # not part of a logical drive
+ # condition will surely be other
+ } elsif ($self->{cpqFcaPhyDrvCondition} ne 'ok') {
+ $self->add_message(CRITICAL, $info);
+ }
+ $self->add_info($info);
+}
+
+sub dump {
+ my $self = shift;
+ printf "[PHYSICAL_DRIVE_%s]\n", $self->{name};
+ foreach (qw(cpqFcaPhyDrvBoxIndex cpqFcaPhyDrvIndex cpqFcaPhyDrvModel
+ cpqFcaPhyDrvBay cpqFcaPhyDrvStatus cpqFcaPhyDrvCondition
+ cpqFcaPhyDrvSize cpqFcaPhyDrvBusNumber)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::SpareDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub dump {
+ my $self = shift;
+ printf "[SPARE_DRIVE]\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm
new file mode 100755
index 0000000..fd11dbc
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm
@@ -0,0 +1,34 @@
+package HP::Proliant::Component::DiskSubsystem::Fca::CLI;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ # .....
+ $self->{global_status} =
+ HP::Proliant::Component::DiskSubsystem::Fca::GlobalStatus->new(
+ runtime => $self->{runtime},
+ cpqFcaMibCondition => 'n/a',
+ );
+
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm
new file mode 100755
index 0000000..fc603e5
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm
@@ -0,0 +1,303 @@
+package HP::Proliant::Component::DiskSubsystem::Fca::SNMP;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+
+ # CPQFCA-MIB
+ my $oids = {
+ cpqFcaHostCntlrEntry => '1.3.6.1.4.1.232.16.2.7.1.1',
+ cpqFcaHostCntlrIndex => '1.3.6.1.4.1.232.16.2.7.1.1.1',
+ cpqFcaHostCntlrSlot => '1.3.6.1.4.1.232.16.2.7.1.1.2',
+ cpqFcaHostCntlrModel => '1.3.6.1.4.1.232.16.2.7.1.1.3',
+ cpqFcaHostCntlrStatus => '1.3.6.1.4.1.232.16.2.7.1.1.4',
+ cpqFcaHostCntlrCondition => '1.3.6.1.4.1.232.16.2.7.1.1.5',
+ cpqFcaHostCntlrOverallCondition => '1.3.6.1.4.1.232.16.2.7.1.1.8',
+ cpqFcaHostCntlrModelValue => {
+ 1 => "other",
+ # You may need to upgrade your driver software and\or instrument
+ # agent(s). You have a drive array controller in the system
+ # that the instrument agent does not recognize. (other according to CPQFCAL-MIB)
+ 2 => "fchc-p",
+ 3 => "fchc-e",
+ 4 => "fchc64",
+ 5 => "sa-sam",
+ 6 => "fca-2101",
+ 7 => "sw64-33",
+ 8 => "fca-221x",
+ 9 => "dpfcmc",
+ 10 => 'fca-2404',
+ 11 => 'fca-2214',
+ 12 => 'a7298a',
+ 13 => 'fca-2214dc',
+ 14 => 'a6826a',
+ 15 => 'fcmcG3',
+ 16 => 'fcmcG4',
+ 17 => 'ab46xa',
+ 18 => 'fc-generic',
+ 19 => 'fca-1143',
+ 20 => 'fca-1243',
+ 21 => 'fca-2143',
+ 22 => 'fca-2243',
+ 23 => 'fca-1050',
+ 24 => 'fca-lpe1105',
+ 25 => 'fca-qmh2462',
+ 26 => 'fca-1142sr',
+ 27 => 'fca-1242sr',
+ 28 => 'fca-2142sr',
+ 29 => 'fca-2242sr',
+ 30 => 'fcmc20pe',
+ 31 => 'fca-81q',
+ 32 => 'fca-82q',
+ 33 => 'fca-qmh2562',
+ 34 => 'fca-81e',
+ 35 => 'fca-82e',
+ 36 => 'fca-1205',
+ },
+ cpqFcaHostCntlrStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ 4 => "shutdown",
+ 5 => "loopDegraded",
+ 6 => "loopFailed",
+ 7 => "notConnected",
+ },
+ cpqFcaHostCntlrConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqFcaHostCntlrOverallConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ }, # cntrl + alle associated storage boxes
+ };
+
+ # INDEX { cpqFcaHostCntlrIndex }
+ foreach ($self->get_entries($oids, 'cpqFcaHostCntlrEntry')) {
+ push(@{$self->{host_controllers}},
+ HP::Proliant::Component::DiskSubsystem::Fca::HostController->new(%{$_}));
+ }
+
+ $oids = {
+ cpqFcaCntlrEntry => '1.3.6.1.4.1.232.16.2.2.1.1',
+ cpqFcaCntlrBoxIndex => '1.3.6.1.4.1.232.16.2.2.1.1.1',
+ cpqFcaCntlrBoxIoSlot => '1.3.6.1.4.1.232.16.2.2.1.1.2',
+ cpqFcaCntlrModel => '1.3.6.1.4.1.232.16.2.2.1.1.3',
+ cpqFcaCntlrStatus => '1.3.6.1.4.1.232.16.2.2.1.1.5',
+ cpqFcaCntlrCondition => '1.3.6.1.4.1.232.16.2.2.1.1.6',
+ cpqFcaCntlrModelValue => {
+ 1 => "other",
+ 2 => "fibreArray",
+ 3 => "msa1000",
+ 4 => "smartArrayClusterStorage",
+ 5 => "hsg80",
+ 6 => "hsv110",
+ 7 => "msa500g2",
+ 8 => "msa20",
+ 8 => "msa1510i",
+ },
+ cpqFcaCntlrStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ 4 => "offline",
+ 5 => "redundantPathOffline",
+ 6 => "notConnected",
+ },
+ cpqFcaCntlrConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+
+ # INDEX { cpqFcaCntlrBoxIndex, cpqFcaCntlrBoxIoSlot }
+ foreach ($self->get_entries($oids, 'cpqFcaCntlrEntry')) {
+ push(@{$self->{controllers}},
+ HP::Proliant::Component::DiskSubsystem::Fca::Controller->new(%{$_}));
+ }
+
+ $oids = {
+ cpqFcaAccelEntry => '1.3.6.1.4.1.232.16.2.2.2.1',
+ cpqFcaAccelBoxIndex => '1.3.6.1.4.1.232.16.2.2.2.1.1',
+ cpqFcaAccelBoxIoSlot => '1.3.6.1.4.1.232.16.2.2.2.1.2',
+ cpqFcaAccelStatus => '1.3.6.1.4.1.232.16.2.2.2.1.3',
+ cpqFcaAccelErrCode => '1.3.6.1.4.1.232.16.2.2.2.1.5',
+ cpqFcaAccelBatteryStatus => '1.3.6.1.4.1.232.16.2.2.2.1.6',
+ cpqFcaAccelCondition => '1.3.6.1.4.1.232.16.2.2.2.1.9',
+ cpqFcaAccelStatusValue => {
+ 1 => "other",
+ 2 => "invalid",
+ 3 => "enabled",
+ 4 => "tmpDisabled",
+ 5 => "permDisabled",
+ },
+ cpqFcaAccelErrCodeValue => {
+ 1 => 'other',
+ 2 => 'invalid',
+ 3 => 'badConfig',
+ 4 => 'lowBattery',
+ 5 => 'disableCmd',
+ 6 => 'noResources',
+ 7 => 'notConnected',
+ 8 => 'badMirrorData',
+ 9 => 'readErr',
+ 10 => 'writeErr',
+ 11 => 'configCmd',
+ 12 => 'expandInProgress',
+ 13 => 'snapshotInProgress',
+ 14 => 'redundantLowBattery',
+ 15 => 'redundantSizeMismatch',
+ 16 => 'redundantCacheFailure',
+ 17 => 'excessiveEccErrors',
+ 19 => 'postEccErrors',
+ },
+ cpqFcaAccelBatteryStatusValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'recharging',
+ 4 => 'failed',
+ 5 => 'degraded',
+ 6 => 'notPresent',
+ },
+ cpqFcaAccelConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+
+ # INDEX { cpqFcaAccelBoxIndex, cpqFcaAccelBoxIoSlot }
+ foreach ($self->get_entries($oids, 'cpqFcaAccelEntry')) {
+ push(@{$self->{accelerators}},
+ HP::Proliant::Component::DiskSubsystem::Fca::Accelerator->new(%{$_}));
+ }
+
+ $oids = {
+ cpqFcaLogDrvEntry => '1.3.6.1.4.1.232.16.2.3.1.1',
+ cpqFcaLogDrvBoxIndex => '1.3.6.1.4.1.232.16.2.3.1.1.1',
+ cpqFcaLogDrvIndex => '1.3.6.1.4.1.232.16.2.3.1.1.2',
+ cpqFcaLogDrvFaultTol => '1.3.6.1.4.1.232.16.2.3.1.1.3',
+ cpqFcaLogDrvStatus => '1.3.6.1.4.1.232.16.2.3.1.1.4',
+ cpqFcaLogDrvPercentRebuild => '1.3.6.1.4.1.232.16.2.3.1.1.6',
+ cpqFcaLogDrvSize => '1.3.6.1.4.1.232.16.2.3.1.1.9',
+ cpqFcaLogDrvPhyDrvIDs => '1.3.6.1.4.1.232.16.2.3.1.1.10',
+ cpqFcaLogDrvCondition => '1.3.6.1.4.1.232.16.2.3.1.1.11',
+ cpqFcaLogDrvFaultTolValue => {
+ 1 => 'other',
+ 2 => 'none',
+ 3 => 'mirroring',
+ 4 => 'dataGuard',
+ 5 => 'distribDataGuard',
+ 7 => 'advancedDataGuard',
+ },
+ cpqFcaLogDrvStatusValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'failed',
+ 4 => 'unconfigured',
+ 5 => 'recovering',
+ 6 => 'readyForRebuild',
+ 7 => 'rebuilding',
+ 8 => 'wrongDrive',
+ 9 => 'badConnect',
+ 10 => 'overheating',
+ 11 => 'shutdown',
+ 12 => 'expanding',
+ 13 => 'notAvailable',
+ 14 => 'queuedForExpansion',
+ 15 => 'hardError',
+ },
+ cpqFcaLogDrvConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ };
+
+ # INDEX { cpqFcaLogDrvBoxIndex, cpqFcaLogDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqFcaLogDrvEntry')) {
+ push(@{$self->{logical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Fca::LogicalDrive->new(%{$_}));
+ }
+
+ $oids = {
+ cpqFcaPhyDrvEntry => '1.3.6.1.4.1.232.16.2.5.1.1',
+ cpqFcaPhyDrvBoxIndex => '1.3.6.1.4.1.232.16.2.5.1.1.1',
+ cpqFcaPhyDrvIndex => '1.3.6.1.4.1.232.16.2.5.1.1.2',
+ cpqFcaPhyDrvModel => '1.3.6.1.4.1.232.16.2.5.1.1.3',
+ cpqFcaPhyDrvBay => '1.3.6.1.4.1.232.16.2.5.1.1.5',
+ cpqFcaPhyDrvStatus => '1.3.6.1.4.1.232.16.2.5.1.1.6',
+ cpqFcaPhyDrvCondition => '1.3.6.1.4.1.232.16.2.5.1.1.31',
+ cpqFcaPhyDrvSize => '1.3.6.1.4.1.232.16.2.5.1.1.38',
+ cpqFcaPhyDrvBusNumber => '1.3.6.1.4.1.232.16.2.5.1.1.42',
+ cpqFcaPhyDrvStatusValue => {
+ 1 => 'other',
+ 2 => 'unconfigured',
+ 3 => 'ok',
+ 4 => 'threshExceeded',
+ 5 => 'predictiveFailure',
+ 6 => 'failed',
+ },
+ cpqFcaPhyDrvConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ };
+
+ # INDEX { cpqFcaPhyDrvBoxIndex, cpqFcaPhyDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqFcaPhyDrvEntry')) {
+ push(@{$self->{physical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Fca::PhysicalDrive->new(%{$_}));
+ }
+
+ $oids = {
+ cpqFcaMibRevMajor => '1.3.6.1.4.1.232.16.1.1.0',
+ cpqFcaMibRevMinor => '1.3.6.1.4.1.232.16.1.2.0',
+ cpqFcaMibCondition => '1.3.6.1.4.1.232.16.1.3.0',
+ cpqFcaMibConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ };
+ $self->{global_status} =
+ HP::Proliant::Component::DiskSubsystem::Fca::GlobalStatus->new(
+ runtime => $self->{runtime},
+ cpqFcaMibCondition =>
+ SNMP::Utils::get_object_value($snmpwalk,
+ $oids->{cpqFcaMibCondition}, $oids->{cpqFcaMibConditionValue})
+ );
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide.pm
new file mode 100755
index 0000000..fdd3230
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide.pm
@@ -0,0 +1,256 @@
+package HP::Proliant::Component::DiskSubsystem::Ide;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ controllers => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ condition => undef,
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Ide::SNMP';
+ } else {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Ide::CLI';
+ }
+ $self->init();
+ $self->assemble();
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->dump();
+ }
+}
+
+package HP::Proliant::Component::DiskSubsystem::Ide::Controller;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqIdeControllerIndex => $params{cpqIdeControllerIndex},
+ cpqIdeControllerOverallCondition => $params{cpqIdeControllerOverallCondition},
+ cpqIdeControllerModel => $params{cpqIdeControllerModel},
+ cpqIdeControllerSlot => $params{cpqIdeControllerSlot}, # -1 ist sysboard?
+ blacklisted => 0,
+ };
+ $self->{name} = $params{name} || $self->{cpqIdeControllerIndex};
+ $self->{controllerindex} = $self->{cpqIdeControllerIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('ideco', $self->{name});
+ if ($self->{cpqIdeControllerOverallCondition} eq 'other') {
+ if (scalar(@{$self->{physical_drives}})) {
+ $self->add_message(CRITICAL,
+ sprintf 'ide controller %s in slot %s needs attention',
+ $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot});
+ $self->add_info(sprintf 'ide controller %s in slot %s needs attention',
+ $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot});
+ } else {
+ $self->add_info(sprintf 'ide controller %s in slot %s is ok and unused',
+ $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot});
+ $self->{blacklisted} = 1;
+ }
+ } elsif ($self->{cpqIdeControllerOverallCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf 'ide controller %s in slot %s needs attention',
+ $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot});
+ $self->add_info(sprintf 'ide controller %s in slot %s needs attention',
+ $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot});
+ } else {
+ $self->add_info(sprintf 'ide controller %s in slot %s is ok',
+ $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot});
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[IDE_CONTROLLER_%s]\n", $self->{name};
+ foreach (qw(cpqIdeControllerIndex cpqIdeControllerSlot
+ cpqIdeControllerModel cpqIdeControllerOverallCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+ foreach (@{$self->{logical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Ide::LogicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqIdeLogicalDriveControllerIndex => $params{cpqIdeLogicalDriveControllerIndex},
+ cpqIdeLogicalDriveIndex => $params{cpqIdeLogicalDriveIndex},
+ cpqIdeLogicalDriveRaidLevel => $params{cpqIdeLogicalDriveRaidLevel},
+ cpqIdeLogicalDriveCapacity => $params{cpqIdeLogicalDriveCapacity},
+ cpqIdeLogicalDriveStatus => $params{cpqIdeLogicalDriveStatus},
+ cpqIdeLogicalDriveCondition => $params{cpqIdeLogicalDriveCondition},
+ cpqIdeLogicalDriveDiskIds => $params{cpqIdeLogicalDriveDiskIds},
+ cpqIdeLogicalDriveSpareIds => $params{cpqIdeLogicalDriveSpareIds},
+ cpqIdeLogicalDriveRebuildingDisk => $params{cpqIdeLogicalDriveRebuildingDisk},
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ $self->{name} = $params{name} ||
+ $self->{cpqIdeLogicalDriveControllerIndex}.':'.
+ $self->{cpqIdeLogicalDriveIndex};
+ $self->{controllerindex} = $self->{cpqIdeLogicalDriveControllerIndex};
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('ideld', $self->{name});
+ if ($self->{cpqIdeLogicalDriveCondition} ne "ok") {
+ if ($self->{cpqIdeLogicalDriveStatus} =~
+ /rebuild/) {
+ $self->add_message(WARNING,
+ sprintf "logical drive %s is %s",
+ $self->{name}, $self->{cpqIdeLogicalDriveStatus});
+ } else {
+ $self->add_message(CRITICAL,
+ sprintf "logical drive %s is %s",
+ $self->{name}, $self->{cpqIdeLogicalDriveStatus});
+ }
+ }
+ $self->add_info(
+ sprintf "logical drive %s is %s", $self->{name},
+ $self->{cpqIdeLogicalDriveStatus});
+}
+
+sub dump {
+ my $self = shift;
+ printf "[LOGICAL_DRIVE]\n";
+ foreach (qw(cpqIdeLogicalDriveControllerIndex cpqIdeLogicalDriveIndex
+ cpqIdeLogicalDriveRaidLevel cpqIdeLogicalDriveCapacity
+ cpqIdeLogicalDriveDiskIds cpqIdeLogicalDriveSpareIds
+ cpqIdeLogicalDriveRebuildingDisk cpqIdeLogicalDriveStatus
+ cpqIdeLogicalDriveCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Ide::PhysicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqIdeAtaDiskControllerIndex => $params{cpqIdeAtaDiskControllerIndex},
+ cpqIdeAtaDiskIndex => $params{cpqIdeAtaDiskIndex},
+ cpqIdeAtaDiskModel => $params{cpqIdeAtaDiskModel},
+ cpqIdeAtaDiskStatus => $params{cpqIdeAtaDiskStatus},
+ cpqIdeAtaDiskCondition => $params{cpqIdeAtaDiskCondition},
+ cpqIdeAtaDiskCapacity => $params{cpqIdeAtaDiskCapacity},
+ cpqIdeAtaDiskLogicalDriveMember => $params{cpqIdeAtaDiskLogicalDriveMember},
+ cpqIdeAtaDiskIsSpare => $params{cpqIdeAtaDiskIsSpare},
+ blacklisted => 0,
+ };
+ $self->{name} = $params{name} ||
+ $self->{cpqIdeAtaDiskControllerIndex}.':'.
+ $self->{cpqIdeAtaDiskIndex}; ####vorerst
+ $self->{controllerindex} = $self->{cpqIdeAtaDiskControllerIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('idepd', $self->{name});
+ if ($self->{cpqIdeAtaDiskCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqIdeAtaDiskCondition});
+ }
+ $self->add_info(
+ sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqIdeAtaDiskCondition});
+}
+
+sub dump {
+ my $self = shift;
+ printf "[PHYSICAL_DRIVE]\n";
+ foreach (qw(cpqIdeAtaDiskControllerIndex cpqIdeAtaDiskIndex
+ cpqIdeAtaDiskModel cpqIdeAtaDiskCapacity cpqIdeAtaDiskLogicalDriveMember
+ cpqIdeAtaDiskStatus cpqIdeAtaDiskCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Ide::SpareDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub dump {
+ my $self = shift;
+ printf "[SPARE_DRIVE]\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm
new file mode 100755
index 0000000..babc616
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm
@@ -0,0 +1,27 @@
+package HP::Proliant::Component::DiskSubsystem::Ide::CLI;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm
new file mode 100755
index 0000000..86f9543
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm
@@ -0,0 +1,115 @@
+package HP::Proliant::Component::DiskSubsystem::Ide::SNMP;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+
+ # CPQIDE-MIB
+ my $oids = {
+ cpqIdeControllerEntry => '1.3.6.1.4.1.232.14.2.3.1.1',
+ cpqIdeControllerIndex => '1.3.6.1.4.1.232.14.2.3.1.1.1',
+ cpqIdeControllerOverallCondition => '1.3.6.1.4.1.232.14.2.3.1.1.2',
+ cpqIdeControllerModel => '1.3.6.1.4.1.232.14.2.3.1.1.3',
+ cpqIdeControllerSlot => '1.3.6.1.4.1.232.14.2.3.1.1.5',
+ cpqIdeControllerOverallConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+
+ # INDEX { cpqIdeControllerIndex }
+ foreach ($self->get_entries($oids, 'cpqIdeControllerEntry')) {
+ push(@{$self->{controllers}},
+ HP::Proliant::Component::DiskSubsystem::Ide::Controller->new(%{$_}));
+ }
+
+ $oids = {
+ cpqIdeLogicalDriveEntry => '1.3.6.1.4.1.232.14.2.6.1.1',
+ cpqIdeLogicalDriveControllerIndex => '1.3.6.1.4.1.232.14.2.6.1.1.1',
+ cpqIdeLogicalDriveIndex => '1.3.6.1.4.1.232.14.2.6.1.1.2',
+ cpqIdeLogicalDriveRaidLevel => '1.3.6.1.4.1.232.14.2.6.1.1.3',
+ cpqIdeLogicalDriveCapacity => '1.3.6.1.4.1.232.14.2.6.1.1.4',
+ cpqIdeLogicalDriveStatus => '1.3.6.1.4.1.232.14.2.6.1.1.5',
+ cpqIdeLogicalDriveCondition => '1.3.6.1.4.1.232.14.2.6.1.1.6',
+ cpqIdeLogicalDriveDiskIds => '1.3.6.1.4.1.232.14.2.6.1.1.7',
+ cpqIdeLogicalDriveSpareIds => '1.3.6.1.4.1.232.14.2.6.1.1.9',
+ cpqIdeLogicalDriveRebuildingDisk => '1.3.6.1.4.1.232.14.2.6.1.1.10',
+ cpqIdeLogicalDriveRaidLevelValue => {
+ 1 => "other",
+ 2 => "raid0",
+ 3 => "raid1",
+ 4 => "raid0plus1",
+ },
+ cpqIdeLogicalDriveStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "rebuilding",
+ 5 => "failed",
+ },
+ cpqIdeLogicalDriveConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+ # INDEX { cpqIdeLogicalDriveControllerIndex, cpqIdeLogicalDriveIndex }
+ foreach ($self->get_entries($oids, 'cpqIdeLogicalDriveEntry')) {
+ push(@{$self->{logical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Ide::LogicalDrive->new(%{$_}));
+ }
+
+ $oids = {
+ cpqIdeAtaDiskEntry => '1.3.6.1.4.1.232.14.2.4.1.1',
+ cpqIdeAtaDiskControllerIndex => '1.3.6.1.4.1.232.14.2.4.1.1.1',
+ cpqIdeAtaDiskIndex => '1.3.6.1.4.1.232.14.2.4.1.1.2',
+ cpqIdeAtaDiskModel => '1.3.6.1.4.1.232.14.2.4.1.1.3',
+ cpqIdeAtaDiskStatus => '1.3.6.1.4.1.232.14.2.4.1.1.6',
+ cpqIdeAtaDiskCondition => '1.3.6.1.4.1.232.14.2.4.1.1.7',
+ cpqIdeAtaDiskCapacity => '1.3.6.1.4.1.232.14.2.4.1.1.8',
+ cpqIdeAtaDiskLogicalDriveMember => '1.3.6.1.4.1.232.14.2.4.1.1.13',
+ cpqIdeAtaDiskIsSpare => '1.3.6.1.4.1.232.14.2.4.1.1.14',
+ cpqIdeAtaDiskStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "smartError",
+ 4 => "failed",
+ },
+ cpqIdeAtaDiskConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+ # INDEX { cpqIdeAtaDiskControllerIndex, cpqIdeAtaDiskIndex }
+ foreach ($self->get_entries($oids, 'cpqIdeAtaDiskEntry')) {
+ push(@{$self->{physical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Ide::PhysicalDrive->new(%{$_}));
+ }
+
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas.pm
new file mode 100755
index 0000000..bb417d4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas.pm
@@ -0,0 +1,251 @@
+package HP::Proliant::Component::DiskSubsystem::Sas;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ controllers => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ condition => undef,
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Sas::SNMP';
+ } else {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Sas::CLI';
+ }
+ $self->init();
+ $self->assemble();
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->dump();
+ }
+}
+
+package HP::Proliant::Component::DiskSubsystem::Sas::Controller;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqSasHbaIndex => $params{cpqSasHbaIndex},
+ cpqSasHbaLocation => $params{cpqSasHbaLocation},
+ cpqSasHbaSlot => $params{cpqSasHbaSlot},
+ cpqSasHbaStatus => $params{cpqSasHbaStatus},
+ cpqSasHbaCondition => $params{cpqSasHbaCondition},
+ blacklisted => 0,
+ };
+ $self->{name} = $params{name} || $self->{cpqSasHbaSlot};
+ $self->{controllerindex} = $self->{cpqSasHbaIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('saco', $self->{cpqSasHbaSlot});
+ if ($self->{cpqSasHbaCondition} eq 'other') {
+ if (scalar(@{$self->{physical_drives}})) {
+ $self->add_message(CRITICAL,
+ sprintf 'sas controller in slot %s needs attention',
+ $self->{cpqSasHbaSlot});
+ $self->add_info(sprintf 'sas controller in slot %s needs attention',
+ $self->{cpqSasHbaSlot});
+ } else {
+ $self->add_info(sprintf 'sas controller in slot %s is ok and unused',
+ $self->{cpqSasHbaSlot});
+ $self->{blacklisted} = 1;
+ }
+ } elsif ($self->{cpqSasHbaCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf 'sas controller in slot %s needs attention',
+ $self->{cpqSasHbaSlot});
+ $self->add_info(sprintf 'sas controller in slot %s needs attention',
+ $self->{cpqSasHbaSlot});
+ } else {
+ $self->add_info(sprintf 'sas controller in slot %s is ok',
+ $self->{cpqSasHbaSlot});
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[SAS_HBA%s]\n", $self->{name};
+ foreach (qw(cpqSasHbaSlot cpqSasHbaIndex cpqSasHbaCondition
+ cpqSasHbaStatus cpqSasHbaLocation)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+ foreach (@{$self->{logical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Sas::LogicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqSasLogDrvHbaIndex => $params{cpqSasLogDrvHbaIndex},
+ cpqSasLogDrvIndex => $params{cpqSasLogDrvIndex},
+ cpqSasLogDrvStatus => $params{cpqSasLogDrvStatus},
+ cpqSasLogDrvCondition => $params{cpqSasLogDrvCondition},
+ cpqSasLogDrvRebuildingPercent => $params{cpqSasLogDrvRebuildingPercent},
+ cpqSasLogDrvRaidLevel => $params{cpqSasLogDrvRaidLevel},
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ $self->{name} = $params{name} ||
+ $self->{cpqSasLogDrvHbaIndex}.':'.$self->{cpqSasLogDrvIndex}; ####vorerst
+ $self->{controllerindex} = $self->{cpqSasLogDrvHbaIndex};
+ if (! $self->{cpqSasLogDrvRebuildingPercent} ||
+ $self->{cpqSasLogDrvRebuildingPercent} == 4294967295) {
+ $self->{cpqSasLogDrvRebuildingPercent} = 100;
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('sald', $self->{name});
+ if ($self->{cpqSasLogDrvCondition} ne "ok") {
+ if ($self->{cpqSasLogDrvStatus} =~
+ /rebuild|recovering|expanding|queued/) {
+ $self->add_message(WARNING,
+ sprintf "logical drive %s is %s",
+ $self->{name}, $self->{cpqSasLogDrvStatus});
+ } else {
+ $self->add_message(CRITICAL,
+ sprintf "logical drive %s is %s",
+ $self->{name}, $self->{cpqSasLogDrvStatus});
+ }
+ }
+ $self->add_info(
+ sprintf "logical drive %s is %s (%s)", $self->{name},
+ $self->{cpqSasLogDrvStatus}, $self->{cpqSasLogDrvRaidLevel});
+}
+
+sub dump {
+ my $self = shift;
+ printf "[LOGICAL_DRIVE]\n";
+ foreach (qw(cpqSasLogDrvHbaIndex cpqSasLogDrvIndex cpqSasLogDrvRaidLevel
+ cpqSasLogDrvStatus cpqSasLogDrvCondition
+ cpqSasLogDrvRebuildingPercent)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Sas::PhysicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqSasPhyDrvHbaIndex => $params{cpqSasPhyDrvHbaIndex},
+ cpqSasPhyDrvIndex => $params{cpqSasPhyDrvIndex},
+ cpqSasPhyDrvLocationString => $params{cpqSasPhyDrvLocationString},
+ cpqSasPhyDrvStatus => $params{cpqSasPhyDrvStatus},
+ cpqSasPhyDrvSize => $params{cpqSasPhyDrvSize},
+ cpqSasPhyDrvCondition => $params{cpqSasPhyDrvCondition},
+ blacklisted => 0,
+ };
+ $self->{name} = $params{name} ||
+ $self->{cpqSasPhyDrvHbaIndex}.':'.$self->{cpqSasPhyDrvIndex}; ####vorerst
+ $self->{controllerindex} = $self->{cpqSasPhyDrvHbaIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('sapd', $self->{name});
+ if ($self->{cpqSasPhyDrvCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqSasPhyDrvCondition});
+ }
+ $self->add_info(
+ sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqSasPhyDrvCondition});
+}
+
+sub dump {
+ my $self = shift;
+ printf "[PHYSICAL_DRIVE]\n";
+ foreach (qw(cpqSasPhyDrvHbaIndex cpqSasPhyDrvIndex cpqSasPhyDrvLocationString
+ cpqSasPhyDrvSize cpqSasPhyDrvStatus cpqSasPhyDrvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Sas::SpareDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub dump {
+ my $self = shift;
+ printf "[SPARE_DRIVE]\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm
new file mode 100755
index 0000000..1a250d3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm
@@ -0,0 +1,27 @@
+package HP::Proliant::Component::DiskSubsystem::Sas::CLI;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm
new file mode 100755
index 0000000..cb493fd
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm
@@ -0,0 +1,126 @@
+package HP::Proliant::Component::DiskSubsystem::Sas::SNMP;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+
+ # CPQSCSI-MIB
+ my $oids = {
+ cpqSasHbaEntry => "1.3.6.1.4.1.232.5.5.1.1.1",
+ cpqSasHbaIndex => "1.3.6.1.4.1.232.5.5.1.1.1.1",
+ cpqSasHbaLocation => "1.3.6.1.4.1.232.5.5.1.1.1.2",
+ cpqSasHbaSlot => "1.3.6.1.4.1.232.5.5.1.1.1.6",
+ cpqSasHbaStatus => "1.3.6.1.4.1.232.5.5.1.1.1.4",
+ cpqSasHbaStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ },
+ cpqSasHbaCondition => "1.3.6.1.4.1.232.5.5.1.1.1.5",
+ cpqSasHbaConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+
+ # INDEX { cpqSasHbaIndex }
+ foreach ($self->get_entries($oids, 'cpqSasHbaEntry')) {
+ push(@{$self->{controllers}},
+ HP::Proliant::Component::DiskSubsystem::Sas::Controller->new(%{$_}));
+ }
+
+ $oids = {
+ cpqSasLogDrvEntry => "1.3.6.1.4.1.232.5.5.3.1.1",
+ cpqSasLogDrvHbaIndex => "1.3.6.1.4.1.232.5.5.3.1.1.1",
+ cpqSasLogDrvIndex => "1.3.6.1.4.1.232.5.5.3.1.1.2",
+ cpqSasLogDrvStatus => "1.3.6.1.4.1.232.5.5.3.1.1.4",
+ cpqSasLogDrvCondition => "1.3.6.1.4.1.232.5.5.3.1.1.5",
+ cpqSasLogDrvRebuildingPercent => "1.3.6.1.4.1.232.5.5.3.1.1.12",
+ cpqSasLogDrvRaidLevel => "1.3.6.1.4.1.232.5.5.3.1.1.3",
+ cpqSasLogDrvRaidLevelValue => {
+ 1 => "other",
+ 2 => "raid0",
+ 3 => "raid1",
+ 4 => "raid0plus1",
+ 5 => "raid5",
+ 6 => "raid15",
+ 7 => "volume",
+ },
+ cpqSasLogDrvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqSasLogDrvStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "rebuilding",
+ 5 => "failed",
+ 6 => "offline",
+ }
+ };
+ # INDEX { cpqSasLogDrvCntlrIndex, cpqSasLogDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqSasLogDrvEntry')) {
+ push(@{$self->{logical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Sas::LogicalDrive->new(%{$_}));
+ }
+
+ $oids = {
+ cpqSasPhyDrvEntry => "1.3.6.1.4.1.232.5.5.2.1.1",
+ cpqSasPhyDrvHbaIndex => "1.3.6.1.4.1.232.5.5.2.1.1.1",
+ cpqSasPhyDrvIndex => "1.3.6.1.4.1.232.5.5.2.1.1.2",
+ cpqSasPhyDrvLocationString => "1.3.6.1.4.1.232.5.5.2.1.1.3",
+ cpqSasPhyDrvStatus => "1.3.6.1.4.1.232.5.5.2.1.1.5",
+ cpqSasPhyDrvSize => "1.3.6.1.4.1.232.5.5.2.1.1.8",
+ cpqSasPhyDrvCondition => "1.3.6.1.4.1.232.5.5.2.1.1.6",
+ cpqSasPhyDrvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqSasPhyDrvStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "predictiveFailure",
+ 4 => "offline",
+ 5 => "failed",
+ 6 => "missingWasOk",
+ 7 => "missingWasPredictiveFailure",
+ 8 => "missingWasOffline",
+ 9 => "missingWasFailed",
+ },
+ };
+
+ # INDEX { cpqPhyLogDrvCntlrIndex, cpqSasPhyDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqSasPhyDrvEntry')) {
+ push(@{$self->{physical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Sas::PhysicalDrive->new(%{$_}));
+ }
+
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi.pm
new file mode 100755
index 0000000..cf38238
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi.pm
@@ -0,0 +1,227 @@
+package HP::Proliant::Component::DiskSubsystem::Scsi;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ controllers => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ condition => undef,
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Scsi::SNMP';
+ } else {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Scsi::CLI';
+ }
+ $self->init();
+ $self->assemble();
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->dump();
+ }
+}
+
+package HP::Proliant::Component::DiskSubsystem::Scsi::Controller;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqScsiCntlr/, keys %params;
+ $self->{name} = $params{name} || $params{cpqScsiCntlrIndex}.':'.$params{cpqScsiCntlrBusIndex};
+ $self->{controllerindex} = $self->{cpqScsiCntlrIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('scco', $self->{name});
+ my $info = sprintf 'scsi controller %s in slot %s is %s',
+ $self->{name}, $self->{cpqScsiCntlrSlot}, $self->{cpqScsiCntlrCondition};
+ if ($self->{cpqScsiCntlrCondition} eq 'other') {
+ if (scalar(@{$self->{physical_drives}})) {
+ $info .= ' and needs attention';
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } else {
+ $info .= ' and unused';
+ $self->add_info($info);
+ $self->{blacklisted} = 1;
+ }
+ } elsif ($self->{cpqScsiCntlrCondition} ne 'ok') {
+ $info .= ' and needs attention';
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } else {
+ $self->add_info($info);
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[SCSI_CONTROLLER_%s]\n", $self->{name};
+ foreach (qw(cpqScsiCntlrIndex cpqScsiCntlrBusIndex cpqScsiCntlrSlot
+ cpqScsiCntlrStatus cpqScsiCntlrCondition cpqScsiCntlrHwLocation)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+ foreach (@{$self->{logical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Scsi::LogicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqScsiLogDrv/, keys %params;
+ $self->{name} = $params{name} || $params{cpqScsiLogDrvCntlrIndex}.':'.$params{cpqScsiLogDrvBusIndex}.':'.$params{cpqScsiLogDrvIndex};
+ bless $self, $class;
+ $self->{controllerindex} = $self->{cpqScsiLogDrvCntlrIndex};
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('scld', $self->{name});
+ my $info = sprintf 'logical drive %s is %s', $self->{name}, $self->{cpqScsiLogDrvStatus};
+ if ($self->{cpqScsiLogDrvCondition} ne "ok") {
+ if ($self->{cpqScsiLogDrvStatus} =~
+ /rebuild|recovering/) {
+ $self->add_message(WARNING, $info);
+ } else {
+ $self->add_message(CRITICAL, $info);
+ }
+ }
+ $self->add_info($info);
+}
+
+sub dump {
+ my $self = shift;
+ printf "[LOGICAL_DRIVE_%s]\n", $self->{name};
+ foreach (qw(cpqScsiLogDrvCntlrIndex cpqScsiLogDrvBusIndex cpqScsiLogDrvIndex
+ cpqScsiLogDrvFaultTol cpqScsiLogDrvStatus cpqScsiLogDrvSize
+ cpqScsiLogDrvPhyDrvIDs cpqScsiLogDrvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Scsi::PhysicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqScsiPhyDrv/, keys %params;
+ $self->{name} = $params{name} ||
+ $self->{cpqScsiPhyDrvCntlrIndex}.':'.$self->{cpqScsiPhyDrvBusIndex}.':'.$self->{cpqScsiPhyDrvIndex};
+ $self->{controllerindex} = $self->{cpqScsiPhyDrvCntlrIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('scpd', $self->{name});
+ my $info = sprintf 'physical drive %s is %s', $self->{name}, $self->{cpqScsiPhyDrvCondition};
+ if ($self->{cpqScsiPhyDrvCondition} ne 'ok') {
+ $self->add_message(CRITICAL, $info);
+ }
+ $self->add_info($info);
+}
+
+sub dump {
+ my $self = shift;
+ printf "[PHYSICAL_DRIVE_%s]\n", $self->{name};
+ foreach (qw(cpqScsiPhyDrvCntlrIndex cpqScsiPhyDrvBusIndex cpqScsiPhyDrvIndex
+ cpqScsiPhyDrvStatus cpqScsiPhyDrvSize cpqScsiPhyDrvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Scsi::SpareDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub dump {
+ my $self = shift;
+ printf "[SPARE_DRIVE]\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm
new file mode 100755
index 0000000..69b3926
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm
@@ -0,0 +1,27 @@
+package HP::Proliant::Component::DiskSubsystem::Scsi::CLI;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm
new file mode 100755
index 0000000..71a0f66
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm
@@ -0,0 +1,134 @@
+package HP::Proliant::Component::DiskSubsystem::Scsi::SNMP;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+
+ # CPQSCSI-MIB
+ my $oids = {
+ cpqScsiCntlrEntry => '1.3.6.1.4.1.232.5.2.2.1.1',
+ cpqScsiCntlrIndex => '1.3.6.1.4.1.232.5.2.2.1.1.1',
+ cpqScsiCntlrBusIndex => '1.3.6.1.4.1.232.5.2.2.1.1.2',
+ cpqScsiCntlrSlot => '1.3.6.1.4.1.232.5.2.2.1.1.6',
+ cpqScsiCntlrStatus => '1.3.6.1.4.1.232.5.2.2.1.1.7',
+ cpqScsiCntlrCondition => '1.3.6.1.4.1.232.5.2.2.1.1.12',
+ cpqScsiCntlrHwLocation => '1.3.6.1.4.1.232.5.2.2.1.1.16',
+ cpqScsiCntlrStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ },
+ cpqScsiCntlrConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ }
+ };
+
+ # INDEX { cpqScsiCntlrIndex, cpqScsiCntlrBusIndex }
+ foreach ($self->get_entries($oids, 'cpqScsiCntlrEntry')) {
+ push(@{$self->{controllers}},
+ HP::Proliant::Component::DiskSubsystem::Scsi::Controller->new(%{$_}));
+ }
+
+ $oids = {
+ cpqScsiLogDrvEntry => '1.3.6.1.4.1.232.5.2.3.1.1',
+ cpqScsiLogDrvCntlrIndex => '1.3.6.1.4.1.232.5.2.3.1.1.1',
+ cpqScsiLogDrvBusIndex => '1.3.6.1.4.1.232.5.2.3.1.1.2',
+ cpqScsiLogDrvIndex => '1.3.6.1.4.1.232.5.2.3.1.1.3',
+ cpqScsiLogDrvFaultTol => '1.3.6.1.4.1.232.5.2.3.1.1.4',
+ cpqScsiLogDrvStatus => '1.3.6.1.4.1.232.5.2.3.1.1.5',
+ cpqScsiLogDrvSize => '1.3.6.1.4.1.232.5.2.3.1.1.6',
+ cpqScsiLogDrvPhyDrvIDs => '1.3.6.1.4.1.232.5.2.3.1.1.7',
+ cpqScsiLogDrvCondition => '1.3.6.1.4.1.232.5.2.3.1.1.8',
+ cpqScsiLogDrvStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ 4 => "unconfigured",
+ 5 => "recovering",
+ 6 => "readyForRebuild",
+ 7 => "rebuilding",
+ 8 => "wrongDrive",
+ 9 => "badConnect",
+ },
+ cpqScsiLogDrvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqScsiLogDrvFaultTolValue => {
+ 1 => "other",
+ 2 => "none",
+ 3 => "mirroring",
+ 4 => "dataGuard",
+ 5 => "distribDataGuard",
+ },
+
+ };
+ # INDEX { cpqScsiLogDrvCntlrIndex, cpqScsiLogDrvBusIndex, cpqScsiLogDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqScsiLogDrvEntry')) {
+ push(@{$self->{logical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Scsi::LogicalDrive->new(%{$_}));
+ }
+
+ $oids = {
+ cpqScsiPhyDrvEntry => '1.3.6.1.4.1.232.5.2.4.1.1',
+ cpqScsiPhyDrvCntlrIndex => '1.3.6.1.4.1.232.5.2.4.1.1.1',
+ cpqScsiPhyDrvBusIndex => '1.3.6.1.4.1.232.5.2.4.1.1.2',
+ cpqScsiPhyDrvIndex => '1.3.6.1.4.1.232.5.2.4.1.1.3',
+ cpqScsiPhyDrvStatus => '1.3.6.1.4.1.232.5.2.4.1.1.9',
+ cpqScsiPhyDrvSize => '1.3.6.1.4.1.232.5.2.4.1.1.7',
+ cpqScsiPhyDrvCondition => '1.3.6.1.4.1.232.5.2.4.1.1.26',
+ cpqScsiPhyDrvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqScsiPhyDrvStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ 4 => "notConfigured",
+ 5 => "badCable",
+ 6 => "missingWasOk",
+ 7 => "missingWasFailed",
+ 8 => "predictiveFailure",
+ 9 => "missingWasPredictiveFailure",
+ 10 => "offline",
+ 11 => "missingWasOffline",
+ 12 => "hardError",
+ },
+ };
+
+ # INDEX { cpqScsiPhyDrvCntlrIndex, cpqScsiPhyDrvBusIndex, cpqScsiPhyDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqScsiPhyDrvEntry')) {
+ push(@{$self->{physical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Scsi::PhysicalDrive->new(%{$_}));
+ }
+
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem.pm
new file mode 100755
index 0000000..2a7a378
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem.pm
@@ -0,0 +1,236 @@
+package HP::Proliant::Component::EventSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ events => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ boottime => 0,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ $self = HP::Proliant::Component::EventSubsystem::SNMP->new(%params);
+ my $sysUpTime = SNMP::Utils::get_object(
+ $self->{rawdata}, '1.3.6.1.2.1.1.3.0') || 3600*24*100;
+ $self->{boottime} = int(time - $sysUpTime / 100);
+ } elsif ($self->{method} eq 'cli') {
+ $self = HP::Proliant::Component::EventSubsystem::CLI->new(%params);
+ my $uptime = do { local (@ARGV, $/) = "/proc/uptime"; my $x = <>; close ARGV; $x };
+ # also watch 10 minutes of booting before the operating system starts ticking
+ $self->{boottime} = time - int((split(/\s+/, $uptime))[0]) - 600;
+ } else {
+ die "unknown method";
+ }
+ # repair dates
+ my $lasttime = 0;
+ for my $event (reverse @{$self->{events}}) {
+ if ($event->{cpqHeEventLogUpdateTime} != 0) {
+ $lasttime = $event->{cpqHeEventLogUpdateTime};
+ } else {
+ $event->{cpqHeEventLogUpdateTime} = $lasttime;
+ }
+ }
+ # maybe the most recent events had zero timestamps.
+ # fill them up with timestamps from the past.
+ for my $event (@{$self->{events}}) {
+ if ($event->{cpqHeEventLogUpdateTime} != 0) {
+ $lasttime = $event->{cpqHeEventLogUpdateTime};
+ } else {
+ $event->{cpqHeEventLogUpdateTime} = $lasttime;
+ }
+ }
+ # we need the boottime in the event's check method
+ for my $event (@{$self->{events}}) {
+ $event->{boottime} = $self->{boottime};
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking events');
+ if (scalar (@{$self->{events}}) == 0) {
+ #$self->overall_check();
+ $self->add_info('no events found');
+ } else {
+ foreach (sort { $a->{cpqHeEventLogEntryNumber} <=> $b->{cpqHeEventLogEntryNumber}}
+ @{$self->{events}}) {
+ $_->check($self->{warningtime}, $self->{criticaltime});
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (sort { $a->{cpqHeEventLogEntryNumber} <=> $b->{cpqHeEventLogEntryNumber} } @{$self->{events}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::EventSubsystem::Event;
+our @ISA = qw(HP::Proliant::Component::EventSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+{
+ our $interesting_events = {
+ # POST Error: 201-Memory Error Multi-bit error occurred during memory initialization, Board 1, Bank B. Bank containing DIMM(s) has been disabled..
+ # POST Error: 201-Memory Error Single-bit error occured during memory initialization, Board 1, DIMM 1. Bank containing DIMM(s) has been disabled..
+ # POST Error: 207-Memory initialization error on Memory Board 5 DIMM 7. The operating system may not have access to all of the memory installed in the system..
+ # POST Error: 207-Invalid Memory Configuration-Mismatched DIMMs within DIMM Bank Memory in Bank A Not Utilized..
+ # POST Error: 210 - Quick Path Interconnect (QPI) Link Degradation. A QPI link is operating in a degraded performace state..
+ 'POST Messages' => [
+ '201-Memory', '207-Memory',
+ '210\s*-\s*Quick Path Interconnect.*degraded.*'
+ ],
+ 'Main Memory' => [
+ 'Corrected Memory Error threshold exceeded',
+ 'Uncorrectable Memory Error',
+ ],
+ };
+}
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqHeEventLogEntryNumber => $params{cpqHeEventLogEntryNumber},
+ cpqHeEventLogEntrySeverity => lc $params{cpqHeEventLogEntrySeverity},
+ cpqHeEventLogEntryClass => $params{cpqHeEventLogEntryClass},
+ cpqHeEventLogEntryCount => $params{cpqHeEventLogEntryCount} || 1,
+ cpqHeEventLogInitialTime => $params{cpqHeEventLogInitialTime},
+ cpqHeEventLogUpdateTime => $params{cpqHeEventLogUpdateTime},
+ cpqHeEventLogErrorDesc => $params{cpqHeEventLogErrorDesc},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ if (! $self->{cpqHeEventLogInitialTime}) {
+ $self->{cpqHeEventLogInitialTime} = $self->{cpqHeEventLogUpdateTime};
+ }
+ #
+ #
+ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ # |warn |crit |now
+ #
+ #<----- ignore -------><----- warning ------><---------- critical --------->
+ #
+ # If we have --eventrange <warnlookback>/<critlookback>
+ # Very young events are shown as critical
+ # If the event gets older, it is shown as warning
+ # At some time, the event is no longer shown
+ # Without --eventrange the event is shown as critical until you manually repair it
+ if ($params{runtime}->{options}->{eventrange}) {
+ my ($warningrange, $criticalrange) = split(/\//, $params{runtime}->{options}->{eventrange});
+ if (! $criticalrange) {
+ $criticalrange = $warningrange;
+ }
+ if ($criticalrange =~ /^(\d+)[s]*$/) {
+ $criticalrange = $1;
+ } elsif ($criticalrange =~ /^(\d+)m$/) {
+ $criticalrange = $1 * 60;
+ } elsif ($criticalrange =~ /^(\d+)h$/) {
+ $criticalrange = $1 * 3600;
+ } elsif ($criticalrange =~ /^(\d+)d$/) {
+ $criticalrange = $1 * 3600 * 24;
+ } else {
+ die "range has to be <number>[smhd]";
+ }
+ if ($warningrange =~ /^(\d+)[s]*$/) {
+ $warningrange = $1;
+ } elsif ($warningrange =~ /^(\d+)m$/) {
+ $warningrange = $1 * 60;
+ } elsif ($warningrange =~ /^(\d+)h$/) {
+ $warningrange = $1 * 3600;
+ } elsif ($warningrange =~ /^(\d+)d$/) {
+ $warningrange = $1 * 3600 * 24;
+ } else {
+ die "range has to be <number>[smhd]";
+ }
+ $self->{warningtime} = time - $warningrange;
+ $self->{criticaltime} = time - $criticalrange;
+ } else {
+ $self->{warningtime} = 0;
+ $self->{criticaltime} = 0;
+ }
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('evt', $self->{cpqHeEventLogEntryNumber});
+ # only check severity "critical" and "caution"
+ # optional: only check interesting events
+ # POST events only if they date maximum from reboot-5min
+ # younger than critical? -> critical
+ #
+ $self->add_info(sprintf "Event: %d Added: %s Class: (%s) %s %s",
+ $self->{cpqHeEventLogEntryNumber},
+ $self->{cpqHeEventLogUpdateTime},
+ $self->{cpqHeEventLogEntryClass},
+ $self->{cpqHeEventLogEntrySeverity},
+ $self->{cpqHeEventLogErrorDesc});
+ if ($self->{cpqHeEventLogEntrySeverity} eq "caution" ||
+ $self->{cpqHeEventLogEntrySeverity} eq "critical") {
+ # also watch 10 minutes of booting before the operating system starts ticking
+ if ($self->{cpqHeEventLogUpdateTime} >= $self->{boottime}) {
+ foreach my $class (keys %{$HP::Proliant::Component::EventSubsystem::Event::interesting_events}) {
+ foreach my $pattern (@{$HP::Proliant::Component::EventSubsystem::Event::interesting_events->{$class}}) {
+ if ($self->{cpqHeEventLogErrorDesc} =~ /$pattern/) {
+ if ($self->{cpqHeEventLogUpdateTime} < $self->{warningtime}) {
+ # you didn't care for this problem too long.
+ # don't say i didn't warn you.
+ if (0) {
+ # auto-ack?
+ }
+ last;
+ } elsif ($self->{cpqHeEventLogUpdateTime} < $self->{criticaltime}) {
+ $self->add_message(WARNING, $self->{info});
+ last;
+ } else {
+ $self->add_message(CRITICAL, $self->{info});
+ last;
+ }
+ }
+ }
+ }
+ }
+ } else {
+ # info, repair...
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[EVENT_%s]\n", $self->{cpqHeEventLogEntryNumber};
+ foreach (qw(cpqHeEventLogEntryNumber cpqHeEventLogEntrySeverity
+ cpqHeEventLogEntryCount cpqHeEventLogInitialTime
+ cpqHeEventLogUpdateTime cpqHeEventLogErrorDesc)) {
+ if ($_ =~ /.*Time$/) {
+ printf "%s: %s\n", $_, scalar localtime $self->{$_};
+ } else {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ }
+ printf "info: %s\n\n", $self->{info};
+}
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/CLI.pm
new file mode 100755
index 0000000..b75a547
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/CLI.pm
@@ -0,0 +1,78 @@
+package HP::Proliant::Component::EventSubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::EventSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+use Time::Local;
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ events => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my %tmpevent = (
+ runtime => $params{runtime},
+ );
+ my $inblock = 0;
+ foreach (grep(/^iml/, split(/\n/, $self->{rawdata}))) {
+ s/^iml\s*//g;
+ if (/^Event:\s+(\d+)\s+[\w]+:\s+(\d+)\/(\d+)\/(\d+)\s+(\d+):(\d+)/) {
+ # Event: 31 Added: 09/22/2011 05:11
+ # 1 2 3 4 5 6
+ $tmpevent{cpqHeEventLogEntryNumber} = $1;
+ if ($4 == 0) {
+ # Event: 29 Added: 00/00/0000 00:00
+ $tmpevent{cpqHeEventLogUpdateTime} = 0;
+ } else {
+ eval {
+ $tmpevent{cpqHeEventLogUpdateTime} = timelocal(0, $6, $5, $3, $2 - 1, $4);
+ };
+ if ($@) {
+ # Event: 10 Added: 27/27/2027 27:27
+ $tmpevent{cpqHeEventLogUpdateTime} = 0;
+ }
+ }
+ $inblock = 1;
+ } elsif (/^(\w+):\s+(.*?)\s+\-\s+(.*)/) {
+ $tmpevent{cpqHeEventLogEntrySeverity} = $1;
+ $tmpevent{cpqHeEventLogEntryClass} = $2;
+ $tmpevent{cpqHeEventLogErrorDesc} = $3;
+ if ($tmpevent{cpqHeEventLogErrorDesc} =~ /.*?:\s+(\d+)/) {
+ $tmpevent{cpqHeEventLogEntryCode} = $1;
+ } else {
+ $tmpevent{cpqHeEventLogEntryCode} = 0;
+ }
+ } elsif (/^\s*$/) {
+ if ($inblock) {
+ $inblock = 0;
+ push(@{$self->{events}},
+ HP::Proliant::Component::EventSubsystem::Event->new(%tmpevent));
+ %tmpevent = (
+ runtime => $params{runtime},
+ );
+ }
+ }
+ }
+ if ($inblock) {
+ push(@{$self->{events}},
+ HP::Proliant::Component::EventSubsystem::Event->new(%tmpevent));
+ }
+}
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/SNMP.pm
new file mode 100755
index 0000000..506732a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/SNMP.pm
@@ -0,0 +1,221 @@
+package HP::Proliant::Component::EventSubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::EventSubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+use Time::Local;
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ events => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->overall_init(%params);
+ $self->init(%params);
+ return $self;
+}
+
+sub overall_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $params{rawdata};
+ # overall
+ my $cpqHeEventLogSupported = '1.3.6.1.4.1.232.6.2.11.1.0';
+ my $cpqHeEventLogSupportedValue = {
+ 1 => 'other',
+ 2 => 'notSupported',
+ 3 => 'supported',
+ 4 => 'clear',
+ };
+ my $cpqHeEventLogCondition = '1.3.6.1.4.1.232.6.2.11.2.0';
+ my $cpqHeEventLogConditionValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ };
+ $self->{eventsupp} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeEventLogSupported,
+ $cpqHeEventLogSupportedValue);
+ $self->{eventstatus} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeEventLogCondition,
+ $cpqHeEventLogConditionValue);
+ $self->{eventsupp} |= lc $self->{eventsupp};
+ $self->{eventstatus} |= lc $self->{eventstatus};
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeEventLogEntry => "1.3.6.1.4.1.232.6.2.11.3.1",
+ cpqHeEventLogEntryNumber => "1.3.6.1.4.1.232.6.2.11.3.1.1",
+ cpqHeEventLogEntrySeverity => "1.3.6.1.4.1.232.6.2.11.3.1.2",
+ cpqHeEventLogEntryClass => "1.3.6.1.4.1.232.6.2.11.3.1.3",
+ cpqHeEventLogEntryCode => "1.3.6.1.4.1.232.6.2.11.3.1.4",
+ cpqHeEventLogEntryCount => "1.3.6.1.4.1.232.6.2.11.3.1.5",
+ cpqHeEventLogInitialTime => "1.3.6.1.4.1.232.6.2.11.3.1.6",
+ cpqHeEventLogUpdateTime => "1.3.6.1.4.1.232.6.2.11.3.1.7",
+ cpqHeEventLogErrorDesc => "1.3.6.1.4.1.232.6.2.11.3.1.8",
+
+ cpqHeEventLogEntryClassValue => {
+ # 2 Fan Failure (Fan 1, Location I/O Board)
+ # Internal Storage System Overheating (Slot 0, Zone 1, Location Storage, Temperature Unknown)
+ # System Fans Not Redundant (Location I/O Board)
+ # MY MUSTARD: only critical events should lead to an alert, if at all. The caution events mean "loss of redundancy".
+ # We monitor temperatures and fan status anyway.
+ #2 => "",
+ # 3 Corrected Memory Error threshold exceeded (System Memory, Memory Module 1)
+ # Uncorrectable Memory Error detected by ROM-based memory validation (Board 1, Memory Module 4)
+ # MY MUSTARD: threshold exceeded is caution. Uncorrectable errors are critical. Both should be detected anyway.
+ 3 => "Main Memory",
+ # 4 Accelerator Cache Memory Parity Error (Socket 1)
+ #4 => "",
+ # 5 Processor Correctable error threshold exceeded (Board 0, Processor 2)
+ #5 => "",
+ # 6 Unrecoverable Intermodule Bus error (Error code 0x00000000)
+ #6 => "",
+ # 8 PCI Bus Error (Slot 0, Bus 0, Device 0, Function 0)
+ 8 => "PCI Bus",
+ # 10 1720-S.M.A.R.T. Hard Drive Detects Imminent Failure
+ # POST Error: 201-Memory Error Multi-bit error occurred during memory initialization, Board 1, Bank B. Bank containing DIMM(s) has been disabled..
+ # POST Error: 201-Memory Error Single-bit error occured during memory initialization, Board 1, DIMM 1. Bank containing DIMM(s) has been disabled..
+ # POST Error: 207-Memory Configuration Warning - memory boards should be installed sequentially.
+ # POST Error: 210-Memory Board Failure on board 4.
+ # POST Error: 210-Memory Board Power Fault on board 3.
+ # POST Error: 207-Memory initialization error on Memory Board 5 DIMM 7. The operating system may not have access to all of the memory installed in the system..
+ # POST Error: 207-Invalid Memory Configuration-Mismatched DIMMs within DIMM Bank Memory in Bank A Not Utilized..
+ 10 => "POST Messages",
+ 11 => "Power Subsystem",
+ 13 => "ASR",
+ # 14 Automatic Operating System Shutdown Initiated Due to Overheat Condition
+ # Automatic Operating System Shutdown Initiated Due to Fan Failure
+ # Blue Screen Trap (BugCheck, STOP: 0x00000050 (0x9CB2C5B4, 0x00000001, 0x00000004, 0x00000000))
+ # Operating System failure (BugCheck, STOP: 0x000000AB (0x00000005, 0x00000488, 0x00000000, 0x00000002))
+ 14 => "OS Class",
+ # 15 Unknown Event (Class 15, Code 255)
+ #15 => "",
+ # 17 Network Adapter Link Down (Slot 0, Port 4)
+ # Network Adapters Redundancy Reduced (Slot 0, Port 1)
+ 17 => "Network Adapter",
+ # 19 Drive Array Device Failure (Slot 0, Bus 2, Bay 4)
+ # Internal SAS Enclosure Device Failure (Bay 1, Box 1, Port 2I, Slot 1)
+ #19 => "",
+ # 20 An Unrecoverable System Error (NMI) has occurred
+ # Unrecoverable System Error has occurred (Error code 0x01AE0E2F, 0x00000000)
+ 20 => "Unrecoverable System Error",
+ # 32 ROM flashed (New version: 01/09/2008)
+ 32 => "System Revision",
+ # 33 IML Cleared (Administrator)
+ # IML cleared through HP ProLiant Health Agent (cmahealthd)
+ # Insight Diagnostics Note: Physisches Festplattenlaufwerk 5, Controller Steckplatz 0-Diagnosis: Fehlgeschlagen
+ 33 => "Maintenance Note",
+ # 34 New Chassis Connected (Enclosure Address 27AC)
+ # Loss Of Chassis Connectivity (Enclosure Serial Number 8004******)
+ # Server Blade Enclosure Server Blade Inserted (Slot 16, Enclosure Address 0000)
+ #34 => "",
+ },
+ cpqHeEventLogEntrySeverityValue => {
+ 2 => "informational",
+ 3 => "infoWithAlert",
+ 6 => "repaired",
+ 9 => "caution",
+ 15 => "critical",
+ },
+ # Time
+ # 07 D8 09 02 11 11
+ };
+ # INDEX { cpqHeEventLogEntryNumber }
+ foreach ($self->get_entries($oids, 'cpqHeEventLogEntry')) {
+ if ($_->{cpqHeEventLogInitialTime} =~ /^(([0-9a-fA-F]{2})( [0-9a-fA-F]{2})*)\s*$/) {
+ $_->{cpqHeEventLogInitialTime} =~ s/ //;
+ my ($year, $month, $day, $hour, $min) = map { hex($_) } split(/\s+/, $_->{cpqHeEventLogInitialTime});
+ if ($year == 0) {
+ $_->{cpqHeEventLogInitialTime} = 0;
+ } else {
+ eval {
+ $_->{cpqHeEventLogInitialTime} = timelocal(0, $min, $hour, $day, $month - 1, $year);
+ };
+ if ($@) {
+ $_->{cpqHeEventLogInitialTime} = 0;
+ }
+ }
+ } elsif ($_->{cpqHeEventLogInitialTime} =~ /^0x([0-9a-fA-F]{4})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/) {
+ my ($year, $month, $day, $hour, $min) = map { hex($_) } ($1, $2, $3, $4, $5);
+ if ($year == 0) {
+ $_->{cpqHeEventLogInitialTime} = 0;
+ } else {
+ eval {
+ $_->{cpqHeEventLogInitialTime} = timelocal(0, $min, $hour, $day, $month - 1, $year);
+ };
+ if ($@) {
+ $_->{cpqHeEventLogInitialTime} = 0;
+ }
+ }
+ } elsif ($_->{cpqHeEventLogInitialTime} =~ /^\0\0\0\0\0\0/) {
+ $_->{cpqHeEventLogInitialTime} = 0;
+ }
+ if ($_->{cpqHeEventLogUpdateTime} =~ /^(([0-9a-fA-F]{2})( [0-9a-fA-F]{2})*)\s*$/) {
+ $_->{cpqHeEventLogUpdateTime} =~ s/ //;
+ my ($year, $month, $day, $hour, $min) = map { hex($_) } split(/\s+/, $_->{cpqHeEventLogUpdateTime});
+ if ($year == 0) {
+ $_->{cpqHeEventLogUpdateTime} = 0;
+ } else {
+ eval {
+ $_->{cpqHeEventLogUpdateTime} = timelocal(0, $min, $hour, $day, $month - 1, $year);
+ };
+ if ($@) {
+ $_->{cpqHeEventLogUpdateTime} = 0;
+ }
+ }
+ } elsif ($_->{cpqHeEventLogUpdateTime} =~ /^0x([0-9a-fA-F]{4})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/) {
+ my ($year, $month, $day, $hour, $min) = map { hex($_) } ($1, $2, $3, $4, $5);
+ if ($year == 0) {
+ $_->{cpqHeEventLogUpdateTime} = 0;
+ } else {
+ eval {
+ $_->{cpqHeEventLogUpdateTime} = timelocal(0, $min, $hour, $day, $month - 1, $year);
+ };
+ if ($@) {
+ $_->{cpqHeEventLogUpdateTime} = 0;
+ }
+ }
+ } elsif ($_->{cpqHeEventLogUpdateTime} =~ /^\0\0\0\0\0\0/) {
+ $_->{cpqHeEventLogUpdateTime} = 0;
+ }
+ if ($_->{cpqHeEventLogErrorDesc} =~ /^(([0-9a-fA-F]{2})(\s+[0-9a-fA-F]{2})*)\s*$/) {
+ $_->{cpqHeEventLogErrorDesc} = join "", map { chr($_) } map { if (hex($_) > 127) { 20; } else { hex($_) } } split(/\s+/, $_->{cpqHeEventLogErrorDesc});
+ }
+ push(@{$self->{events}},
+ HP::Proliant::Component::EventSubsystem::Event->new(%{$_}));
+ }
+}
+
+sub overall_check {
+ my $self = shift;
+ my $result = 0;
+ $self->blacklist('oe', '');
+ if ($self->{eventsupp} && $self->{eventsupp} eq "supported") {
+ if ($self->{eventstatus} eq "ok") {
+ $result = 0;
+ $self->add_info('eventlog system is ok');
+ } else {
+ $result = 0;
+ $self->add_info(sprintf "eventlog system is %s", $self->{eventstatus});
+ }
+ } else {
+ $result = 0;
+ $self->add_info('no event status found');
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem.pm
new file mode 100755
index 0000000..38da57b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem.pm
@@ -0,0 +1,263 @@
+package HP::Proliant::Component::FanSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+################################## fan_redundancy ##########
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ fans => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::FanSubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::FanSubsystem::CLI->new(%params);
+ } else {
+ die 'unknown method';
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking fans');
+ $self->blacklist('ff', '');
+ if (scalar (@{$self->{fans}}) == 0) {
+ $self->overall_check(); # sowas ist mir nur einmal untergekommen
+ # die maschine hatte alles in allem nur 2 oids (cpqHeFltTolFanChassis)
+ # SNMPv2-SMI::enterprises.232.6.2.6.7.1.1.0.1 = INTEGER: 0
+ # SNMPv2-SMI::enterprises.232.6.2.6.7.1.1.0.2 = INTEGER: 0
+ } else {
+ my $overallhealth = $self->overall_check();
+ foreach (@{$self->{fans}}) {
+ $_->{overallhealth} = $overallhealth;
+ $_->check();
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{fans}}) {
+ $_->dump();
+ }
+}
+
+sub get_fan_by_index {
+ my $self = shift;
+ my $index;
+ foreach (@{$self->{fans}}) {
+ return $_ if exists $_->{cpqHeFltTolFanIndex} &&
+ $_->{cpqHeFltTolFanIndex} == $index;
+ }
+ return undef;
+}
+
+
+package HP::Proliant::Component::FanSubsystem::Fan;
+our @ISA = qw(HP::Proliant::Component::FanSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ if (exists $params{cpqHeFltTolFanRedundant}) {
+ return HP::Proliant::Component::FanSubsystem::Fan::FTol->new(%params);
+ } else {
+ return HP::Proliant::Component::FanSubsystem::Fan::Thermal->new(%params);
+ }
+}
+
+
+package HP::Proliant::Component::FanSubsystem::Fan::FTol;
+our @ISA = qw(HP::Proliant::Component::FanSubsystem::Fan);
+
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqHeFltTolFanChassis => $params{cpqHeFltTolFanChassis},
+ cpqHeFltTolFanIndex => $params{cpqHeFltTolFanIndex},
+ cpqHeFltTolFanLocale => $params{cpqHeFltTolFanLocale},
+ cpqHeFltTolFanPresent => $params{cpqHeFltTolFanPresent},
+ cpqHeFltTolFanType => $params{cpqHeFltTolFanType},
+ cpqHeFltTolFanSpeed => $params{cpqHeFltTolFanSpeed},
+ cpqHeFltTolFanRedundant => $params{cpqHeFltTolFanRedundant},
+ cpqHeFltTolFanRedundantPartner => $params{cpqHeFltTolFanRedundantPartner},
+ cpqHeFltTolFanCondition => $params{cpqHeFltTolFanCondition},
+ cpqHeFltTolFanPctMax => $params{cpqHeFltTolFanPctMax}, #!!!
+ cpqHeFltTolFanHotPlug => $params{cpqHeFltTolFanHotPlug}, #!!!
+ partner => $params{partner},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if (($self->{cpqHeFltTolFanRedundant} eq 'redundant') &&
+ ((! defined $self->{cpqHeFltTolFanRedundantPartner}) ||
+ (! $self->{cpqHeFltTolFanRedundantPartner}))) {
+ $self->{cpqHeFltTolFanRedundant} = 'notRedundant';
+ # cpqHeFltTolFanRedundantPartner=0: partner not avail
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('f', $self->{cpqHeFltTolFanIndex});
+ $self->add_info(sprintf 'fan %d is %s, speed is %s, pctmax is %s%%, '.
+ 'location is %s, redundance is %s, partner is %s',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanPresent},
+ $self->{cpqHeFltTolFanSpeed}, $self->{cpqHeFltTolFanPctMax},
+ $self->{cpqHeFltTolFanLocale}, $self->{cpqHeFltTolFanRedundant},
+ $self->{cpqHeFltTolFanRedundantPartner});
+ $self->add_extendedinfo(sprintf 'fan_%s=%d%%',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanPctMax});
+ if ($self->{cpqHeFltTolFanPresent} eq 'present') {
+ if ($self->{cpqHeFltTolFanSpeed} eq 'high') {
+ $self->add_info(sprintf 'fan %d (%s) runs at high speed',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(CRITICAL, $self->{info});
+ } elsif ($self->{cpqHeFltTolFanSpeed} ne 'normal') {
+ $self->add_info(sprintf 'fan %d (%s) needs attention',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(CRITICAL, $self->{info});
+ }
+ if ($self->{cpqHeFltTolFanCondition} eq 'failed') {
+ $self->add_info(sprintf 'fan %d (%s) failed',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(CRITICAL, $self->{info});
+ } elsif ($self->{cpqHeFltTolFanCondition} eq 'degraded') {
+ $self->add_info(sprintf 'fan %d (%s) degraded',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(WARNING, $self->{info});
+ } elsif ($self->{cpqHeFltTolFanCondition} ne 'ok' &&
+ $self->{cpqHeFltTolFanCondition} ne 'other') {
+ $self->add_info(sprintf 'fan %d (%s) is not ok',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(WARNING, $self->{info});
+ }
+ if ($self->{cpqHeFltTolFanRedundant} eq 'notRedundant') {
+ # sieht so aus, als waere notRedundant und partner=0 normal z.b. dl360
+ # das duerfte der fall sein, wenn nur eine cpu verbaut wurde und
+ # statt einem redundanten paar nur dummies drinstecken.
+ # "This specifies if the fan is in a redundant configuration"
+ # notRedundant heisst also sowohl nicht redundant wegen ausfall
+ # des partners als auch von haus aus nicht redundant ausgelegt
+ if ($self->{cpqHeFltTolFanRedundantPartner}) {
+ # nicht redundant, hat aber einen partner. da muss man genauer
+ # hinschauen
+ #if (my $partner = $self->{partner}) {
+ #}
+ if ($self->{overallhealth}) {
+ # da ist sogar das system der meinung, dass etwas faul ist
+ if (! $self->{runtime}->{options}->{ignore_fan_redundancy}) {
+ $self->add_info(sprintf 'fan %d (%s) is not redundant',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(WARNING, $self->{info});
+ }
+ } else {
+ # das ist wohl so gewollt, dass einzelne fans eingebaut werden,
+ # obwohl redundante paerchen vorgesehen sind.
+ # scheint davon abzuhaengen, wieviele cpus geordert wurden.
+ }
+ }
+ } elsif ($self->{cpqHeFltTolFanRedundant} eq 'other') {
+ #seen on a dl320 g5p with bios from 2008.
+ # maybe redundancy is not supported at all
+ }
+ } elsif ($self->{cpqHeFltTolFanPresent} eq 'failed') { # from cli
+ $self->add_info(sprintf 'fan %d (%s) failed',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(CRITICAL, $self->{info});
+ } elsif ($self->{cpqHeFltTolFanPresent} eq 'absent') {
+ $self->add_info(sprintf 'fan %d (%s) needs attention (is absent)',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ # weiss nicht, ob absent auch kaputt bedeuten kann
+ # wenn nicht, dann wuerde man sich hier dumm und daemlich blacklisten
+ #$self->add_message(CRITICAL, $self->{info});
+ $self->add_message(WARNING, $self->{info}) if $self->{overallhealth};
+ }
+ if ($self->{runtime}->{options}->{perfdata}) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('fan_%s', $self->{cpqHeFltTolFanIndex}),
+ value => $self->{cpqHeFltTolFanPctMax},
+ uom => '%',
+ );
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FAN_%s]\n", $self->{cpqHeFltTolFanIndex};
+ foreach (qw(cpqHeFltTolFanChassis cpqHeFltTolFanIndex cpqHeFltTolFanLocale
+ cpqHeFltTolFanPresent cpqHeFltTolFanType cpqHeFltTolFanSpeed
+ cpqHeFltTolFanRedundant cpqHeFltTolFanRedundantPartner
+ cpqHeFltTolFanCondition cpqHeFltTolFanHotPlug)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::FanSubsystem::Fan::Thermal;
+our @ISA = qw(HP::Proliant::Component::FanSubsystem::Fan);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqHeThermalFanIndex => $params{cpqHeThermalFanIndex},
+ cpqHeThermalFanRequired => $params{cpqHeThermalFanRequired},
+ cpqHeThermalFanPresent => $params{cpqHeThermalFanPresent},
+ cpqHeThermalFanCpuFan => $params{cpqHeThermalFanCpuFan},
+ cpqHeThermalFanStatus => $params{cpqHeThermalFanStatus},
+ cpqHeThermalFanHwLocation => $params{cpqHeThermalFanHwLocation},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FAN_%s]\n", $self->{cpqHeThermalFanIndex};
+ foreach (qw(cpqHeThermalFanIndex cpqHeThermalFanRequired
+ cpqHeThermalFanPresent cpqHeThermalFanCpuFan cpqHeThermalFanStatus
+ cpqHeThermalFanHwLocation)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/CLI.pm
new file mode 100755
index 0000000..f82c770
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/CLI.pm
@@ -0,0 +1,101 @@
+package HP::Proliant::Component::FanSubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::FanSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ fans => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+# partner not available = cpqHeFltTolFanRedundantPartner=0
+# cpqHeFltTolFanTypeValue = other
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my %tmpfan = ();
+ foreach (grep(/^fans/, split(/\n/, $self->{rawdata}))) {
+ s/^fans //g;
+ if (/^#(\d+)\s+([\w#_\/\-]+)\s+(\w+)\s+(\w+)\s+(FAILED|[N\/A\d]+)%*\s+([\w\/]+)\s+(FAILED|[N\/A\d]+)\s+(\w+)/) {
+ %tmpfan = (
+ cpqHeFltTolFanIndex => $1,
+ cpqHeFltTolFanLocale => lc $2,
+ cpqHeFltTolFanPresent => lc $3,
+ cpqHeFltTolFanSpeed => lc $4,
+ cpqHeFltTolFanPctMax => lc $5, # (FAILED|[N\/A\d]+)
+ cpqHeFltTolFanRedundant => lc $6,
+ cpqHeFltTolFanRedundantPartner => lc $7, # (FAILED|[N\/A\d]+)
+ cpqHeFltTolFanHotPlug => lc $8,
+ );
+ } elsif (/^#(\d+)\s+([\w#_\/\-]+?)(Yes|No|N\/A)\s+(\w+)\s+(FAILED|[N\/A\d]+)%*\s+([\w\/]+)\s+(FAILED|[N\/A\d]+)\s+(\w+)/) {
+ # #5 SCSI_BACKPLANE_ZONEYes NORMAL N/A ....
+ %tmpfan = (
+ cpqHeFltTolFanIndex => $1,
+ cpqHeFltTolFanLocale => lc $2,
+ cpqHeFltTolFanPresent => lc $3,
+ cpqHeFltTolFanSpeed => lc $4,
+ cpqHeFltTolFanPctMax => lc $5,
+ cpqHeFltTolFanRedundant => lc $6,
+ cpqHeFltTolFanRedundantPartner => lc $7,
+ cpqHeFltTolFanHotPlug => lc $8,
+ );
+ } elsif (/^#(\d+)\s+([\w#_\/\-]+)\s+[NOno]+\s/) {
+ # Fan is not installed. #2 CPU#2 No - - No N/A -
+ } elsif (/^#(\d+)/) {
+ main::contact_author("FAN", $_);
+ }
+ if (%tmpfan) {
+ $tmpfan{runtime} = $params{runtime};
+ $tmpfan{cpqHeFltTolFanChassis} = 1; # geht aus hpasmcli nicht hervor
+ $tmpfan{cpqHeFltTolFanType} = 'other';
+ if ($tmpfan{cpqHeFltTolFanPctMax} !~ /^\d+$/) {
+ if ($tmpfan{cpqHeFltTolFanSpeed} eq 'normal') {
+ $tmpfan{cpqHeFltTolFanPctMax} = 50;
+ } elsif ($tmpfan{cpqHeFltTolFanSpeed} eq 'high') {
+ $tmpfan{cpqHeFltTolFanPctMax} = 100;
+ } else {
+ $tmpfan{cpqHeFltTolFanPctMax} = 0;
+ }
+ }
+ if($tmpfan{cpqHeFltTolFanSpeed} eq 'failed') {
+ $tmpfan{cpqHeFltTolFanCondition} = 'failed';
+ } elsif($tmpfan{cpqHeFltTolFanSpeed} eq 'n/a') {
+ $tmpfan{cpqHeFltTolFanCondition} = 'other';
+ } else {
+ $tmpfan{cpqHeFltTolFanCondition} = 'ok';
+ }
+ $tmpfan{cpqHeFltTolFanRedundant} =
+ $tmpfan{cpqHeFltTolFanRedundant} eq 'yes' ? 'redundant' :
+ $tmpfan{cpqHeFltTolFanRedundant} eq 'no' ? 'notRedundant' : 'other';
+ $tmpfan{cpqHeFltTolFanPresent} =
+ $tmpfan{cpqHeFltTolFanPresent} eq 'yes' ? 'present' :
+ $tmpfan{cpqHeFltTolFanPresent} eq 'failed' ? 'present' :
+ $tmpfan{cpqHeFltTolFanPresent} eq 'no' ? 'absent' : 'other';
+ $tmpfan{cpqHeFltTolFanHotPlug} =
+ $tmpfan{cpqHeFltTolFanHotPlug} eq 'yes' ? 'hotPluggable' :
+ $tmpfan{cpqHeFltTolFanHotPlug} eq 'no' ? 'nonHotPluggable' : 'other';
+ push(@{$self->{fans}},
+ HP::Proliant::Component::FanSubsystem::Fan->new(%tmpfan));
+ %tmpfan = ();
+ }
+ }
+}
+
+sub overall_check {
+ my $self = shift;
+ # nix. nur wegen der gleichheit mit snmp
+ return 0;
+}
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/SNMP.pm
new file mode 100755
index 0000000..82bd180
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/SNMP.pm
@@ -0,0 +1,231 @@
+package HP::Proliant::Component::FanSubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::FanSubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ fans => [],
+ he_fans => [],
+ th_fans => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->overall_init(%params);
+ $self->he_init(%params);
+ $self->te_init(%params);
+ $self->unite();
+ return $self;
+}
+
+sub overall_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $params{rawdata};
+ # overall
+ my $cpqHeThermalSystemFanStatus = '1.3.6.1.4.1.232.6.2.6.4.0';
+ my $cpqHeThermalSystemFanStatusValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ };
+ my $cpqHeThermalCpuFanStatus = '1.3.6.1.4.1.232.6.2.6.5.0';
+ my $cpqHeThermalCpuFanStatusValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 4 => 'failed', # shutdown
+ };
+ $self->{sysstatus} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeThermalSystemFanStatus,
+ $cpqHeThermalSystemFanStatusValue);
+ $self->{cpustatus} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeThermalCpuFanStatus,
+ $cpqHeThermalCpuFanStatusValue);
+ $self->{sysstatus} |= lc $self->{sysstatus};
+ $self->{cpustatus} |= lc $self->{cpustatus};
+}
+
+sub te_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $params{rawdata};
+ my $ignore_redundancy = $params{ignore_redundancy};
+ # cpqHeThermalFanTable
+ my $oids = {
+ cpqHeThermalFanEntry => '1.3.6.1.4.1.232.6.2.6.6.1',
+ cpqHeThermalFanIndex => '1.3.6.1.4.1.232.6.2.6.6.1.1',
+ cpqHeThermalFanRequired => '1.3.6.1.4.1.232.6.2.6.6.1.2',
+ cpqHeThermalFanPresent => '1.3.6.1.4.1.232.6.2.6.6.1.3',
+ cpqHeThermalFanCpuFan => '1.3.6.1.4.1.232.6.2.6.6.1.4',
+ cpqHeThermalFanStatus => '1.3.6.1.4.1.232.6.2.6.6.1.5',
+ cpqHeThermalFanHwLocation => '1.3.6.1.4.1.232.6.2.6.6.1.6',
+ cpqHeThermalFanRequiredValue => {
+ 1 => 'other',
+ 2 => 'nonRequired',
+ 3 => 'required',
+ },
+ cpqHeThermalFanPresentValue => {
+ 1 => 'other',
+ 2 => 'absent',
+ 3 => 'present',
+ },
+ cpqHeThermalFanCpuFanValue => {
+ 1 => 'other',
+ 2 => 'systemFan',
+ 3 => 'cpuFan',
+ },
+ cpqHeThermalFanStatusValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 4 => 'failed',
+ },
+ };
+ # INDEX { cpqHeThermalFanIndex }
+ foreach ($self->get_entries($oids, 'cpqHeThermalFanEntry')) {
+ next if ! $_->{cpqHeThermalFanPresent};
+ push(@{$self->{th_fans}},
+ HP::Proliant::Component::FanSubsystem::Fan->new(%{$_}));
+ }
+}
+
+sub he_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $params{rawdata};
+ my $ignore_redundancy = $params{ignore_redundancy};
+ # cpqHeFltTolFanTable
+ my $oids = {
+ cpqHeFltTolFanEntry => '1.3.6.1.4.1.232.6.2.6.7.1',
+ cpqHeFltTolFanChassis => '1.3.6.1.4.1.232.6.2.6.7.1.1',
+ cpqHeFltTolFanIndex => '1.3.6.1.4.1.232.6.2.6.7.1.2',
+ cpqHeFltTolFanLocale => '1.3.6.1.4.1.232.6.2.6.7.1.3',
+ cpqHeFltTolFanPresent => '1.3.6.1.4.1.232.6.2.6.7.1.4',
+ cpqHeFltTolFanType => '1.3.6.1.4.1.232.6.2.6.7.1.5',
+ cpqHeFltTolFanSpeed => '1.3.6.1.4.1.232.6.2.6.7.1.6',
+ cpqHeFltTolFanRedundant => '1.3.6.1.4.1.232.6.2.6.7.1.7',
+ cpqHeFltTolFanRedundantPartner => '1.3.6.1.4.1.232.6.2.6.7.1.8',
+ cpqHeFltTolFanCondition => '1.3.6.1.4.1.232.6.2.6.7.1.9',
+ cpqHeFltTolFanHotPlug => '1.3.6.1.4.1.232.6.2.6.7.1.10',
+ cpqHeFltTolFanHwLocation => '1.3.6.1.4.1.232.6.2.6.7.1.11',
+ cpqHeFltTolFanCurrentSpeed => '1.3.6.1.4.1.232.6.2.6.7.1.12',
+ cpqHeFltTolFanLocaleValue => {
+ 1 => "other",
+ 2 => "unknown",
+ 3 => "system",
+ 4 => "systemBoard",
+ 5 => "ioBoard",
+ 6 => "cpu",
+ 7 => "memory",
+ 8 => "storage",
+ 9 => "removableMedia",
+ 10 => "powerSupply",
+ 11 => "ambient",
+ 12 => "chassis",
+ 13 => "bridgeCard",
+ },
+ cpqHeFltTolFanPresentValue => {
+ 1 => "other",
+ 2 => "absent",
+ 3 => "present",
+ },
+ cpqHeFltTolFanSpeedValue => {
+ 1 => "other",
+ 2 => "normal",
+ 3 => "high",
+ },
+ cpqHeFltTolFanRedundantValue => {
+ 1 => "other",
+ 2 => "notRedundant",
+ 3 => "redundant",
+ },
+ cpqHeFltTolFanTypeValue => {
+ 1 => "other",
+ 2 => "tachInput",
+ 3 => "spinDetect",
+ },
+ cpqHeFltTolFanConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqHeFltTolFanHotPlugValue => {
+ 1 => "other",
+ 2 => "nonHotPluggable",
+ 3 => "hotPluggable",
+ },
+ };
+ # INDEX { cpqHeFltTolFanChassis, cpqHeFltTolFanIndex }
+ foreach ($self->get_entries($oids, 'cpqHeFltTolFanEntry')) {
+ next if ! defined $_->{cpqHeFltTolFanIndex};
+ # z.b. USM65201WS hat nur solche fragmente. die werden erst gar nicht
+ # als fans akzeptiert. dafuer gibts dann die overall condition
+ # SNMPv2-SMI::enterprises.232.6.2.6.7.1.1.0.1 = INTEGER: 0
+ # SNMPv2-SMI::enterprises.232.6.2.6.7.1.1.0.2 = INTEGER: 0
+ $_->{cpqHeFltTolFanPctMax} = ($_->{cpqHeFltTolFanPresent} eq 'present') ?
+ 50 : 0;
+ push(@{$self->{he_fans}},
+ HP::Proliant::Component::FanSubsystem::Fan->new(%{$_}));
+ }
+
+}
+
+sub unite {
+ my $self = shift;
+ my $tmpfans = {};
+ foreach (@{$self->{he_fans}}) {
+ $tmpfans->{$_->{cpqHeFltTolFanIndex}} = $_;
+ }
+ foreach (@{$self->{he_fans}}) {
+ if (exists $tmpfans->{$_->{cpqHeFltTolFanRedundantPartner}}) {
+ $_->{partner} = $tmpfans->{$_->{cpqHeFltTolFanRedundantPartner}};
+ } else {
+ $_->{partner} = undef;
+ }
+ }
+ @{$self->{fans}} = @{$self->{he_fans}};
+}
+
+sub overall_check {
+ my $self = shift;
+ my $result = 0;
+ $self->blacklist('ofs', '');
+ if ($self->{sysstatus} && $self->{cpustatus}) {
+ if ($self->{sysstatus} eq 'degraded') {
+ $result = 1;
+ $self->add_message(WARNING,
+ sprintf 'system fan overall status is %s', $self->{sysstatus});
+ } elsif ($self->{sysstatus} eq 'failed') {
+ $result = 2;
+ $self->add_message(CRITICAL,
+ sprintf 'system fan overall status is %s', $self->{sysstatus});
+ }
+ if ($self->{cpustatus} eq 'degraded') {
+ $result = 1;
+ $self->add_message(WARNING,
+ sprintf 'cpu fan overall status is %s', $self->{cpustatus});
+ } elsif ($self->{cpustatus} eq 'failed') {
+ $result = 2;
+ $self->add_message(CRITICAL,
+ sprintf 'cpu fan overall status is %s', $self->{cpustatus});
+ }
+ $self->add_info(sprintf 'overall fan status: system=%s, cpu=%s',
+ $self->{sysstatus}, $self->{cpustatus});
+ } else {
+ $result = 0;
+ $self->add_info('this system seems to be water-cooled. no fans found');
+ }
+ return $result;
+}
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem.pm
new file mode 100755
index 0000000..17a49ea
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem.pm
@@ -0,0 +1,197 @@
+package HP::Proliant::Component::MemorySubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ dimms => [],
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::MemorySubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::MemorySubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking memory');
+ foreach (@{$self->{dimms}}) {
+ $_->check(); # info ausfuellen
+ }
+ if ((scalar(grep {
+ $_->is_present() &&
+ ($_->{condition} ne 'n/a' && $_->{condition} ne 'other' )
+ } @{$self->{dimms}})) != 0) {
+ foreach (@{$self->{dimms}}) {
+ if (($_->is_present()) && ($_->{condition} ne 'ok')) {
+ $_->add_message(CRITICAL, $_->{info});
+ $errorfound++;
+ }
+ }
+ } else {
+ if ($self->{runtime}->{options}->{ignore_dimms}) {
+ $self->add_message(OK,
+ sprintf "ignoring %d dimms with status 'n/a' ",
+ scalar(grep { ($_->is_present()) } @{$self->{dimms}}));
+ } elsif ($self->{runtime}->{options}->{buggy_firmware}) {
+ $self->add_message(OK,
+ sprintf "ignoring %d dimms with status 'n/a' because of buggy firmware",
+ scalar(grep { ($_->is_present()) } @{$self->{dimms}}));
+ } else {
+ $self->add_message(WARNING,
+ sprintf "status of all %d dimms is n/a (please upgrade firmware)",
+ scalar(grep { $_->is_present() } @{$self->{dimms}}));
+ $errorfound++;
+ }
+ }
+ foreach (@{$self->{dimms}}) {
+ printf "%s\n", $_->{info} if $self->{runtime}->{options}->{verbose} >= 2;
+ }
+ if (! $errorfound && $self->is_faulty()) {
+ #if ($self->is_faulty()) {
+ $self->add_message(WARNING,
+ sprintf 'overall memory error found');
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "i dump the memory\n";
+ foreach (@{$self->{dimms}}) {
+ $_->dump();
+ }
+}
+
+package HP::Proliant::Component::MemorySubsystem::Dimm;
+our @ISA = qw(HP::Proliant::Component::MemorySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cartridge => $params{cartridge},
+ module => $params{module},
+ size => $params{size} || 0,
+ status => $params{status},
+ condition => $params{condition},
+ type => $params{type},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->{name} = sprintf '%s:%s',
+ $self->{cartridge}, $self->{module};
+ $self->{location} = sprintf 'module %s @ cartridge %s',
+ $self->{module}, $self->{cartridge};
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ # check dient nur dazu, info und extended_info zu fuellen
+ # die eigentliche bewertung findet eins hoeher statt
+ $self->blacklist('d', $self->{name});
+ if (($self->{status} eq 'present') || ($self->{status} eq 'good')) {
+ if ($self->{condition} eq 'other') {
+ $self->add_info(sprintf 'dimm %s (%s) is n/a',
+ $self->{name}, $self->{location});
+ } elsif ($self->{condition} ne 'ok') {
+ $self->add_info(
+ sprintf "dimm module %s (%s) needs attention (%s)",
+ $self->{name}, $self->{location}, $self->{condition});
+ } else {
+ $self->add_info(sprintf 'dimm module %s (%s) is %s',
+ $self->{name}, $self->{location}, $self->{condition});
+ }
+ } elsif ($self->{status} eq 'notPresent') {
+ $self->add_info(sprintf 'dimm module %s (%s) is not present',
+ $self->{name}, $self->{location});
+ } else {
+ $self->add_info(
+ sprintf "dimm module %s (%s) needs attention (%s)",
+ $self->{name}, $self->{location}, $self->{condition});
+ }
+}
+
+sub is_present {
+ my $self = shift;
+ my @signs_of_presence = (qw(present good add upgraded doesnotmatch
+ notsupported badconfig degraded));
+ return scalar(grep { $self->{status} eq $_ } @signs_of_presence);
+}
+
+
+sub dump {
+ my $self = shift;
+ #printf "[DIMM_%s_%s]\n", $self->{cartridge}, $self->{module};
+ #foreach (qw(cartridge module size status condition info)) {
+ # printf "%s: %s\n", $_, $self->{$_};
+ #}
+ #printf "status: %s\n", $self->{status} if exists $self->{status};
+ #printf "\n";
+ printf "car %02d mod %02d siz %.0f sta %-12s con %-10s typ %s\n",
+ $self->{cartridge}, $self->{module}, $self->{size},
+ $self->{status}, $self->{condition}, defined $self->{type} ? $self->{type} : "";
+}
+
+
+package HP::Proliant::Component::MemorySubsystem::Cartridge;
+our @ISA = qw(HP::Proliant::Component::MemorySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ cpqHeResMemBoardSlotIndex => $params{cpqHeResMemBoardSlotIndex},
+ cpqHeResMemBoardOnlineStatus => $params{cpqHeResMemBoardOnlineStatus},
+ cpqHeResMemBoardErrorStatus => $params{cpqHeResMemBoardErrorStatus},
+ cpqHeResMemBoardNumSockets => $params{cpqHeResMemBoardNumSockets},
+ cpqHeResMemBoardOsMemSize => $params{cpqHeResMemBoardOsMemSize},
+ cpqHeResMemBoardTotalMemSize => $params{cpqHeResMemBoardTotalMemSize},
+ cpqHeResMemBoardCondition => $params{cpqHeResMemBoardCondition},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub dump {
+ my $self = shift;
+ #printf "[CARTRIDGE_%s_%s]\n", $self->{cpqHeResMemBoardSlotIndex};
+ #foreach (qw(cpqHeResMemBoardSlotIndex cpqHeResMemBoardOnlineStatus
+ # cpqHeResMemBoardErrorStatus cpqHeResMemBoardNumSockets
+ # cpqHeResMemBoardOsMemSize cpqHeResMemBoardTotalMemSize
+ # cpqHeResMemBoardCondition)) {
+ # printf "%s: %s\n", $_, $self->{$_};
+ #}
+ #printf "\n";
+}
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/CLI.pm
new file mode 100755
index 0000000..f53d77f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/CLI.pm
@@ -0,0 +1,87 @@
+package HP::Proliant::Component::MemorySubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::MemorySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ dimms => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ $self->{dimms} = [];
+ my %tmpdimm = (
+ runtime => $params{runtime},
+ );
+ my $inblock = 0;
+ foreach (grep(/^dimm/, split(/\n/, $self->{rawdata}))) {
+ s/^dimm\s*$//g;
+ if (/Cartridge #:\s+(\d+)/ || /Processor #:\s+(\d+)/) {
+ # neuerdings (g6) tauchen hier prozessor- statt cartridge-angaben auf
+ $tmpdimm{cartridge} = $1;
+ $tmpdimm{board} = $1;
+ $inblock = 1;
+ } elsif (/Module #:\s+(\d+)/) {
+ $tmpdimm{module} = $1;
+ } elsif (/Present:\s+(\w+)/) {
+ $tmpdimm{status} = lc $1 eq 'yes' ? 'present' :
+ lc $1 eq 'no' ? 'notPresent' : 'other';
+ } elsif (/Status:\s+(.+?)\s*$/) {
+ $tmpdimm{condition} = lc $1 =~ /degraded/ ? 'degraded' :
+ lc $1 eq 'ok' ? 'ok' : lc $1 =~ /n\/a/ ? 'n/a' : 'other';
+ } elsif (/Size:\s+(\d+)\s*(.+?)\s*$/) {
+ $tmpdimm{size} = $1 * (lc $2 eq 'mb' ? 1024*1024 :
+ lc $2 eq 'gb' ? 1024*1024*1024 : 1);
+ } elsif (/^\s*$/) {
+ if ($inblock) {
+ $inblock = 0;
+ push(@{$self->{dimms}},
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(%tmpdimm));
+ %tmpdimm = (
+ runtime => $params{runtime},
+ );
+ }
+ } elsif (/(\d+)\s+(\d+)\s+(\w+)\s+(0x\w+)\s+(0x\w+)\s+(\d+[MGT]B)\s+(\d+MHz)\s+(\w+)/) {
+ $tmpdimm{cartridge} = $1;
+ $tmpdimm{module} = $2;
+ $tmpdimm{status} = lc $3 eq 'yes' ? 'present' :
+ lc $3 eq 'no' ? 'notPresent' : 'other';
+ my $formfactor = $4;
+ my $memorytype = $5;
+ my $memorysize = $6;
+ my $memoryspeed = $7;
+ $tmpdimm{condition} = lc $8 =~ /degraded/ ? 'degraded' :
+ lc $8 eq 'ok' ? 'ok' : lc $8 =~ /n\/a/ ? 'n/a' : 'other';
+ $memorysize =~ /(\d+)([MGT]B)/;
+ $tmpdimm{size} = $1 * (lc $2 eq 'mb' ? 1024*1024 :
+ lc $2 eq 'gb' ? 1024*1024*1024 : 1);
+ push(@{$self->{dimms}},
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(%tmpdimm));
+ }
+ }
+ if ($inblock) {
+ push(@{$self->{dimms}},
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(%tmpdimm));
+ }
+}
+
+sub is_faulty {
+ my $self = shift;
+ return 0; # cli hat so einen globalen status nicht
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/SNMP.pm
new file mode 100755
index 0000000..410a858
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/SNMP.pm
@@ -0,0 +1,746 @@
+package HP::Proliant::Component::MemorySubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::MemorySubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ dimms => [],
+ si_dimms => [],
+ he_dimms => [],
+ h2_dimms => [],
+ he_cartridges => [],
+ h2_cartridges => [],
+ si_overall_condition => undef,
+ he_overall_condition => undef,
+ h2_overall_condition => undef,
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->si_init();
+ $self->he_init();
+ $self->he_cartridge_init();
+ $self->h2_init();
+ #$self->h2_cartridge_init();
+ $self->condense();
+ return $self;
+}
+
+sub si_init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqSiMemModuleEntry => '1.3.6.1.4.1.232.2.2.4.5.1',
+ cpqSiMemBoardIndex => '1.3.6.1.4.1.232.2.2.4.5.1.1',
+ cpqSiMemModuleIndex => '1.3.6.1.4.1.232.2.2.4.5.1.2',
+ cpqSiMemModuleSize => '1.3.6.1.4.1.232.2.2.4.5.1.3',
+ cpqSiMemModuleType => '1.3.6.1.4.1.232.2.2.4.5.1.4',
+ cpqSiMemECCStatus => '1.3.6.1.4.1.232.2.2.4.5.1.11',
+ cpqSiMemModuleHwLocation => '1.3.6.1.4.1.232.2.2.4.5.1.12',
+ cpqSiMemModuleTypeValue => {
+ 1 => 'other',
+ 2 => 'board',
+ 3 => 'cpqSingleWidthModule',
+ 4 => 'cpqDoubleWidthModule',
+ 5 => 'simm',
+ 6 => 'pcmcia',
+ 7 => 'compaq-specific',
+ 8 => 'dimm',
+ 9 => 'smallOutlineDimm',
+ 10 => 'rimm',
+ 11 => 'srimm',
+ },
+ cpqSiMemECCStatusValue => {
+ 0 => "n/a",
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "degradedModuleIndexUnknown",
+ 34 => 'n/a', # es ist zum kotzen...
+ 104 => 'n/a',
+ },
+ };
+ # INDEX { cpqSiMemBoardIndex, cpqSiMemModuleIndex }
+ foreach ($self->get_entries($oids, 'cpqSiMemModuleEntry')) {
+ $_->{cartridge} = $_->{cpqSiMemBoardIndex};
+ $_->{module} = $_->{cpqSiMemModuleIndex};
+ next if (! defined $_->{cartridge} || ! defined $_->{module});
+ $_->{size} = $_->{cpqSiMemModuleSize};
+ $_->{type} = $_->{cpqSiMemModuleType};
+ $_->{condition} = $_->{cpqSiMemECCStatus};
+ $_->{status} = ($_->{cpqSiMemModuleSize} > 0) ? 'present' : 'notPresent';
+ push(@{$self->{si_dimms}},
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(%{$_})
+ );
+ }
+ my $cpqSiMemECCCondition = '1.3.6.1.4.1.232.2.2.4.15.0';
+ my $cpqSiMemECCConditionValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ };
+ $self->{si_overall_condition} = SNMP::Utils::get_object_value(
+ $self->{rawdata}, $cpqSiMemECCCondition,
+ $cpqSiMemECCConditionValue);
+ $self->trace(2, sprintf 'overall si condition is %s',
+ $self->{si_overall_condition} || 'undefined');
+}
+
+sub he_init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeResMemModuleEntry => '1.3.6.1.4.1.232.6.2.14.11.1',
+ cpqHeResMemBoardIndex => '1.3.6.1.4.1.232.6.2.14.11.1.1',
+ cpqHeResMemModuleIndex => '1.3.6.1.4.1.232.6.2.14.11.1.2',
+ cpqHeResMemModuleStatus => '1.3.6.1.4.1.232.6.2.14.11.1.4',
+ cpqHeResMemModuleCondition => '1.3.6.1.4.1.232.6.2.14.11.1.5',
+ cpqHeResMemModuleStatusValue => {
+ 1 => "other", # unknown or could not be determined
+ 2 => "notPresent", # not present or un-initialized
+ 3 => "present", # present but not in use
+ 4 => "good", # present and in use. ecc threshold not exceeded
+ 5 => "add", # added but not yet in use
+ 6 => "upgrade", # upgraded but not yet in use
+ 7 => "missing", # expected but missing
+ 8 => "doesNotMatch", # does not match the other modules in the bank
+ 9 => "notSupported", # module not supported
+ 10 => "badConfig", # violates add/upgrade configuration
+ 11 => "degraded", # ecc exceeds threshold
+ },
+ # condition = status of the correctable memory errors
+ cpqHeResMemModuleConditionValue => {
+ 0 => "n/a", # this appears only with buggy firmwares.
+ # (only 1 module shows up)
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ },
+ };
+ my $tablesize = SNMP::Utils::get_size($snmpwalk,
+ $oids->{cpqHeResMemModuleEntry});
+ # INDEX { cpqHeResMemBoardIndex, cpqHeResMemModuleIndex }
+ foreach ($self->get_entries($oids, 'cpqHeResMemModuleEntry')) {
+ $_->{cartridge} = $_->{cpqHeResMemBoardIndex};
+ $_->{module} = $_->{cpqHeResMemModuleIndex};
+ $_->{present} = $_->{cpqHeResMemModuleStatus};
+ $_->{status} = $_->{cpqHeResMemModuleStatus};
+ $_->{condition} = $_->{cpqHeResMemModuleCondition};
+ if ((! defined $_->{module}) && ($_->{cartridge} == 0)) {
+ $_->{module} = $_->{index2}; # auf dem systemboard verbaut
+ }
+
+ push(@{$self->{he_dimms}},
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(%{$_})
+ ) unless (! defined $_->{cartridge} || ! defined $_->{module} ||
+ $tablesize == 1);
+ }
+ my $cpqHeResilientMemCondition = '1.3.6.1.4.1.232.6.2.14.4.0';
+ my $cpqHeResilientMemConditionValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ };
+ $self->{he_overall_condition} = SNMP::Utils::get_object_value(
+ $self->{rawdata}, $cpqHeResilientMemCondition,
+ $cpqHeResilientMemConditionValue);
+ $self->trace(2, sprintf 'overall he condition is %s',
+ $self->{hei_overall_condition} || 'undefined');
+}
+
+sub he_cartridge_init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeResMemBoardEntry => '1.3.6.1.4.1.232.6.2.14.10.1',
+ cpqHeResMemBoardSlotIndex => '1.3.6.1.4.1.232.6.2.14.10.1.1',
+ cpqHeResMemBoardOnlineStatus => '1.3.6.1.4.1.232.6.2.14.10.1.2',
+ cpqHeResMemBoardErrorStatus => '1.3.6.1.4.1.232.6.2.14.10.1.3',
+ cpqHeResMemBoardNumSockets => '1.3.6.1.4.1.232.6.2.14.10.1.5',
+ cpqHeResMemBoardOsMemSize => '1.3.6.1.4.1.232.6.2.14.10.1.6',
+ cpqHeResMemBoardTotalMemSize => '1.3.6.1.4.1.232.6.2.14.10.1.7',
+ cpqHeResMemBoardCondition => '1.3.6.1.4.1.232.6.2.14.10.1.8',
+ # onlinestatus
+ cpqHeResMemBoardOnlineStatusValue => {
+ 0 => "n/a", # this appears only with buggy firmwares.
+ # (only 1 module shows up)
+ 1 => "other",
+ 2 => "present",
+ 3 => "absent",
+ },
+ cpqHeResMemBoardErrorStatusValue => {
+ 1 => "other", #
+ 2 => "noError", #
+ 3 => "dimmEccError", #
+ 4 => "unlockError", #
+ 5 => "configError", #
+ 6 => "busError", #
+ 7 => "powerError", #
+ },
+ # condition = status of the correctable memory errors
+ cpqHeResMemBoardConditionValue => {
+ 0 => "n/a", # this appears only with buggy firmwares.
+ # (only 1 module shows up)
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ },
+ };
+ my $tablesize = SNMP::Utils::get_size($snmpwalk,
+ $oids->{cpqHeResMemBoardEntry});
+ # INDEX { cpqHeResMemBoardIndex, cpqHeResMemBoardIndex }
+ foreach ($self->get_entries($oids, 'cpqHeResMemBoardEntry')) {
+ push(@{$self->{he_cartridges}},
+ HP::Proliant::Component::MemorySubsystem::Cartridge->new(%{$_})
+ ) unless (! defined $_->{cpqHeResMemBoardSlotIndex} || $tablesize == 1);
+ }
+}
+
+sub h2_init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeResMem2ModuleEntry => '1.3.6.1.4.1.232.6.2.14.13.1',
+ cpqHeResMem2BoardNum => '1.3.6.1.4.1.232.6.2.14.13.1.2',
+ cpqHeResMem2ModuleNum => '1.3.6.1.4.1.232.6.2.14.13.1.5',
+ cpqHeResMem2ModuleStatus => '1.3.6.1.4.1.232.6.2.14.13.1.19',
+ cpqHeResMem2ModuleCondition => '1.3.6.1.4.1.232.6.2.14.13.1.20',
+ cpqHeResMem2ModuleSize => '1.3.6.1.4.1.232.6.2.14.13.1.6',
+
+ cpqHeResMem2ModuleStatusValue => {
+ 1 => "other", # unknown or could not be determined
+ 2 => "notPresent", # not present or un-initialized
+ 3 => "present", # present but not in use
+ 4 => "good", # present and in use. ecc threshold not exceeded
+ 5 => "add", # added but not yet in use
+ 6 => "upgrade", # upgraded but not yet in use
+ 7 => "missing", # expected but missing
+ 8 => "doesNotMatch", # does not match the other modules in the bank
+ 9 => "notSupported", # module not supported
+ 10 => "badConfig", # violates add/upgrade configuration
+ 11 => "degraded", # ecc exceeds threshold
+ },
+ # condition = status of the correctable memory errors
+ cpqHeResMem2ModuleConditionValue => {
+ 0 => "n/a", # this appears only with buggy firmwares.
+ # (only 1 module shows up)
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ },
+ };
+ # INDEX { cpqHeResMem2ModuleNum }
+ my $lastboard = 0;
+ my $lastmodule = 0;
+ my $myboard= 0;
+ my $hpboard = 0;
+ foreach (sort { $a->{index1} <=> $b->{index1} }
+ $self->get_entries($oids, 'cpqHeResMem2ModuleEntry')) {
+ $hpboard = $_->{cpqHeResMem2BoardNum};
+ # dass hier faelschlicherweise 0 zurueckkommt, wundert mich schon
+ # gar nicht mehr
+ $_->{module} = $_->{cpqHeResMem2ModuleNum};
+ if ($_->{module} < $lastmodule) {
+ # sieht so aus, als haette man es mit einem neuen board zu tun
+ # da hp zu bloed ist, selber hochzuzaehlen, muss ich das tun
+ $myboard++;
+ }
+ $lastmodule = $_->{cpqHeResMem2ModuleNum};
+ $_->{cartridge} = ($myboard != $hpboard) ? $myboard : $hpboard;
+ $_->{present} = $_->{cpqHeResMem2ModuleStatus};
+ $_->{status} = $_->{cpqHeResMem2ModuleStatus};
+ $_->{condition} = $_->{cpqHeResMem2ModuleCondition};
+ $_->{size} = $_->{cpqHeResMem2ModuleSize};
+ push(@{$self->{h2_dimms}},
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(%{$_})
+ ) unless (! defined $_->{cpqHeResMem2BoardNum} ||
+ ! defined $_->{cpqHeResMem2ModuleNum});
+ }
+}
+
+sub h2_cartridge_init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeResMem2BoardEntry => '1.3.6.1.4.1.232.6.2.14.12.1',
+ cpqHeResMem2BoardIndex => '1.3.6.1.4.1.232.6.2.14.12.1.1',
+ cpqHeResMem2BoardOnlineStatus => '1.3.6.1.4.1.232.6.2.14.12.1.5',
+ cpqHeResMem2BoardErrorStatus => '1.3.6.1.4.1.232.6.2.14.12.1.6',
+ cpqHeResMem2BoardNumSockets => '1.3.6.1.4.1.232.6.2.14.12.1.8',
+ cpqHeResMem2BoardOsMemSize => '1.3.6.1.4.1.232.6.2.14.12.1.9',
+ cpqHeResMem2BoardTotalMemSize => '1.3.6.1.4.1.232.6.2.14.12.1.10',
+ cpqHeResMem2BoardCondition => '1.3.6.1.4.1.232.6.2.14.12.1.11',
+ # onlinestatus
+ cpqHeResMem2BoardOnlineStatusValue => {
+ 0 => "n/a", # this appears only with buggy firmwares.
+ # (only 1 module shows up)
+ 1 => "other",
+ 2 => "present",
+ 3 => "absent",
+ },
+ cpqHeResMem2BoardErrorStatusValue => {
+ 1 => "other", #
+ 2 => "noError", #
+ 3 => "dimmEccError", #
+ 4 => "unlockError", #
+ 5 => "configError", #
+ 6 => "busError", #
+ 7 => "powerError", #
+ },
+ # condition = status of the correctable memory errors
+ cpqHeResMem2BoardConditionValue => {
+ 0 => "n/a", # this appears only with buggy firmwares.
+ # (only 1 module shows up)
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ },
+ };
+ my $tablesize = SNMP::Utils::get_size($snmpwalk,
+ $oids->{cpqHeResMemBoardEntry});
+ # INDEX { cpqHeResMem2BoardIndex, cpqHeResMem2BoardIndex }
+ foreach ($self->get_entries($oids, 'cpqHeResMem2BoardEntry')) {
+ push(@{$self->{h2_cartridges}},
+ HP::Proliant::Component::MemorySubsystem::Cartridge->new(%{$_})
+ ) unless (! defined $_->{cpqHeRes2MemBoardIndex} || $tablesize == 1);
+ }
+}
+
+sub condense {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ # wenn saemtliche dimms n/a sind
+ # wenn ignore dimms: ignoring %d dimms with status 'n/a'
+ # wenn buggyfirmware: ignoring %d dimms with status 'n/a' because of buggy firmware
+ # if buggy firmware : condition n/a ist normal
+ # ignore-dimms :
+ # es gibt si_dimms und he_dimms
+ my $si_dimms = scalar(@{$self->{si_dimms}});
+ my $he_dimms = scalar(@{$self->{he_dimms}});
+ my $h2_dimms = scalar(@{$self->{h2_dimms}});
+ $self->trace(2, sprintf "SI: %02d HE: %02d H2: %02d",
+ $si_dimms, $he_dimms, $h2_dimms)
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ foreach ($self->get_si_boards()) {
+ printf "SI%02d-> ", $_ if ($self->{runtime}->{options}->{verbose} >= 2);
+ foreach ($self->get_si_modules($_)) {
+ printf "%02d ", $_ if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ printf "\n" if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ foreach ($self->get_he_boards()) {
+ printf "HE%02d-> ", $_ if ($self->{runtime}->{options}->{verbose} >= 2);
+ foreach ($self->get_he_modules($_)) {
+ printf "%02d ", $_ if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ printf "\n" if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ foreach ($self->get_h2_boards()) {
+ printf "H2%02d-> ", $_ if ($self->{runtime}->{options}->{verbose} >= 2);
+ foreach ($self->get_h2_modules($_)) {
+ printf "%02d ", $_ if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ printf "\n" if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ if (($h2_dimms == 0) && ($he_dimms == 0) && ($si_dimms > 0)) {
+ printf "TYP1 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_si_with_si();
+ } elsif (($h2_dimms == 0) && ($he_dimms > 0) && ($si_dimms > 0)) {
+ printf "TYP2 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_si_with_he();
+ } elsif (($h2_dimms == 0) && ($he_dimms > 0) && ($si_dimms == 0)) {
+ printf "TYP3 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_he_with_he();
+ } elsif (($h2_dimms > 0) && ($he_dimms == 0) && ($si_dimms == 0)) {
+ printf "TYP4 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_h2_with_h2();
+ } elsif (($h2_dimms > 0) && ($he_dimms > 0) && ($si_dimms == 0)) {
+ printf "TYP5 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_he_with_h2();
+ } elsif (($h2_dimms > 0) && ($he_dimms == 0) && ($si_dimms > 0)) {
+ printf "TYP6 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_si_with_h2();
+ } elsif (($h2_dimms > 0) && ($he_dimms > 0) && ($si_dimms > 0)) {
+ if ($h2_dimms > $si_dimms) {
+ printf "TYP7 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_he_with_h2();
+ } else {
+ printf "TYP8 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_si_with_he();
+ }
+ } else {
+ printf "TYPX %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ my $all_dimms = scalar(@{$self->{dimms}});
+ $self->trace(2, sprintf "ALL: %02d", $all_dimms);
+}
+
+sub dump {
+ my $self = shift;
+ if ($self->{runtime}->{options}->{verbose} > 2) {
+ printf "[SI]\n";
+ foreach (@{$self->{si_dimms}}) {
+ $_->dump();
+ }
+ printf "[HE]\n";
+ foreach (@{$self->{he_dimms}}) {
+ $_->dump();
+ }
+ printf "[H2]\n";
+ foreach (@{$self->{h2_dimms}}) {
+ $_->dump();
+ }
+ }
+ $self->SUPER::dump();
+}
+
+sub update_si_with_si {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my @dimms = ();
+ my $repaircondition = undef;
+ # wenn si keine statusinformationen liefert, dann besteht die chance
+ # dass ein undokumentiertes he-fragment vorliegt
+ # 1.3.6.1.4.1.232.6.2.14.11.1.1.0.<anzahl der dimms>
+ my $cpqHeResMemModuleEntry = "1.3.6.1.4.1.232.6.2.14.11.1";
+ if (SNMP::Utils::get_size($snmpwalk, $cpqHeResMemModuleEntry) == 1) {
+ $repaircondition = lc SNMP::Utils::get_object(
+ $snmpwalk, $cpqHeResMemModuleEntry.'.1.0.'.scalar(@{$self->{si_dimms}}));
+ # repaircondition 0 (ok) biegt alles wieder gerade
+ } else {
+ # anderer versuch
+ if ($self->{si_overall_condition} &&
+ $self->{si_overall_condition} eq 'ok') {
+ $repaircondition = 0;
+ }
+ }
+ foreach my $si_dimm (@{$self->{si_dimms}}) {
+ if (($si_dimm->{condition} eq 'n/a') ||
+ ($si_dimm->{condition} eq 'other')) {
+ $si_dimm->{condition} = 'ok' if
+ (defined $repaircondition && $repaircondition == 0);
+ }
+ push(@dimms,
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(
+ runtime => $si_dimm->{runtime},
+ cartridge => $si_dimm->{cartridge},
+ module => $si_dimm->{module},
+ size => $si_dimm->{size},
+ status => $si_dimm->{status},
+ condition => $si_dimm->{condition},
+ ));
+ }
+ return @dimms;
+}
+
+sub update_si_with_he {
+ my $self = shift;
+ my @dimms = ();
+ my $first_si_cartridge = ($self->get_si_boards())[0];
+ my $first_he_cartridge = ($self->get_he_boards())[0];
+ my $offset = 0;
+ if (scalar(@{$self->{si_dimms}}) == scalar(@{$self->{he_dimms}})) {
+ # aufpassen! sowas kann vorkommen: si cartridge 0...6, he cartridge 1...7
+ if ($first_si_cartridge != $first_he_cartridge) {
+ # README case 5
+ $offset = $first_si_cartridge - $first_he_cartridge;
+ }
+ } elsif ((scalar(@{$self->{si_dimms}}) > 1) &&
+ (scalar(@{$self->{he_dimms}}) == 1)) {
+ # siehe update_si_with_si. he-fragment
+ return $self->update_si_with_si();
+ } else {
+ # z.b. 4 si notpresent, 4 si present, 4 he
+ }
+ foreach my $si_dimm (@{$self->{si_dimms}}) {
+ if (($si_dimm->{condition} eq 'n/a') ||
+ ($si_dimm->{condition} eq 'other')) {
+ if (my $he_dimm = $self->get_he_module(
+ $si_dimm->{cartridge} - $offset, $si_dimm->{module})) {
+ # vielleicht hat he mehr ahnung
+ $si_dimm->{condition} = $he_dimm->{condition};
+ if (($si_dimm->{condition} eq 'n/a') ||
+ ($si_dimm->{condition} eq 'other')) {
+ # wenns immer noch kein brauchbares ergebnis gibt....
+ if ($self->{he_overall_condition} &&
+ $self->{he_overall_condition} eq 'ok') {
+ # wird schon stimmen...
+ $si_dimm->{condition} = 'ok';
+ } else {
+ # ansonsten stellen wir uns dumm
+ $si_dimm->{status} = 'notPresent';
+ }
+ }
+ } else {
+ # in dem fall zeigt si unbestueckte cartridges an
+ }
+ }
+ push(@dimms,
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(
+ runtime => $si_dimm->{runtime},
+ cartridge => $si_dimm->{cartridge},
+ module => $si_dimm->{module},
+ size => $si_dimm->{size},
+ status => $si_dimm->{status},
+ condition => $si_dimm->{condition},
+ ));
+ }
+ return @dimms;
+}
+
+sub update_he_with_he {
+ my $self = shift;
+ my @dimms = ();
+ foreach my $he_dimm (@{$self->{he_dimms}}) {
+ push(@dimms,
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(
+ runtime => $he_dimm->{runtime},
+ cartridge => $he_dimm->{cartridge},
+ module => $he_dimm->{module},
+ size => $he_dimm->{size},
+ status => $he_dimm->{status},
+ condition => $he_dimm->{condition},
+ ));
+ }
+ return @dimms;
+}
+
+sub update_si_with_h2 {
+ my $self = shift;
+ my @dimms = ();
+ my $first_si_cartridge = ($self->get_si_boards())[0];
+ my $first_h2_cartridge = ($self->get_h2_boards())[0];
+ my $offset = 0;
+ if (scalar(@{$self->{si_dimms}}) == scalar(@{$self->{h2_dimms}})) {
+ # aufpassen! sowas kann vorkommen: si cartridge 0...6, he cartridge 1...7
+ if ($first_si_cartridge != $first_h2_cartridge) {
+ # README case 5
+ $offset = $first_si_cartridge - $first_h2_cartridge;
+ }
+ } else {
+ # z.b. 4 si notpresent, 4 si present, 4 he
+ }
+ foreach my $si_dimm (@{$self->{si_dimms}}) {
+ if (($si_dimm->{condition} eq 'n/a') ||
+ ($si_dimm->{condition} eq 'other')) {
+ if (my $h2_dimm = $self->get_h2_module(
+ $si_dimm->{cartridge} - $offset, $si_dimm->{module})) {
+ # vielleicht hat h2 mehr ahnung
+ $si_dimm->{condition} = $h2_dimm->{condition};
+ if (1) {
+ # ist zwar da, aber irgendwie auskonfiguriert
+ $si_dimm->{status} = 'notPresent' if $h2_dimm->{status} eq 'other';
+ }
+ } else {
+ # in dem fall zeigt si unbestueckte cartridges an
+ }
+ }
+ push(@dimms,
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(
+ runtime => $si_dimm->{runtime},
+ cartridge => $si_dimm->{cartridge},
+ module => $si_dimm->{module},
+ size => $si_dimm->{size},
+ status => $si_dimm->{status},
+ condition => $si_dimm->{condition},
+ ));
+ }
+ return @dimms;
+}
+
+sub update_he_with_h2 {
+ my $self = shift;
+ my @dimms = ();
+ my $first_he_cartridge = ($self->get_he_boards())[0];
+ my $first_h2_cartridge = ($self->get_h2_boards())[0];
+ my $offset = 0;
+ # auch hier koennte sowas u.u.vorkommen: he cartridge 0..6, h2 cartridge 1..7
+ # ich habs zwar nie gesehen, aber wer weiss...
+ if ($first_h2_cartridge != $first_he_cartridge) {
+ $offset = $first_h2_cartridge - $first_he_cartridge;
+ }
+ foreach my $he_dimm (@{$self->{he_dimms}}) {
+ if (($he_dimm->{condition} eq 'n/a') ||
+ ($he_dimm->{condition} eq 'other')) {
+ if (my $h2_dimm = $self->get_h2_module(
+ $he_dimm->{cartridge} + $offset, $he_dimm->{module})) {
+ # vielleicht hat h2 mehr ahnung
+ $he_dimm->{condition} = $h2_dimm->{condition};
+ if (1) {
+ # ist zwar da, aber irgendwie auskonfiguriert
+ $he_dimm->{status} = 'notPresent' if $h2_dimm->{status} eq 'other';
+ }
+ } else {
+ # in dem fall weiss he mehr als h2
+ }
+ }
+ if ($he_dimm->{size} == 0) {
+ if (my $h2_dimm = $self->get_h2_module(
+ $he_dimm->{cartridge} + $offset, $he_dimm->{module})) {
+ $he_dimm->{size} = $h2_dimm->{size};
+ # h2 beinhaltet eine size-oid
+ }
+ }
+ push(@dimms,
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(
+ runtime => $he_dimm->{runtime},
+ cartridge => $he_dimm->{cartridge},
+ module => $he_dimm->{module},
+ size => $he_dimm->{size},
+ status => $he_dimm->{status},
+ condition => $he_dimm->{condition},
+ ));
+ }
+ return @dimms;
+}
+
+sub update_h2_with_h2 {
+ my $self = shift;
+ my @dimms = ();
+ foreach my $h2_dimm (@{$self->{h2_dimms}}) {
+ push(@dimms,
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(
+ runtime => $h2_dimm->{runtime},
+ cartridge => $h2_dimm->{cartridge},
+ module => $h2_dimm->{module},
+ size => $h2_dimm->{size},
+ status => $h2_dimm->{status},
+ condition => $h2_dimm->{condition},
+ ));
+ }
+ return @dimms;
+}
+
+sub is_faulty {
+ my $self = shift;
+ if (scalar(@{$self->{si_dimms}}) > 0 &&
+ scalar(@{$self->{he_dimms}}) > 0) {
+ return $self->si_is_faulty() || $self->he_is_faulty();
+ } elsif (scalar(@{$self->{si_dimms}}) > 0 &&
+ scalar(@{$self->{he_dimms}}) == 0) {
+ return $self->si_is_faulty();
+ } elsif (scalar(@{$self->{si_dimms}}) == 0 &&
+ scalar(@{$self->{he_dimms}}) > 0) {
+ return $self->he_is_faulty();
+ } else {
+ return 0;
+ }
+}
+
+sub si_is_faulty {
+ my $self = shift;
+ return ! defined $self->{si_overall_condition} ? 0 :
+ $self->{si_overall_condition} eq 'degraded' ? 1 : 0;
+}
+
+sub si_is_ok {
+ my $self = shift;
+ return ! defined $self->{si_overall_condition} ? 1 :
+ $self->{si_overall_condition} eq 'ok' ? 1 : 0;
+}
+
+sub he_is_faulty {
+ my $self = shift;
+ return ! defined $self->{he_overall_condition} ? 0 :
+ $self->{he_overall_condition} eq 'degraded' ? 1 : 0;
+}
+
+sub he_is_ok {
+ my $self = shift;
+ return ! defined $self->{he_overall_condition} ? 1 :
+ $self->{he_overall_condition} eq 'ok' ? 1 : 0;
+}
+
+sub get_si_boards {
+ my $self = shift;
+ my %found = ();
+ foreach (@{$self->{si_dimms}}) {
+ $found{$_->{cartridge}} = 1;
+ }
+ return sort { $a <=> $b } keys %found;
+}
+
+sub get_si_modules {
+ my $self = shift;
+ my $board = shift;
+ my %found = ();
+ foreach (grep { $_->{cartridge} == $board } @{$self->{si_dimms}}) {
+ $found{$_->{module}} = 1;
+ }
+ return sort { $a <=> $b } keys %found;
+}
+
+sub get_he_boards {
+ my $self = shift;
+ my %found = ();
+ foreach (@{$self->{he_dimms}}) {
+ $found{$_->{cartridge}} = 1;
+ }
+ return sort { $a <=> $b } keys %found;
+}
+
+sub get_he_modules {
+ my $self = shift;
+ my $board = shift;
+ my %found = ();
+ foreach (grep { $_->{cartridge} == $board } @{$self->{he_dimms}}) {
+ $found{$_->{module}} = 1;
+ }
+ return sort { $a <=> $b } keys %found;
+}
+
+sub get_he_module {
+ my $self = shift;
+ my $board = shift;
+ my $module = shift;
+ my $found = (grep { $_->{cartridge} == $board && $_->{module} == $module }
+ @{$self->{he_dimms}})[0];
+ return $found;
+}
+
+sub get_h2_boards {
+ my $self = shift;
+ my %found = ();
+ #
+ foreach (@{$self->{h2_dimms}}) {
+ $found{$_->{cartridge}} = 1;
+ }
+ return sort { $a <=> $b } keys %found;
+}
+
+sub get_h2_modules {
+ my $self = shift;
+ my $board = shift;
+ my %found = ();
+ foreach (grep { $_->{cartridge} == $board } @{$self->{h2_dimms}}) {
+ $found{$_->{module}} = 1;
+ }
+ return sort { $a <=> $b } keys %found;
+}
+
+sub get_h2_module {
+ my $self = shift;
+ my $board = shift;
+ my $module = shift;
+ my $found = (grep { $_->{cartridge} == $board && $_->{module} == $module }
+ @{$self->{h2_dimms}})[0];
+ return $found;
+}
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem.pm
new file mode 100755
index 0000000..02e5703
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem.pm
@@ -0,0 +1,202 @@
+package HP::Proliant::Component::NicSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ logical_nics => [],
+ physical_nics => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::NicSubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::NicSubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking nic teams');
+ if (scalar (@{$self->{logical_nics}}) == 0) {
+ $self->add_info('no logical nics found');
+ $self->overall_check();
+ } else {
+ foreach (@{$self->{logical_nics}}) {
+ $_->check();
+ }
+ }
+ if (scalar (@{$self->{physical_nics}}) == 0) {
+ $self->add_info('no physical nics found. do you connect with slip?');
+ } else {
+ foreach (@{$self->{physical_nics}}) {
+ $_->check();
+ }
+ }
+}
+
+sub num_logical_nics {
+ my $self = shift;
+ return scalar @{$self->{logical_nics}};
+}
+
+sub num_physical_nics {
+ my $self = shift;
+ return scalar @{$self->{physical_nics}};
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{logical_nics}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{physical_nics}}) {
+ $_->dump();
+ }
+}
+
+sub overall_check {
+ my $self = shift;
+ if ($self->{lognicstatus} ne "ok") {
+ $self->add_info(sprintf 'overall logical nic status is %s',
+ $self->{lognicstatus});
+ }
+}
+
+
+package HP::Proliant::Component::NicSubsystem::LogicalNic;
+our @ISA = qw(HP::Proliant::Component::NicSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ foreach (qw(cpqNicIfLogMapIndex cpqNicIfLogMapIfNumber cpqNicIfLogMapDescription cpqNicIfLogMapGroupType cpqNicIfLogMapAdapterCount cpqNicIfLogMapAdapterOKCount cpqNicIfLogMapPhysicalAdapters cpqNicIfLogMapSwitchoverMode cpqNicIfLogMapCondition cpqNicIfLogMapStatus cpqNicIfLogMapNumSwitchovers cpqNicIfLogMapHwLocation cpqNicIfLogMapSpeed cpqNicIfLogMapVlanCount cpqNicIfLogMapVlans)) {
+ $self->{$_} = $params{$_};
+ }
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('lni', $self->{cpqNicIfLogMapIndex});
+ if ($self->{cpqNicIfLogMapAdapterCount} > 0) {
+ if ($self->{cpqNicIfLogMapCondition} eq "other") {
+ # simply ignore this. if there is a physical nic
+ # it is usually unknown/other/scheissegal
+ $self->add_info(sprintf "logical nic %d (%s) is %s",
+ $self->{cpqNicIfLogMapIndex}, $self->{cpqNicIfLogMapDescription},
+ $self->{cpqNicIfLogMapCondition});
+ } elsif ($self->{cpqNicIfLogMapCondition} ne "ok") {
+ $self->add_info(sprintf "logical nic %d (%s) is %s (%s)",
+ $self->{cpqNicIfLogMapIndex}, $self->{cpqNicIfLogMapDescription},
+ $self->{cpqNicIfLogMapCondition}, $self->{cpqNicIfLogMapStatus});
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ $self->add_info(sprintf "logical nic %d (%s) is %s",
+ $self->{cpqNicIfLogMapIndex}, $self->{cpqNicIfLogMapDescription},
+ $self->{cpqNicIfLogMapCondition});
+ }
+ } else {
+ $self->add_info(sprintf "logical nic %d (%s) has 0 physical nics",
+ $self->{cpqNicIfLogMapIndex}, $self->{cpqNicIfLogMapDescription});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[LNIC_%s]\n", $self->{cpqNicIfLogMapIndex};
+ foreach (qw(cpqNicIfLogMapIndex cpqNicIfLogMapIfNumber cpqNicIfLogMapDescription cpqNicIfLogMapAdapterCount cpqNicIfLogMapGroupType cpqNicIfLogMapSwitchoverMode cpqNicIfLogMapCondition cpqNicIfLogMapStatus cpqNicIfLogMapNumSwitchovers cpqNicIfLogMapHwLocation cpqNicIfLogMapSpeed)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::NicSubsystem::PhysicalNic;
+our @ISA = qw(HP::Proliant::Component::NicSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ foreach (qw(cpqNicIfPhysAdapterIndex cpqNicIfPhysAdapterIfNumber cpqNicIfPhysAdapterRole cpqNicIfPhysAdapterDuplexState cpqNicIfPhysAdapterCondition cpqNicIfPhysAdapterState cpqNicIfPhysAdapterStatus cpqNicIfPhysAdapterBadTransmits cpqNicIfPhysAdapterBadReceives)) {
+ $self->{$_} = $params{$_};
+ }
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('pni', $self->{cpqNicIfPhysAdapterIndex});
+ if ($self->{cpqNicIfPhysAdapterCondition} eq "other") {
+ # hp doesnt output a clear status. i am optimistic, unknown/other
+ # means "dont care"
+ $self->add_info(sprintf "physical nic %d (%s) is %s",
+ $self->{cpqNicIfPhysAdapterIndex}, $self->{cpqNicIfPhysAdapterRole},
+ $self->{cpqNicIfPhysAdapterCondition});
+ } elsif ($self->{cpqNicIfPhysAdapterCondition} ne "ok") {
+ $self->add_info(sprintf "physical nic %d (%s) is %s (%s,%s)",
+ $self->{cpqNicIfPhysAdapterIndex}, $self->{cpqNicIfPhysAdapterRole},
+ $self->{cpqNicIfPhysAdapterCondition},
+ $self->{cpqNicIfPhysAdapterState}, $self->{cpqNicIfPhysAdapterStatus});
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ if ($self->{cpqNicIfPhysAdapterDuplexState} ne "full") {
+ $self->add_info(sprintf "physical nic %d (%s) is %s duplex",
+ $self->{cpqNicIfPhysAdapterIndex}, $self->{cpqNicIfPhysAdapterRole},
+ $self->{cpqNicIfPhysAdapterDuplexState});
+ } else {
+ $self->add_info(sprintf "physical nic %d (%s) is %s",
+ $self->{cpqNicIfPhysAdapterIndex}, $self->{cpqNicIfPhysAdapterRole},
+ $self->{cpqNicIfPhysAdapterCondition});
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[PNIC_%s]\n", $self->{cpqNicIfPhysAdapterIndex};
+ foreach (qw(cpqNicIfPhysAdapterIndex cpqNicIfPhysAdapterIfNumber cpqNicIfPhysAdapterRole cpqNicIfPhysAdapterDuplexState cpqNicIfPhysAdapterCondition cpqNicIfPhysAdapterState cpqNicIfPhysAdapterStatus cpqNicIfPhysAdapterBadTransmits cpqNicIfPhysAdapterBadReceives)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem/SNMP.pm
new file mode 100755
index 0000000..85f1fd4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem/SNMP.pm
@@ -0,0 +1,189 @@
+package HP::Proliant::Component::NicSubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::NicSubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ logical_nics => [],
+ physical_nics => [],
+ };
+ bless $self, $class;
+ $self->overall_init(%params);
+ $self->init();
+ return $self;
+}
+
+sub overall_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ # overall
+ my $cpqNicIfLogMapOverallCondition = '1.3.6.1.4.1.232.18.2.2.2.0';
+ my $cpqNicIfLogMapOverallConditionValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ };
+ $self->{lognicstatus} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqNicIfLogMapOverallCondition,
+ $cpqNicIfLogMapOverallConditionValue);
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my $ifconnect = {};
+ # CPQNIC-MIB
+ my $oids = {
+ cpqNicIfLogMapEntry => '1.3.6.1.4.1.232.18.2.2.1.1',
+ cpqNicIfLogMapIndex => '1.3.6.1.4.1.232.18.2.2.1.1.1',
+ cpqNicIfLogMapIfNumber => '1.3.6.1.4.1.232.18.2.2.1.1.2',
+ cpqNicIfLogMapDescription => '1.3.6.1.4.1.232.18.2.2.1.1.3',
+ cpqNicIfLogMapGroupType => '1.3.6.1.4.1.232.18.2.2.1.1.4',
+ cpqNicIfLogMapAdapterCount => '1.3.6.1.4.1.232.18.2.2.1.1.5',
+ cpqNicIfLogMapAdapterOKCount => '1.3.6.1.4.1.232.18.2.2.1.1.6',
+ cpqNicIfLogMapPhysicalAdapters => '1.3.6.1.4.1.232.18.2.2.1.1.7',
+ cpqNicIfLogMapMACAddress => '1.3.6.1.4.1.232.18.2.2.1.1.8',
+ cpqNicIfLogMapSwitchoverMode => '1.3.6.1.4.1.232.18.2.2.1.1.9',
+ cpqNicIfLogMapCondition => '1.3.6.1.4.1.232.18.2.2.1.1.10',
+ cpqNicIfLogMapStatus => '1.3.6.1.4.1.232.18.2.2.1.1.11',
+ cpqNicIfLogMapNumSwitchovers => '1.3.6.1.4.1.232.18.2.2.1.1.12',
+ cpqNicIfLogMapHwLocation => '1.3.6.1.4.1.232.18.2.2.1.1.13',
+ cpqNicIfLogMapSpeed => '1.3.6.1.4.1.232.18.2.2.1.1.14',
+ cpqNicIfLogMapVlanCount => '1.3.6.1.4.1.232.18.2.2.1.1.15',
+ cpqNicIfLogMapVlans => '1.3.6.1.4.1.232.18.2.2.1.1.16',
+
+ cpqNicIfLogMapGroupTypeValue => {
+ 1 => "unknown",
+ 2 => "none",
+ 3 => "redundantPair",
+ 4 => "nft",
+ 5 => "alb",
+ 6 => "fec",
+ 7 => "gec",
+ 8 => "ad",
+ 9 => "slb",
+ 10 => "tlb",
+ 11 => "redundancySet",
+ },
+ cpqNicIfLogMapConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqNicIfLogMapStatusValue => {
+ 1 => "unknown",
+ 2 => "ok",
+ 3 => "primaryFailed",
+ 4 => "standbyFailed",
+ 5 => "groupFailed",
+ 6 => "redundancyReduced",
+ 7 => "redundancyLost",
+ },
+ cpqNicIfLogMapSwitchoverModeValue => {
+ 1 => "unknown",
+ 2 => "none",
+ 3 => "manual",
+ 4 => "switchOnFail",
+ 5 => "preferredPrimary",
+ },
+ };
+
+ # INDEX { cpqNicIfLogMapIndex }
+ foreach ($self->get_entries($oids, 'cpqNicIfLogMapEntry')) {
+ push(@{$self->{logical_nics}},
+ HP::Proliant::Component::NicSubsystem::LogicalNic->new(%{$_})
+ );
+ }
+
+ $oids = {
+ cpqNicIfPhysAdapterEntry => '1.3.6.1.4.1.232.18.2.3.1.1',
+ cpqNicIfPhysAdapterIndex => '1.3.6.1.4.1.232.18.2.3.1.1.1',
+ cpqNicIfPhysAdapterIfNumber => '1.3.6.1.4.1.232.18.2.3.1.1.2',
+ cpqNicIfPhysAdapterRole => '1.3.6.1.4.1.232.18.2.3.1.1.3',
+ cpqNicIfPhysAdapterMACAddress => '1.3.6.1.4.1.232.18.2.3.1.1.4',
+ cpqNicIfPhysAdapterSlot => '1.3.6.1.4.1.232.18.2.3.1.1.5',
+ cpqNicIfPhysAdapterIoAddr => '1.3.6.1.4.1.232.18.2.3.1.1.6',
+ cpqNicIfPhysAdapterIrq => '1.3.6.1.4.1.232.18.2.3.1.1.7',
+ cpqNicIfPhysAdapterDma => '1.3.6.1.4.1.232.18.2.3.1.1.8',
+ cpqNicIfPhysAdapterMemAddr => '1.3.6.1.4.1.232.18.2.3.1.1.9',
+ cpqNicIfPhysAdapterPort => '1.3.6.1.4.1.232.18.2.3.1.1.10',
+ cpqNicIfPhysAdapterDuplexState => '1.3.6.1.4.1.232.18.2.3.1.1.11',
+ cpqNicIfPhysAdapterCondition => '1.3.6.1.4.1.232.18.2.3.1.1.12',
+ cpqNicIfPhysAdapterState => '1.3.6.1.4.1.232.18.2.3.1.1.13',
+ cpqNicIfPhysAdapterStatus => '1.3.6.1.4.1.232.18.2.3.1.1.14',
+ cpqNicIfPhysAdapterStatsValid => '1.3.6.1.4.1.232.18.2.3.1.1.15',
+ cpqNicIfPhysAdapterGoodTransmits => '1.3.6.1.4.1.232.18.2.3.1.1.16',
+ cpqNicIfPhysAdapterGoodReceives => '1.3.6.1.4.1.232.18.2.3.1.1.17',
+ cpqNicIfPhysAdapterBadTransmits => '1.3.6.1.4.1.232.18.2.3.1.1.18',
+ cpqNicIfPhysAdapterBadReceives => '1.3.6.1.4.1.232.18.2.3.1.1.19',
+ cpqNicIfPhysAdapterAlignmentErrors => '1.3.6.1.4.1.232.18.2.3.1.1.20',
+ cpqNicIfPhysAdapterFCSErrors => '1.3.6.1.4.1.232.18.2.3.1.1.21',
+ cpqNicIfPhysAdapterSingleCollisionFrames => '1.3.6.1.4.1.232.18.2.3.1.1.22',
+ cpqNicIfPhysAdapterMultipleCollisionFrames => '1.3.6.1.4.1.232.18.2.3.1.1.23',
+ cpqNicIfPhysAdapterDeferredTransmissions => '1.3.6.1.4.1.232.18.2.3.1.1.24',
+ cpqNicIfPhysAdapterLateCollisions => '1.3.6.1.4.1.232.18.2.3.1.1.25',
+ cpqNicIfPhysAdapterExcessiveCollisions => '1.3.6.1.4.1.232.18.2.3.1.1.26',
+ cpqNicIfPhysAdapterInternalMacTransmitErrors => '1.3.6.1.4.1.232.18.2.3.1.1.27',
+ cpqNicIfPhysAdapterCarrierSenseErrors => '1.3.6.1.4.1.232.18.2.3.1.1.28',
+ cpqNicIfPhysAdapterFrameTooLongs => '1.3.6.1.4.1.232.18.2.3.1.1.29',
+ cpqNicIfPhysAdapterInternalMacReceiveErrors => '1.3.6.1.4.1.232.18.2.3.1.1.30',
+ cpqNicIfPhysAdapterHwLocation => '1.3.6.1.4.1.232.18.2.3.1.1.31',
+ cpqNicIfPhysAdapterPartNumber => '1.3.6.1.4.1.232.18.2.3.1.1.32',
+ cpqNicIfPhysAdapterRoleValue => {
+ 1 => "unknown",
+ 2 => "primary",
+ 3 => "secondary",
+ 4 => "member",
+ 5 => "txRx",
+ 6 => "tx",
+ 7 => "standby",
+ 8 => "none",
+ 255 => "notApplicable",
+ },
+ cpqNicIfPhysAdapterDuplexStateValue => {
+ 1 => "unknown",
+ 2 => "half",
+ 3 => "full",
+ },
+ cpqNicIfPhysAdapterConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqNicIfPhysAdapterStateValue => {
+ 1 => "unknown",
+ 2 => "ok",
+ 3 => "standby",
+ 4 => "failed",
+ },
+ cpqNicIfPhysAdapterStatusValue => {
+ 1 => "unknown",
+ 2 => "ok",
+ 3 => "generalFailure",
+ 4 => "linkFailure",
+ },
+
+ };
+ # INDEX { cpqNicIfPhysAdapterIndex }
+ foreach ($self->get_entries($oids, 'cpqNicIfPhysAdapterEntry')) {
+ push(@{$self->{physical_nics}},
+ HP::Proliant::Component::NicSubsystem::PhysicalNic->new(%{$_}));
+ }
+
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem.pm
new file mode 100755
index 0000000..6abba29
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem.pm
@@ -0,0 +1,214 @@
+package HP::Proliant::Component::PowersupplySubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ powersupplies => [],
+ powerconverters => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::PowersupplySubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::PowersupplySubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking power supplies');
+ if (scalar (@{$self->{powersupplies}}) == 0) {
+ #$self->overall_check();
+ } else {
+ foreach (@{$self->{powersupplies}}) {
+ $_->check();
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{powersupplies}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::PowersupplySubsystem::Powersupply;
+our @ISA = qw(HP::Proliant::Component::PowersupplySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqHeFltTolPowerSupplyChassis => $params{cpqHeFltTolPowerSupplyChassis},
+ cpqHeFltTolPowerSupplyBay => $params{cpqHeFltTolPowerSupplyBay},
+ cpqHeFltTolPowerSupplyPresent => $params{cpqHeFltTolPowerSupplyPresent},
+ cpqHeFltTolPowerSupplyCondition => $params{cpqHeFltTolPowerSupplyCondition},
+ cpqHeFltTolPowerSupplyRedundant => $params{cpqHeFltTolPowerSupplyRedundant},
+ cpqHeFltTolPowerSupplyCapacityUsed => $params{cpqHeFltTolPowerSupplyCapacityUsed} || 0,
+ cpqHeFltTolPowerSupplyCapacityMaximum => $params{cpqHeFltTolPowerSupplyCapacityMaximum} || 0,
+ blacklisted => 0,
+ info => undef,
+ extendexinfo => undef,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('p', $self->{cpqHeFltTolPowerSupplyBay});
+ if ($self->{cpqHeFltTolPowerSupplyPresent} eq "present") {
+ if ($self->{cpqHeFltTolPowerSupplyCondition} ne "ok") {
+ if ($self->{cpqHeFltTolPowerSupplyCondition} eq "other") {
+ $self->add_info(sprintf "powersupply %d is missing",
+ $self->{cpqHeFltTolPowerSupplyBay});
+ } else {
+ $self->add_info(sprintf "powersupply %d needs attention (%s)",
+ $self->{cpqHeFltTolPowerSupplyBay},
+ $self->{cpqHeFltTolPowerSupplyCondition});
+ }
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ $self->add_info(sprintf "powersupply %d is %s",
+ $self->{cpqHeFltTolPowerSupplyBay},
+ $self->{cpqHeFltTolPowerSupplyCondition});
+ }
+ $self->add_extendedinfo(sprintf "ps_%s=%s",
+ $self->{cpqHeFltTolPowerSupplyBay},
+ $self->{cpqHeFltTolPowerSupplyCondition});
+ if ($self->{cpqHeFltTolPowerSupplyCapacityUsed} &&
+ $self->{cpqHeFltTolPowerSupplyCapacityMaximum}) {
+ if ($self->{runtime}->{options}->{perfdata}) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf("pc_%s", $self->{cpqHeFltTolPowerSupplyBay}),
+ value => $self->{cpqHeFltTolPowerSupplyCapacityUsed},
+ warning => $self->{cpqHeFltTolPowerSupplyCapacityMaximum},
+ critical => $self->{cpqHeFltTolPowerSupplyCapacityMaximum}
+ );
+ }
+ } elsif ($self->{cpqHeFltTolPowerSupplyCapacityUsed}) {
+ if ($self->{runtime}->{options}->{perfdata}) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf("pc_%s", $self->{cpqHeFltTolPowerSupplyBay}),
+ value => $self->{cpqHeFltTolPowerSupplyCapacityUsed}
+ );
+ }
+ }
+ } else {
+ $self->add_info(sprintf "powersupply %d is %s",
+ $self->{cpqHeFltTolPowerSupplyBay},
+ $self->{cpqHeFltTolPowerSupplyPresent});
+ $self->add_extendedinfo(sprintf "ps_%s=%s",
+ $self->{cpqHeFltTolPowerSupplyBay},
+ $self->{cpqHeFltTolPowerSupplyPresent});
+ }
+}
+
+
+sub dump {
+ my $self = shift;
+ printf "[PS_%s]\n", $self->{cpqHeFltTolPowerSupplyBay};
+ foreach (qw(cpqHeFltTolPowerSupplyBay cpqHeFltTolPowerSupplyChassis
+ cpqHeFltTolPowerSupplyPresent cpqHeFltTolPowerSupplyCondition
+ cpqHeFltTolPowerSupplyRedundant cpqHeFltTolPowerSupplyCapacityUsed
+ cpqHeFltTolPowerSupplyCapacityMaximum)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n\n", $self->{info};
+}
+
+
+package HP::Proliant::Component::PowersupplySubsystem::Powerconverter;
+our @ISA = qw(HP::Proliant::Component::PowersupplySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+
+ cpqHePowerConvEntry => $params{cpqHePowerConvEntry},
+ cpqHePowerConvChassis => $params{cpqHePowerConvChassis},
+ cpqHePowerConvIndex => $params{cpqHePowerConvIndex},
+ cpqHePowerConvPresent => $params{cpqHePowerConvPresent},
+ cpqHePowerConvRedundant => $params{cpqHePowerConvRedundant},
+ cpqHePowerConvCondition => $params{cpqHePowerConvCondition},
+ cpqHePowerConvHwLocation => $params{cpqHePowerConvHwLocation},
+ blacklisted => 0,
+ info => undef,
+ extendexinfo => undef,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('pc', $self->{cpqHePowerConvIndex});
+ if ($self->{cpqHePowerConvPresent} eq "present") {
+ if ($self->{cpqHePowerConvCondition} ne "ok") {
+ if ($self->{cpqHePowerConvCondition} eq "other") {
+ $self->add_info(sprintf "powerconverter %d is missing",
+ $self->{cpqHePowerConvIndex});
+ } else {
+ $self->add_info(sprintf "powerconverter %d needs attention (%s)",
+ $self->{cpqHePowerConvIndex},
+ $self->{cpqHePowerConvCondition});
+ }
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ $self->add_info(sprintf "powerconverter %d is %s",
+ $self->{cpqHePowerConvIndex},
+ $self->{cpqHePowerConvCondition});
+ }
+ $self->add_extendedinfo(sprintf "pc_%s=%s",
+ $self->{cpqHePowerConvIndex},
+ $self->{cpqHePowerConvCondition});
+ } else {
+ $self->add_info(sprintf "powerconverter %d is %s",
+ $self->{cpqHePowerConvIndex},
+ $self->{cpqHePowerConvPresent});
+ $self->add_extendedinfo(sprintf "pc_%s=%s",
+ $self->{cpqHePowerConvIndex},
+ $self->{cpqHePowerConvPresent});
+ }
+}
+
+
+sub dump {
+ my $self = shift;
+ printf "[PS_%s]\n", ($self->{cpqHePowerConvChassis} ? $self->{cpqHePowerConvChassis}.":" : "").$self->{cpqHePowerConvIndex};
+ foreach (qw(cpqHePowerConvIndex cpqHePowerConvPresent cpqHePowerConvRedundant cpqHePowerConvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n\n", $self->{info};
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/CLI.pm
new file mode 100755
index 0000000..c218975
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/CLI.pm
@@ -0,0 +1,81 @@
+package HP::Proliant::Component::PowersupplySubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::PowersupplySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ powersupplies => [],
+ powerconverters => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my %tmpps = (
+ runtime => $self->{runtime},
+ cpqHeFltTolPowerSupplyChassis => 1,
+ );
+ my $inblock = 0;
+ foreach (grep(/^powersupply/, split(/\n/, $self->{rawdata}))) {
+ s/^powersupply\s*//g;
+ if (/^Power supply #(\d+)/) {
+ if ($inblock) {
+ $inblock = 0;
+ push(@{$self->{powersupplies}},
+ HP::Proliant::Component::PowersupplySubsystem::Powersupply->new(%tmpps));
+ %tmpps = (
+ runtime => $self->{runtime},
+ cpqHeFltTolPowerSupplyChassis => 1,
+ );
+ }
+ $tmpps{cpqHeFltTolPowerSupplyBay} = $1;
+ $inblock = 1;
+ } elsif (/\s*Present\s+:\s+(\w+)/) {
+ $tmpps{cpqHeFltTolPowerSupplyPresent} = lc $1 eq 'yes' ? 'present' :
+ lc $1 eq 'no' ? 'absent': 'other';
+ } elsif (/\s*Redundant\s*:\s+(\w+)/) {
+ $tmpps{cpqHeFltTolPowerSupplyRedundant} = lc $1 eq 'yes' ? 'redundant' :
+ lc $1 eq 'no' ? 'notRedundant' : 'other';
+ } elsif (/\s*Condition\s*:\s+(\w+)/) {
+ $tmpps{cpqHeFltTolPowerSupplyCondition} = lc $1;
+ } elsif (/\s*Power\s*:\s+(\d+)/) {
+ $tmpps{cpqHeFltTolPowerSupplyCapacityUsed} = $1;
+ } elsif (/\s*Power Supply not present/) {
+ $tmpps{cpqHeFltTolPowerSupplyPresent} = "absent";
+ $tmpps{cpqHeFltTolPowerSupplyCondition} = "other";
+ $tmpps{cpqHeFltTolPowerSupplyRedundant} = "notRedundant";
+ } elsif (/^\s*$/) {
+ if ($inblock) {
+ $inblock = 0;
+ push(@{$self->{powersupplies}},
+ HP::Proliant::Component::PowersupplySubsystem::Powersupply->new(%tmpps));
+ %tmpps = (
+ runtime => $self->{runtime},
+ cpqHeFltTolPowerSupplyChassis => 1,
+ );
+ }
+ }
+ }
+ if ($inblock) {
+ push(@{$self->{powersupplies}},
+ HP::Proliant::Component::PowersupplySubsystem::Powersupply->new(%tmpps));
+ %tmpps = (
+ runtime => $params{runtime},
+ );
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/SNMP.pm
new file mode 100755
index 0000000..3fa8599
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/SNMP.pm
@@ -0,0 +1,96 @@
+package HP::Proliant::Component::PowersupplySubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::PowersupplySubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ powersupplies => [],
+ powerconverters => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeFltTolPowerSupplyEntry => "1.3.6.1.4.1.232.6.2.9.3.1",
+ cpqHeFltTolPowerSupplyChassis => "1.3.6.1.4.1.232.6.2.9.3.1.1",
+ cpqHeFltTolPowerSupplyBay => "1.3.6.1.4.1.232.6.2.9.3.1.2",
+ cpqHeFltTolPowerSupplyPresent => "1.3.6.1.4.1.232.6.2.9.3.1.3",
+ cpqHeFltTolPowerSupplyCondition => "1.3.6.1.4.1.232.6.2.9.3.1.4",
+ cpqHeFltTolPowerSupplyRedundant => "1.3.6.1.4.1.232.6.2.9.3.1.9",
+ cpqHeFltTolPowerSupplyPresentValue => {
+ 1 => "other",
+ 2 => "absent",
+ 3 => "present",
+ },
+ cpqHeFltTolPowerSupplyConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqHeFltTolPowerSupplyCapacityUsed => '1.3.6.1.4.1.232.6.2.9.3.1.7',
+ cpqHeFltTolPowerSupplyCapacityMaximum => '1.3.6.1.4.1.232.6.2.9.3.1.8',
+ cpqHeFltTolPowerSupplyRedundantValue => {
+ 1 => "other",
+ 2 => "notRedundant",
+ 3 => "redundant",
+ },
+ };
+
+ # INDEX { cpqHeFltTolPowerSupplyChassis, cpqHeFltTolPowerSupplyBay }
+ foreach ($self->get_entries($oids, 'cpqHeFltTolPowerSupplyEntry')) {
+ push(@{$self->{powersupplies}},
+ HP::Proliant::Component::PowersupplySubsystem::Powersupply->new(%{$_}));
+ }
+
+ $oids = {
+ cpqHePowerConvEntry => "1.3.6.1.4.1.232.6.2.13.3.1",
+ cpqHePowerConvChassis => "1.3.6.1.4.1.232.6.2.13.3.1.1",
+ cpqHePowerConvIndex => "1.3.6.1.4.1.232.6.2.13.3.1.2",
+ cpqHePowerConvPresent => "1.3.6.1.4.1.232.6.2.13.3.1.3",
+ cpqHePowerConvRedundant => "1.3.6.1.4.1.232.6.2.13.3.1.6",
+ cpqHePowerConvCondition => "1.3.6.1.4.1.232.6.2.13.3.1.8",
+ cpqHePowerConvPresentValue => {
+ 1 => "other",
+ 2 => "absent",
+ 3 => "present",
+ },
+ cpqHePowerConvRedundantValue => {
+ 1 => "other",
+ 2 => "notRedundant",
+ 3 => "redundant",
+ },
+ cpqHePowerConvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqHePowerConvHwLocation => "1.3.6.1.4.1.232.6.2.13.3.1.9",
+ };
+
+ # INDEX { cpqHePowerConvChassis cpqHePowerConvIndex }
+ foreach ($self->get_entries($oids, 'cpqHePowerConvEntry')) {
+ push(@{$self->{powerconverters}},
+ HP::Proliant::Component::PowersupplySubsystem::Powerconverter->new(%{$_}));
+ }
+ # keine ahnung, was man damit machen kann
+
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/SNMP.pm
new file mode 100755
index 0000000..708f7f6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/SNMP.pm
@@ -0,0 +1,67 @@
+package HP::Proliant::Component::SNMP;
+
+sub get_entries {
+ my $self = shift;
+ my $oids = shift;
+ my $entry = shift;
+ my $snmpwalk = $self->{rawdata};
+ my @params = ();
+ my @indices = SNMP::Utils::get_indices($snmpwalk, $oids->{$entry});
+ foreach (@indices) {
+ my @idx = @{$_};
+ my %params = (
+ runtime => $self->{runtime},
+ );
+ my $maxdimension = scalar(@idx) - 1;
+ foreach my $idxnr (1..scalar(@idx)) {
+ $params{'index'.$idxnr} = $_->[$idxnr - 1];
+ }
+ foreach my $oid (keys %{$oids}) {
+ next if $oid =~ /Entry$/;
+ next if $oid =~ /Value$/;
+ if (exists $oids->{$oid.'Value'}) {
+ $params{$oid} = SNMP::Utils::get_object_value(
+ $snmpwalk, $oids->{$oid}, $oids->{$oid.'Value'}, @idx);
+ if (! defined $params{$oid}) {
+ my $numerical_value = SNMP::Utils::get_object(
+ $snmpwalk, $oids->{$oid}, @idx);
+ if (! defined $numerical_value) {
+ # maschine liefert schrott
+ $params{$oid} = 'value_unknown';
+ } else {
+ $params{$oid} = 'value_'.SNMP::Utils::get_object(
+ $snmpwalk, $oids->{$oid}, @idx);
+ }
+ }
+ } else {
+ $params{$oid} = SNMP::Utils::get_object(
+ $snmpwalk, $oids->{$oid}, @idx);
+ }
+ }
+ push(@params, \%params);
+ }
+ return @params;
+}
+
+sub mib {
+ my $self = shift;
+ my $mib = shift;
+ my $condition = {
+ 0 => 'other',
+ 1 => 'ok',
+ 2 => 'degraded',
+ 3 => 'failed',
+ };
+ my $MibRevMajor = $mib.'.1.0';
+ my $MibRevMinor = $mib.'.2.0';
+ my $MibRevCondition = $mib.'.3.0';
+ return (
+ $self->SNMP::Utils::get_object($self->{rawdata},
+ $MibRevMajor),
+ $self->SNMP::Utils::get_object($self->{rawdata},
+ $MibRevMinor),
+ $self->SNMP::Utils::get_object_value($self->{rawdata},
+ $MibRevCondition, $condition));
+};
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem.pm
new file mode 100755
index 0000000..7c82a11
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem.pm
@@ -0,0 +1,205 @@
+package HP::Proliant::Component::TemperatureSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+################################## custom_thresholds
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ temperatures => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($params{runtime}->{options}->{customthresholds}) {
+ if (-f $params{runtime}->{options}->{customthresholds}) {
+ $params{runtime}->{options}->{customthresholds} =
+ do { local (@ARGV, $/) =
+ $params{runtime}->{options}->{customthresholds}; <> };
+ }
+ foreach my $ct_items
+ (split(/\//, $params{runtime}->{options}->{customthresholds})) {
+ if ($ct_items =~ /^(\d+):(\d+)$/) {
+ $params{runtime}->{options}->{thresholds}->{$1} = $2;
+ } else {
+ die sprintf "invalid threshold %s", $ct_items;
+ }
+ }
+ }
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::TemperatureSubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::TemperatureSubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking temperatures');
+ if (scalar (@{$self->{temperatures}}) == 0) {
+ #$self->overall_check();
+ $self->add_info('no temperatures found');
+ } else {
+ foreach (sort { $a->{cpqHeTemperatureIndex} <=> $b->{cpqHeTemperatureIndex}}
+ @{$self->{temperatures}}) {
+ $_->check();
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{temperatures}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::TemperatureSubsystem::Temperature;
+our @ISA = qw(HP::Proliant::Component::TemperatureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqHeTemperatureChassis => $params{cpqHeTemperatureChassis},
+ cpqHeTemperatureIndex => $params{cpqHeTemperatureIndex},
+ cpqHeTemperatureLocale => $params{cpqHeTemperatureLocale},
+ cpqHeTemperatureCelsius => $params{cpqHeTemperatureCelsius},
+ cpqHeTemperatureThresholdCelsius => $params{cpqHeTemperatureThresholdCelsius},
+ cpqHeTemperatureCondition => $params{cpqHeTemperatureCondition},
+ cpqHeTemperatureThresholdType => $params{cpqHeTemperatureThresholdType} || "unknown",
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($params{runtime}->{options}->{celsius}) {
+ $self->{cpqHeTemperatureUnits} = 'C';
+ $self->{cpqHeTemperature} = $self->{cpqHeTemperatureCelsius};
+ $self->{cpqHeTemperatureThreshold} =
+ $self->{cpqHeTemperatureThresholdCelsius};
+ } else {
+ $self->{cpqHeTemperatureUnits} = 'F';
+ $self->{cpqHeTemperature} =
+ (($self->{cpqHeTemperatureCelsius} * 9) / 5) + 32;
+ $self->{cpqHeTemperatureThreshold} =
+ (($self->{cpqHeTemperatureThresholdCelsius} * 9) / 5) + 32;
+ }
+ my $index = $self->{cpqHeTemperatureIndex};
+ if (exists $params{runtime}->{options}->{thresholds}->{$index}) {
+ $self->{cpqHeTemperatureThreshold} =
+ $params{runtime}->{options}->{thresholds}->{$index};
+
+ }
+ if ($self->{cpqHeTemperatureThresholdCelsius} == -99) {
+ bless $self, 'HP::Proliant::Component::TemperatureSubsystem::SoSTemperature';
+ } elsif ($self->{cpqHeTemperatureThresholdCelsius} == 0) {
+ # taucht auf, seit man gen8 ueber das ilo abfragen kann
+ bless $self, 'HP::Proliant::Component::TemperatureSubsystem::SoSTemperature';
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('t', $self->{cpqHeTemperatureIndex});
+ if ($self->{cpqHeTemperature} > $self->{cpqHeTemperatureThreshold}) {
+ $self->add_info(sprintf "%d %s temperature too high (%d%s, %d max)",
+ $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale},
+ $self->{cpqHeTemperature}, $self->{cpqHeTemperatureUnits},
+ $self->{cpqHeTemperatureThreshold});
+ $self->add_message(CRITICAL, $self->{info});
+ } elsif ($self->{cpqHeTemperature} < 0) {
+ # #21 SCSI_BACKPLANE_ZONE -1C/31F 60C/140F OK - can't be true
+ $self->add_info(sprintf "%d %s temperature too low (%d%s)",
+ $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale},
+ $self->{cpqHeTemperature}, $self->{cpqHeTemperatureUnits});
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ $self->add_info(sprintf "%d %s temperature is %d%s (%d max)",
+ $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale},
+ $self->{cpqHeTemperature}, $self->{cpqHeTemperatureUnits},
+ $self->{cpqHeTemperatureThreshold});
+ }
+ if ($self->{runtime}->{options}->{perfdata} == 2) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('temp_%s', $self->{cpqHeTemperatureIndex}),
+ value => $self->{cpqHeTemperature},
+ warning => $self->{cpqHeTemperatureThreshold},
+ critical => $self->{cpqHeTemperatureThreshold}
+ );
+ } elsif ($self->{runtime}->{options}->{perfdata} == 1) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('temp_%s_%s', $self->{cpqHeTemperatureIndex},
+ $self->{cpqHeTemperatureLocale}),
+ value => $self->{cpqHeTemperature},
+ warning => $self->{cpqHeTemperatureThreshold},
+ critical => $self->{cpqHeTemperatureThreshold}
+ );
+ }
+ $self->add_extendedinfo(sprintf "temp_%s=%d",
+ $self->{cpqHeTemperatureIndex},
+ $self->{cpqHeTemperature});
+}
+
+sub dump {
+ my $self = shift;
+ printf "[TEMP_%s]\n", $self->{cpqHeTemperatureIndex};
+ foreach (qw(cpqHeTemperatureChassis cpqHeTemperatureIndex
+ cpqHeTemperatureLocale cpqHeTemperatureCelsius cpqHeTemperatureThreshold
+ cpqHeTemperatureThresholdType cpqHeTemperatureCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n\n", $self->{info};
+}
+
+
+package HP::Proliant::Component::TemperatureSubsystem::SoSTemperature;
+our @ISA = qw(HP::Proliant::Component::TemperatureSubsystem::Temperature);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub check {
+ my $self = shift;
+ $self->blacklist('t', $self->{cpqHeTemperatureIndex});
+ $self->add_info(sprintf "%d %s temperature is %d%s (no thresh.)",
+ $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale},
+ $self->{cpqHeTemperature}, $self->{cpqHeTemperatureUnits});
+ if ($self->{runtime}->{options}->{perfdata} == 2) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('temp_%s', $self->{cpqHeTemperatureIndex}),
+ value => $self->{cpqHeTemperature},
+ );
+ } elsif ($self->{runtime}->{options}->{perfdata} == 1) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('temp_%s_%s', $self->{cpqHeTemperatureIndex},
+ $self->{cpqHeTemperatureLocale}),
+ value => $self->{cpqHeTemperature},
+ );
+ }
+ $self->add_extendedinfo(sprintf "temp_%s=%d",
+ $self->{cpqHeTemperatureIndex},
+ $self->{cpqHeTemperature});
+}
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/CLI.pm
new file mode 100755
index 0000000..9e8e6be
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/CLI.pm
@@ -0,0 +1,56 @@
+package HP::Proliant::Component::TemperatureSubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::TemperatureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ temperatures => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $tempcnt = 1;
+ foreach (grep(/^temp/, split(/\n/, $params{rawdata}))) {
+ s/^temp\s*//g;
+ if (/^#(\d+)\s+([\w_\/\-#]+)\s+(-*\d+)C\/(\d+)F\s+(\d+)C\/(\d+)F/) {
+ my %params = ();
+ $params{runtime} = $self->{runtime};
+ $params{cpqHeTemperatureChassis} = 1;
+ $params{cpqHeTemperatureIndex} = $1;
+ $params{cpqHeTemperatureLocale} = lc $2;
+ $params{cpqHeTemperatureCelsius} = $3;
+ $params{cpqHeTemperatureThresholdCelsius} = $5;
+ $params{cpqHeTemperatureCondition} = 'unknown';
+ push(@{$self->{temperatures}},
+ HP::Proliant::Component::TemperatureSubsystem::Temperature->new(
+ %params));
+ } elsif (/^#(\d+)\s+([\w_\/\-#]+)\s+\-\s+(\d+)C\/(\d+)F/) {
+ # #3 CPU#2 - 0C/0F
+ $self->trace(2, sprintf "skipping temperature %s", $_);
+ } elsif (/^#(\d+)\s+([\w_\/\-#]+)\s+(\d+)C\/(\d+)F\s+\-/) {
+ # #3 CPU#2 0C/0F -
+ $self->trace(2, sprintf "skipping temperature %s", $_);
+ } elsif (/^#(\d+)\s+([\w_\/\-#]+)\s+\-\s+\-/) {
+ # #3 CPU#2 - -
+ $self->trace(2, sprintf "skipping temperature %s", $_);
+ } elsif (/^#(\d+)/) {
+ $self->trace(0, sprintf "send this to lausser: %s", $_);
+ }
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/SNMP.pm
new file mode 100755
index 0000000..de8e4cb
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/SNMP.pm
@@ -0,0 +1,119 @@
+package HP::Proliant::Component::TemperatureSubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::TemperatureSubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ temperatures => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->overall_init(%params);
+ $self->init(%params);
+ return $self;
+}
+
+sub overall_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $params{rawdata};
+ # overall
+ my $cpqHeThermalTempStatus = '1.3.6.1.4.1.232.6.2.6.3.0';
+ my $cpqHeThermalTempStatusValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ };
+ $self->{tempstatus} = lc SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeThermalTempStatus,
+ $cpqHeThermalTempStatusValue);
+ $self->{tempstatus} |= lc $self->{tempstatus};
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeTemperatureEntry => "1.3.6.1.4.1.232.6.2.6.8.1",
+ cpqHeTemperatureChassis => "1.3.6.1.4.1.232.6.2.6.8.1.1",
+ cpqHeTemperatureIndex => "1.3.6.1.4.1.232.6.2.6.8.1.2",
+ cpqHeTemperatureLocale => "1.3.6.1.4.1.232.6.2.6.8.1.3",
+ cpqHeTemperatureCelsius => "1.3.6.1.4.1.232.6.2.6.8.1.4",
+ cpqHeTemperatureThresholdCelsius => "1.3.6.1.4.1.232.6.2.6.8.1.5",
+ cpqHeTemperatureCondition => "1.3.6.1.4.1.232.6.2.6.8.1.6",
+ cpqHeTemperatureThresholdType => "1.3.6.1.4.1.232.6.2.6.8.1.7",
+ cpqHeTemperatureLocaleValue => {
+ 1 => "other",
+ 2 => "unknown",
+ 3 => "system",
+ 4 => "systemBoard",
+ 5 => "ioBoard",
+ 6 => "cpu",
+ 7 => "memory",
+ 8 => "storage",
+ 9 => "removableMedia",
+ 10 => "powerSupply",
+ 11 => "ambient",
+ 12 => "chassis",
+ 13 => "bridgeCard",
+ },
+ cpqHeTemperatureConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ cpqHeTemperatureThresholdTypeValue => {
+ 1 => 'other',
+ 5 => 'blowout',
+ 9 => 'caution',
+ 15 => 'critical',
+ },
+ };
+ # INDEX { cpqHeTemperatureChassis, cpqHeTemperatureIndex }
+ foreach ($self->get_entries($oids, 'cpqHeTemperatureEntry')) {
+ # sieht aus, als wurden die gar nicht existieren.
+ # im ilo4 werden sie als n/a angezeigt
+ next if $_->{cpqHeTemperatureThresholdType} eq "caution" && $_->{cpqHeTemperatureThresholdCelsius} == 0;
+ push(@{$self->{temperatures}},
+ HP::Proliant::Component::TemperatureSubsystem::Temperature->new(%{$_}));
+ }
+}
+
+sub overall_check {
+ my $self = shift;
+ my $result = 0;
+ $self->blacklist('ots', '');
+ if ($self->{tempstatus}) {
+ if ($self->{tempstatus} eq "ok") {
+ $result = 0;
+ $self->add_info('all temp sensors are within normal operating range');
+ } elsif ($self->{tempstatus} eq "degraded") {
+ $result = 1;
+ $self->add_info('a temp sensor is outside of normal operating range');
+ } elsif ($self->{tempstatus} eq "failed") {
+ $result = 2;
+ $self->add_info('a temp sensor detects a condition that could permanently
+damage the system');
+ } elsif ($self->{tempstatus} eq "other") {
+ $result = 0;
+ $self->add_info('temp sensing is not supported by this system or driver');
+ }
+ } else {
+ $result = 0;
+ $self->add_info('no global temp status found');
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/SNMP/Utils.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/SNMP/Utils.pm
new file mode 100755
index 0000000..f2d31a9
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/SNMP/Utils.pm
@@ -0,0 +1,103 @@
+package SNMP::Utils;
+
+use strict;
+
+{
+ sub get_indices {
+ my $oids = shift;
+ my $entry = shift;
+ my $numindices = shift;
+ # find all oids beginning with $entry
+ # then skip one field for the sequence
+ # then read the next numindices fields
+ my $entrypat = $entry;
+ $entrypat =~ s/\./\\\./g;
+ my @indices = map {
+ /^$entrypat\.\d+\.(.*)/ && $1;
+ } grep {
+ /^$entrypat/
+ } keys %{$oids};
+ my %seen = ();
+ my @o = map {[split /\./]} sort grep !$seen{$_}++, @indices;
+ return @o;
+ }
+
+ sub get_size {
+ my $oids = shift;
+ my $entry = shift;
+ my $entrypat = $entry;
+ $entrypat =~ s/\./\\\./g;
+ my @entries = grep {
+ /^$entrypat/
+ } keys %{$oids};
+ return scalar(@entries);
+ }
+
+ sub get_object {
+ my $oids = shift;
+ my $object = shift;
+ my @indices = @_;
+ #my $oid = $object.'.'.join('.', @indices);
+ my $oid = $object;
+ $oid .= '.'.join('.', @indices) if (@indices);
+ return $oids->{$oid};
+ }
+
+ sub get_object_value {
+ my $oids = shift;
+ my $object = shift;
+ my $values = shift;
+ my @indices = @_;
+ my $key = get_object($oids, $object, @indices);
+ if (defined $key) {
+ return $values->{$key};
+ } else {
+ return undef;
+ }
+ }
+
+ #SNMP::Utils::counter([$idxs1, $idxs2], $idx1, $idx2),
+ # this flattens a n-dimensional array and returns the absolute position
+ # of the element at position idx1,idx2,...,idxn
+ # element 1,2 in table 0,0 0,1 0,2 1,0 1,1 1,2 2,0 2,1 2,2 is at pos 6
+ sub get_number {
+ my $indexlists = shift; #, zeiger auf array aus [1, 2]
+ my @element = @_;
+ my $dimensions = scalar(@{$indexlists->[0]});
+ my @sorted = ();
+ my $number = 0;
+ if ($dimensions == 1) {
+ @sorted =
+ sort { $a->[0] <=> $b->[0] } @{$indexlists};
+ } elsif ($dimensions == 2) {
+ @sorted =
+ sort { $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] } @{$indexlists};
+ } elsif ($dimensions == 3) {
+ @sorted =
+ sort { $a->[0] <=> $b->[0] ||
+ $a->[1] <=> $b->[1] ||
+ $a->[2] <=> $b->[2] } @{$indexlists};
+ }
+ foreach (@sorted) {
+ if ($dimensions == 1) {
+ if ($_->[0] == $element[0]) {
+ last;
+ }
+ } elsif ($dimensions == 2) {
+ if ($_->[0] == $element[0] && $_->[1] == $element[1]) {
+ last;
+ }
+ } elsif ($dimensions == 3) {
+ if ($_->[0] == $element[0] &&
+ $_->[1] == $element[1] &&
+ $_->[2] == $element[2]) {
+ last;
+ }
+ }
+ $number++;
+ }
+ return ++$number;
+ }
+
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Server.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Server.pm
new file mode 100755
index 0000000..7477c40
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Server.pm
@@ -0,0 +1,447 @@
+package HP::Server;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ productname => 'unknown',
+ };
+ bless $self, $class;
+ if (! ($self->{runtime}->{plugin}->opts->hostname ||
+ $self->{runtime}->{plugin}->opts->snmpwalk)) {
+ bless $self, 'HP::Proliant::CLI';
+ $self->{method} = 'cli';
+ } else {
+ $self->check_snmp_and_model();
+ if ($self->{runtime}->{options}->{servertype}) {
+ $self->{productname} = 'ProLiant' if
+ $self->{runtime}->{options}->{servertype} eq 'proliant';
+ $self->{productname} = 'BladeSystem' if
+ $self->{runtime}->{options}->{servertype} eq 'bladesystem';
+ $self->{productname} = 'Storage' if
+ $self->{runtime}->{options}->{servertype} eq 'storage';
+ }
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ if ($self->{productname} =~ /ProLiant/) {
+ bless $self, 'HP::Proliant::SNMP';
+ $self->trace(3, 'using HP::Proliant::SNMP');
+ } elsif ($self->{productname} =~ /^DL\d+\s*G\d+/) {
+ bless $self, 'HP::Proliant::SNMP';
+ $self->trace(3, 'using HP::Proliant::SNMP');
+ } elsif ($self->{productname} =~ /OpenView .* appliance/) {
+ bless $self, 'HP::Proliant::SNMP';
+ $self->trace(3, 'using HP::Proliant::SNMP');
+ } elsif ($self->{productname} =~ /Synergy.*Gen/i) {
+ bless $self, 'HP::Proliant::SNMP';
+ $self->trace(3, 'using HP::Proliant::SNMP');
+ } elsif ($self->{productname} =~ /Superdome.*Enclosure/i) {
+ bless $self, 'HP::BladeSystem';
+ $self->trace(3, 'using HP::BladeSystem');
+ } elsif ($self->{productname} =~ /BladeSystem/) {
+ bless $self, 'HP::BladeSystem';
+ $self->trace(3, 'using HP::BladeSystem');
+ } elsif ($self->{productname} =~ /PROLIANT 4LEE/) {
+ bless $self, 'HP::Storage';
+ $self->trace(3, 'using HP::Storage');
+ } elsif ($self->{productname} =~ /X\d+[\s\w]* Network Storage/) {
+ # HP X1600 Network Storage System
+ # HP X1600 G2 Network Storage System
+ bless $self, 'HP::Proliant::SNMP';
+ $self->trace(3, 'using HP::Proliant::SNMP');
+ } elsif ($self->{productname} =~ /StorageWorks/i) {
+ bless $self, 'HP::StorageWorks';
+ $self->trace(3, 'using HP::StorageWorks');
+ } elsif ($self->{productname} =~ /MSA/i) {
+ bless $self, 'HP::StorageWorks';
+ $self->trace(3, 'using HP::StorageWorks');
+ } elsif ($self->{productname} =~ /StoreEasy/i) {
+ bless $self, 'HP::Proliant::SNMP';
+ $self->trace(3, 'using HP::Proliant::SNMP');
+ } elsif ($self->{productname} =~ /Storage/) { # fake
+ bless $self, 'HP::Storage';
+ $self->trace(3, 'using HP::Storage');
+ } else {
+ $self->add_message(CRITICAL,
+ sprintf('unknown device%s', $self->{productname} eq 'unknown' ?
+ '' : '('.$self->{productname}.')'));
+ }
+ $self->{method} = 'snmp';
+ }
+ }
+ if ($self->{runtime}->{options}->{blacklist} &&
+ -f $self->{runtime}->{options}->{blacklist}) {
+ $self->{runtime}->{options}->{blacklist} = do {
+ local (@ARGV, $/) = $self->{runtime}->{options}->{blacklist}; <> };
+ }
+ return $self;
+}
+
+sub check_snmp_and_model {
+# uptime pruefen
+# dann whoami
+ my $self = shift;
+ if ($self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $response = {};
+ if (! -f $self->{runtime}->{plugin}->opts->snmpwalk) {
+ $self->{runtime}->{plugin}->add_message(CRITICAL,
+ sprintf 'file %s not found',
+ $self->{runtime}->{plugin}->opts->snmpwalk);
+ } elsif (-x $self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $cmd = sprintf "%s -On -v%s -c%s %s:%s 1.3.6.1.4.1.232 2>&1",
+ $self->{runtime}->{plugin}->opts->snmpwalk,
+ $self->{runtime}->{plugin}->opts->protocol,
+ $self->{runtime}->{plugin}->opts->community,
+ $self->{runtime}->{plugin}->opts->domain,
+ $self->{runtime}->{plugin}->opts->hostname;
+ open(WALK, "$cmd |");
+ while (<WALK>) {
+ if (/^.*?\.(232\.[\d\.]+) = .*?: (\-*\d+)/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ } elsif (/^.*?\.(232\.[\d\.]+) = .*?: "(.*?)"/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $response->{'1.3.6.1.4.1.'.$1} =~ s/\s+$//;
+ }
+ }
+ close WALK;
+ } else {
+ open(MESS, $self->{runtime}->{plugin}->opts->snmpwalk);
+ my $in_string = 0;
+ my $in_hex_string = 0;
+ my $hex_oid = 0;
+ while(<MESS>) {
+ chomp;
+ if ($in_hex_string && /^(([0-9a-fA-F]{2})( [0-9a-fA-F]{2})*)\s*$/) {
+ $response->{$hex_oid} .= " ".$1;
+ } elsif ($in_string) {
+ if (/(.*)"$/) {
+ $response->{$hex_oid} .= $1;
+ $in_string = 0;
+ } else {
+ $response->{$hex_oid} .= $_;
+ }
+ } elsif (/^.*?\.(232\.[\d\.]+) = .*?: (\-*\d+)\s*$/) {
+ # SNMPv2-SMI::enterprises.232.6.2.6.7.1.3.1.4 = INTEGER: 6
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $in_hex_string = 0;
+ } elsif (/^.*?\.(232\.[\d\.]+) = .*?: "(.*?)"/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $response->{'1.3.6.1.4.1.'.$1} =~ s/\s+$//;
+ $in_hex_string = 0;
+ } elsif (/^.*?\.(232\.[\d\.]+) = (\-*\d+)/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $in_hex_string = 0;
+ } elsif (/^.*?\.(232\.[\d\.]+) = "(.*?)"/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $response->{'1.3.6.1.4.1.'.$1} =~ s/\s+$//;
+ $in_hex_string = 0;
+ } elsif (/^.*?\.(232\.[\d\.]+) = STRING: "(.*?[^"])$/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $response->{'1.3.6.1.4.1.'.$1} =~ s/\s+$//;
+ $in_string = 0;
+ $in_hex_string = 0;
+ } elsif (/^.*?\.(232\.[\d\.]+) = Hex-STRING: (.*)/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $in_hex_string = 1;
+ $hex_oid = '1.3.6.1.4.1.'.$1;
+ } elsif (/^.*?\.(232\.[\d\.]+) =[ ]{1,2}Hex: (.*)/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $in_hex_string = 1;
+ $hex_oid = '1.3.6.1.4.1.'.$1;
+ }
+ }
+ close MESS;
+ }
+ map { $response->{$_} =~ s/^\s+//; $response->{$_} =~ s/\s+$//; }
+ keys %$response;
+ $self->{rawdata} = $response;
+ $self->whoami();
+ } else {
+ if (eval "require Net::SNMP") {
+ my %params = ();
+ my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000
+ $params{'-translate'} = [
+ -timeticks => 0x0
+ ];
+ $params{'-hostname'} = $self->{runtime}->{plugin}->opts->hostname;
+ $params{'-domain'} = $self->{runtime}->{plugin}->opts->domain;
+ $params{'-version'} = $self->{runtime}->{plugin}->opts->protocol;
+ if ($self->{runtime}->{plugin}->opts->port) {
+ $params{'-port'} = $self->{runtime}->{plugin}->opts->port;
+ }
+ if ($self->{runtime}->{plugin}->opts->protocol eq '3') {
+ $params{'-username'} = $self->{runtime}->{plugin}->opts->username;
+ if ($self->{runtime}->{plugin}->opts->authpassword) {
+ $params{'-authpassword'} = $self->decode_password($self->{runtime}->{plugin}->opts->authpassword);
+ }
+ if ($self->{runtime}->{plugin}->opts->authprotocol) {
+ $params{'-authprotocol'} = $self->{runtime}->{plugin}->opts->authprotocol;
+ }
+ if ($self->{runtime}->{plugin}->opts->privpassword) {
+ $params{'-privpassword'} = $self->decode_password($self->{runtime}->{plugin}->opts->privpassword);
+ }
+ if ($self->{runtime}->{plugin}->opts->privprotocol) {
+ $params{'-privprotocol'} = $self->{runtime}->{plugin}->opts->privprotocol;
+ }
+ } elsif ($self->decode_password($self->{runtime}->{plugin}->opts->community) =~ /^snmpv3(.)(.+)/) {
+ my $separator = $1;
+ my ($authprotocol, $authpassword, $privprotocol, $privpassword,
+ $username, $contextengineid, $contextname) = split(/$separator/, $2);
+ $params{'-version'} = 3;
+ $params{'-username'} = $self->decode_password($username) if $username;
+ $params{'-authprotocol'} = $self->decode_password($authprotocol) if $authprotocol;
+ $params{'-authpassword'} = $self->decode_password($authpassword) if $authpassword;
+ $params{'-privprotocol'} = $self->decode_password($privprotocol) if $privprotocol;
+ $params{'-privpassword'} = $self->decode_password($privpassword) if $privpassword;
+ } else {
+ $params{'-community'} = $self->decode_password($self->{runtime}->{plugin}->opts->community);
+ }
+ $self->{runtime}->{snmpparams} = \%params;
+ my ($session, $error) = Net::SNMP->session(%params);
+ $self->{session} = $session;
+ if (! defined $session) {
+ $self->add_message(CRITICAL, 'cannot create session object (maybe wrong hostname)');
+ $self->trace(1, Data::Dumper::Dumper(\%params));
+ } else {
+ my $sysUpTime = '1.3.6.1.2.1.1.3.0';
+ my $result = $session->get_request(
+ -varbindlist => [$sysUpTime]
+ );
+ if (!defined($result)) {
+ $self->add_message(CRITICAL,
+ 'could not contact snmp agent');
+ $session->close;
+ } else {
+ $self->trace(3, 'snmp agent answered');
+ $self->whoami();
+ }
+ }
+ } else {
+ $self->add_message(CRITICAL,
+ 'could not find Net::SNMP module');
+ }
+ }
+}
+
+sub whoami {
+ my $self = shift;
+ my $productname = undef;
+ if ($self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $cpqSiProductName = '1.3.6.1.4.1.232.2.2.4.2.0';
+ my $cpqSsMibRevMajor = '1.3.6.1.4.1.232.8.1.1.0';
+ my $cpqSsBackplaneModel = '1.3.6.1.4.1.232.8.2.2.6.1.9'.'.1.1';
+ my $cpqHoMibStatusArray = '1.3.6.1.4.1.232.11.2.10.1.0';
+ if ($productname = $self->{rawdata}->{$cpqSiProductName}) {
+ if (! $productname) {
+ $self->{productname} = 'ProLiant';
+ } else {
+ $self->{productname} = $self->{rawdata}->{$cpqSiProductName};
+ }
+ } elsif (exists $self->{rawdata}->{$cpqSsBackplaneModel}) {
+ $self->{productname} = $self->{rawdata}->{$cpqSsBackplaneModel};
+ } elsif (exists $self->{rawdata}->{$cpqSsMibRevMajor}) {
+ # at least there is a CPQSTSYS-MIB
+ $self->{productname} = 'Storage'
+ } else {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no product name (cpqsinfo-mib)');
+ }
+ } else {
+ my $cpqSiProductName = '1.3.6.1.4.1.232.2.2.4.2.0';
+ my $cpqSsMibRevMajor = '1.3.6.1.4.1.232.8.1.1.0';
+ my $cpqSsBackplaneModel = '1.3.6.1.4.1.232.8.2.2.6.1.9'.'.1.1';
+ my $cpqHoMibStatusArray = '1.3.6.1.4.1.232.11.2.10.1.0';
+ my $dummy = '1.3.6.1.2.1.1.5.0';
+ if ($productname = $self->valid_response($cpqSiProductName)) {
+ if ($productname =~ /HP P\d+ .*SAS/ && $self->valid_response($cpqHoMibStatusArray)) {
+ $self->{productname} = 'StorageWorks'
+ } elsif ($productname eq '') {
+ $self->{productname} = 'ProLiant';
+ } else {
+ $self->{productname} = $productname;
+ }
+ } elsif ($productname = $self->valid_response($cpqSsBackplaneModel)) {
+ $self->{productname} = $productname;
+ } elsif ($self->valid_response($cpqSsMibRevMajor)) {
+ # at least there is a CPQSTSYS-MIB
+ $self->{productname} = 'Storage'
+ } elsif ($self->valid_response($cpqHoMibStatusArray)) {
+ $self->{productname} = 'StorageWorks'
+ } else {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no product name (cpqsinfo-mib)');
+ $self->{session}->close;
+ }
+ $self->trace(3, 'whoami: '.$self->{productname});
+ }
+}
+
+sub valid_response {
+ my $self = shift;
+ my $oid = shift;
+ my $result = $self->{session}->get_request(
+ -varbindlist => [$oid]
+ );
+ if (!defined($result) ||
+ ! defined $result->{$oid} ||
+ $result->{$oid} eq 'noSuchInstance' ||
+ $result->{$oid} eq 'noSuchObject' ||
+ $result->{$oid} eq 'endOfMibView') {
+ return undef;
+ } else {
+ return $result->{$oid};
+ }
+}
+
+sub trace {
+ my $self = shift;
+ my $level = shift;
+ my $message = shift;
+ if ($self->{runtime}->{options}->{verbose} >= $level) {
+ printf "%s\n", $message;
+ }
+}
+
+sub blacklist {
+ my $self = shift;
+ my $type = shift;
+ my $name = shift;
+ $self->{blacklisted} = $self->is_blacklisted($type, $name);
+}
+
+sub add_blacklist {
+ my $self = shift;
+ my $list = shift;
+ $self->{runtime}->{options}->{blacklist} = join('/',
+ (split('/', $self->{runtime}->{options}->{blacklist}), $list));
+}
+
+sub is_blacklisted {
+ my $self = shift;
+ my $type = shift;
+ my $name = shift;
+ my $blacklisted = 0;
+# $name =~ s/\:/-/g;
+ foreach my $bl_items (split(/\//, $self->{runtime}->{options}->{blacklist})) {
+ if ($bl_items =~ /^(\w+):([\:\w\-,]+)$/) {
+ my $bl_type = $1;
+ my $bl_names = $2;
+ foreach my $bl_name (split(/,/, $bl_names)) {
+ if ($bl_type eq $type && $bl_name eq $name) {
+ $blacklisted = 1;
+ }
+ }
+ } elsif ($bl_items =~ /^(\w+)$/) {
+ my $bl_type = $1;
+ if ($bl_type eq $type) {
+ $blacklisted = 1;
+ }
+ }
+ }
+ return $blacklisted;
+}
+
+sub add_message {
+ my $self = shift;
+ my $level = shift;
+ my $message = shift;
+ $self->{runtime}->{plugin}->add_message($level, $message)
+ unless $self->{blacklisted};
+ if (exists $self->{failed}) {
+ if ($level == UNKNOWN && $self->{failed} == OK) {
+ $self->{failed} = $level;
+ } elsif ($level > $self->{failed}) {
+ $self->{failed} = $level;
+ }
+ }
+}
+
+sub remove_message {
+ my $self = shift;
+ my $level = shift;
+ my $message = shift;
+ $self->{runtime}->{plugin}->remove_message($level) ;
+}
+
+sub has_failed {
+ my $self = shift;
+ return $self->{failed};
+}
+
+sub add_info {
+ my $self = shift;
+ my $info = shift;
+ $info = $self->{blacklisted} ? $info.' (blacklisted)' : $info;
+ $self->{info} = $info;
+ if (! exists $self->{runtime}->{plugin}->{info}) {
+ $self->{runtime}->{plugin}->{info} = [];
+ }
+ push(@{$self->{runtime}->{plugin}->{info}}, $info);
+}
+
+sub annotate_info {
+ my $self = shift;
+ my $annotation = shift;
+ my $lastinfo = pop(@{$self->{runtime}->{plugin}->{info}});
+ $lastinfo .= sprintf ' (%s)', $annotation;
+ push(@{$self->{runtime}->{plugin}->{info}}, $lastinfo);
+}
+
+sub add_extendedinfo {
+ my $self = shift;
+ my $info = shift;
+ $self->{extendedinfo} = $info;
+ return if ! $self->{runtime}->{options}->{extendedinfo};
+ if (! exists $self->{runtime}->{plugin}->{extendedinfo}) {
+ $self->{runtime}->{plugin}->{extendedinfo} = [];
+ }
+ push(@{$self->{runtime}->{plugin}->{extendedinfo}}, $info);
+}
+
+sub get_extendedinfo {
+ my $self = shift;
+ if (! exists $self->{runtime}->{plugin}->{extendedinfo}) {
+ $self->{runtime}->{plugin}->{extendedinfo} = [];
+ }
+ return join(' ', @{$self->{runtime}->{plugin}->{extendedinfo}});
+}
+
+sub add_summary {
+ my $self = shift;
+ my $summary = shift;
+ if (! exists $self->{runtime}->{plugin}->{summary}) {
+ $self->{runtime}->{plugin}->{summary} = [];
+ }
+ push(@{$self->{runtime}->{plugin}->{summary}}, $summary);
+}
+
+sub get_summary {
+ my $self = shift;
+ if (! exists $self->{runtime}->{plugin}->{summary}) {
+ $self->{runtime}->{plugin}->{summary} = [];
+ }
+ return join(', ', @{$self->{runtime}->{plugin}->{summary}});
+}
+
+sub dumper {
+ my $self = shift;
+ my $object = shift;
+ my $run = $object->{runtime};
+ delete $object->{runtime};
+ printf STDERR "%s\n", Data::Dumper::Dumper($object);
+ $object->{runtime} = $run;
+}
+
+sub decode_password {
+ my $self = shift;
+ my $password = shift;
+ if ($password && $password =~ /^rfc3986:\/\/(.*)/) {
+ $password = $1;
+ $password =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg;
+ }
+ return $password;
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Storage.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Storage.pm
new file mode 100755
index 0000000..6fecca1
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Storage.pm
@@ -0,0 +1,308 @@
+package HP::Storage;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+use Data::Dumper;
+
+our @ISA = qw(HP::Server);
+
+sub init {
+ my $self = shift;
+ $self->{components} = {
+ powersupply_subsystem => undef,
+ fan_subsystem => undef,
+ temperature_subsystem => undef,
+ cpu_subsystem => undef,
+ memory_subsystem => undef,
+ disk_subsystem => undef,
+ sensor_subsystem => undef,
+ };
+ $self->{serial} = 'unknown';
+ $self->{product} = 'unknown';
+ $self->{romversion} = 'unknown';
+ $self->collect();
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ $self->set_serial();
+# $self->check_for_buggy_firmware();
+# $self->analyze_cpus();
+# $self->analyze_powersupplies();
+# $self->analyze_fan_subsystem();
+# $self->analyze_temperatures();
+# $self->analyze_memory_subsystem();
+ $self->analyze_disk_subsystem();
+## $self->analyze_sensor_subsystem();
+# $self->check_cpus();
+# $self->check_powersupplies();
+# $self->check_fan_subsystem();
+# $self->check_temperatures();
+# $self->check_memory_subsystem();
+ $self->check_disk_subsystem();
+## $self->check_sensor_subsystem();
+ }
+}
+
+sub identify {
+ my $self = shift;
+ return sprintf "System: '%s', S/N: '%s', ROM: '%s'",
+ $self->{product}, $self->{serial}, $self->{romversion};
+}
+
+sub check_for_buggy_firmware {
+ my $self = shift;
+ my @buggyfirmwares = (
+ "P24 12/11/2001",
+ "P24 11/15/2002",
+ "D13 06/03/2003",
+ "D13 09/15/2004",
+ "P20 12/17/2002"
+ );
+ $self->{runtime}->{options}->{buggy_firmware} =
+ grep /^$self->{romversion}/, @buggyfirmwares;
+}
+
+sub dump {
+ my $self = shift;
+ printf STDERR "serial %s\n", $self->{serial};
+ printf STDERR "product %s\n", $self->{product};
+ printf STDERR "romversion %s\n", $self->{romversion};
+ printf STDERR "%s\n", Data::Dumper::Dumper($self->{components});
+}
+
+sub analyze_powersupplies {
+ my $self = shift;
+ $self->{components}->{powersupply_subsystem} =
+ HP::Storage::Component::PowersupplySubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_fan_subsystem {
+ my $self = shift;
+ $self->{components}->{fan_subsystem} =
+ HP::Storage::Component::FanSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_temperatures {
+ my $self = shift;
+ $self->{components}->{temperature_subsystem} =
+ HP::Storage::Component::TemperatureSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_cpus {
+ my $self = shift;
+ $self->{components}->{cpu_subsystem} =
+ HP::Storage::Component::CpuSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_memory_subsystem {
+ my $self = shift;
+ $self->{components}->{memory_subsystem} =
+ HP::Storage::Component::MemorySubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_disk_subsystem {
+ my $self = shift;
+ $self->{components}->{disk_subsystem} =
+ HP::Proliant::Component::DiskSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_sensor_subsystem {
+ my $self = shift;
+ $self->{components}->{sensor_subsystem} =
+ HP::FCMGMT::Component::SensorSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub check_cpus {
+ my $self = shift;
+ $self->{components}->{cpu_subsystem}->check();
+ $self->{components}->{cpu_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_powersupplies {
+ my $self = shift;
+ $self->{components}->{powersupply_subsystem}->check();
+ $self->{components}->{powersupply_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_fan_subsystem {
+ my $self = shift;
+ $self->{components}->{fan_subsystem}->check();
+ $self->{components}->{fan_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_temperatures {
+ my $self = shift;
+ $self->{components}->{temperature_subsystem}->check();
+ $self->{components}->{temperature_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_memory_subsystem {
+ my $self = shift;
+ $self->{components}->{memory_subsystem}->check();
+ $self->{components}->{memory_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_disk_subsystem {
+ my $self = shift;
+ $self->{components}->{disk_subsystem}->check();
+ $self->{components}->{disk_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 1;
+}
+
+sub check_sensor_subsystem {
+ my $self = shift;
+ $self->{components}->{isensor_subsystem}->check();
+ $self->{components}->{sensor_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 1;
+}
+
+
+sub collect {
+ my $self = shift;
+ if ($self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $cpqSeMibCondition = '1.3.6.1.4.1.232.6.1.3.0';
+ # rindsarsch!
+ $self->{rawdata}->{$cpqSeMibCondition} = 0;
+ if (! exists $self->{rawdata}->{$cpqSeMibCondition}) {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqhlth-mib)');
+ }
+ } else {
+ my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000
+ #$params{'-translate'} = [
+ # -all => 0x0
+ #];
+ my ($session, $error) =
+ Net::SNMP->session(%{$self->{runtime}->{snmpparams}});
+ if (! defined $session) {
+ $self->{plugin}->add_message(CRITICAL, 'cannot create session object');
+ $self->trace(1, Data::Dumper::Dumper($self->{runtime}->{snmpparams}));
+ } else {
+ # revMajor is often used for discovery of hp devices
+ my $cpqSeMibRev = '1.3.6.1.4.1.232.6.1';
+ my $cpqSeMibRevMajor = '1.3.6.1.4.1.232.6.1.1.0';
+ my $cpqSeMibCondition = '1.3.6.1.4.1.232.6.1.3.0';
+ my $result = $session->get_request(
+ -varbindlist => [$cpqSeMibCondition]
+ );
+ # rindsarsch!
+ $result->{$cpqSeMibCondition} = 0;
+ if (!defined($result) ||
+ $result->{$cpqSeMibCondition} eq 'noSuchInstance' ||
+ $result->{$cpqSeMibCondition} eq 'noSuchObject' ||
+ $result->{$cpqSeMibCondition} eq 'endOfMibView') {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqhlth-mib)');
+ $session->close;
+ } else {
+ # this is not reliable. many agents return 4=failed
+ #if ($result->{$cpqSeMibCondition} != 2) {
+ # $obstacle = "cmapeerstart";
+ #}
+ }
+ }
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ # snmp peer is alive
+ $self->trace(2, sprintf "Protocol is %s",
+ $self->{runtime}->{snmpparams}->{'-version'});
+ my $cpqSsSys = "1.3.6.1.4.1.232.8";
+ $session->translate;
+ my $response = {}; #break the walk up in smaller pieces
+ my $tic = time; my $tac = $tic;
+ my $response1 = $session->get_table(
+ -baseoid => $cpqSsSys);
+ $tac = time;
+ $self->trace(2, sprintf "%03d seconds for walk cpqSsSys (%d oids)",
+ $tac - $tic, scalar(keys %{$response1}));
+ $session->close;
+ map { $response->{$_} = $response1->{$_} } keys %{$response1};
+ map { $response->{$_} =~ s/^\s+//; $response->{$_} =~ s/\s+$//; }
+ keys %$response;
+ $self->{rawdata} = $response;
+ }
+ }
+ return $self->{runtime}->{plugin}->check_messages();
+}
+
+sub set_serial {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my @serials = ();
+ my @models = ();
+ my @fws = ();
+ my $cpqSsBackplaneEntry = '1.3.6.1.4.1.232.8.2.2.6.1';
+ my $cpqSsBackplaneFWRev = '1.3.6.1.4.1.232.8.2.2.6.1.3';
+ my $cpqSsBackplaneModel = '1.3.6.1.4.1.232.8.2.2.6.1.9';
+ my $cpqSsBackplaneSerialNumber = '1.3.6.1.4.1.232.8.2.2.6.1.13';
+ # INDEX { cpqSsBackplaneChassisIndex, cpqSsBackplaneIndex }
+ my @indexes = SNMP::Utils::get_indices($snmpwalk,
+ $cpqSsBackplaneEntry);
+ foreach (@indexes) {
+ my($idx1, $idx2) = ($_->[0], $_->[1]);
+ my $fw = SNMP::Utils::get_object($snmpwalk,
+ $cpqSsBackplaneFWRev, $idx1, $idx2);
+ my $model = SNMP::Utils::get_object($snmpwalk,
+ $cpqSsBackplaneModel, $idx1, $idx2);
+ my $serial = SNMP::Utils::get_object($snmpwalk,
+ $cpqSsBackplaneSerialNumber, $idx1, $idx2);
+ push(@serials, $serial);
+ push(@models, $model);
+ push(@fws, $fw);
+ }
+
+ $self->{serial} = join('/', @serials);
+ $self->{product} = join('/', @models);
+ $self->{romversion} = join('/', @fws);
+ $self->{runtime}->{product} = $self->{product};
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/StorageWorks.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/StorageWorks.pm
new file mode 100755
index 0000000..5792961
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/StorageWorks.pm
@@ -0,0 +1,157 @@
+package HP::StorageWorks;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+use Data::Dumper;
+
+our @ISA = qw(HP::Server);
+
+sub init {
+ my $self = shift;
+ $self->{serial} = 'unknown';
+ $self->{product} = 'unknown';
+ $self->{romversion} = 'unknown';
+ $self->collect();
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ $self->set_serial();
+ $self->overall_init();
+ $self->overall_check();
+ }
+}
+
+sub overall_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ my $cpqHoMibStatusArray = '1.3.6.1.4.1.232.11.2.10.1.0';
+ $self->{cpqHoMibStatusArray} = SNMP::Utils::get_object(
+ $snmpwalk, $cpqHoMibStatusArray);
+ if ($self->{cpqHoMibStatusArray} =~ /^(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/) {
+ $self->{cpqHoMibStatusArray} = 1 * $2;
+ } elsif ($self->{cpqHoMibStatusArray} =~ /^0x.*(\d\d)(\d\d)(\d\d)(\d\d)$/) {
+ $self->{cpqHoMibStatusArray} = 1 * $2;
+ }
+}
+
+sub overall_check {
+ my $self = shift;
+ if ($self->{cpqHoMibStatusArray} == 4) {
+ $self->add_info('overall status is failed');
+ $self->add_message(CRITICAL, 'overall status is failed');
+ } elsif ($self->{cpqHoMibStatusArray} == 3) {
+ $self->add_info('overall status is degraded');
+ $self->add_message(WARNING, 'overall status is degraded');
+ } elsif ($self->{cpqHoMibStatusArray} == 2) {
+ $self->add_info('overall status is ok');
+ $self->add_message(OK, 'overall status is ok');
+ } elsif ($self->{cpqHoMibStatusArray} == 1) {
+ $self->add_info('overall status is other');
+ $self->add_message(UNKNOWN, 'overall status is other');
+ }
+}
+
+sub identify {
+ my $self = shift;
+ return $self->{productname};
+}
+
+sub dump {
+ my $self = shift;
+ printf STDERR "serial %s\n", $self->{serial};
+ printf STDERR "product %s\n", $self->{product};
+ printf STDERR "romversion %s\n", $self->{romversion};
+ printf STDERR "%s\n", Data::Dumper::Dumper($self->{components});
+}
+
+sub collect {
+ my $self = shift;
+ if ($self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $cpqHoMibStatusArray = '1.3.6.1.4.1.232.11.2.10.1.0';
+ if (! exists $self->{rawdata}->{$cpqHoMibStatusArray}) {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqhost-mib)');
+ }
+ } else {
+ my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000
+ #$params{'-translate'} = [
+ # -all => 0x0
+ #];
+ my ($session, $error) =
+ Net::SNMP->session(%{$self->{runtime}->{snmpparams}});
+ if (! defined $session) {
+ $self->{plugin}->add_message(CRITICAL, 'cannot create session object');
+ $self->trace(1, Data::Dumper::Dumper($self->{runtime}->{snmpparams}));
+ }
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ # snmp peer is alive
+ $self->trace(2, sprintf "Protocol is %s",
+ $self->{runtime}->{snmpparams}->{'-version'});
+ my $cpqHoMibStatusArray = '1.3.6.1.4.1.232.11.2.10.1.0';
+ $session->translate;
+ my $tic = time;
+ my $response = $session->get_request(
+ -varbindlist => [$cpqHoMibStatusArray]
+ );
+ my $tac = time;
+ $self->trace(2, sprintf "%03d seconds for walk cpqHoMibStatusArray (%d oids)",
+ $tac - $tic, scalar(keys %{$response}));
+ $session->close;
+ map { $response->{$_} =~ s/^\s+//; $response->{$_} =~ s/\s+$//; }
+ keys %$response;
+ $self->{rawdata} = $response;
+ }
+ }
+ return $self->{runtime}->{plugin}->check_messages();
+}
+
+sub set_serial {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my @serials = ();
+ my @models = ();
+ my @fws = ();
+ my $cpqSsBackplaneEntry = '1.3.6.1.4.1.232.8.2.2.6.1';
+ my $cpqSsBackplaneFWRev = '1.3.6.1.4.1.232.8.2.2.6.1.3';
+ my $cpqSsBackplaneModel = '1.3.6.1.4.1.232.8.2.2.6.1.9';
+ my $cpqSsBackplaneSerialNumber = '1.3.6.1.4.1.232.8.2.2.6.1.13';
+ # INDEX { cpqSsBackplaneChassisIndex, cpqSsBackplaneIndex }
+ my @indexes = SNMP::Utils::get_indices($snmpwalk,
+ $cpqSsBackplaneEntry);
+ foreach (@indexes) {
+ my($idx1, $idx2) = ($_->[0], $_->[1]);
+ my $fw = SNMP::Utils::get_object($snmpwalk,
+ $cpqSsBackplaneFWRev, $idx1, $idx2);
+ my $model = SNMP::Utils::get_object($snmpwalk,
+ $cpqSsBackplaneModel, $idx1, $idx2);
+ my $serial = SNMP::Utils::get_object($snmpwalk,
+ $cpqSsBackplaneSerialNumber, $idx1, $idx2);
+ push(@serials, $serial);
+ push(@models, $model);
+ push(@fws, $fw);
+ }
+
+ $self->{serial} = join('/', @serials);
+ $self->{product} = join('/', @models);
+ $self->{romversion} = join('/', @fws);
+ $self->{runtime}->{product} = $self->{product};
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.am b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.am
new file mode 100755
index 0000000..20f32c4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.am
@@ -0,0 +1,104 @@
+## Process this file with automake to produce Makefile.in
+
+SED=/bin/sed
+GREP=/bin/grep
+CAT=/bin/cat
+ECHO=/bin/echo
+
+SUFFIXES = .pl .pm .sh
+
+VPATH=$(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t
+
+libexec_SCRIPTS=check_hpasm
+MY_MODULES=
+EXTRA_MODULES=\
+ Nagios/MiniPlugin.pm \
+ HP/SNMP/Utils.pm \
+ HP/Proliant/Component/EventSubsystem.pm \
+ HP/Proliant/Component/EventSubsystem/CLI.pm \
+ HP/Proliant/Component/EventSubsystem/SNMP.pm \
+ HP/Proliant/Component/PowersupplySubsystem.pm \
+ HP/Proliant/Component/PowersupplySubsystem/CLI.pm \
+ HP/Proliant/Component/PowersupplySubsystem/SNMP.pm \
+ HP/Proliant/Component/TemperatureSubsystem.pm \
+ HP/Proliant/Component/TemperatureSubsystem/CLI.pm \
+ HP/Proliant/Component/TemperatureSubsystem/SNMP.pm \
+ HP/Proliant/Component/CpuSubsystem.pm \
+ HP/Proliant/Component/CpuSubsystem/CLI.pm \
+ HP/Proliant/Component/CpuSubsystem/SNMP.pm \
+ HP/Proliant/Component/FanSubsystem.pm \
+ HP/Proliant/Component/FanSubsystem/CLI.pm \
+ HP/Proliant/Component/FanSubsystem/SNMP.pm \
+ HP/Proliant/Component/MemorySubsystem/CLI.pm \
+ HP/Proliant/Component/MemorySubsystem/SNMP.pm \
+ HP/Proliant/Component/MemorySubsystem.pm \
+ HP/Proliant/Component/NicSubsystem/SNMP.pm \
+ HP/Proliant/Component/NicSubsystem.pm \
+ HP/Proliant/Component/AsrSubsystem/CLI.pm \
+ HP/Proliant/Component/AsrSubsystem/SNMP.pm \
+ HP/Proliant/Component/AsrSubsystem.pm \
+ HP/Proliant/Component/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Da/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Da.pm \
+ HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Sas.pm \
+ HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Scsi.pm \
+ HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Ide.pm \
+ HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Fca.pm \
+ HP/Proliant/Component/DiskSubsystem.pm \
+ HP/Proliant/Component/BatterySubsystem/CLI.pm \
+ HP/Proliant/Component/BatterySubsystem/SNMP.pm \
+ HP/Proliant/Component/BatterySubsystem.pm \
+ HP/Proliant/Component.pm \
+ HP/Proliant.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm \
+ HP/BladeSystem/Component/PowerEnclosureSubsystem.pm \
+ HP/BladeSystem/Component/PowerSupplySubsystem.pm \
+ HP/BladeSystem/Component/NetConnectorSubsystem.pm \
+ HP/BladeSystem/Component/ServerBladeSubsystem.pm \
+ HP/BladeSystem/Component.pm \
+ HP/BladeSystem.pm \
+ HP/Storage.pm \
+ HP/StorageWorks.pm \
+ HP/Server.pm
+EXTRA_DIST=check_hpasm.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) >> $@
+ for m in ${EXTRA_MODULES}; do \
+ $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "use Nagios::Plugin" >> $@; \
+ done
+ $(ECHO) "package main;" >> $@
+ $(CAT) check_hpasm.pl | $(AWK) -f ./subst >> $@
+ chmod +x $@
+#| $(GREP) -v "use Nagios" >> $@;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.in
new file mode 100644
index 0000000..e885fb4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.in
@@ -0,0 +1,574 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = plugins-scripts
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = subst
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libexecdir)"
+SCRIPTS = $(libexec_SCRIPTS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/subst.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+VPATH = $(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CELSIUS = @CELSIUS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EXTENDEDINFO = @EXTENDEDINFO@
+HPACUCLI = @HPACUCLI@
+HWINFO = @HWINFO@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_OPTS = @INSTALL_OPTS@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NOINSTLEVEL = @NOINSTLEVEL@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERFDATA = @PERFDATA@
+PERL = @PERL@
+RELEASE = @RELEASE@
+SET_MAKE = @SET_MAKE@
+SH = @SH@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SUPPORT = @SUPPORT@
+VERSION = @VERSION@
+WARRANTY = @WARRANTY@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+with_nagios_group = @with_nagios_group@
+with_nagios_user = @with_nagios_user@
+SED = /bin/sed
+GREP = /bin/grep
+CAT = /bin/cat
+ECHO = /bin/echo
+SUFFIXES = .pl .pm .sh
+libexec_SCRIPTS = check_hpasm
+MY_MODULES =
+EXTRA_MODULES = \
+ Nagios/MiniPlugin.pm \
+ HP/SNMP/Utils.pm \
+ HP/Proliant/Component/EventSubsystem.pm \
+ HP/Proliant/Component/EventSubsystem/CLI.pm \
+ HP/Proliant/Component/EventSubsystem/SNMP.pm \
+ HP/Proliant/Component/PowersupplySubsystem.pm \
+ HP/Proliant/Component/PowersupplySubsystem/CLI.pm \
+ HP/Proliant/Component/PowersupplySubsystem/SNMP.pm \
+ HP/Proliant/Component/TemperatureSubsystem.pm \
+ HP/Proliant/Component/TemperatureSubsystem/CLI.pm \
+ HP/Proliant/Component/TemperatureSubsystem/SNMP.pm \
+ HP/Proliant/Component/CpuSubsystem.pm \
+ HP/Proliant/Component/CpuSubsystem/CLI.pm \
+ HP/Proliant/Component/CpuSubsystem/SNMP.pm \
+ HP/Proliant/Component/FanSubsystem.pm \
+ HP/Proliant/Component/FanSubsystem/CLI.pm \
+ HP/Proliant/Component/FanSubsystem/SNMP.pm \
+ HP/Proliant/Component/MemorySubsystem/CLI.pm \
+ HP/Proliant/Component/MemorySubsystem/SNMP.pm \
+ HP/Proliant/Component/MemorySubsystem.pm \
+ HP/Proliant/Component/NicSubsystem/SNMP.pm \
+ HP/Proliant/Component/NicSubsystem.pm \
+ HP/Proliant/Component/AsrSubsystem/CLI.pm \
+ HP/Proliant/Component/AsrSubsystem/SNMP.pm \
+ HP/Proliant/Component/AsrSubsystem.pm \
+ HP/Proliant/Component/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Da/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Da.pm \
+ HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Sas.pm \
+ HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Scsi.pm \
+ HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Ide.pm \
+ HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Fca.pm \
+ HP/Proliant/Component/DiskSubsystem.pm \
+ HP/Proliant/Component/BatterySubsystem/CLI.pm \
+ HP/Proliant/Component/BatterySubsystem/SNMP.pm \
+ HP/Proliant/Component/BatterySubsystem.pm \
+ HP/Proliant/Component.pm \
+ HP/Proliant.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm \
+ HP/BladeSystem/Component/PowerEnclosureSubsystem.pm \
+ HP/BladeSystem/Component/PowerSupplySubsystem.pm \
+ HP/BladeSystem/Component/NetConnectorSubsystem.pm \
+ HP/BladeSystem/Component/ServerBladeSubsystem.pm \
+ HP/BladeSystem/Component.pm \
+ HP/BladeSystem.pm \
+ HP/Storage.pm \
+ HP/StorageWorks.pm \
+ HP/Server.pm
+
+EXTRA_DIST = check_hpasm.pl $(EXTRA_MODULES)
+CLEANFILES = $(libexec_SCRIPTS)
+AM_INSTALL_PROGRAM_FLAGS = @INSTALL_OPTS@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .pl .pm .sh
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins-scripts/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu plugins-scripts/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+subst: $(top_builddir)/config.status $(srcdir)/subst.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(libexecdir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+ for dir in "$(DESTDIR)$(libexecdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libexecSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libexecSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
+ ctags-am distclean distclean-generic distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libexecSCRIPTS install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags-am uninstall uninstall-am \
+ uninstall-libexecSCRIPTS
+
+.PRECIOUS: Makefile
+
+
+.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) >> $@
+ for m in ${EXTRA_MODULES}; do \
+ $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "use Nagios::Plugin" >> $@; \
+ done
+ $(ECHO) "package main;" >> $@
+ $(CAT) check_hpasm.pl | $(AWK) -f ./subst >> $@
+ chmod +x $@
+#| $(GREP) -v "use Nagios" >> $@;
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Nagios/MiniPlugin.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Nagios/MiniPlugin.pm
new file mode 100755
index 0000000..c4ad442
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Nagios/MiniPlugin.pm
@@ -0,0 +1,333 @@
+package Nagios::MiniPlugin;
+
+use strict;
+use Getopt::Long qw(:config no_ignore_case bundling);
+
+our @STATUS_CODES = qw(OK WARNING CRITICAL UNKNOWN DEPENDENT);
+
+require Exporter;
+our @ISA = qw(Exporter);
+our @EXPORT = (@STATUS_CODES, qw(nagios_exit nagios_die check_messages));
+our @EXPORT_OK = qw(%ERRORS);
+
+use constant OK => 0;
+use constant WARNING => 1;
+use constant CRITICAL => 2;
+use constant UNKNOWN => 3;
+use constant DEPENDENT => 4;
+
+our %ERRORS = (
+ 'OK' => OK,
+ 'WARNING' => WARNING,
+ 'CRITICAL' => CRITICAL,
+ 'UNKNOWN' => UNKNOWN,
+ 'DEPENDENT' => DEPENDENT,
+);
+
+our %STATUS_TEXT = reverse %ERRORS;
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ perfdata => [],
+ messages => {
+ ok => [],
+ warning => [],
+ critical => [],
+ unknown => [],
+ },
+ args => [],
+ opts => Nagios::MiniPlugin::Getopt->new(%params),
+ };
+ foreach (qw(shortname usage version url plugin blurb extra
+ license timeout)) {
+ $self->{$_} = $params{$_};
+ }
+ bless $self, $class;
+}
+
+sub add_arg {
+ my $self = shift;
+ $self->{opts}->add_arg(@_);
+}
+
+sub getopts {
+ my $self = shift;
+ $self->{opts}->getopts();
+}
+
+sub opts {
+ my $self = shift;
+ return $self->{opts};
+}
+
+sub add_message {
+ my $self = shift;
+ my ($code, @messages) = @_;
+ $code = (qw(ok warning critical unknown))[$code] if $code =~ /^\d+$/;
+ $code = lc $code;
+ push @{$self->{messages}->{$code}}, @messages;
+}
+
+sub remove_message {
+ my $self = shift;
+ my ($code, @messages) = @_;
+ $code = (qw(ok warning critical unknown))[$code] if $code =~ /^\d+$/;
+ $code = lc $code;
+ pop @{$self->{messages}->{$code}};
+}
+
+sub add_perfdata {
+ my ($self, %args) = @_;
+ my $str = $args{label}.'='.$args{value};
+ if ($args{uom}) {
+ $str .= $args{uom};
+ }
+ if ($args{warning}) {
+ $str .= ';'.$args{warning};
+ }
+ if ($args{critical}) {
+ $str .= ';'.$args{critical};
+ }
+ push @{$self->{perfdata}}, $str;
+}
+
+
+sub check_messages {
+ my $self = shift;
+ my %args = @_;
+
+ # Add object messages to any passed in as args
+ for my $code (qw(critical warning unknown ok)) {
+ my $messages = $self->{messages}->{$code} || [];
+ if ($args{$code}) {
+ unless (ref $args{$code} eq 'ARRAY') {
+ if ($code eq 'ok') {
+ $args{$code} = [ $args{$code} ];
+ }
+ }
+ push @{$args{$code}}, @$messages;
+ } else {
+ $args{$code} = $messages;
+ }
+ }
+ my %arg = %args;
+ $arg{join} = ' ' unless defined $arg{join};
+
+ # Decide $code
+ my $code = OK;
+ $code ||= CRITICAL if @{$arg{critical}};
+ $code ||= WARNING if @{$arg{warning}};
+ $code ||= UNKNOWN if @{$arg{unknown}};
+ return $code unless wantarray;
+
+ # Compose message
+ my $message = '';
+ if ($arg{join_all}) {
+ $message = join( $arg{join_all},
+ map { @$_ ? join( $arg{'join'}, @$_) : () }
+ $arg{critical},
+ $arg{warning},
+ $arg{unknown},
+ $arg{ok} ? (ref $arg{ok} ? $arg{ok} : [ $arg{ok} ]) : []
+ );
+ }
+
+ else {
+ $message ||= join( $arg{'join'}, @{$arg{critical}} )
+ if $code == CRITICAL;
+ $message ||= join( $arg{'join'}, @{$arg{warning}} )
+ if $code == WARNING;
+ $message ||= join( $arg{'join'}, @{$arg{unknown}} )
+ if $code == UNKNOWN;
+ $message ||= ref $arg{ok} ? join( $arg{'join'}, @{$arg{ok}} ) : $arg{ok}
+ if $arg{ok};
+ }
+
+ return ($code, $message);
+}
+
+sub nagios_exit {
+ my $self = shift;
+ my ($code, $message, $arg) = @_;
+ $code = $ERRORS{$code} if defined $code && exists $ERRORS{$code};
+ $code = UNKNOWN unless defined $code && exists $STATUS_TEXT{$code};
+ $message = '' unless defined $message;
+ if (ref $message && ref $message eq 'ARRAY') {
+ $message = join(' ', map { chomp; $_ } @$message);
+ } else {
+ chomp $message;
+ }
+ my $output = "$STATUS_TEXT{$code}";
+ $output .= " - $message" if defined $message && $message ne '';
+ if (scalar (@{$self->{perfdata}})) {
+ $output .= " | ".join(" ", @{$self->{perfdata}});
+ }
+ $output .= "\n";
+ print $output;
+ exit $code;
+}
+
+package Nagios::MiniPlugin::Getopt;
+
+use strict;
+use File::Basename;
+use Data::Dumper;
+use Getopt::Long qw(:config no_ignore_case bundling);
+
+# Standard defaults
+my %DEFAULT = (
+ timeout => 60,
+ verbose => 0,
+ license =>
+"This nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY.
+It may be used, redistributed and/or modified under the terms of the GNU
+General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).",
+);
+# Standard arguments
+my @ARGS = ({
+ spec => 'usage|?',
+ help => "-?, --usage\n Print usage information",
+ }, {
+ spec => 'help|h',
+ help => "-h, --help\n Print detailed help screen",
+ }, {
+ spec => 'version|V',
+ help => "-V, --version\n Print version information",
+ }, {
+ #spec => 'extra-opts:s@',
+ #help => "--extra-opts=[<section>[@<config_file>]]\n Section and/or config_file from which to load extra options (may repeat)",
+ }, {
+ spec => 'timeout|t=i',
+ help => "-t, --timeout=INTEGER\n Seconds before plugin times out (default: %s)",
+ default => $DEFAULT{timeout},
+ }, {
+ spec => 'verbose|v+',
+ help => "-v, --verbose\n Show details for command-line debugging (can repeat up to 3 times)",
+ default => $DEFAULT{verbose},
+ },
+);
+# Standard arguments we traditionally display last in the help output
+my %DEFER_ARGS = map { $_ => 1 } qw(timeout verbose);
+
+sub _init
+{
+ my $self = shift;
+ my %params = @_;
+ # Check params
+ my $plugin = basename($ENV{NAGIOS_PLUGIN} || $0);
+ #my %attr = validate( @_, {
+ my %attr = (
+ usage => 1,
+ version => 0,
+ url => 0,
+ plugin => { default => $plugin },
+ blurb => 0,
+ extra => 0,
+ 'extra-opts' => 0,
+ license => { default => $DEFAULT{license} },
+ timeout => { default => $DEFAULT{timeout} },
+ );
+
+ # Add attr to private _attr hash (except timeout)
+ $self->{timeout} = delete $attr{timeout};
+ $self->{_attr} = { %attr };
+ foreach (keys %{$self->{_attr}}) {
+ if (exists $params{$_}) {
+ $self->{_attr}->{$_} = $params{$_};
+ } else {
+ $self->{_attr}->{$_} = $self->{_attr}->{$_}->{default}
+ if ref ($self->{_attr}->{$_}) eq 'HASH' &&
+ exists $self->{_attr}->{$_}->{default};
+ }
+ }
+ # Chomp _attr values
+ chomp foreach values %{$self->{_attr}};
+
+ # Setup initial args list
+ $self->{_args} = [ grep { exists $_->{spec} } @ARGS ];
+
+ $self
+}
+
+sub new
+{
+ my $class = shift;
+ my $self = bless {}, $class;
+ $self->_init(@_);
+}
+
+sub add_arg {
+ my $self = shift;
+ my %arg = @_;
+ push (@{$self->{_args}}, \%arg);
+}
+
+sub getopts {
+ my $self = shift;
+ my %commandline = ();
+ my @params = map { $_->{spec} } @{$self->{_args}};
+ if (! GetOptions(\%commandline, @params)) {
+ $self->print_help();
+ exit 0;
+ } else {
+ no strict 'refs';
+ do { $self->print_help(); exit 0; } if $commandline{help};
+ do { $self->print_version(); exit 0 } if $commandline{version};
+ do { $self->print_usage(); exit 0 } if $commandline{usage};
+ foreach (map { $_->{spec} =~ /^([\w\-]+)/; $1; } @{$self->{_args}}) {
+ my $field = $_;
+ *{"$field"} = sub {
+ return $self->{opts}->{$field};
+ };
+ }
+ foreach (grep { exists $_->{default} } @{$self->{_args}}) {
+ $_->{spec} =~ /^([\w\-]+)/;
+ my $spec = $1;
+ $self->{opts}->{$spec} = $_->{default};
+ }
+ foreach (keys %commandline) {
+ $self->{opts}->{$_} = $commandline{$_};
+ }
+ }
+}
+
+sub get {
+ my $self = shift;
+ my $opt = shift;
+ return $self->{opts}->{$opt};
+}
+
+sub print_help {
+ my $self = shift;
+ $self->print_version();
+ printf "\n%s\n", $self->{_attr}->{license};
+ printf "\n%s\n\n", $self->{_attr}->{blurb};
+ $self->print_usage();
+ foreach (@{$self->{_args}}) {
+ printf " %s\n", $_->{help};
+ }
+ exit 0;
+}
+
+sub print_usage {
+ my $self = shift;
+ printf $self->{_attr}->{usage}, $self->{_attr}->{plugin};
+ print "\n";
+}
+
+sub print_version {
+ my $self = shift;
+ printf "%s %s", $self->{_attr}->{plugin}, $self->{_attr}->{version};
+ printf " [%s]", $self->{_attr}->{url} if $self->{_attr}->{url};
+ print "\n";
+}
+
+sub print_license {
+ my $self = shift;
+ printf "%s\n", $self->{_attr}->{license};
+ print "\n";
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/check_hpasm.pl b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/check_hpasm.pl
new file mode 100755
index 0000000..65495f6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/check_hpasm.pl
@@ -0,0 +1,215 @@
+#! /usr/bin/perl
+
+use strict;
+
+my $CELSIUS = 1;
+my $PERFDATA = 1;
+my $EXTENDEDINFO = 1;
+my $HWINFO = 1;
+my $HPACUCLI = 1;
+my $NOINSTLEVEL = 'unknown';
+
+use constant OK => 0;
+use constant WARNING => 1;
+use constant CRITICAL => 2;
+use constant UNKNOWN => 3;
+use constant DEPENDENT => 4;
+
+my $plugin = Nagios::MiniPlugin->new(
+ shortname => '',
+ usage => 'Usage: %s [ -v|--verbose ] [ -t <timeout> ] '.
+ '--hostname <proliant> --community <snmp-community>'.
+ ' ...]',
+ version => '4.0',
+ blurb => 'This plugin checks the hardware of hp/compaq proliant servers',
+ url => 'http://labs.consol.de/nagios/check_hpasm',
+ timeout => 60,
+ shortname => '',
+);
+$plugin->add_arg(
+ spec => 'blacklist|b=s',
+ help => '--blacklist
+ Blacklist some (missing/failed) components',
+ required => 0,
+ default => '',
+);
+$plugin->add_arg(
+ spec => 'ignore-dimms|i',
+ help => '--ignore-dimms
+ Ignore "N/A"-DIMM status on misc. servers (e.g. older DL320)',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'ignore-fan-redundancy',
+ help => '--ignore-fan-redundancy
+ Ignore missing redundancy partners',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'customthresholds|c=s',
+ help => '--customthresholds
+ Use custom thresholds for certain temperatures',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'eventrange=s',
+ help => '--eventrange=<warningrange>/<criticalrange>
+ Period of time before critical IML events respecively become warnings or vanish
+ A range is descibed as a number and a unit (s, m, h, d), e.g. --eventrange 1h/20m',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'perfdata=s',
+ help => '--perfdata=[short]
+ Output performance data. If your performance data string becomes
+ too long and is truncated by Nagios, then you can use --perfdata=short
+ instead. This will output temperature tags without location information',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'hostname|H=s',
+ help => '--hostname
+ Hostname or IP-address of the server (SNMP mode only)',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'port=i',
+ help => '--port
+ The SNMP port to use (default: 161)',
+ required => 0,
+ default => 161,
+);
+$plugin->add_arg(
+ spec => 'protocol|P=s',
+ help => '--protocol
+ The SNMP protocol to use (default: 2c, other possibilities: 1,3)',
+ required => 0,
+ default => '2c',
+);
+$plugin->add_arg(
+ spec => 'domain|d=s',
+ help => '--domain
+ The transport protocol to use (default: udp, other possibilities: tcp)',
+ required => 0,
+ default => 'udp',
+);
+$plugin->add_arg(
+ spec => 'community|C=s',
+ help => '--community
+ SNMP community of the server (SNMP v1/2 only)',
+ required => 0,
+ default => 'public',
+);
+$plugin->add_arg(
+ spec => 'username=s',
+ help => '--username
+ The securityName for the USM security model (SNMPv3 only)',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'authpassword=s',
+ help => '--authpassword
+ The authentication password for SNMPv3',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'authprotocol=s',
+ help => '--authprotocol
+ The authentication protocol for SNMPv3 (md5|sha)',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'privpassword=s',
+ help => '--privpassword
+ The password for authPriv security level',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'privprotocol=s',
+ help => '--privprotocol
+ The private protocol for SNMPv3 (des|aes|aes128|3des|3desde)',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'snmpwalk=s',
+ help => '--snmpwalk
+ A file with the output of snmpwalk 1.3.6.1.4.1.232',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'hpasmcli=s',
+ help => '--hpasmcli
+ A file with the output of hpasmcli',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'servertype=s',
+ help => '--servertype
+ The type of the server: proliant (default) or bladesystem',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'eval-nics',
+ help => '--eval-nics
+ Check network interfaces (and groups). Try it and report me whyt you think about it. I need to build up some know how on this subject. If get an error and you think, it is not justified for your configuration, please tell me about it. (alwasy send the output of "snmpwalk -On .... 1.3.6.1.4.1.232" and a description how you setup your nics and why it is correct opposed to the plugins error message',
+ required => 0,
+);
+
+$plugin->getopts();
+if (! $PERFDATA && $plugin->opts->get('perfdata')) {
+ $PERFDATA = 1;
+}
+if ($PERFDATA && $plugin->opts->get('perfdata') &&
+ ($plugin->opts->get('perfdata') eq 'short')) {
+ $PERFDATA = 2;
+}
+$plugin->{messages}->{unknown} = []; # wg. add_message(UNKNOWN,...)
+
+$plugin->{info} = []; # gefrickel
+
+$SIG{'ALRM'} = sub {
+ printf "UNKNOWN - check_hpasm timed out after %d seconds\n",
+ $plugin->opts->get('timeout');
+ exit $ERRORS{UNKNOWN};
+};
+alarm($plugin->opts->get('timeout'));
+
+my $server = HP::Server->new( runtime => {
+ plugin => $plugin,
+ options => {
+ servertype => $plugin->opts->get('servertype'),
+ verbose => $plugin->opts->get('verbose'),
+ scrapiron => 0,
+ ignore_fan_redundancy => $plugin->opts->get('ignore-fan-redundancy'),
+ ignore_dimms => $plugin->opts->get('ignore-dimms'),
+ customthresholds => $plugin->opts->get('customthresholds'),
+ eventrange => $plugin->opts->get('eventrange'),
+ blacklist => $plugin->opts->get('blacklist'),
+ celsius => $CELSIUS,
+ perfdata => $PERFDATA,
+ extendedinfo => $EXTENDEDINFO,
+ hwinfo => $HWINFO,
+ hpacucli => $HPACUCLI,
+ noinstlevel => $NOINSTLEVEL,
+ },
+},);
+if (! $plugin->check_messages()) {
+ $server->init();
+ $plugin->add_message(OK, $server->identify()) if $HWINFO;
+ if (! $plugin->check_messages()) {
+ $plugin->add_message(OK, 'hardware working fine');
+ $plugin->add_message(OK, $server->get_summary())
+ if $server->get_summary();
+ $plugin->add_message(OK, $server->get_extendedinfo())
+ if $server->get_extendedinfo();
+ }
+} else {
+ $plugin->add_message(CRITICAL, 'wrong device');
+}
+
+my ($code, $message) = $plugin->check_messages(join => ', ', join_all => ', ');
+$message .= sprintf "\n%s\n", join("\n", @{$plugin->{info}})
+ if $plugin->opts->get('verbose') >= 1;
+#printf "%s\n", Data::Dumper::Dumper($plugin->{info});
+$plugin->nagios_exit($code, $message);
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/subst.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/subst.in
new file mode 100755
index 0000000..7ddb10c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/subst.in
@@ -0,0 +1,64 @@
+#!/usr/bin/awk
+
+function which(c,path) {
+ cmd = "test -x " c;
+
+ if (system(cmd)==0) {
+ return c;
+ }
+
+ sub(/\/.*\//,"",c);
+ for (dir in path) {
+ cmd = "test -x " path[dir] "/" c;
+ if (system(cmd)==0) {
+ return path[dir] "/" c;
+ }
+ }
+
+
+ return c;
+}
+
+# used to replace "use lib utils.pm" with "use lib @libexecdir"
+#
+function led() {
+ led1 = "@libexecdir@";
+ led2 = "@exec_prefix@";
+ led3 = "@prefix@";
+ if ( match(led1, /^\$\{exec_prefix\}/ ) != 0 ) {
+ return "\"" led3 "/libexec\" " ;
+
+ }
+ return "\"" led1 "\"" ;
+}
+
+BEGIN {
+ split(ENVIRON["PATH"] ":/sbin:/usr/sbin",path,/:/);
+
+}
+
+# scripting language (first line)
+
+/^#! ?\/.*\/python/ {sub(/^#! ?\/.*\/python/,"#! @PYTHON@");}
+/^#! ?\/.*\/perl/ {sub(/^#! ?\/.*\/perl/,"#! @PERL@");}
+/^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! @AWK@");}
+/^#! ?\/.*\/sh/ {sub(/^#! ?\/.*\/sh/,"#! @SHELL@");}
+
+# add to libexecdir to INC for perl utils.pm
+/^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } }
+
+
+# Replace the placeholders with the values from configure
+/#PERL#/ {sub(/#PERL#/,"@PERL@");}
+/my \$NOINSTLEVEL = 'unknown'/ {sub(/unknown/,"@NOINSTLEVEL@");}
+/my \$CELSIUS = 1;/ {sub(/1/,"@CELSIUS@");}
+/my \$PERFDATA = 1;/ {sub(/1/,"@PERFDATA@");}
+/my \$EXTENDEDINFO = 1;/ {sub(/1/,"@EXTENDEDINFO@");}
+/my \$HWINFO = 1;/ {sub(/1/,"@HWINFO@");}
+/my \$HPACUCLI = 1;/ {sub(/1/,"@HPACUCLI@");}
+/version => '.*',/ {sub(/'.*'/,"'@PACKAGE_VERSION@'");}
+
+{
+ print;
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/control
new file mode 100644
index 0000000..fc2d222
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/control
@@ -0,0 +1,18 @@
+Homepage: http://labs.consol.de/lang/en/nagios/check_hpasm/
+Watch: http://labs.consol.de/lang/en/nagios/check_hpasm/ check_hpasm-([0-9.]+)\.tar\.gz
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to check the hardware health of
+ HP Proliant Servers
+ It either uses snmp or - if installed - the hpasm package locally.
+ The plugin checks the health of
+ * Processors
+ * Power supplies
+ * Memory modules
+ * Fans
+ * CPU- and board-temperatures
+ * Raids
+ and alerts you if one of these components is faulty or operates
+ outside its normal parameters.
+Build-Depends: autotools-dev
+Recommends: snmp
+Version: 4.8
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/copyright
new file mode 100644
index 0000000..f6a171b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/copyright
@@ -0,0 +1,19 @@
+AUTHOR: Gerhard Lausser <gerhard.lausser@consol.de>
+License: GPL v2
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/src b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/src
new file mode 120000
index 0000000..c8ffc86
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/src
@@ -0,0 +1 @@
+check_hpasm-4.8 \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/Makefile
new file mode 100644
index 0000000..52de70c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/Makefile
@@ -0,0 +1,4 @@
+#/usr/bin/make -f
+
+include ../common.mk
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/check_httpd_status b/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/check_httpd_status
new file mode 100644
index 0000000..2e38325
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/check_httpd_status
@@ -0,0 +1,444 @@
+#!/usr/bin/perl -w
+####################### check_httpd_status.pl #######################
+# Version : 1.3
+# Date : 06 Aug 2010
+#
+# V1.3 Rewrite using Nagios::Plugin, rename check_httpd_status.pl (Stéphane Urbanovski)
+# V1.2 Updated perf data to be PNP compliant, added proxy option (Gerhard Lausser)
+# V1.1 Works with lighttpd server-status as well, added accesses perfdata
+# V1.0 Inital Release
+#
+#
+# Authors : Dennis D. Spreen (dennis at spreendigital.de)
+# Based on check_apachestatus.pl v1.4 by
+# De Bodt Lieven (Lieven dot DeBodt at gmail.com)
+# Updated by
+# Karsten Behrens (karsten at behrens dot in)
+# Geoff McQueen (geoff dot mcqueen at hiivesystems dot com )
+# Dave Steinberg (dave at redterror dot net)
+# Updated by
+# Gerhard Lausser (gerhard dot lausser at consol dot de)
+# Licence : GPL - http://www.fsf.org/licenses/gpl.txt
+#############################################################
+#
+#
+
+use strict;
+use warnings;
+#use Data::Dumper;
+
+use File::Basename; # get basename()
+
+use POSIX qw(setlocale);
+use Locale::gettext;
+
+use Nagios::Plugin ;
+
+use LWP::UserAgent;
+use HTTP::Status; # get status_message()
+use Time::HiRes qw(gettimeofday tv_interval);
+use Digest::MD5 qw(md5 md5_hex);
+
+
+# Globals
+
+my $VERSION = '1.3';
+my $TIMEOUT = 10;
+my $PROGNAME = basename($0);
+# my $PROGNAME = 'check_httpd_status.pl';
+
+# Retention files path (save previous values) :
+# FIXME: Make this configurable
+my $TempPath = '/tmp/';
+
+# Check freshness og previous values
+my $MaxUptimeDif = 60*30; # Maximum uptime difference (seconds), default 30 minutes
+
+
+# i18n :
+setlocale(LC_MESSAGES, '');
+textdomain('nagios-plugins-perl');
+
+# Translate Apache / lighthttpd scoreboard status
+my %TranslationTable = (
+ 'APACHE' => {
+ '.' => 'OpenSLot',
+ '_' => 'Waiting',
+ 'I' => 'Idle',
+ 'S' => 'Starting',
+ 'R' => 'Reading',
+ 'W' => 'Sending',
+ 'K' => 'Keepalive',
+ 'D' => 'DNS',
+ 'C' => 'Closing',
+ 'L' => 'Logging',
+ 'G' => 'Finishing',
+ },
+ 'LIGHTTPD' => {
+ '.' => 'Connect',
+ 'C' => 'Close',
+ 'E' => 'HardError',
+ 'r' => 'Read',
+ 'R' => 'ReadPost',
+ 'W' => 'Write',
+ 'h' => 'HandleRequest',
+ 'q' => 'RequestStart',
+ 'Q' => 'ReqestEnd',
+ 's' => 'ResponseStart',
+ 'S' => 'ResponseEnd',
+ },
+);
+
+
+my $np = Nagios::Plugin->new(
+ version => $VERSION,
+ blurb => _gt('Apache / Lighthttpd server status monitor for Nagios'),
+ usage => "Usage: %s [ -H <host> [-p <port>] [-t <timeout>] [-w <warn_level> -c <crit_level>] [-V] [-u <url>] [-U user -P pass -r realm]",
+ extra => &showExtra(),
+ timeout => $TIMEOUT+1
+);
+
+$np->add_arg (
+ spec => 'hostname|H=s',
+ help => _gt('Name or IP address of host to check'),
+ required => 1,
+);
+
+$np->add_arg (
+ spec => 'port|p=i',
+ help => _gt('Http port'),
+);
+$np->add_arg (
+ spec => 'url|u=s',
+ help => _gt('Specific URL to use, instead of the default http://<hostname>/server-status?auto'),
+ default => '/server-status?auto',
+);
+
+$np->add_arg (
+ spec => 'user|U=s',
+ help => _gt('Username for basic auth'),
+);
+$np->add_arg (
+ spec => 'pass|P=s',
+ help => _gt('Password for basic auth'),
+);
+$np->add_arg (
+ spec => 'realm|r=s',
+ help => _gt('Realm for basic auth'),
+);
+$np->add_arg (
+ spec => 'proxy|X=s',
+ help => _gt('Proxy-URL for http and https (mandatory)'),
+);
+
+$np->add_arg (
+ spec => 'warn|w=s',
+ help => _gt('Number of available slots that will cause a warning (Range format).'),
+);
+$np->add_arg (
+ spec => 'crit|c=s',
+ help => _gt('Number of available slots that will cause an error (Range format).'),
+);
+
+
+$np->getopts;
+
+my $o_host = $np->opts->get('hostname');
+my $o_port = $np->opts->get('port');
+my $o_url = $np->opts->get('url');
+my $o_user = $np->opts->get('user');
+my $o_pass = $np->opts->get('pass');
+my $o_realm = $np->opts->get('realm');
+my $o_proxy = $np->opts->get('proxy');
+my $o_warn_level = $np->opts->get('warn');
+my $o_crit_level = $np->opts->get('crit');
+
+# if (((defined($o_warn_level) && !defined($o_crit_level)) ||
+# (!defined($o_warn_level) && defined($o_crit_level))) ||
+# ((defined($o_warn_level) && defined($o_crit_level)) && (($o_warn_level != -1) && ($o_warn_level <= $o_crit_level)))
+# ) {
+# $np->nagios_exit(UNKNOWN, _gt("Check warn and crit!") );
+# }
+
+my $o_proto = 'http';
+my $url = undef;
+my $httpserver = 'APACHE'; #assume it is apache by default
+
+if (($o_url =~ m/^http(s?)\:\/\//i) ){
+ $url = $o_url;
+ if ($1 eq 's') {
+ $o_proto = 'https';
+ }
+} else {
+ $url = $o_proto.'://' . $o_host;
+ if ( defined($o_port)) {
+ $url .= ':' . $o_port;
+ }
+ if ( $o_url !~ /^\// ) {
+ $url .= '/';
+ }
+ $url .= $o_url;
+}
+
+if ( $url !~ /\?auto$/ ) {
+ $url .= '/server-status?auto';
+}
+
+my $ua = LWP::UserAgent->new( protocols_allowed => ['http', 'https'], timeout => $TIMEOUT);
+$ua->agent($PROGNAME.'-'.$VERSION);
+
+
+logD("Web URL : $url");
+
+my $req = HTTP::Request->new( GET => $url );
+if ( defined($o_user) ) {
+ $req->authorization_basic($o_user, $o_pass);
+}
+
+if ( defined($o_proxy) ) {
+ if ($o_proto eq 'https') {
+ if ($o_proxy =~ /^http:\/\/(.*?)\/?$/) {
+ $o_proxy = $1;
+ }
+ $ENV{HTTPS_PROXY} = $o_proxy;
+ } else {
+ $ua->proxy(['http'], $o_proxy);
+ }
+}
+
+my $timing0 = [gettimeofday];
+my $response = $ua->request($req);
+my $timeelapsed = tv_interval($timing0, [gettimeofday]);
+
+
+if ( $response->is_error() ) {
+ my $err = $response->code." ".status_message($response->code)." (".$response->message.")";
+ my $status = CRITICAL;
+ $np->add_message(CRITICAL, );
+
+ if (defined($o_warn_level) || defined($o_crit_level)) {
+ $status = UNKNOWN;
+ }
+ $np->nagios_exit($status, _gt("HTTP error: ").$err );
+
+} elsif ( ! $response->is_success() ) {
+ my $err = $response->code." ".status_message($response->code)." (".$response->message.")";
+ $np->add_message(CRITICAL, _gt("Internal error: ").$err );
+}
+
+
+
+my $webcontent = $response->content;
+
+logD("Web content :\n----------------------------\n".$webcontent."\n----------------------------");
+
+my $patternFound = 0;
+
+my $Uptime = 0;
+# if ( $webcontent =~ m/Uptime: (.*?)\n/) {
+ # $Uptime = $1;
+ # $patternFound++;
+# }
+### FIXME XH 20171204 catch ServerUptimeSeconds, not [Server]Uptime. Change in server-status between 2.2 & 2.4
+if ( $webcontent =~ m/\b(ServerUptimeSeconds|Uptime): (\d+)\n/) {
+ $Uptime = $2;
+ $patternFound++;
+}
+
+my $TotalAccesses = 0;
+if ( $webcontent =~ m/Total Accesses: (.*?)\n/) {
+ $TotalAccesses = $1;
+ $patternFound++;
+} else {
+ $np->add_message(WARNING, _gt('"Total Accesses" not set ! (need extented status ?)') );
+}
+
+my $TotalKbytes = 0;
+if ( $webcontent =~ m/Total kBytes: (.*?)\n/) {
+ $TotalKbytes = $1;
+ $patternFound++;
+}
+
+my $ScoreBoard = '';
+if ( $webcontent =~ m/Scoreboard: (.*?)\n/) {
+ $ScoreBoard = $1;
+ $patternFound++;
+} else {
+ $np->add_message(WARNING, _gt("Scoreboard not found in reponse !") );
+}
+
+my $BusyWorkers = 0;
+if ( $webcontent =~ m/(BusyWorkers|BusyServers): (.*?)\n/) {
+ $BusyWorkers = $2;
+ $patternFound++;
+ if ($1 eq 'BusyServers') {
+ $httpserver = 'LIGHTTPD';
+ }
+}
+
+my $IdleWorkers = 0;
+if ( $webcontent =~ m/(IdleWorkers|IdleServers): (.*?)\n/) {
+ $IdleWorkers = $2;
+ $patternFound++;
+}
+
+if ( $patternFound <= 1) {
+ $np->nagios_exit(CRITICAL, _gt("Server-status informations not found !") );
+}
+
+
+my $TempFile = $TempPath.$o_host.'_check_httpd_status'.md5_hex($url);
+
+my $LastUptime = 0;
+my $LastTotalAccesses = 0;
+my $LastTotalKbytes = 0;
+
+if ((-e $TempFile) && (-r $TempFile) && (-w $TempFile)) {
+ if ( !open (RETENTION_FILE, '<',$TempFile) ) {
+ $np->nagios_exit(CRITICAL, sprintf(_gt('Error while trying to read %s !'),$TempFile) );
+ }
+ $LastUptime = <RETENTION_FILE>;
+ $LastTotalAccesses = <RETENTION_FILE>;
+ $LastTotalKbytes = <RETENTION_FILE>;
+ close (RETENTION_FILE);
+ chomp($LastUptime);
+ chomp($LastTotalAccesses);
+ chomp($LastTotalKbytes);
+ logD("LastUptime=$LastUptime LastTotalAccesses=$LastTotalAccesses LastTotalKbytes=$LastTotalKbytes (from $TempFile)");
+
+} else {
+ logD("Retention file '$TempFile' not found");
+}
+
+if ( !open (RETENTION_FILE, '>',$TempFile) ) {
+ $np->nagios_exit(CRITICAL, sprintf(_gt('Error while trying to write to %s !'),$TempFile) );
+}
+print RETENTION_FILE "$Uptime\n";
+print RETENTION_FILE "$TotalAccesses\n";
+print RETENTION_FILE "$TotalKbytes\n";
+close (RETENTION_FILE);
+
+my $ReqPerSec = 0;
+my $BytesPerReq = 0;
+my $BytesPerSec = 0;
+
+my $DiffTime = $Uptime-$LastUptime;
+
+if ( ($DiffTime > 0) && ($DiffTime < $MaxUptimeDif) && ($TotalAccesses >= $LastTotalAccesses) && ($TotalKbytes >= $LastTotalKbytes) ) {
+
+ $ReqPerSec = ($TotalAccesses-$LastTotalAccesses)/$DiffTime;
+ $np->add_perfdata(
+ 'label' => 'ReqPerSec',
+ 'value' => sprintf('%.3f',$ReqPerSec),
+ 'uom' => 'req/s',
+ );
+
+ $BytesPerSec = (($TotalKbytes-$LastTotalKbytes)*1024)/$DiffTime;
+ $np->add_perfdata(
+ 'label' => 'BytesPerSec',
+ 'value' => sprintf('%.2f',$BytesPerSec),
+ 'uom' => 'B/s',
+ );
+
+ my $Accesses = ($TotalAccesses-$LastTotalAccesses);
+
+ if ( $Accesses > 0 ) {
+ $BytesPerReq = (($TotalKbytes-$LastTotalKbytes)*1024)/$Accesses;
+ $np->add_perfdata(
+ 'label' => 'BytesPerReq',
+ 'value' => sprintf('%.2f',$BytesPerReq),
+ 'uom' => 'B/req',
+ );
+ }
+}
+
+my $CountOpenSlots = ($ScoreBoard =~ tr/\.//);
+my $TotalSlots = $CountOpenSlots+$IdleWorkers+$BusyWorkers;
+my $InfoData = '';
+
+my %WorkerStates = ();
+
+map( $WorkerStates{$_}++ , split(//,$ScoreBoard) );
+
+
+foreach my $slotState ( sort(keys(%{$TranslationTable{$httpserver}})) ) {
+ my $val = 0 ;
+ if ( defined($WorkerStates{$slotState}) ) {
+ $val = $WorkerStates{$slotState};
+ }
+
+ $np->add_perfdata(
+ 'label' => $TranslationTable{$httpserver}{$slotState},
+ 'value' => $val,
+ );
+}
+
+
+if ( $httpserver eq 'APACHE' ) {
+ $InfoData = sprintf ("%.3f s - %d/%d Busy/Idle, %d/%d Open/Total, %.1f requests/s, %.1f B/s, %d B/request",
+ $timeelapsed, $BusyWorkers, $IdleWorkers, $CountOpenSlots, $TotalSlots, $ReqPerSec, $BytesPerSec, $BytesPerReq);
+
+} else {
+ $InfoData = sprintf ("%.3f sec. response time, Busy/Idle %d/%d, slots %d, ReqPerSec %.1f, BytesPerReq %d, BytesPerSec %d",
+ $timeelapsed, $BusyWorkers, $IdleWorkers, $TotalSlots, $ReqPerSec, $BytesPerReq, $BytesPerSec);
+
+}
+
+$np->add_message(OK, $InfoData);
+
+
+my $fw = $CountOpenSlots + $IdleWorkers;
+
+logD("FreeWorker = ".$fw);
+
+my $tmp_status = $np->check_threshold(
+ check => $fw,
+ warning => $o_warn_level,
+ critical => $o_crit_level,
+);
+
+$np->add_perfdata(
+ 'label' => 'FreeWorker',
+ 'value' => $fw,
+ 'min' => 0,
+ 'threshold' => $np->threshold()
+);
+
+if ( $tmp_status ) {
+ $np->add_message($tmp_status, sprintf(_gt(" Not enough free worker (%d) !"),$fw) );
+}
+
+
+
+my ($status, $message) = $np->check_messages('join' => ' ');
+$np->nagios_exit($status, $message );
+
+
+sub logD {
+ print STDERR 'DEBUG: '.$_[0]."\n" if ($np->opts->verbose);
+}
+sub logW {
+ print STDERR 'WARNING: '.$_[0]."\n" if ($np->opts->verbose);
+}
+# Gettext wrapper
+sub _gt {
+ return gettext($_[0]);
+}
+sub showExtra {
+ return <<EOT;
+(c)2009 Dennis D. Spreen
+(c)2010 Stéphane Urbanovski
+
+Note :
+
+ This plugin check Apache or Lighthttpd server-status page (using mod_status). It require the ?auto option.
+
+ Warning and critical values follow Nagios::Plugins::Threshold format. See http://nagiosplug.sourceforge.net/developer-guidelines.html
+
+ Example (note the trailing colon):
+
+ check_httpd_status -H www.server.org -w 100: -c 10:
+ Warn if less than 100 workers are available
+ Crit if less than 10 workers are available
+EOT
+} \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/control
new file mode 100644
index 0000000..d490cb3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/control
@@ -0,0 +1,7 @@
+Homepage: http://cvs.orion.education.fr/viewvc/viewvc.cgi/nagios-plugins-perl/trunk/plugins/check_httpd_status.pl?view=log
+Watch: http://cvs.orion.education.fr/viewvc/viewvc.cgi/nagios-plugins-perl/trunk/plugins/check_httpd_status.pl?view=log <a name="(rev[^"]+)"></a>
+Recommends: liblocale-gettext-perl, libmonitoring-plugin-perl | libnagios-plugin-perl, liblwp-useragent-determined-perl
+Version: rev204
+Uploaders: Jan Wagner <waja@cyconet.org>
+Description: plugin checking Apache or Lighthttpd
+ server-status page (using mod_status)
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/copyright
new file mode 100644
index 0000000..4d8f6a9
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/copyright
@@ -0,0 +1,14 @@
+Dennis D. Spreen (dennis at spreendigital.de)
+De Bodt Lieven (Lieven dot DeBodt at gmail.com)
+Karsten Behrens (karsten at behrens dot in)
+Geoff McQueen (geoff dot mcqueen at hiivesystems dot com )
+Dave Steinberg (dave at redterror dot net)
+Gerhard Lausser (gerhard dot lausser at consol dot de)
+Stéphane Urbanovski <stephane.urbanovski@ac-nancy-metz.fr>
+
+License: GPL v2
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/httpd_status.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/httpd_status.cfg
new file mode 100644
index 0000000..eac8149
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/httpd_status.cfg
@@ -0,0 +1,5 @@
+# 'check_httpd_status' command definition
+define command{
+ command_name check_httpd_status
+ command_line /usr/lib/nagios/plugins/check_httpd_status -H $HOSTADDRESS$ -p '$ARG1$' -w '$ARG2$': -c '$ARG3$': '$ARG4$'
+ }
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/tests b/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/tests
new file mode 100644
index 0000000..c374a76
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_httpd_status/tests
@@ -0,0 +1,3 @@
+Depends: apache2, liblocale-gettext-perl, libmonitoring-plugin-perl | libnagios-plugin-perl, liblwp-useragent-determined-perl
+Test-Command: /usr/lib/nagios/plugins/check_httpd_status -H localhost
+Restrictions: needs-root, allow-stderr, isolation-container
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/COPYING b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/Makefile
new file mode 100644
index 0000000..8253f23
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/Makefile
@@ -0,0 +1,6 @@
+#/usr/bin/make -f
+
+DOCFILES = contrib/default-combinedgraph.template
+
+include ../common.mk
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/README.md b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/README.md
new file mode 100644
index 0000000..845a354
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/README.md
@@ -0,0 +1,67 @@
+# check_ipmi_sensor - Nagios/Icinga plugin to check IPMI sensors [![License: GPL v3+](https://img.shields.io/badge/License-GPL%20v3%2B-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
+
+## Description
+With this plugin the hardware status of a server can be monitored with Nagios, Icinga or Icinga 2. Specifically, fan speeds, temperatures, voltages, power consumption, power supply performance, etc. can be monitored.
+
+## Requirements
+* Nagios, Icinga or Icinga 2
+* FreeIPMI version 0.5.1 or newer
+* Perl
+* Perl IPC::Run
+
+## Installation hints
+For detailed information, installation instructions and definition examples, please go to:
+
+* [IPMI Sensor Monitoring Plugin](https://www.thomas-krenn.com/en/wiki/IPMI_Sensor_Monitoring_Plugin)
+
+### Destination folder
+Copy this plugin to the following folder:
+
+ /usr/lib/nagios/plugins/check_ipmi_sensor
+
+### Debian/Ubuntu
+Install missing lib:
+
+ apt-get install libipc-run-perl
+
+### CentOS
+Install missing lib:
+
+ yum install perl-IPC-Run freeipmi
+
+### Additional
+If you are running the plugin locally and not via network, the user 'nagios'
+needs root privileges for calling:
+* ipmimonitoring/ipmi-sensors/ipmi-sel/[ipmi-fru]/[ipmi-dcmi]
+
+You can achieve that by adding a sudoers config (e.g. for ipmi-sensors)
+
+ nagios ALL=(root) NOPASSWD: /usr/sbin/ipmi-sensors, /usr/sbin/ipmi-sel, /usr/sbin/ipmi-fru, /usr/sbin/ipmi-dcmi
+
+Please check with '-vvv' which commands are run by the plugin!
+
+## Notes on ipmi-sel
+If you want to clear the ipmi system event log, please use ipmi-sel.
+
+### Remote machine
+ /usr/sbin/ipmi-sel -h $IP -u ADMIN -p $PW -l ADMIN --clear
+
+### Local machine
+ /usr/sbin/ipmi-sel --clear
+
+## License
+Copyright (C) 2009-2019 [Thomas-Krenn.AG](https://www.thomas-krenn.com/en/index.html),
+additional contributors see changelog.txt
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 3 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, see <http://www.gnu.org/licenses/>.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/changelog b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/changelog
new file mode 100644
index 0000000..0bf50ac
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/changelog
@@ -0,0 +1,129 @@
+################################################################################
+Changelog for check_ipmi_sensor, a Nagios/Icinga plugin to check IPMI sensors
+################################################################################
+
+Version 3.13 20190123
+ * Option --unify-sensors to unify sensor names across platforms
+ (closes issue #8)
+ * Options --xx and -sx now support regular expressions (closes issue #25)
+ * Added --selonly option to check only System Event Log (closes issue #12)
+ * Added --seltail to limit SEL output to specified count of last messages
+ * Added ipmi-dcmi command to fetch current power (closes issue #26)
+ * Added spec file for creating a rpm file under RHEL (closes issue #24)
+ * Added check sensor event and reading for absent sensors
+ * Added installation hints for CentOS
+ * Bug fixes and minor improvements
+ * Updated help texts and usage information
+ * Updated copyright information
+
+Version 3.12 20161005
+ * New Options added (closes issue #6)
+ Option -xT to exclude monitored sensor types
+ Option -xST to exclude SEL entries of specific sensor types
+ * Improved error message when a monitored server seems to be powered off
+ * More comprehensible output for warnings caused by SEL entries
+ (closes issue #7)
+
+Version 3.11 20160524
+ * Skip entities which are absent if '--noentityabsent' is present
+ * Per default monitor all SEL sensor types
+ Add command line flag to specify entry types for SEL
+
+Version 3.10 20151020
+ * Only monitor specific sensor types from the system event log (SEL).
+ The check with ipmi-sel is limited to types of Memory and Processor for
+ monitoring.
+
+Version 3.9 20150624
+ * Add exclude files for sensors - use name and type in a file to exclude not
+ needed sensors (-xx for normal sensors, -sx for SEL entries).
+
+Version 3.8 20150402
+ * If ipmi host is ommited, localhost is assumed without a LAN driver
+ * Add a 'nosudo' option to disable sudo
+ * Only add sudo if user is not already root
+ * Fix base command usage on localhost
+ * Only add hostname parameter if not on localhost
+ * Check if freeipmi version supports output-sensor-thresholds
+ * Print sensor thresholds fetched via output-sensor-thresholds
+
+Version 3.7 20150211
+ * Add LAN driver LAN_2_0 to ipmi-sel and ipmi-fru
+
+Version 3.6 20150107
+ * Fix ipmi calls on localhost with sudo
+ * Monitor ipmi system event log with ipmi-sel
+ * Enhance verbose output for sensors, fru and sel
+
+Version 3.5 20141031
+ * Fix LAN Driver if called on localhost
+
+Version 3.4 20140929
+ * Fix implicit array warning with split
+ * Add option to disable LAN protocol version 2.0
+
+Version 3.3 20140606
+ * Print a warning if ipmi-sensors only returned a single output row
+ * Ignore sudo errors and warnings in IPMI command output
+ (Thanks to Robert Heinzmann for contributing)
+ * Use LAN protocol version 2.0 per default
+ * Print empty output error only if return code was 0
+ * Exit the plugin with return code 3 if fru command fails
+ * Added an include list option to only include specific sensors
+
+Version 3.2 20131028
+ * Added FRU serial number to output
+ * Add check if ipmimonitoring output is empty
+ * Print correct command in verbose output
+ * Number of fans can be compared to a desired number of fans
+
+Version 3.2-dev 20120627
+ * Help text cleanups (hint on 'ipmi-sensors -L').
+
+Version 3.1 20120524
+ Version 3.1-dev (20120312-20120508)
+ * Documentation cleanups.
+ * Added PNP4Nagios default-combinedgraph.template in contrib/ directory.
+ (was missing for 3.* version)
+ * Updated help text (-v|-vv|-vvv verbose outputs).
+ * Renamed check_ipmi_sensor.pl to check_ipmi_sensor.
+ * Added output of check_ipmi_sensor version.
+ * Added newlines to debug output master.
+ Version 3.1rc1 20120222
+ * Reformatted code to be as close as possible to check_ipmi_sensor v2 (bash).
+ * Fetched Version 3.0 from https://github.com/zito/check_ipmi_sensor.git
+ * Moved development to git.thomas-krenn.com
+ * Added various default options.
+
+Version 3.0 20110501
+ * The code rewritten using the Perl.
+ * Added long variant options.
+ * Removed trailing zeros after the decimal point in perfdata.
+ * Output format of the ipmimonitoring version 0.8.x and up supported.
+
+Version 2.2 20110127
+ * Added -b option to enable backward compatibility with FreeIPMI 0.5.*.
+ reported by: Tobias Gablunsky, CBXNET combox internet GmbH
+ * Added ipmimonitoring version information in verbose output (-v 3).
+ * Further improved readability of the help text (-x Option).
+
+List of contributors to version 3.* branch:
+ Werner Fischer, Thomas-Krenn.AG
+ Georg Schönberger, Thomas-Krenn.AG
+ Václav Ovsík (ported version 2 to Perl)
+ Robert Heinzmann
+
+List of contributors to version 2.* branch:
+ Werner Fischer, Thomas-Krenn.AG (author)
+ Tobias Gablunsky, CBXNET combox internet GmbH
+ Sebastian Mörchen, DFS Deutsche Flugsicherung GmbH
+ Gustav Olsson, Telavox AB
+
+List of contributors to version 1.* branch:
+ Nikolaus Filus (to version 1.3rc1)
+ Werner Fischer, Thomas-Krenn.AG (author)
+ Lars Meuser, LMA Deutschland GmbH (to version 1.2.1)
+ Holger Paschke, comspace GmbH & Co. KG (to version 1.2)
+ Ulrich Zehl, lagis Internet Serviceprovider GmbH (to version 1.1)
+
+################################################################################
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/check_ipmi_sensor b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/check_ipmi_sensor
new file mode 100755
index 0000000..90711b0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/check_ipmi_sensor
@@ -0,0 +1,1074 @@
+#!/usr/bin/perl
+# check_ipmi_sensor: Nagios/Icinga plugin to check IPMI sensors
+#
+# Copyright (C) 2009-2019 Thomas-Krenn.AG,
+# additional contributors see changelog.txt
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 3 of the License, or (at your option) any later
+# version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+# The following guides provide helpful information if you want to extend this
+# script:
+# http://tldp.org/LDP/abs/html/ (Advanced Bash-Scripting Guide)
+# http://www.gnu.org/software/gawk/manual/ (Gawk: Effective AWK Programming)
+# http://de.wikibooks.org/wiki/Awk (awk Wikibook, in German)
+# http://nagios.sourceforge.net/docs/3_0/customobjectvars.html (hints on
+# custom object variables)
+# http://nagiosplug.sourceforge.net/developer-guidelines.html (plug-in
+# development guidelines)
+# http://nagios.sourceforge.net/docs/3_0/pluginapi.html (plugin API)
+################################################################################
+use strict;
+use warnings;
+use Getopt::Long qw(:config no_ignore_case);
+use IPC::Run qw( run ); #interact with processes
+################################################################################
+# set text variables
+our $check_ipmi_sensor_version = "3.13";
+
+sub get_version{
+ return <<EOT;
+check_ipmi_sensor version $check_ipmi_sensor_version
+Copyright (C) 2009-2019 Thomas-Krenn.AG
+Current updates at https://github.com/thomas-krenn/check_ipmi_sensor_v3.git
+EOT
+}
+
+sub get_usage{
+ return <<EOT;
+Usage:
+check_ipmi_sensor -H <hostname>
+ [-f <FreeIPMI config file> | -U <username> -P <password> -L <privilege level>]
+ [-O <FreeIPMI options>] [-b] [-T <sensor type(s)>] [-ST <SEL sensor type(s)>]
+ [-x <sensor id>] [-xT <sensor type(s)>] [-xST <SEL sensor type(s)]
+ [-i <sensor id>] [-o zenoss] [-D <protocol LAN version>] [-h] [-V]
+ [-fc <num_fans>] [--fru] [--nosel] [--selonly] [--seltail <count>]
+ [-sx|--selexclude <sel exclude file>] [-xx|--sexclude <exclude file>]
+ [-us|--unify-sensors <unify file>] [--nosudo [--nothresholds]
+ [--noentityabsent] [-s <ipmi-sensor output file>] [-h] [-V]
+ [-v|-vv|-vvv]
+EOT
+}
+
+sub get_help{
+ return <<EOT;
+ [-H <hostname>]
+ hostname or IP of the IPMI interface.
+ For \"-H localhost\" or if no host is specified (local computer) the
+ Nagios/Icinga user must be allowed to run
+ ipmimonitoring/ipmi-sensors/ipmi-sel/[ipmi-fru] with root privileges
+ or via sudo (ipmimonitoring/ipmi-sensors/ipmi-sel/[ipmi-fru] must be
+ able to access the IPMI devices via the IPMI system interface).
+ [-f <FreeIPMI config file>]
+ path to the FreeIPMI configuration file.
+ Only neccessary for communication via network.
+ Not neccessary for access via IPMI system interface (\"-H localhost\").
+ It should contain IPMI username, IPMI password, and IPMI privilege-level,
+ for example:
+ username monitoring
+ password yourpassword
+ privilege-level user
+ As alternative you can use -U/-P/-L instead (see below).
+ [-U <username> -P <password> -L <privilege level>]
+ IPMI username, IPMI password and IPMI privilege level, provided as
+ parameters and not by a FreeIPMI configuration file. Useful for RHEL/
+ Centos 5.* with FreeIPMI 0.5.1 (this elder FreeIPMI version does not
+ support config files).
+ Warning: with this method the password is visible in the process list.
+ So whenever possible use a FreeIPMI confiugration file instead.
+ [-O <FreeIPMI options>]
+ additional options for FreeIPMI. Useful for RHEL/CentOS 5.* with
+ FreeIPMI 0.5.1 (this elder FreeIPMI version does not support config
+ files).
+ [-b]
+ backward compatibility mode for FreeIPMI 0.5.* (this omits the FreeIPMI
+ caching options --quiet-cache and --sdr-cache-recreate)
+ [-T <sensor type(s)>]
+ limit sensors to query based on IPMI sensor type.
+ Examples for IPMI sensor types are 'Fan', 'Temperature', 'Voltage', ...
+ See the output of the FreeIPMI command 'ipmi-sensors -L' and chapter
+ '42.2 Sensor Type Codes and Data' of the IPMI 2.0 spec for a full list
+ of possible sensor types. You can also find the full list of possible
+ sensor types at https://www.thomas-krenn.com/en/wiki/IPMI_Sensor_Types
+ The available types depend on your particular server and the available
+ sensors there.
+ Multiple sensor types can be specified as a comma-separated list.
+ [-ST <SEL sensor type(s)>]
+ limit SEL entries to specific types, run 'ipmi-sel -L' for a list of
+ types. All sensors are populated to the SEL and per default all sensor
+ types are monitored. E.g. to limit the sensor SEL types to Memory and
+ Processsor use -ST 'Memory,Processor'.
+ [-x <sensor id>]
+ exclude sensor matching <sensor id>. Useful for cases when unused
+ sensors cannot be deleted from SDR and are reported in a non-OK state.
+ Option can be specified multiple times. The <sensor id> is a numeric
+ value (sensor names are not used as some servers have multiple sensors
+ with the same name). Use -vvv option to query the <sensor ids>.
+ [-xT <sensor type(s)>]
+ exclude sensors based on IPMI sensor type.
+ Multiple sensor types can be specified as a comma-separated list.
+ [-xST <SEL sensor type(s)]
+ exclude SEL entries of specific sensor types.
+ Multiple sensor types can be specified as a comma-separated list.
+ [-i <sensor id>]
+ include only sensor matching <sensor id>. Useful for cases when only
+ specific sensors should be monitored. Be aware that only for the
+ specified sensor errors/warnings are generated. Use -vvv option to query
+ the <sensor ids>.
+ [-v|-vv|-vvv]
+ be verbose
+ (no -v) .. single line output
+ -v ..... single line output with additional details for warnings
+ -vv ..... multi line output, also with additional details for warnings
+ -vvv ..... debugging output, followed by normal multi line output
+ [-o]
+ change output format. Useful for using the plugin with other monitoring
+ software than Nagios or Icinga.
+ -o zenoss .. create ZENOSS compatible formatted output (output with
+ underscores instead of whitespaces and no single quotes)
+ [-D]
+ change the protocol LAN version. Normally LAN_2_0 is used as protocol
+ version if not overwritten with this option. Use 'default' here if you
+ don't want to use LAN_2_0.
+ [-fc <num fans>]
+ number of installed fans. If the number of current installed
+ fans reported by IPMI is not equal than <num fans> then a Warning state
+ is returned. Please use this option carefully as number of fans and
+ number of fan sensors can differ!
+ [--fru]
+ print the product serial number if it is available in the IPMI FRU data.
+ For this purpose the tool 'ipmi-fru' is used. E.g.:
+ IPMI Status: OK (9000096781)
+ [--nosel]
+ turn off system event log checking via ipmi-sel. If there are
+ unintentional entries in SEL, use 'ipmi-sel --clear' or the -sx or -xST
+ option.
+ [--selonly]
+ check only system event log checking via ipmi-sel. If there are
+ unintentional entries in SEL, use 'ipmi-sel --clear' or the -sx or -xST
+ option.
+ [--seltail <count>]
+ limit SEL output to specified count of last messages
+ [-sx|--selexclude <sel exclude file>]
+ use a sel exclude file to exclude entries from the system event log.
+ Specify name and type pipe delimitered in this file to exclude an entry,
+ for example: System Chassis Chassis Intru|Physical Security
+ To get valid names and types use the -vvv option and take a look at:
+ debug output for sel (-vvv is set). Don't use name and type from the
+ web interface as sensor descriptions are not complete there.
+ As with the '-xx' option if the first character of a line is '~' the
+ name is treated as a regular expression.
+ [-xx|--sexclude <exclude file>]
+ use an exclude file to exclude sensors, each line specifies an exclude.
+ Specify name and type pipe delimitered in this file to exclude a sensor,
+ for example: System Chassis Chassis Intru|Physical Security
+ If the first character of a line is '~' the name is treated as a regular
+ expression. E.g. to exclude all sensor names from CPU0 to CPU9:
+ ~CPU[0-9] Temp|Temperature
+ To get valid names and types use the -vvv option.
+ [-us|--unify-sensors <unify file>]
+ use an unify file to unify sensor names. This is an easy way to rename
+ sensors with given patterns in the file. Once might use this option
+ to get the same sensor names accross different platforms, e.g. to only
+ have 'Mainboard Temperature' as sensor name and not 'MB1 Temperature' or 'System Temp'.
+ Rules in the file follow simple regex patterns e.g.:
+ ^(MB1 Temperature|System Temp)\$/Mainboard Temperature
+ Temp\$/TEMP
+ [--nosudo]
+ turn off sudo usage on localhost or if ipmi host is ommited.
+ [--nothresholds]
+ turn off performance data thresholds from output-sensor-thresholds.
+ [--noentityabsent]
+ skip sensor checks for sensors that have 'noentityabsent' as event state
+ [-s <ipmi-sensor output file>]
+ simulation mode - test the plugin with an ipmi-sensor output redirected
+ to a file.
+ [-h]
+ show this help
+ [-V]
+ show version information
+
+Examples:
+ \$ check_ipmi_sensor -H 192.0.2.1 -U monitor -P monitor -L user
+ IPMI Status: OK | 'System Temp'=30.00 'Peripheral Temp'=32.00
+ 'FAN 1'=2775.00 [...]
+ \$ check_ipmi_sensor -H 192.0.2.1 -U monitor -P monitor -L user -x 205
+ IPMI Status: OK | 'System Temp'=30.00 'Peripheral Temp'=32.00
+ 'FAN 2'=2775.00 [...]
+ \$ check_ipmi_sensor -H 192.0.2.1 -U monitor -P monitor -L user -i 4,71
+ IPMI Status: OK | 'System Temp'=30.00 'Peripheral Temp'=32.00
+ \$ check_ipmi_sensor -H 192.0.2.1 -U monitor -P monitor -L user -i 4 --fru
+ IPMI Status: OK (0000012345) | 'System Temp'=30.00
+
+Further information about this plugin can be found at
+http://www.thomas-krenn.com/en/wiki/IPMI_Sensor_Monitoring_Plugin
+
+Use the github repo at https://github.com/thomas-krenn/check_ipmi_sensor_v3.git
+to submit patches, suggest improvements or if you have questions regarding
+use of this plugin.
+
+Attention: the mailing list is no longer in use but an archive can be found at
+http://lists.thomas-krenn.com/
+EOT
+}
+
+sub usage{
+ my ($arg) = @_; #the list of inputs
+ my ($exitcode);
+ if ( defined $arg ){
+ if ( $arg =~ m/^\d+$/ ){
+ $exitcode = $arg;
+ }
+ else{
+ print STDOUT $arg, "\n";
+ $exitcode = 1;
+ }
+ }
+ print STDOUT get_usage();
+ exit($exitcode) if defined $exitcode;
+}
+################################################################################
+# set ipmimonitoring path
+our $MISSING_COMMAND_TEXT = '';
+our $IPMICOMMAND ="";
+if(-x "/usr/sbin/ipmimonitoring"){
+ $IPMICOMMAND = "/usr/sbin/ipmimonitoring";
+}
+elsif (-x "/usr/bin/ipmimonitoring"){
+ $IPMICOMMAND = "/usr/bin/ipmimonitoring";
+}
+elsif (-x "/usr/local/sbin/ipmimonitoring"){
+ $IPMICOMMAND = "/usr/local/sbin/ipmimonitoring";
+}
+elsif (-x "/usr/local/bin/ipmimonitoring"){
+ $IPMICOMMAND = "/usr/local/bin/ipmimonitoring";
+}
+else{
+ $MISSING_COMMAND_TEXT = " ipmimonitoring/ipmi-sensors command not found!\n";
+}
+
+# Identify the version of the ipmi-tool
+sub get_ipmi_version{
+ my @ipmi_version_output = '';
+ my $ipmi_version = '';
+ @ipmi_version_output = `$IPMICOMMAND -V`;
+ $ipmi_version = shift(@ipmi_version_output);
+ $ipmi_version =~ /(\d+)\.(\d+)\.(\d+)/;
+ @ipmi_version_output = ();
+ push @ipmi_version_output,$1,$2,$3;
+ return @ipmi_version_output;
+}
+
+sub simulate{
+ my $output = '';
+ my $simul_file = $_[0];
+ if( !defined $simul_file || (-x '\"'.$simul_file.'\"')){
+ print "DEBUG: Using simulation file: $simul_file\n";
+ print "Error: Simulation file with ipmi output not found.\n";
+ exit(3);
+ }
+ return ($output = `cat $simul_file`);
+}
+
+sub get_fru{
+ my @frucmd = @{(shift)};
+ my $verbosity = shift;
+ my $fru;
+ if(-e '/usr/sbin/ipmi-fru'){
+ $fru = '/usr/sbin/ipmi-fru';
+ }
+ else{
+ chomp($fru = `which ipmi-fru`);
+ }
+ #if sudo is used the command is the second element
+ if($frucmd[0] eq 'sudo'){
+ $frucmd[1] = $fru;
+ }
+ else{
+ $frucmd[0] = $fru;
+ }
+ #skip checksum validation
+ push @frucmd,'-s';
+ my $fruoutput;
+ my $returncode;
+ run \@frucmd, '>&', \$fruoutput;
+ #the upper eight bits contain the error condition (exit code)
+ #see http://perldoc.perl.org/perlvar.html#Error-Variables
+ $returncode = $? >> 8;
+ if ( $returncode != 0 ){
+ print "$fruoutput\n";
+ print "-> Execution of $fru failed with return code $returncode.\n";
+ print "-> $fru was executed with the following parameters:\n";
+ print " ", join(' ', @frucmd), "\n";
+ exit(3);
+ }
+ if($verbosity == 3){
+ print "------------- debug output for fru (-vvv is set): ------------\n";
+ print " $fru was executed with the following parameters:\n";
+ print " ", join(' ', @frucmd), "\n";
+ print " output of FreeIPMI:\n";
+ print "$fruoutput";
+ }
+ return split('\n', $fruoutput);
+}
+
+sub get_sel{
+ my @selcmd = @{(shift)};
+ my $verbosity = shift;
+ my @sel_sensor_types = @{(shift)};
+ my @exclude_sel_sensor_types = @{(shift)};
+ my $sel;
+ if(-e '/usr/sbin/ipmi-sel'){
+ $sel = '/usr/sbin/ipmi-sel';
+ }
+ else{
+ chomp($sel = `which ipmi-sel`);
+ }
+ #if sudo is used the command is the second element
+ if($selcmd[0] eq 'sudo'){
+ $selcmd[1] = $sel;
+ }
+ else{
+ $selcmd[0] = $sel;
+ }
+ push @selcmd, '--output-event-state', '--interpret-oem-data', '--entity-sensor-names';
+ push @selcmd, '--sensor-types=' . join(',', @sel_sensor_types);
+ push @selcmd, '--exclude-sensor-types=' . join(',', @exclude_sel_sensor_types);
+ my $seloutput;
+ my $returncode;
+ run \@selcmd, '>&', \$seloutput;
+ $returncode = $? >> 8;
+ if ( $returncode != 0 ){
+ print "$seloutput\n";
+ print "-> Execution of $sel failed with return code $returncode.\n";
+ print "-> $sel was executed with the following parameters:\n";
+ print " ", join(' ', @selcmd), "\n";
+ exit(3);
+ }
+ if($verbosity == 3){
+ print "------------- debug output for sel (-vvv is set): ------------\n";
+ print " $sel was executed with the following parameters:\n";
+ print " ", join(' ', @selcmd), "\n";
+ print " output of FreeIPMI:\n";
+ print "$seloutput";
+ }
+ return split('\n', $seloutput);
+}
+
+sub parse_sel{
+ my $selcmd = shift;
+ my $verbosity = shift;
+ my $sel_xfile = shift;
+ my $sel_sensor_types = shift;
+ my $exclude_sel_sensor_types = shift;
+ my @seloutput = get_sel($selcmd, $verbosity, $sel_sensor_types, $exclude_sel_sensor_types);
+ @seloutput = map { [ map { s/^\s*//; s/\s*$//; $_; } split(m/\|/, $_) ] } @seloutput;
+ my $header = shift(@seloutput);
+
+ my @sel_rows;
+ foreach my $row (@seloutput){
+ my %curr_row;
+ for(my $i = 0; $i < scalar(@{$header}); $i++){
+ my $key = lc $header->[$i];
+ $curr_row{$key} = $row->[$i];
+ }
+ if(!(exclude_with_file($sel_xfile, $curr_row{'name'}, $curr_row{'type'}))){
+ push @sel_rows, \%curr_row;
+ }
+ }
+ return \@sel_rows;
+}
+
+sub get_dcmi{
+ my @dcmicmd = @{(shift)};
+ my $verbosity = shift;
+ my $dcmi;
+ if(-e '/usr/sbin/ipmi-dcmi'){
+ $dcmi = '/usr/sbin/ipmi-dcmi';
+ }
+ else{
+ chomp($dcmi = `which ipmi-dcmi`);
+ }
+ #if sudo is used the command is the second element
+ if($dcmicmd[0] eq 'sudo'){
+ $dcmicmd[1] = $dcmi;
+ }
+ else{
+ $dcmicmd[0] = $dcmi;
+ }
+ push @dcmicmd, '--get-system-power-statistics';
+
+ my $dcmioutput;
+ my $returncode;
+ run \@dcmicmd, '>&', \$dcmioutput;
+ $returncode = $? >> 8;
+ if ( $returncode == 0 ){
+ return split('\n', $dcmioutput);
+ }
+}
+
+sub parse_dcmi{
+ my $dcmicmd = shift;
+ my $verbosity = shift;
+ my @dcmioutput = get_dcmi($dcmicmd, $verbosity);
+ if(@dcmioutput){
+ @dcmioutput = map { [ map { s/^\s*//; s/\s*$//; $_; } split(m/\:/, $_) ] } @dcmioutput;
+ my %current_power;
+ my $power_available = 0;
+ foreach my $power (@dcmioutput){
+ if(defined($power) && defined($power->[0]) && $power->[0] ne ''){
+ if($power->[0] eq 'Current Power'){
+ $power->[1] =~ m/^(\d+)/;
+ my $watts = $1;
+ $current_power{'Current Power'} = $watts;
+ }
+ if($power->[0] eq 'Power Measurement'){
+ if($power->[1] eq 'Active'){
+ $power_available = 1;
+ }
+ }
+ }
+ }
+ if($power_available == 1){
+ return \%current_power;
+ }
+ }
+}
+
+# Excludes a name and type pair if it is present in the given file, pipe
+# delimitered.
+# @return 1 if name should be skipped, 0 if not
+sub exclude_with_file{
+ my $file_name = shift;
+ my $name = shift;
+ my $type = shift;
+ my @xlist;
+ my $skip = 0;
+ if($file_name){
+ if(!(open (FH, "< $file_name"))){
+ print "-> Reading exclude file $file_name failed with: $!.\n";
+ exit(3);
+ };
+ @xlist = <FH>;
+ }
+ foreach my $exclude (@xlist){
+ my @curr_exclude = map { s/^\s*//; s/\s*$//; $_; } split(/\|/,$exclude);
+ if(@curr_exclude && $curr_exclude[0] ne '' && $curr_exclude[1] ne ''){
+ #if the first char of the name in the exclude file is a '~' treat it as regex
+ if(substr($curr_exclude[0], 0, 1 ) eq '~'){
+ my $regex_curr_exclude = substr $curr_exclude[0], 1;
+ if($name =~ m/$regex_curr_exclude/ && $curr_exclude[1] eq $type){
+ $skip = 1;
+ }
+ }
+ elsif($curr_exclude[0] eq $name && $curr_exclude[1] eq $type){
+ $skip = 1;
+ }
+ }
+ }
+ close FH;
+ return $skip;
+}
+
+# Reads regular expressions from a file and applies the rules to sensor names.
+# This unifies sensor names across different platforms.
+# @return The sensor name with specified unify rules applied
+sub unify_with_file{
+ my $file_name = shift;
+ my $name = shift;# given sensor name
+ my @ulist;# list of rules to apply
+ if($file_name){
+ if(!(open (FH, "< $file_name"))){
+ print "-> Reading unify file $file_name failed with: $!.\n";
+ exit(3);
+ };
+ @ulist = <FH>;
+ }
+ foreach my $unify_rule (@ulist){
+ #split at the only / that is not masked with a \,
+ #this is the separator in s/x/y/g to get x and y
+ my @curr_rule = map { s/^\s*//; s/\s*$//; $_; } split(/(?<!\\)\//,$unify_rule);
+ if(@curr_rule && $curr_rule[0] ne '' && $curr_rule[1] ne ''){
+ $name =~ s/$curr_rule[0]/$curr_rule[1]/g;
+ }
+ }
+ close FH;
+ return $name;
+}
+
+#define entire hashes
+our %hdrmap = (
+ 'Record_ID' => 'id', # FreeIPMI ...,0.7.x
+ 'Record ID' => 'id', # FreeIPMI 0.8.x,... with --legacy-output
+ 'ID' => 'id', # FreeIPMI 0.8.x
+ 'Sensor Name' => 'name',
+ 'Name' => 'name', # FreeIPMI 0.8.x
+ 'Sensor Group' => 'type',
+ 'Type' => 'type', # FreeIPMI 0.8.x
+ 'Monitoring Status' => 'state',
+ 'State' => 'state', # FreeIPMI 0.8.x
+ 'Sensor Units' => 'units',
+ 'Units' => 'units', # FreeIPMI 0.8.x
+ 'Sensor Reading' => 'reading',
+ 'Reading' => 'reading', # FreeIPMI 0.8.x
+ 'Event' => 'event', # FreeIPMI 0.8.x
+ 'Lower C' => 'lowerC',
+ 'Lower NC' => 'lowerNC',
+ 'Upper C' => 'upperC',
+ 'Upper NC' => 'upperNC',
+ 'Lower NR' => 'lowerNR',
+ 'Upper NR' => 'upperNR',
+);
+
+our $verbosity = 0;
+
+MAIN: {
+ $| = 1; #force a flush after every write or print
+ my @ARGV_SAVE = @ARGV;#keep args for verbose output
+ my ($show_help, $show_version);
+ my ($ipmi_host, $ipmi_user, $ipmi_password, $ipmi_privilege_level, $ipmi_config_file, $ipmi_outformat);
+ my (@freeipmi_options, $freeipmi_compat);
+ my (@ipmi_sensor_types, @ipmi_exclude_sensor_types, @ipmi_xlist, @ipmi_ilist);
+ my (@ipmi_version);
+ my $ipmi_sensors = 0;#states to use ipmi-sensors instead of ipmimonitoring
+ my $fan_count;#number of fans that should be installed in unit
+ my $lanVersion;#if desired use a different protocol version
+ my $abort_text = '';
+ my $zenoss = 0;
+ my @sel_sensor_types;
+ my @exclude_sel_sensor_types;
+ my $sel_issues_present = 0;
+ my $simulate = '';
+ my ($use_fru, $no_sel, $sel_only, $sel_tail, $no_sudo, $use_thresholds, $no_thresholds, $sel_xfile, $s_xfile, $s_ufile, $no_entity_absent);
+
+ #read in command line arguments and init hash variables with the given values from argv
+ if ( !( GetOptions(
+ 'H|host=s' => \$ipmi_host,
+ 'f|config-file=s' => \$ipmi_config_file,
+ 'U|user=s' => \$ipmi_user,
+ 'P|password=s' => \$ipmi_password,
+ 'L|privilege-level=s' => \$ipmi_privilege_level,
+ 'O|options=s' => \@freeipmi_options,
+ 'b|compat' => \$freeipmi_compat,
+ 'T|sensor-types=s' => \@ipmi_sensor_types,
+ 'xT|exclude-sensor-types=s' => \@ipmi_exclude_sensor_types,
+ 'ST|sel-sensor-types=s' => \@sel_sensor_types,
+ 'xST|exclude-sel-sensor-types=s' => \@exclude_sel_sensor_types,
+ 'fru' => \$use_fru,
+ 'nosel' => \$no_sel,
+ 'selonly' => \$sel_only,
+ 'seltail=s' => \$sel_tail,
+ 'nosudo' => \$no_sudo,
+ 'nothresholds' => \$no_thresholds,
+ 'noentityabsent' => \$no_entity_absent,
+ 'v|verbosity' => \$verbosity,
+ 'vv' => sub{$verbosity=2},
+ 'vvv' => sub{$verbosity=3},
+ 'x|exclude=s' => \@ipmi_xlist,
+ 'sx|selexclude=s' => \$sel_xfile,
+ 'xx|sexclude=s' => \$s_xfile,
+ 'us|unify-sensors=s'=> \$s_ufile,
+ 'i|include=s' => \@ipmi_ilist,
+ 'o|outformat=s' => \$ipmi_outformat,
+ 'fc|fancount=i' => \$fan_count,
+ 'D=s' => \$lanVersion,
+ 's=s' => \$simulate,
+ 'h|help' =>
+ sub{print STDOUT get_version();
+ print STDOUT "\n";
+ print STDOUT get_usage();
+ print STDOUT "\n";
+ print STDOUT get_help();
+ exit(0)
+ },
+ 'V|version' =>
+ sub{
+ print STDOUT get_version();
+ exit(0);
+ },
+ 'usage|?' =>
+ sub{print STDOUT get_usage();
+ exit(3);
+ }
+ ) ) ){
+ usage(1);#call usage if GetOptions failed
+ }
+ usage(1) if @ARGV;#print usage if unknown arg list is left
+
+################################################################################
+# check for ipmimonitoring or ipmi-sensors. Since version > 0.8 ipmi-sensors is used
+# if '--legacy-output' is given ipmi-sensors cannot be used
+ if( $MISSING_COMMAND_TEXT ne "" ){
+ print STDOUT "Error:$MISSING_COMMAND_TEXT";
+ exit(3);
+ }
+ else{
+ @ipmi_version = get_ipmi_version();
+ if( $ipmi_version[0] > 0 && (grep(/legacy\-output/,@freeipmi_options)) == 0){
+ $IPMICOMMAND =~ s/ipmimonitoring/ipmi-sensors/;
+ $ipmi_sensors = 1;
+ }
+ if( $ipmi_version[0] > 0 && (grep(/legacy\-output/,@freeipmi_options)) == 1){
+ print "Error: Cannot use ipmi-sensors with option \'--legacy-output\'. Remove it to work correctly.\n";
+ exit(3);
+ }
+ # check if output-sensor-thresholds can be used, this is supported
+ # since 1.2.1. Version 1.2.0 was not released, so skip the third minor
+ # version number
+ if($ipmi_version[0] > 1 || ($ipmi_version[0] == 1 && $ipmi_version[1] >= 2)){
+ $use_thresholds = 1;
+ }
+ else{
+ $use_thresholds = 0;
+ }
+ }
+###############################################################################
+# verify if all mandatory parameters are set and initialize various variables
+ #\s defines any whitespace characters
+ #first join the list, then split it at whitespace ' '
+ #also cf. http://perldoc.perl.org/Getopt/Long.html#Options-with-multiple-values
+ @freeipmi_options = split(/\s+/, join(' ', @freeipmi_options)); # a bit hack, shell word splitting should be implemented...
+ @ipmi_sensor_types = split(/,/, join(',', @ipmi_sensor_types));
+ @ipmi_exclude_sensor_types = split(/,/, join(',', @ipmi_exclude_sensor_types));
+ @sel_sensor_types = split(/,/, join(',', @sel_sensor_types));
+ @exclude_sel_sensor_types = split(/,/, join(',', @exclude_sel_sensor_types));
+ @ipmi_xlist = split(/,/, join(',', @ipmi_xlist));
+ @ipmi_ilist = split(/,/, join(',', @ipmi_ilist));
+
+ #check for zenoss output
+ if(defined $ipmi_outformat && $ipmi_outformat eq "zenoss"){
+ $zenoss = 1;
+ }
+
+ # Per default monitor all sensor types, use -ST to specify your sensor types
+ if(!@sel_sensor_types){
+ @sel_sensor_types = ('all');
+ }
+ # If -xST has not been set, set this array to empty.
+ if(!@exclude_sel_sensor_types){
+ @exclude_sel_sensor_types = ('');
+ }
+
+ # Define basic ipmi command
+ my @basecmd = $IPMICOMMAND;
+ # If host is omitted localhost is assumed, if not turned off sudo is used
+ if(!(defined $ipmi_host) || ($ipmi_host eq 'localhost')){
+ if(!defined($no_sudo)){
+ # Only add sudo if not already root
+ @basecmd = ($> != 0 ? 'sudo' : (), $IPMICOMMAND);
+ }
+ }
+ # If we are not local, we need authentication credentials
+ else{
+ # Add the ipmi desired host
+ push @basecmd, '-h', $ipmi_host;
+ if(defined $ipmi_config_file){
+ push @basecmd, '--config-file', $ipmi_config_file;
+ }
+ elsif(defined $ipmi_user && defined $ipmi_password && defined $ipmi_privilege_level ){
+ push @basecmd, '-u', $ipmi_user, '-p', $ipmi_password, '-l', $ipmi_privilege_level;
+ }
+ else{
+ $abort_text = $abort_text . " -f <FreeIPMI config file> or -U <username> -P <password> -L <privilege level>";
+ }
+ if( $abort_text ne ""){
+ print STDOUT "Error: " . $abort_text . " missing.";
+ print STDOUT get_usage();
+ exit(3);
+ }
+ }
+ # copy command for fru usage
+ my @frucmd;
+ if($use_fru){
+ @frucmd = @basecmd
+ }
+ my @selcmd = @basecmd;
+ my @dcmicmd = @basecmd;
+
+ if(@ipmi_sensor_types){
+ # , is the seperator in the new string
+ # -g option is older name for ipmi-sensors -t or --sensor-types and
+ # compatible with both older and newer version of FreeIPMI
+ push @basecmd, '-g', join(',', @ipmi_sensor_types);
+ }
+
+ # add sensor types to exclude
+ if(@ipmi_exclude_sensor_types){
+ push @basecmd, '--exclude-sensor-types', join(',', @ipmi_exclude_sensor_types);
+ }
+
+
+ if(@freeipmi_options){
+ push @basecmd, @freeipmi_options;
+ }
+
+ #keep original basecmd for later usage
+ my @getstatus = @basecmd;
+
+ #if -b is not defined, caching options are used
+ if( !(defined $freeipmi_compat) ){
+ push @getstatus, '--quiet-cache', '--sdr-cache-recreate';
+ }
+ #since version 0.8 it is possible to interpret OEM data
+ if( ($ipmi_version[0] == 0 && $ipmi_version[1] > 7) ||
+ $ipmi_version[0] > 0){
+ push @getstatus, '--interpret-oem-data';
+ }
+ #since version 0.8 it is necessary to add the legacy option
+ if( ($ipmi_version[0] == 0 && $ipmi_version[1] > 7) && (grep(/legacy\-output/,@freeipmi_options) == 0)){
+ push @getstatus, '--legacy-output';
+ }
+ #if ipmi-sensors is used show the state of sensors and ignore N/A
+ if($ipmi_sensors){
+ push @getstatus, '--output-sensor-state', '--ignore-not-available-sensors';
+ }
+ #if not stated otherwise we use protocol lan version 2 per default
+ if(!defined($lanVersion)){
+ $lanVersion = 'LAN_2_0';
+ }
+ if($lanVersion ne 'default' && defined $ipmi_host && $ipmi_host ne 'localhost'){
+ push @getstatus, "--driver-type=$lanVersion";
+ if(!$no_sel){
+ push @selcmd, "--driver-type=$lanVersion";
+ }
+ if($use_fru){
+ push @frucmd, "--driver-type=$lanVersion";
+ }
+ }
+ if($use_thresholds && !$no_thresholds){
+ push @getstatus, '--output-sensor-thresholds';
+ }
+ if(defined($sel_tail)){
+ push @selcmd, "--tail=$sel_tail";
+ }
+
+################################################################################
+ #execute status command and redirect stdout and stderr to ipmioutput
+ my $ipmioutput;
+ my $returncode;
+ if ($sel_only){
+ $returncode = 0;
+ }
+ elsif(!$simulate){
+ run \@getstatus, '>&', \$ipmioutput;
+ #the upper eight bits contain the error condition (exit code)
+ #see http://perldoc.perl.org/perlvar.html#Error-Variables
+ $returncode = $? >> 8;
+ }
+ else{
+ $ipmioutput = simulate($simulate);
+ print "DEBUG: Using simulation mode\n";
+ $returncode = 0;
+ }
+ my @fruoutput;
+ if($use_fru){
+ @fruoutput = get_fru(\@frucmd, $verbosity);
+ }
+ my $seloutput;
+ if(!$no_sel){
+ $seloutput = parse_sel(\@selcmd, $verbosity, $sel_xfile, \@sel_sensor_types, \@exclude_sel_sensor_types);
+ }
+ my $dcmioutput;
+ $dcmioutput = parse_dcmi(\@dcmicmd, $verbosity);
+################################################################################
+# print debug output when verbosity is set to 3 (-vvv)
+ if ( $verbosity == 3 && !$sel_only ){
+ my $ipmicommandversion;
+ run [$IPMICOMMAND, '-V'], '2>&1', '|', ['head', '-n', 1], '&>', \$ipmicommandversion;
+ #remove trailing newline with chomp
+ chomp $ipmicommandversion;
+ print "------------- debug output for sensors (-vvv is set): ------------\n";
+ print " script was executed with the following parameters:\n";
+ print " $0 ", join(' ', @ARGV_SAVE), "\n";
+ print " check_ipmi_sensor version:\n";
+ print " $check_ipmi_sensor_version\n";
+ print " FreeIPMI version:\n";
+ print " $ipmicommandversion\n";
+ print " FreeIPMI was executed with the following parameters:\n";
+ print " ", join(' ', @getstatus), "\n";
+ print " FreeIPMI return code: $returncode\n";
+ print " output of FreeIPMI:\n";
+ print "$ipmioutput\n";
+ print "--------------------- end of debug output ---------------------\n";
+ }
+
+################################################################################
+# generate main output
+ if ( $returncode != 0 ){
+ print "$ipmioutput\n";
+ print "-> Execution of $IPMICOMMAND failed with return code $returncode.\n";
+ print "-> $IPMICOMMAND was executed with the following parameters:\n";
+ print " ", join(' ', @getstatus), "\n";
+ exit(3);
+ }
+ else{
+ my @outputRows;
+ if(defined($ipmioutput)){
+ @outputRows = split('\n', $ipmioutput);
+ }
+ if(!$sel_only && (!defined($ipmioutput) || scalar(@outputRows) == 1)){
+ print "-> Your server seems to be powered off.";
+ print " (Execution of FreeIPMI returned an empty output or only 1 header row!)\n";
+ print "-> $IPMICOMMAND was executed with the following parameters:\n";
+ print " ", join(' ', @getstatus), "\n";
+ exit(3);
+ }
+ #print desired filter types
+ if ( @ipmi_sensor_types ){
+ print "Sensor Type(s) ", join(', ', @ipmi_sensor_types), " Status: ";
+ }
+ elsif ($sel_only){
+ print "SEL Status: ";
+ }
+ else{
+ print "IPMI Status: ";
+ }
+ #start with main output
+ my $exit = 0;
+ my $w_sensors = '';#sensors with warnings
+ my $sel_w_sensors = '';#verbose output for sel entries with warnings
+ my $perf = '';#performance sensor
+ my $curr_fans = 0;
+ my @ipmioutput2;#filtered original ipmi output
+
+ #skip ipmi output, if only SEL queried
+ if (!$sel_only){
+ #split at newlines, fetch array with lines of output
+ my @ipmioutput = split('\n', $ipmioutput);
+
+ #remove sudo errors and warnings like they appear on dns resolving issues
+ @ipmioutput = map { /^sudo:/ ? () : $_ } @ipmioutput;
+
+ #remove leading and trailing whitespace characters, split at the pipe delimiter
+ @ipmioutput = map { [ map { s/^\s*//; s/\s*$//; $_; } split(m/\|/, $_) ] } @ipmioutput;
+
+ #shift out the header as it is the first line
+ my $header = shift @ipmioutput;
+ if(!defined($header)){
+ print "$ipmioutput\n";
+ print " FreeIPMI returned an empty header map (first line)";
+ if(@ipmi_sensor_types){
+ print " FreeIPMI could not find any sensors for the given sensor type (option '-T').\n";
+ }
+ exit(3);
+ }
+ my %header;
+ for(my $i = 0; $i < @$header; $i++)
+ {
+ #assigning %header with (key from hdrmap) => $i
+ #checking at which position in the header is which key
+ $header{$hdrmap{$header->[$i]}} = $i;
+ }
+ foreach my $row ( @ipmioutput ){
+ my %row;
+ #fetch keys from header and assign existent values to row
+ #this maps the values from row(ipmioutput) to the header values
+ while ( my ($key, $index) = each %header ){
+ #check if the option to unify sensor names is active
+ if($key eq 'name' && $s_ufile && $s_ufile ne ''){
+ $row{$key} = unify_with_file($s_ufile, $row->[$index]);
+ }
+ else{
+ $row{$key} = $row->[$index];
+ }
+ }
+ if(!(exclude_with_file($s_xfile, $row{'name'}, $row{'type'}))){
+ push @ipmioutput2, \%row;
+ }
+ }
+ #create hash with sensor name an 1
+ my %ipmi_xlist = map { ($_, 1) } @ipmi_xlist;
+ #filter out the desired sensor values
+ @ipmioutput2 = grep(!exists $ipmi_xlist{$_->{'id'}}, @ipmioutput2);
+ #check for an include list
+ if(@ipmi_ilist){
+ my %ipmi_ilist = map { ($_, 1) } @ipmi_ilist;
+ #only include sensors from include list
+ @ipmioutput2 = grep(exists $ipmi_ilist{$_->{'id'}}, @ipmioutput2);
+ }
+ foreach my $row ( @ipmioutput2 ){
+ if( $zenoss ){
+ $row->{'name'} =~ s/ /_/g;
+ }
+ my $check_sensor_state = 1;
+ if($no_entity_absent){
+ if(exists $row->{'event'} && ($row->{'event'} =~ /\'.*((Device|Entity) (Absent|Removed)).*\'/)){
+ $check_sensor_state = 0;
+ }
+ if(exists $row->{'reading'} && ($row->{'reading'} =~ /\'.*((Device|Entity) (Absent|Removed)).*\'/)){
+ $check_sensor_state = 0;
+ }
+ }
+ #check for warning sensors
+ if($check_sensor_state && ($row->{'state'} ne 'Nominal' && $row->{'state'} ne 'N/A')){
+ $exit = 1 if $exit < 1;
+ $exit = 2 if $exit < 2 && $row->{'state'} ne 'Warning';
+ #don't insert a , the first time
+ $w_sensors .= ", " unless $w_sensors eq '';
+ $w_sensors .= "$row->{'name'} = $row->{'state'}";
+ if( $verbosity ){
+ if( $row->{'reading'} ne 'N/A'){
+ $w_sensors .= " ($row->{'reading'})" ;
+ }
+ else{
+ $w_sensors .= " ($row->{'event'})";
+ }
+ }
+ }
+ if($check_sensor_state && ($row->{'units'} ne 'N/A')){
+ my $val = $row->{'reading'};
+ my $perf_data;
+ my $perf_thresholds;
+ if($zenoss){
+ $perf_data = $row->{'name'}."=".$val;
+ }
+ else{
+ $perf_data = "'".$row->{'name'}."'=".$val;
+ }
+ if($use_thresholds && !$no_thresholds){
+ if(($row->{'lowerNC'} ne 'N/A') && ($row->{'upperNC'} ne 'N/A')){
+ $perf_thresholds = $row->{'lowerNC'}.":".$row->{'upperNC'}.";";
+ }
+ elsif(($row->{'lowerNC'} ne 'N/A') && ($row->{'upperNC'} eq 'N/A')){
+ $perf_thresholds = $row->{'lowerNC'}.":;";
+ }
+ elsif(($row->{'lowerNC'} eq 'N/A') && ($row->{'upperNC'} ne 'N/A')){
+ $perf_thresholds = "~:".$row->{'upperNC'}.";";
+ }
+ elsif(($row->{'lowerNC'} eq 'N/A') && ($row->{'upperNC'} eq 'N/A')){
+ $perf_thresholds = ";";
+ }
+ if(($row->{'lowerC'} ne 'N/A') && ($row->{'upperC'} ne 'N/A')){
+ $perf_thresholds .= $row->{'lowerC'}.":".$row->{'upperC'};
+ }
+ elsif(($row->{'lowerC'} ne 'N/A') && ($row->{'upperC'} eq 'N/A')){
+ $perf_thresholds .= $row->{'lowerC'}.":";
+ }
+ elsif(($row->{'lowerC'} eq 'N/A') && ($row->{'upperC'} ne 'N/A')){
+ $perf_thresholds .= "~:".$row->{'upperC'};
+ }
+ # Add thresholds to performance data
+ if(($row->{'lowerNC'} ne 'N/A') || ($row->{'upperNC'} ne 'N/A') ||
+ ($row->{'lowerC'} ne 'N/A') || ($row->{'upperC'} ne 'N/A')){
+ $perf_data .= ";".$perf_thresholds;
+ }
+ }
+ $perf .= $perf_data." ";
+ }
+ if( $row->{'type'} eq 'Fan' && $row->{'reading'} ne 'N/A' ){
+ $curr_fans++;
+ }
+ }
+ }
+ foreach my $row (@{$seloutput}){
+ if( $zenoss ){
+ $row->{'name'} =~ s/ /_/g;
+ }
+ if ($row->{'state'} ne 'Nominal'){
+ $sel_issues_present += 1;
+ $exit = 1 if $exit < 1;
+ $exit = 2 if $exit < 2 && $row->{'state'} ne 'Warning';
+ if( $verbosity ){
+ $sel_w_sensors .= ", " unless $sel_w_sensors eq '';
+ $sel_w_sensors .= "($row->{'name'} = $row->{'state'},";
+ $sel_w_sensors .= " $row->{'type'}," ;
+ $sel_w_sensors .= " $row->{'event'})" ;
+ }
+ }
+ }
+ if ( $sel_issues_present ){
+ $w_sensors .= ", " unless $w_sensors eq '';
+ if ( $sel_issues_present == 1 ){
+ $w_sensors .= "1 system event log (SEL) entry present";
+ }else{
+ $w_sensors .= $sel_issues_present." system event log (SEL) entries present";
+ }
+ if( $verbosity ){
+ $w_sensors .= " - details: ";
+ $w_sensors .= $sel_w_sensors;
+ $w_sensors .= " - fix the reported issues and clear your SEL";
+ $w_sensors .= " or exclude specific SEL entries using the -sx or -xST option";
+ }
+ }
+ #now check if num fans equals desired unit fans
+ if( $fan_count ){
+ if( $curr_fans < $fan_count ){
+ $exit = 1 if $exit < 1;
+ $w_sensors .= ", " unless $w_sensors eq '';
+ $w_sensors .= "Fan = Warning";
+ if( $verbosity ){
+ $w_sensors .= " ($curr_fans)" ;
+ }
+ }
+ }
+ #check for the FRU serial number
+ my @server_serial;
+ my $serial_number;
+ if( $use_fru ){
+ @server_serial = grep(/Product Serial Number/,@fruoutput);
+ if(@server_serial){
+ $server_serial[0] =~ m/(\d+)/;
+ $serial_number = $1;
+ }
+ }
+ if(defined($dcmioutput) && $dcmioutput ne ''){
+ my $power_perf = '';
+ if(exists $dcmioutput->{'Current Power'}){
+ my $power_key = 'Current Power';
+ if($s_ufile && $s_ufile ne ''){
+ $power_key = unify_with_file($s_ufile, $power_key);
+ }
+ if( $zenoss ){
+ $power_key =~ s/ /_/g;
+ }
+ $power_perf = "\'$power_key\'=" . $dcmioutput->{'Current Power'};
+ }
+ $perf = $power_perf . ' ' . $perf;
+ }
+ $perf = substr($perf, 0, -1);#cut off the last chars
+ if ( $exit == 0 ){
+ print "OK";
+ }
+ elsif ( $exit == 1 ){
+ print "Warning [$w_sensors]";
+ }
+ else{
+ print "Critical [$w_sensors]";
+ }
+ if( $use_fru && defined($serial_number)){
+ print " ($serial_number)";
+ }
+ print " | ", $perf if $perf ne '';
+ print "\n";
+
+ if ( $verbosity > 1 ){
+ foreach my $row (@ipmioutput2){
+ if( $row->{'state'} eq 'N/A'){
+ next;
+ }
+ elsif( $row->{'reading'} ne 'N/A'){
+ print "$row->{'name'} = $row->{'reading'} ";
+ }
+ elsif( $row->{'event'} ne 'N/A'){
+ print "$row->{'name'} = $row->{'event'} ";
+ }
+ else{
+ next;
+ }
+ print "(Status: $row->{'state'})\n";
+ }
+ }
+ exit $exit;
+ }
+};
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/contrib/default-combinedgraph.template b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/contrib/default-combinedgraph.template
new file mode 100644
index 0000000..4d8db3d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/contrib/default-combinedgraph.template
@@ -0,0 +1,37 @@
+<?php
+/*
+License: GPL
+Author: Andy Spiegl <pnp4nagios.andy@spiegl.de>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License version 2 as
+published by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Probably requires:
+ pnp4nagios 0.4.14+
+*/
+
+# Template to combine all data sets of an RRD into one single graph
+# useful for e.g. hardware sensors with many values
+
+$opt[1] = "-T 55 -l 0 --vertical-label \"Combined Graph\" --title \"Combined Graph " . $this->MACRO['DISP_HOSTNAME'] . ' / ' . $this->MACRO['DISP_SERVICEDESC'] . "\" ";
+$def[1] = "";
+
+foreach ($this->DS as $KEY=>$VAL) {
+
+ $def[1] .= rrd::def ("var$KEY", $VAL['RRDFILE'], $VAL['DS'], "AVERAGE");
+ $def[1] .= rrd::line2 ("var$KEY", rrd::color($KEY, 80) , rrd::cut($VAL['NAME'],16) );
+ $def[1] .= rrd::gprint ("var$KEY", array("LAST","MIN","MAX","AVERAGE"), "%3.4lf %S".$VAL['UNIT']);
+}
+$def[1] .= rrd::comment("Default Combined Graph Template\\r");
+$def[1] .= rrd::comment("Command " . $VAL['TEMPLATE'] . "\\r");
+
+?>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/control
new file mode 100644
index 0000000..251a116
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/control
@@ -0,0 +1,8 @@
+Recommends: freeipmi-tools, libipc-run-perl
+Version: 3.13
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Homepage: http://www.thomas-krenn.com/en/oss/ipmi-plugin.html
+Description: IPMI Sensor Monitoring Plugin
+ Plugin to monitor the hardware status (fan speed, temperaturs,
+ voltages, power usage, ...) of a server using IPMI.
+Watch: https://raw.githubusercontent.com/thomas-krenn/check_ipmi_sensor_v3/master/check_ipmi_sensor check_ipmi_sensor_version = "([0-9.]+)";
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/copyright
new file mode 100644
index 0000000..b2d008e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/copyright
@@ -0,0 +1,34 @@
+Copyright (C) 2009-2013 Thomas-Krenn.AG (written by Werner Fischer),
+additional contributors see changelog.txt
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 3 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, see <http://www.gnu.org/licenses/>.
+
+
+
+License and copyright for contrib/default-combinedgraph.template:
+
+Author: Andy Spiegl <pnp4nagios.andy@spiegl.de>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License version 2 as
+published by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/ipmi_sensor.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/ipmi_sensor.cfg
new file mode 100644
index 0000000..8d78ced
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ipmi_sensor/ipmi_sensor.cfg
@@ -0,0 +1,18 @@
+# See http://www.thomas-krenn.com/de/wiki/IPMI_Sensor_Monitoring_Plugin
+# for details (German only)
+
+# Ensure to configure
+# _ipmi_ip
+# as Custom Object Variable in your Host definition.
+
+# 'check_ipmi_sensor' command definition
+define command{
+ command_name check_ipmi_sensor
+ command_line /usr/lib/nagios/plugins/check_ipmi_sensor -H $_HOSTIPMI_IP$ -f $ARG1$
+}
+
+# 'check_ipmi_sensor_exclude' command definition
+define command{
+ command_name check_ipmi_sensor_exclude
+ command_line /usr/lib/nagios/plugins/check_ipmi_sensor -H $_HOSTIPMI_IP$ -f $ARG1$ -x $ARG2$
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/Makefile
new file mode 100644
index 0000000..da38d4b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/Makefile
@@ -0,0 +1,16 @@
+#!/usr/bin/make -f
+
+INIFILES = check-libs.conf
+PLUGIN = check_libs
+CLEANFILES = $(INIFILES) $(PLUGIN)
+CRONJOBS:= update-check_libs-status
+
+include ../common.mk
+
+check_libs:
+ cp nagios-check-libs $@
+ chmod 755 $@
+
+check-libs.conf:
+ cp nagios-check-libs.conf $@
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/control
new file mode 100644
index 0000000..96b590e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/control
@@ -0,0 +1,7 @@
+Homepage: https://gitweb.noreply.org/tools/monitoring.git/
+Watch: https://gitweb.noreply.org/tools/monitoring.git/plain/nagios-checks/nagios-check-libs VERSION = '([0-9.]+)';
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to report the usage of no longer existing
+ libraries by running processes
+Recommends: lsof, libyaml-syck-perl
+Version: 0.2015012901
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/copyright
new file mode 100644
index 0000000..d2777fd
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/copyright
@@ -0,0 +1,52 @@
+
+check_libs:
+
+Copyright (C) 2005, 2006, 2007, 2008, 2012 Peter Palfrader <peter@palfrader.org>
+ 2012 Uli Martens <uli@youam.net>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+update-check_libs-status:
+
+Based on update-apt-status
+Copyright 2009 Peter Palfrader
+
+Copyright 2014 conova communications GmbH
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/nagios-check-libs b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/nagios-check-libs
new file mode 100644
index 0000000..89d7f3a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/nagios-check-libs
@@ -0,0 +1,199 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005, 2006, 2007, 2008, 2012, 2015 Peter Palfrader <peter@palfrader.org>
+# 2012 Uli Martens <uli@youam.net>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+use strict;
+use English;
+use Getopt::Long;
+
+$ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin';
+delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
+
+my $LSOF = '/usr/bin/lsof -F0';
+my $VERSION = '0.2015012901';
+
+# nagios exit codes
+my $OK = 0;
+my $WARNING = 1;
+my $CRITICAL = 2;
+my $UNKNOWN = 3;
+
+my $params;
+my $config;
+
+Getopt::Long::config('bundling');
+
+sub dief {
+ print STDERR @_;
+ exit $UNKNOWN;
+}
+
+if (!GetOptions (
+ '--help' => \$params->{'help'},
+ '--version' => \$params->{'version'},
+ '--quiet' => \$params->{'quiet'},
+ '--verbose' => \$params->{'verbose'},
+ '--config=s' => \$params->{'config'},
+ )) {
+ dief ("$PROGRAM_NAME: Usage: $PROGRAM_NAME [--help|--version] [--verbose] [--quiet] [--config=<CONFIGFILE>]\n");
+};
+if ($params->{'help'}) {
+ print "$PROGRAM_NAME: Usage: $PROGRAM_NAME [--help|--version] [--verbose] [--quiet] [--config=<CONFIGFILE>]\n";
+ print "Reports processes that are linked against libraries that no longer exist.\n";
+ print "The optional config file can specify ignore rules - see the sample config file.\n";
+ exit (0);
+};
+if ($params->{'version'}) {
+ print "nagios-check-libs $VERSION\n";
+ print "nagios check for availability of debian (security) updates\n";
+ print "Copyright (c) 2005, 2006, 2007, 2008, 2012 Peter Palfrader <peter\@palfrader.org>\n";
+ exit (0);
+};
+
+if (! defined $params->{'config'}) {
+ $params->{'config'} = '/etc/nagios/check-libs.conf';
+} elsif (! -e $params->{'config'}) {
+ dief("Config file $params->{'config'} does not exist.\n");
+}
+
+if (-e $params->{'config'}) {
+ eval "use YAML::Syck; 1" or dief "you need YAML::Syck (libyaml-syck-perl) to load a config file";
+ open(my $fh, '<', $params->{'config'}) or dief "Cannot open config file $params->{'config'}: $!";
+ $config = LoadFile($fh);
+ close($fh);
+ if (!(ref($config) eq "HASH")) {
+ dief("Loaded config is not a hash!\n");
+ }
+} else {
+ $config = {
+ 'ignorelist' => [
+ '$path =~ m#^/proc/#',
+ '$path =~ m#^/var/tmp/#',
+ '$path =~ m#^/SYS#',
+ '$path =~ m#^/drm$# # xserver stuff',
+ '$path =~ m#^/dev/zero#',
+ '$path =~ m#^/dev/shm/#',
+ ]
+ };
+}
+
+if (! exists $config->{'ignorelist'}) {
+ $config->{'ignorelist'} = [];
+} elsif (! (ref($config->{'ignorelist'}) eq 'ARRAY')) {
+ dief("Config->ignorelist is not an array!\n");
+}
+
+
+my %processes;
+
+sub getPIDs($$) {
+ my ($user, $process) = @_;
+ return join(', ', sort keys %{ $processes{$user}->{$process} });
+};
+sub getProcs($) {
+ my ($user) = @_;
+
+ return join(', ', map { $_.' ('.getPIDs($user, $_).')' } (sort {$a cmp $b} keys %{ $processes{$user} }));
+};
+sub getUsers() {
+ return join('; ', (map { $_.': '.getProcs($_) } (sort {$a cmp $b} keys %processes)));
+};
+sub inVserver() {
+ my ($f, $key);
+ if (-e "/proc/self/vinfo" ) {
+ $f = "/proc/self/vinfo";
+ $key = "XID";
+ } else {
+ $f = "/proc/self/status";
+ $key = "s_context";
+ };
+ open(F, "< $f") or return 0;
+ while (<F>) {
+ my ($k, $v) = split(/: */, $_, 2);
+ if ($k eq $key) {
+ close F;
+ return ($v > 0);
+ };
+ };
+ close F;
+ return 0;
+}
+
+my $INVSERVER = inVserver();
+
+print STDERR "Running $LSOF -n\n" if $params->{'verbose'};
+open (LSOF, "$LSOF -n|") or dief ("Cannot run $LSOF -n: $!\n");
+my @lsof=<LSOF>;
+close LSOF;
+if ($CHILD_ERROR) { # program failed
+ dief("$LSOF -n returned with non-zero exit code: ".($CHILD_ERROR / 256)."\n");
+};
+
+my ($process, $pid, $user);
+LINE: for my $line (@lsof) {
+ if ( $line =~ /^p/ ) {
+ my %fields = map { m/^(.)(.*)$/ ; $1 => $2 } grep { defined $_ and length $_ >1} split /\0/, $line;
+ $process = $fields{c};
+ $pid = $fields{p};
+ $user = $fields{L};
+ next;
+ }
+
+ unless ( $line =~ /^f/ ) {
+ dief("UNKNOWN strange line read from lsof\n");
+ # don't print it because it contains NULL characters...
+ }
+
+ my %fields = map { m/^(.)(.*)$/ ; $1 => $2 } grep { defined $_ and length $_ >1} split /\0/, $line;
+
+ my $fd = $fields{f};
+ my $inode = $fields{i};
+ my $path = $fields{n};
+ if ($path =~ m/\.dpkg-/ || $path =~ m/\(deleted\)/ || $path =~ /path inode=/ || $path =~ m#/\.nfs# || $fd eq 'DEL') {
+ $path =~ s/^\(deleted\)//; # in some cases "(deleted)" is at the beginning of the string
+ for my $i (@{$config->{'ignorelist'}}) {
+ my $ignore = eval($i);
+ next LINE if $ignore;
+ }
+ next if ($INVSERVER && ($process eq 'init') && ($pid == 1) && ($user eq 'root'));
+ if ( $params->{'verbose'} ) {
+ print STDERR "adding $process($pid) because of [$path]:\n";
+ print STDERR $line;
+ }
+ $processes{$user}->{$process}->{$pid} = 1;
+ };
+};
+
+
+
+my $message='';
+my $exit = $OK;
+if (keys %processes) {
+ $exit = $WARNING;
+ $message = 'The following processes have libs linked that were upgraded: '. getUsers()."\n";
+} else {
+ $message = "No upgraded libs linked in running processes\n" unless $params->{'quiet'};
+};
+
+print $message;
+exit $exit;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/nagios-check-libs.conf b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/nagios-check-libs.conf
new file mode 100644
index 0000000..de4e025
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/nagios-check-libs.conf
@@ -0,0 +1,21 @@
+---
+ ignorelist:
+ - '$path =~ m#^/proc/#'
+ - '$path =~ m#^/var/tmp/#'
+ - '$path =~ m#^/tmp/#'
+ - '$path =~ m#^/var/run/#'
+ - '$path =~ m#^/run/#'
+ - '$path =~ m#^/dev/pts/#'
+ - '$path =~ m#^/SYS#'
+ - '$path =~ m#^/sys/#'
+ - '$path =~ m#^/drm$# # xserver stuff'
+ - '$path =~ m#^/dev/zero#'
+ - '$path =~ m#^/dev/shm/#'
+ - '$path =~ m#^/var/lib/postgresql/#'
+ - '$path =~ m#^/var/log/#'
+ - '$path =~ m#^/var/spool/#'
+ - '$path =~ m#^/var/lib/ganeti/#'
+ - '$path =~ m#^/usr/lib/locale/locale-archive#'
+ - '$path =~ m#^/var/lib/nginx/#'
+ - '$path =~ m#^/\[aio\]$#'
+# vim:syn=yaml
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/tests b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/tests
new file mode 100644
index 0000000..ca87e45
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/tests
@@ -0,0 +1,2 @@
+Depends: lsof, libyaml-syck-perl
+Test-Command: /usr/lib/nagios/plugins/check_libs
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/update-check_libs-status b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/update-check_libs-status
new file mode 100755
index 0000000..78de51b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/update-check_libs-status
@@ -0,0 +1,90 @@
+#!/bin/bash
+
+# Based on update-apt-status
+# Copyright 2009 Peter Palfrader
+#
+# Copyright 2014 conova communications GmbH
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+UPDATE_RUNS=3
+STATUSDIR=/var/cache/nagios_status
+STATUS=${STATUSDIR}/check_libs
+SLEEP_MAX=$(( 15 * 60 ))
+MAX_AGE=$(( 23 * 60 * 60 ))
+
+# we want to run if any of the following things is true
+# - we have never run before
+# - var/lib/dpkg/status has been touched since the last run
+# - var/cache/apt/pkgcache.bin has been touched since the last run
+# - our last run ended with 'apt-get update failed'
+# - our last run has been more than MAX_AGE (23hrs) ago
+run_required() {
+ local run=0
+ local norun=1
+
+ [ -e "$STATUS" ] || return $run
+ [ /var/lib/dpkg/status -nt "$STATUS" ] && return $run
+ [ /var/cache/apt/pkgcache.bin -nt "$STATUS" ] && return $run
+ grep "apt-get update failed" "$STATUS" > /dev/null && return $run
+
+ local last_mod
+ last_mod=`stat -c "%Y" "$STATUS"`
+ now=`date +%s`
+ age=$(( $now - $last_mod ))
+ [ "$age" -gt "$MAX_AGE" ] && return $run
+
+ return $norun
+}
+
+if [ ! -d ${STATUSDIR} ]; then
+ mkdir -p ${STATUSDIR}
+fi
+
+# do stuff only when required, or when asked to
+if [ "${1:-""}" != "-f" ] ; then
+ run_required || exit 0
+fi
+
+# sleep if called non-interactively
+if [ -z "$TERM" -o "$TERM" = "dumb" ]; then
+ sleep $(( $RANDOM % $SLEEP_MAX ))
+fi
+
+# run the apt check itself
+tmp=`tempfile`
+trap "rm -f '$tmp'" exit
+/usr/lib/nagios/plugins/check_libs > "$tmp"
+result="$?"
+case "$result" in
+ 0)
+ st="OK"
+ ;;
+ 1)
+ st="WARNING"
+ ;;
+ 2)
+ st="CRITICAL"
+ ;;
+ *)
+ st="UNKNOWN"
+ ;;
+esac
+(echo "$st"; cat "$tmp") > "$STATUS"
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/update_files.sh b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/update_files.sh
new file mode 100755
index 0000000..6b45c17
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs/update_files.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+for i in nagios-check-libs nagios-check-libs.conf; do
+ tmp=`mktemp`
+ if wget -O ${tmp} "http://svn.noreply.org/svn/weaselutils/trunk/${i}"; then
+ mv ${tmp} ${i}
+ else
+ rm -f ${tmp}
+ fi
+done
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/Makefile
new file mode 100644
index 0000000..ce3f252
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/Makefile
@@ -0,0 +1,5 @@
+#/usr/bin/make -f
+
+PLUGIN = check_libs_ng
+
+include ../common.mk
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/check_libs_ng b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/check_libs_ng
new file mode 100644
index 0000000..e0053e0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/check_libs_ng
@@ -0,0 +1,90 @@
+#!/usr/bin/python
+
+# Copyright (c) 2017 Leo Antunes <leo@costela.net>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+from __future__ import print_function
+
+import os
+import sys
+from glob import glob
+import argparse
+import logging
+
+__version__ = '0.1.0'
+
+OK = 0
+WARNING = 1
+CRITICAL = 2
+UNKNOWN = 3
+
+
+def main():
+ argparser = argparse.ArgumentParser()
+ argparser.add_argument('--version', action='version', version='%(prog)s ' + __version__)
+ argparser.add_argument('--quiet', action='store_true', help='no output if nothing found')
+ argparser.add_argument('--verbose', action='store_true', help='be verbose about the search process')
+
+ args = argparser.parse_args()
+
+ logger = logging.getLogger(os.path.basename(sys.argv[0]))
+ if args.verbose:
+ logging.basicConfig(level=logging.DEBUG)
+ else:
+ logging.basicConfig(level=logging.WARNING)
+
+ needs_reload = dict()
+ for proc in glob('/proc/[0-9]*'): # numbers to avoid e.g. /proc/self
+ exe = os.path.join(proc, 'exe')
+ if os.path.exists(exe):
+ proc_pid = os.path.basename(proc)
+ proc_name = os.path.basename(os.path.realpath(exe))
+ logger.debug('checking process %s', proc_name)
+ os.chdir(os.path.join(proc, 'map_files'))
+ for map_file in os.listdir('.'):
+ # all files in /map_files/ are absolute symlinks, so we don't need abspath()
+ real_map_file_path = os.path.realpath(map_file)
+ if not '/lib/' in real_map_file_path:
+ logger.debug('skipping non-lib path %s', real_map_file_path)
+ continue
+ else:
+ logger.debug('checking lib %s', real_map_file_path)
+ if os.stat(map_file).st_nlink == 0:
+ needs_reload.setdefault(proc_name, set()).add(proc_pid)
+ else:
+ logger.debug('skipping kernel process %s', os.path.basename(proc))
+
+ if needs_reload:
+ procs_with_pids = ', '.join(map(lambda x: '%s (%s)' % (x, ', '.join(needs_reload[x])), needs_reload))
+ print('The following processes have libs linked that were upgraded:', procs_with_pids)
+ exit(WARNING)
+ elif not args.quiet:
+ print('No upgraded libs linked in running processes')
+
+ exit(OK)
+
+if __name__ == '__main__':
+ try:
+ main()
+ except Exception as e:
+ print('Exception:', e)
+ exit(UNKNOWN)
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/control
new file mode 100644
index 0000000..d64ed13
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/control
@@ -0,0 +1,4 @@
+Uploaders: Leo Antunes <leo@costela.net>
+Description: plugin to report processes using outdated libraries
+ depents on kernel features present in kernels newer than 3.3
+Version: 0.1.0
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/copyright
new file mode 100644
index 0000000..57afc28
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/copyright
@@ -0,0 +1,23 @@
+
+check_libs_ng:
+
+Copyright (c) 2017 Leo Antunes <leo@costela.net>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/tests b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/tests
new file mode 100644
index 0000000..998b2c7
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libs_ng/tests
@@ -0,0 +1,2 @@
+Restrictions: needs-root
+Test-Command: /usr/lib/nagios/plugins/check_libs_ng \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/Makefile
new file mode 100644
index 0000000..52de70c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/Makefile
@@ -0,0 +1,4 @@
+#/usr/bin/make -f
+
+include ../common.mk
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/check_libvirt b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/check_libvirt
new file mode 100755
index 0000000..2029c9e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/check_libvirt
@@ -0,0 +1,526 @@
+#!/usr/bin/perl -w
+#
+# Nagios plugin to monitor different virtualization solutions using libvirt, e.g. Xen, KVM, Virtual Box.
+#
+# License: GPL
+# Copyright (c) 2011 op5 AB
+# Author: Kostyantyn Hushchyn <op5-users@lists.op5.com>
+#
+# For direct contact with any of the op5 developers send a mail to
+# op5-users@lists.op5.com
+# Discussions are directed to the mailing list op5-users@op5.com,
+# see http://lists.op5.com/mailman/listinfo/op5-users
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+use strict;
+use warnings;
+use vars qw($PROGNAME $VERSION $output $result);
+use Nagios::Plugin;
+use File::Basename;
+use Sys::Virt;
+use XML::Simple;
+
+$PROGNAME = basename($0);
+$VERSION = '0.1.0';
+my $spooldir="/opt/monitor/var/check_libvirt";
+
+if (!-d $spooldir)
+{
+ mkdir($spooldir);
+}
+
+my $np = Nagios::Plugin->new(
+ usage => "Usage: %s -H <hosturl> [ -N <vmname> ]\n"
+ . " [-u <user> -p <pass>]\n"
+ . " -l <command> [ -s <subcommand> ]\n"
+ . " [ -t <timeout> ] [ -w <warn_range> ] [ -c <crit_range> ]\n"
+ . ' [ -V ] [ -h ]',
+ version => $VERSION,
+ plugin => $PROGNAME,
+ shortname => uc($PROGNAME),
+ blurb => 'Plugin for monitoring virtualization solutions via libvirt: KVM/QEMU, VirtualBox, Xen, Microsoft Hyper-V, etc',
+ extra => "Supported commands :\n"
+ . " Host specific :\n"
+ . " * list - shows VM's list and their statuses\n"
+ . " * pool - shows pool info\n"
+ . " + (name) - query particular pool with name (name)\n"
+ . " ^ list pools and their statuses\n"
+ . " * volume - shows volume info\n"
+ . " + (name) - query particular volume in pool with full name (name)\n"
+ . " ^ list volumes and their statuses\n"
+ . " * running - queries VM state\n"
+ . " + (name) - query particular VM state by it's name (name)\n"
+ . " VM specific :\n"
+ . " * cpu - shows cpu usage info\n"
+ . " * mem - shows mem usage info\n"
+ . " * net - shows net info: TX bytes, TX packets, TX errors, TX drops, RX bytes, RX packets, RX errors, RX drops\n"
+ . " * io - shows io info: Read bytes, Read requests, Write bytes, Write requests, Errors\n"
+ . "\n\nCopyright (c) 2011 op5",
+ timeout => 30,
+);
+
+$np->add_arg(
+ spec => 'host|H=s',
+ help => "-H, --host=<hosturl>\n"
+ . " libvirt remote urls. More information can be found here http://libvirt.org/remote.html#Remote_URI_reference\n"
+ . ' and here http://libvirt.org/drivers.html .',
+ required => 0,
+);
+
+$np->add_arg(
+ spec => 'name|N=s',
+ help => "-N, --name=<vmname>\n"
+ . ' Virtual machine name.',
+ required => 0,
+);
+
+$np->add_arg(
+ spec => 'username|u=s',
+ help => "-u, --username=<username>\n"
+ . ' Username to connect to Hypervisor with.',
+ required => 0,
+);
+
+$np->add_arg(
+ spec => 'password|p=s',
+ help => "-p, --password=<password>\n"
+ . ' Password to use with the username.',
+ required => 0,
+);
+
+$np->add_arg(
+ spec => 'warning|w=s',
+ help => "-w, --warning=THRESHOLD\n"
+ . " Warning threshold. See\n"
+ . " http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT\n"
+ . ' for the threshold format.',
+ required => 0,
+);
+
+$np->add_arg(
+ spec => 'critical|c=s',
+ help => "-c, --critical=THRESHOLD\n"
+ . " Critical threshold. See\n"
+ . " http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT\n"
+ . ' for the threshold format.',
+ required => 0,
+);
+
+$np->add_arg(
+ spec => 'command|l=s',
+ help => "-l, --command=COMMAND\n"
+ . ' Specify command type (VM Server: LIST, POOL, VOLUME; VM Machine: CPU, MEM, NET, IO)',
+ required => 1,
+);
+
+$np->add_arg(
+ spec => 'subcommand|s=s',
+ help => "-s, --subcommand=SUBCOMMAND\n"
+ . ' Specify subcommand',
+ required => 0,
+);
+
+$np->getopts;
+
+my $host = $np->opts->host;
+my $vmname = $np->opts->name;
+my $username = $np->opts->username;
+my $password = $np->opts->password;
+my $warning = $np->opts->warning;
+my $critical = $np->opts->critical;
+my $command = $np->opts->command;
+my $subcommand = $np->opts->subcommand;
+my %runstates = (Sys::Virt::Domain::STATE_NOSTATE => "running", Sys::Virt::Domain::STATE_RUNNING => "running", Sys::Virt::Domain::STATE_BLOCKED => "running", Sys::Virt::Domain::STATE_PAUSED => "running", Sys::Virt::Domain::STATE_SHUTDOWN => "going down", Sys::Virt::Domain::STATE_SHUTOFF => "down", Sys::Virt::Domain::STATE_CRASHED => "crashed");
+my %poolstates = (Sys::Virt::StoragePool::STATE_INACTIVE => "inactive", Sys::Virt::StoragePool::STATE_BUILDING => "building", Sys::Virt::StoragePool::STATE_RUNNING => "running", Sys::Virt::StoragePool::STATE_DEGRADED => "degraded");
+my %voltypes = (Sys::Virt::StorageVol::TYPE_FILE => "image", Sys::Virt::StorageVol::TYPE_BLOCK => "dev");
+$output = "Unknown ERROR!";
+$result = CRITICAL;
+
+if (defined($critical))
+{
+ $critical = undef if ($critical eq '');
+}
+
+if (defined($warning))
+{
+ $warning = undef if ($warning eq '');
+}
+
+$np->set_thresholds(critical => $critical, warning => $warning);
+
+eval
+{
+ my $con = Sys::Virt->new(address => $host, readonly => 1, auth => (defined($username) && defined($password)),
+ credlist => [
+ Sys::Virt::CRED_AUTHNAME,
+ Sys::Virt::CRED_PASSPHRASE,
+ ],
+ callback =>
+ sub {
+ my $creds = shift;
+
+ foreach my $cred (@{$creds}) {
+ if ($cred->{type} == Sys::Virt::CRED_AUTHNAME) {
+ $cred->{result} = $username;
+ }
+ if ($cred->{type} == Sys::Virt::CRED_PASSPHRASE) {
+ $cred->{result} = $password;
+ }
+ }
+ return 0;
+ }
+ );
+
+ if (!defined($vmname))
+ {
+ if (uc($command) eq "LIST")
+ {
+ my @updoms = $con->list_domains();
+ my $up = @updoms;
+ my $cnt = $con->num_of_defined_domains();
+ my @downdoms = $con->list_defined_domain_names($cnt);
+ $output = "";
+
+ while (my $dom = shift(@downdoms))
+ {
+ $output .= $dom . "(" . $runstates{Sys::Virt::Domain::STATE_SHUTOFF} . "), ";
+ }
+
+ $cnt += $up;
+ while (my $dom = shift(@updoms))
+ {
+ my $domstate = $dom->get_info()->{"state"};
+ if (exists($runstates{$domstate}))
+ {
+ if ($runstates{$domstate} ne "running")
+ {
+ $up--;
+ $output = $dom->get_name() . "(" . $runstates{$domstate} . "), " . $output;
+ }
+ else
+ {
+ $output .= $dom->get_name() . "(running), ";
+ }
+ }
+ else
+ {
+ $up--;
+ $output = $dom->get_name() . "(unknown), " . $output;
+ }
+ }
+
+ chop($output);
+ chop($output);
+ $output = $up . "/" . $cnt . " VMs up: " . $output;
+ $np->add_perfdata(label => "vmcount", value => $up, uom => 'units', threshold => $np->threshold);
+ $result = $np->check_threshold(check => $up);
+ }
+ elsif (uc($command) eq "POOL")
+ {
+ if (!defined($subcommand))
+ {
+ my @pools = $con->list_storage_pools();
+ push(@pools, $con->list_defined_storage_pools());
+
+ $output = "";
+ while (my $pool = shift(@pools))
+ {
+ my $poolinfo = $pool->get_info();
+ if (exists($poolstates{$poolinfo->{"state"}}))
+ {
+ my $value1 = $poolinfo->{"allocation"};
+ my $value2 = simplify_number($value1 / $poolinfo->{"capacity"} * 100);
+ $value1 = simplify_number($value1 / 1024 / 1024);
+ $output .= $pool->get_name() . "(" . $poolstates{$poolinfo->{"state"}} . ")=" . $value1 . "MB(" . $value2 . "%), ";
+ }
+ else
+ {
+ $output .= $pool->get_name() . "(unknown)=unavialable, ";
+ }
+ }
+ chop($output);
+ chop($output);
+ $result = OK;
+ }
+ else
+ {
+ my $pool = $con->get_storage_pool_by_name($subcommand);
+ my $poolinfo = $pool->get_info();
+ my $value1 = $poolinfo->{"allocation"};
+ my $value2 = simplify_number($value1 / $poolinfo->{"capacity"} * 100);
+ $value1 = simplify_number($value1 / 1024 / 1024);
+ $output = $pool->get_name() . "(" . $poolstates{$poolinfo->{"state"}} . ")=" . $value1 . "MB(" . $value2 . "%)";
+ $np->add_perfdata(label => $pool->get_name(), value => $value1, uom => 'MB', threshold => $np->threshold);
+ $result = $np->check_threshold(check => $value1);
+ }
+ }
+ elsif (uc($command) eq "VOLUME")
+ {
+ if (!defined($subcommand))
+ {
+ my @pools = $con->list_storage_pools();
+ push(@pools, $con->list_defined_storage_pools());
+
+ $output = "";
+ while (my $pool = shift(@pools))
+ {
+ my @volumes = $pool->list_volumes();
+ while (my $vol = shift(@volumes))
+ {
+ my $volinfo = $vol->get_info();
+ my $value1 = simplify_number($volinfo->{"allocation"} / 1024 / 1024);
+ my $value2 = simplify_number($volinfo->{"capacity"} / 1024 / 1024);
+ $output .= $vol->get_name() . "(" . $voltypes{$volinfo->{"type"}} . ")=" . $value1 . "MB/" . $value2 . "MB, ";
+ }
+ }
+ chop($output);
+ chop($output);
+ $result = OK;
+ }
+ else
+ {
+ my ($poolname, $volname) = split(/\//, $subcommand, 2);
+ die "Volume name is not defined. Please provide argument in form 'pool/volume'.\n" if (!defined($volname));
+ my $pool = $con->get_storage_pool_by_name($poolname);
+ my $vol = $pool->get_volume_by_name($volname);
+ my $volinfo = $vol->get_info();
+ my $value1 = simplify_number($volinfo->{"allocation"} / 1024 / 1024);
+ my $value2 = simplify_number($volinfo->{"capacity"} / 1024 / 1024);
+ $output = $vol->get_name() . "(" . $voltypes{$volinfo->{"type"}} . ")=" . $value1 . "MB/" . $value2 . "MB";
+ $np->add_perfdata(label => $vol->get_name(), value => $value1, uom => 'MB', threshold => $np->threshold);
+ $result = $np->check_threshold(check => $value1);
+ }
+ }
+ elsif (uc($command) eq "RUNNING")
+ {
+ die "VM name is not defined. Please provide argument in -s command.\n" if (!defined($subcommand));
+ my $dom = $con->get_domain_by_name($subcommand);
+ my $domstate = $dom->get_info()->{"state"};
+ if (exists($runstates{$domstate}))
+ {
+ $result = ($runstates{$domstate} eq "running") ? OK : CRITICAL;
+ $output = $dom->get_name() . " is in " . $runstates{$domstate} . " state\n";
+ }
+ else
+ {
+ $result = CRITICAL;
+ $output = $dom->get_name() . " is in unknown state\n";
+ }
+ }
+ else
+ {
+ $result = CRITICAL;
+ $output = "unknown command '$command' for Host\n";
+ }
+ }
+ else
+ {
+ my $dom = $con->get_domain_by_name($vmname);
+ my $dominfo = $dom->get_info();
+ my $domstate = $dominfo->{"state"};
+ die "VM '$vmname' is " . $runstates{$domstate} . ".\n" if (!exists($runstates{$domstate}) || $runstates{$domstate} ne "running");
+
+ if (uc($command) eq "CPU")
+ {
+ my $vars;
+ my $range = time();
+ ($result, $vars) = process_domstat($np, $spooldir . "/" . $vmname . "_cpu", $range, {cpu_time => $dominfo->{"cpuTime"}});
+ die {msg => ("Skipped, first time of data collection.\n"), code => OK} if (ref($vars) ne "HASH");
+ # cpuTime is in nano seconds
+ my $cpuusage = simplify_number($vars->{"cpu_time"} / 1000000000 * 100);
+ $output = "CPU usage = " . $cpuusage . " %\n";
+ $np->add_perfdata(label => "cpu", value => $cpuusage, threshold => $np->threshold);
+ $result = $np->check_threshold(check => $cpuusage);
+ }
+ elsif (uc($command) eq "MEM")
+ {
+ my $value = simplify_number($dominfo->{"memory"} / 1024);
+ $output = "MEM usage = " . $value . " MB\n";
+ $np->add_perfdata(label => "memory", value => $value, threshold => $np->threshold);
+ $result = $np->check_threshold(check => $value);
+ }
+ elsif (uc($command) eq "NET")
+ {
+ my $vmdesc = XML::Simple->new()->XMLin($dom->get_xml_description());
+ my $ifaces = $vmdesc->{"devices"}->{"interface"};
+ $ifaces = [ $ifaces ] if (ref($ifaces) ne "ARRAY");
+ my $tx_bytes = 0;
+ my $tx_pkts = 0;
+ my $tx_drop = 0;
+ my $tx_errs = 0;
+ my $rx_bytes = 0;
+ my $rx_pkts = 0;
+ my $rx_drop = 0;
+ my $rx_errs = 0;
+
+ while (my $iface = shift(@{$ifaces}))
+ {
+ my $ifacedev = $iface->{"target"}->{"dev"};
+ my $devname = $ifacedev;
+ die {msg => ("Can not access network interfaces. Unsure that VM is running as paravirt guest or PV drivers are installed.\n"), code => CRITICAL} if (!defined($devname));
+ $devname =~ s/\./_/g;
+
+ my $vars;
+ my $range = time();
+ ($result, $vars) = process_domstat($np, $spooldir . "/" . $vmname . "_" . $devname . "_net", $range, $dom->interface_stats($ifacedev));
+ next if (ref($vars) ne "HASH");
+
+ $output = "";
+ $tx_bytes += $vars->{"tx_bytes"};
+ $tx_pkts += $vars->{"tx_packets"};
+ $tx_drop += $vars->{"tx_drop"};
+ $tx_errs += $vars->{"tx_errs"};
+ $rx_bytes += $vars->{"rx_bytes"};
+ $rx_pkts += $vars->{"rx_packets"};
+ $rx_drop += $vars->{"rx_drop"};
+ $rx_errs += $vars->{"rx_errs"};
+ }
+ die {msg => ("Skipped, first time of data collection.\n"), code => OK} if ($output);
+
+ $np->add_perfdata(label => "tx_bytes", value => $tx_bytes, threshold => $np->threshold);
+ $np->add_perfdata(label => "tx_packets", value => $tx_pkts, threshold => $np->threshold);
+ $np->add_perfdata(label => "tx_drop", value => $tx_drop, threshold => $np->threshold);
+ $np->add_perfdata(label => "tx_errs", value => $tx_errs, threshold => $np->threshold);
+ $np->add_perfdata(label => "rx_bytes", value => $rx_bytes, threshold => $np->threshold);
+ $np->add_perfdata(label => "rx_packets", value => $rx_pkts, threshold => $np->threshold);
+ $np->add_perfdata(label => "rx_drop", value => $rx_drop, threshold => $np->threshold);
+ $np->add_perfdata(label => "rx_errs", value => $rx_errs, threshold => $np->threshold);
+
+ $output = "NET TX bytes = " . $tx_bytes . ", TX pkts = " . $tx_pkts . ", TX drops = " . $tx_drop . ", TX errors = " . $tx_errs . ", RX bytes = " . $rx_bytes . ", RX pkts = " . $rx_pkts . ", RX drops = " . $rx_drop . ", RX errors = " . $rx_errs;
+ }
+ elsif (uc($command) eq "IO")
+ {
+ my $vmdesc = XML::Simple->new()->XMLin($dom->get_xml_description());
+ my $blks = $vmdesc->{"devices"}->{"disk"};
+ $blks = [ $blks ] if (ref($blks) ne "ARRAY");
+ my $rd_bytes = 0;
+ my $rd_req = 0;
+ my $wr_bytes = 0;
+ my $wr_req = 0;
+ my $errs = 0;
+
+ while (my $blk = shift(@{$blks}))
+ {
+ my $blkdev = $blk->{"target"}->{"dev"};
+ my $devname = $blkdev;
+ die {msg => ("Can not access disk device. Unsure that VM is running as paravirt guest or PV drivers are installed.\n"), code => CRITICAL} if (!defined($devname));
+ $devname =~ s/\./_/g;
+
+ my $vars;
+ my $range = time();
+ ($result, $vars) = process_domstat($np, $spooldir . "/" . $vmname . "_" . $devname . "_io", $range, $dom->block_stats($blkdev));
+ next if (ref($vars) ne "HASH");
+
+ $output = "";
+ $rd_bytes += $vars->{"rd_bytes"};
+ $rd_req += $vars->{"rd_req"};
+ $wr_bytes += $vars->{"wr_bytes"};
+ $wr_req += $vars->{"wr_req"};
+ $errs += $vars->{"errs"};
+ }
+ die {msg => ("Skipped, first time of data collection.\n"), code => OK} if ($output);
+
+ $np->add_perfdata(label => "rd_bytes", value => $rd_bytes, threshold => $np->threshold);
+ $np->add_perfdata(label => "rd_req", value => $rd_req, threshold => $np->threshold);
+ $np->add_perfdata(label => "wr_bytes", value => $wr_bytes, threshold => $np->threshold);
+ $np->add_perfdata(label => "wr_req", value => $wr_req, threshold => $np->threshold);
+ $np->add_perfdata(label => "errors", value => $errs, threshold => $np->threshold);
+
+ $output = "IO read bytes = " . $rd_bytes . ", read req = " . $rd_req . ", write bytes = " . $wr_bytes . ", write req = " . $wr_req . ", errors = " . $errs;
+ }
+ else
+ {
+ $result = CRITICAL;
+ $output = "unknown command '$command' for VM '$vmname'\n";
+ }
+ }
+};
+
+if ($@)
+{
+ if (uc(ref($@)) eq "HASH")
+ {
+ $output = $@->{msg};
+ $result = $@->{code};
+ }
+ else
+ {
+ $output = $@ . "";
+ $result = CRITICAL;
+ }
+ $output =~ s/libvirt error code: [0-9]+, message: //;
+ $output =~ s/\r\n//;
+}
+
+$np->nagios_exit($result, $output);
+
+sub simplify_number
+{
+ my ($number, $cnt) = @_;
+ $cnt = 2 if (!defined($cnt));
+ return sprintf("%.${cnt}f", "$number");
+}
+
+sub process_domstat
+{
+ my ($np, $datapath, $range, $new_vars) = @_;
+ my $result = OK;
+ my $old_range = 0;
+
+ # Read old info
+ my %old_vars;
+ if (open(OLDSPOOL, "<" . $datapath))
+ {
+ $old_range = <OLDSPOOL>;
+ while (my $line = <OLDSPOOL>)
+ {
+ my @vals = split(/\s/, $line);
+ $old_vars{$vals[0]} = $vals[1];
+ }
+ close(OLDSPOOL);
+ }
+
+ # Save new info
+ open(SPOOL, ">" . $datapath) or die {msg => ("Can not create file " . $datapath . ". Please check permissions, disk space and mount point availability.\n"), code => CRITICAL};
+ print(SPOOL $range . "\n");
+ while (my ($key, $value) = each %{$new_vars})
+ {
+ print(SPOOL $key . " " . $value . "\n")
+ }
+ close(SPOOL);
+
+ return OK if (!scalar keys %old_vars);
+
+ # Compute usage statistic
+ my %vars;
+ $range = $range - $old_range;
+ foreach my $key (keys %{$new_vars})
+ {
+ if (exists($old_vars{$key}))
+ {
+ my $value = simplify_number(($new_vars->{$key} - $old_vars{$key}) / $range);
+ $vars{$key} = $value;
+ return OK if ($value < 0);
+ }
+ else
+ {
+ $result = CRITICAL;
+ }
+ }
+
+ die {msg => ("Can not retreive any value.\n"), code => CRITICAL} if (!scalar keys %vars);
+
+ return ($result, \%vars);
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/control
new file mode 100644
index 0000000..c047c19
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/control
@@ -0,0 +1,6 @@
+Homepage: http://git.op5.org/gitweb?p=system-addons/plugins/op5/check_libvirt.git;a=summary
+Recommends: libmonitoring-plugin-perl | libnagios-plugin-perl, libxml-simple-perl
+Suggests: libsys-virt-perl
+Version: v7.0.3
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: monitor virtualization solutions using libvirt
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/copyright
new file mode 100644
index 0000000..ac0c697
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_libvirt/copyright
@@ -0,0 +1,22 @@
+License: GPL 2
+Copyright (c) 2011 op5 AB
+Author: Kostyantyn Hushchyn <op5-users@lists.op5.com>
+
+For direct contact with any of the op5 developers send a mail to
+op5-users@lists.op5.com
+Discussions are directed to the mailing list op5-users@op5.com,
+see http://lists.op5.com/mailman/listinfo/op5-users
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License version 2 as
+published by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/Makefile
new file mode 100644
index 0000000..7d36b16
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/Makefile
@@ -0,0 +1,14 @@
+#/usr/bin/make -f
+
+PLUGIN = src/check_lm_sensors
+MANPAGES = check_lm_sensors.7
+DOCFILES = src/README
+CLEANFILES = check_lm_sensors.7
+
+include ../common.mk
+
+
+check_lm_sensors.7: src/check_lm_sensors.pod
+ pod2man -s 7 $< > $@
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/AUTHORS b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/AUTHORS
new file mode 100644
index 0000000..cb4e315
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/AUTHORS
@@ -0,0 +1,7 @@
+Matteo Corti <matteo@corti.li>
+
+Thanks to:
+- Maarten Bremer for the useful suggestions
+- Greg Vickers for pointing out incompatibilities with ePN
+- Giles Westwood for the multiple renames patch
+- Martin Schulze for the device name patch
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/COPYING b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/COPYRIGHT b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/COPYRIGHT
new file mode 100644
index 0000000..635c112
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/COPYRIGHT
@@ -0,0 +1,15 @@
+Copyright (c) 2007-2010 Matteo Corti
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/Changes b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/Changes
new file mode 100644
index 0000000..bebef07
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/Changes
@@ -0,0 +1,57 @@
+2016-01-08 Matteo Corti <matteo@corti.li>
+
+ * check_lm_sensors: dynamic usage of the deprecated Nagios:: or Monitoring:: plugins
+
+2015-11-23 Martin Schulze
+
+ * check_lm_sensors: fixed an issue with device names on new kernels
+
+2011-04-18 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * Makefile.PL: fixed some dependencies
+
+2011-01-28 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_lm_sensors: applied a patch from Giles Westwood to support multiple --rename
+ arguments
+
+2008-10-17 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_lm_sensors: added 0.2s pause before reading the output of 'sensors'
+
+2007-12-13 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_lm_sensors: removed all the reference to the (no more existing) unknown subroutine
+
+2007-10-04 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_lm_sensors: fixed a problem in the variable initialization which
+ created a nagios plugin object with the wrong name
+
+2007-10-03 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_lm_sensors: several changes to make the plugin compatible with ePN
+
+2007-07-10 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_lm_sensors: deprecated the --check option and added separated
+ --low, --high and --range options
+ * check_lm_sensors: added the sensor(s) output to the status string
+
+2007-06-20 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_lm_sensors: added the --nosensors and --nodrives options
+ * check_lm_sensors: the path for hddtemp and sensors is dynamic (retrieved with 'which')
+ * check_lm_sensors: fixed a bug that make the checker ignore the --sensors_bin and --hddtemp_bin options
+
+2007-06-19 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_lm_sensors: added the --rename option to rename sensors
+ * check_lm_sensors: fixed the program name in --version ouput
+
+2007-06-18 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_lm_sensors: output only the checked values
+ * check_lm_sensors: added the --sanitize option to remove spaces in sensor names
+ * check_lm_sensors: initial release
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/INSTALL b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/INSTALL
new file mode 100644
index 0000000..c769764
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/INSTALL
@@ -0,0 +1,66 @@
+Build and install check_lm_sensors
+
+Dependences
+===========
+
+check_lm_sensors depends on several Perl modules:
+
+ * Carp
+ * English
+ * Getopt::Long
+ * Monitoring::Plugin
+ * Monitoring::Plugin::Threshold
+ * version
+
+Perl modules can be found on the "Comprehensive Perl Archive Network"
+(CPAN). The "How to install CPAN modules" guide summarizes how these
+can be installed
+
+ http://www.cpan.org/modules/INSTALL.html
+
+On many systems Perl modules are also available as installation
+packages (refer to your system documentation on how to install them).
+
+The 'perl Makefile.PL' command (see below) will list the missing
+packages the you will need to install.
+
+Install to /usr/lib/nagios/plugins/contrib
+==========================================
+
+In the source directory run:
+
+ perl Makefile.PL
+ make
+ make install
+
+Install to a custom directory (CUSTOM_DIR)
+=========================================
+
+In the source directory run:
+
+ perl Makefile.PL INSTALLSITESCRIPT=CUSTOM_DIR
+ make
+ make install
+
+You can override the INSTALLSCRIPT, INSTALLNBIN or INSTALLSITESCRIPT
+variable depending on your perl installation.
+
+The man page is installed to /usr/share/man/man1/check_lm_sensors.1
+you can customize the path by setting INSTALLMAN1DIR as follows
+
+ perl Makefile.PL INSTALLSCRIPT=CUSTOM_DIR INSTALLMAN1DIR=CUSTOM_MAN_DIR
+ make
+ make install
+
+Manual installation
+===================
+
+Substitute #!perl at the beginning of the script with the location of
+your Perl interpreter and copy it to the desired location
+
+Generate the man page with pod2man
+
+ pod2man check_lm_sensors.pod > CUSTOM_MAN_FILE
+
+Please report any installation problem to <matteo@corti.li> or
+open a ticket at https://github.com/matteocorti/check_lm_sensors/issues
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MANIFEST b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MANIFEST
new file mode 100644
index 0000000..83513c9
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MANIFEST
@@ -0,0 +1,29 @@
+AUTHORS
+Changes
+check_lm_sensors
+check_lm_sensors.pod
+check_lm_sensors.spec
+COPYING
+COPYRIGHT
+inc/Module/AutoInstall.pm
+inc/Module/Install.pm
+inc/Module/Install/AutoInstall.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Include.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/MakeMaker.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/Scripts.pm
+inc/version.pm
+INSTALL
+Makefile.PL
+MANIFEST This list of files
+MANIFEST.SKIP
+META.yml
+MYMETA.json
+MYMETA.yml
+NAME
+NEWS
+README
+TODO
+VERSION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MANIFEST.SKIP b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MANIFEST.SKIP
new file mode 100644
index 0000000..179f555
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MANIFEST.SKIP
@@ -0,0 +1,17 @@
+\.DS_Store$
+^_build
+^Build$
+^blib
+~$
+\.bak$
+\.sw.$
+\.svn
+^cover_db
+^Makefile$
+^Makefile.old$
+^pm_to_blib$
+^.#
+^#
+^check_lm_sensors-
+\.git
+\.travis.yml
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/META.yml b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/META.yml
new file mode 100644
index 0000000..19e578c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/META.yml
@@ -0,0 +1,32 @@
+---
+abstract: ~
+author:
+ - 'Matteo Corti <matteo@corti.li>'
+build_requires:
+ ExtUtils::MakeMaker: 6.59
+configure_requires:
+ ExtUtils::MakeMaker: 6.59
+distribution_type: module
+dynamic_config: 1
+generated_by: 'Module::Install version 1.16'
+license: gpl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: check_lm_sensors
+no_index:
+ directory:
+ - inc
+requires:
+ Carp: 0
+ English: 0
+ Getopt::Long: 0
+ List::MoreUtils: 0
+ Monitoring::Plugin: 0.31
+ Monitoring::Plugin::Getopt: 0
+ Monitoring::Plugin::Threshold: 0
+ perl: 5.8.0
+ version: 0
+resources:
+ license: http://opensource.org/licenses/gpl-license.php
+version: 4.1.1
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MYMETA.json b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MYMETA.json
new file mode 100644
index 0000000..8524f22
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MYMETA.json
@@ -0,0 +1,53 @@
+{
+ "abstract" : "unknown",
+ "author" : [
+ "Matteo Corti <matteo@corti.li>"
+ ],
+ "dynamic_config" : 0,
+ "generated_by" : "Module::Install version 1.16, CPAN::Meta::Converter version 2.150001",
+ "license" : [
+ "open_source"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "check_lm_sensors",
+ "no_index" : {
+ "directory" : [
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "6.59"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Carp" : "0",
+ "English" : "0",
+ "Getopt::Long" : "0",
+ "List::MoreUtils" : "0",
+ "Monitoring::Plugin" : "0.31",
+ "Monitoring::Plugin::Getopt" : "0",
+ "Monitoring::Plugin::Threshold" : "0",
+ "perl" : "5.00800",
+ "version" : "0"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "license" : [
+ "http://opensource.org/licenses/gpl-license.php"
+ ]
+ },
+ "version" : "4.1.1"
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MYMETA.yml b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MYMETA.yml
new file mode 100644
index 0000000..87b1671
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/MYMETA.yml
@@ -0,0 +1,31 @@
+---
+abstract: unknown
+author:
+ - 'Matteo Corti <matteo@corti.li>'
+build_requires:
+ ExtUtils::MakeMaker: '6.59'
+configure_requires:
+ ExtUtils::MakeMaker: '0'
+dynamic_config: 0
+generated_by: 'Module::Install version 1.16, CPAN::Meta::Converter version 2.150001'
+license: open_source
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: '1.4'
+name: check_lm_sensors
+no_index:
+ directory:
+ - inc
+requires:
+ Carp: '0'
+ English: '0'
+ Getopt::Long: '0'
+ List::MoreUtils: '0'
+ Monitoring::Plugin: '0.31'
+ Monitoring::Plugin::Getopt: '0'
+ Monitoring::Plugin::Threshold: '0'
+ perl: '5.00800'
+ version: '0'
+resources:
+ license: http://opensource.org/licenses/gpl-license.php
+version: 4.1.1
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/Makefile.PL b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/Makefile.PL
new file mode 100644
index 0000000..5ffe903
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/Makefile.PL
@@ -0,0 +1,55 @@
+# Load the Module::Install bundled in ./inc/
+use inc::Module::Install;
+
+##############################################################################
+# Define metadata (we read it from the binary)
+
+name 'check_lm_sensors';
+version_from 'check_lm_sensors';
+perl_version_from 'check_lm_sensors';
+all_from 'check_lm_sensors.pod';
+
+##############################################################################
+# Specific dependencies
+
+include 'version';
+
+my %prereqs = (
+ 'Carp' => 0,
+ 'English' => 0,
+ 'Getopt::Long' => 0,
+ 'List::MoreUtils' => 0,
+ 'version' => 0,
+);
+
+if( eval { require Monitoring::Plugin } ) {
+ $prereqs{'Monitoring::Plugin'} = 0.31;
+}
+else {
+ $prereqs{'Nagios::Plugin'} = 0;
+}
+
+if( eval { require Monitoring::Plugin::Threshold } ) {
+ $prereqs{'Monitoring::Plugin::Threshold'} = 0;
+}
+else {
+ $prereqs{'Nagios::Plugin::Threshold'} = 0;
+}
+
+if( eval { require Monitoring::Plugin::Getopt } ) {
+ $prereqs{'Monitoring::Plugin::Getopt'} = 0;
+}
+else {
+ $prereqs{'Nagios::Plugin::Getopt'} = 0;
+}
+
+install_script 'check_lm_sensors';
+
+auto_install;
+
+WriteMakefile(
+ PREREQ_PM => \%prereqs,
+ INSTALLSCRIPT => '/usr/lib/nagios/plugins/contrib',
+ INSTALLBIN => '/usr/lib/nagios/plugins/contrib',
+ INSTALLSITESCRIPT => '/usr/lib/nagios/plugins/contrib',
+);
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/NAME b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/NAME
new file mode 100644
index 0000000..d604706
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/NAME
@@ -0,0 +1 @@
+check_lm_sensors
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/NEWS b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/NEWS
new file mode 100644
index 0000000..103e200
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/NEWS
@@ -0,0 +1,31 @@
+2016-01-08 (Version 4.1.1)
+* the plugins falls back to the Nagios:: plugins if the Monitoring:: plugins are not installed
+
+2015-11-23 (Version 4.1.0)
+* fix for device names on new kernels
+
+2011-01-28 (Version 4.0.0)
+* code cleanup
+* multiple --rename options
+
+2008-10-17 (Version 3.1.1)
+* added a short pause while reading the output of 'sensors' to cope
+ with some systems where a delay caused the plugin to fail
+
+2007-10-03 (Version 3.0.0)
+* the plugin is now compatible with embedded perl
+
+2007-07-10 (Version 2.0.0)
+* added --low, --high and --range options
+* deprecated the --check option
+* added the sensor(s) output to the status string
+
+2007-06-20
+* automatic detection of the path for hddtemp and sensors
+* --nosensors and --nodrives to disable sensors or drive temperature checks
+* --rename option to rename sensors
+* only the checked sensors are included in the performace output
+* --sanitaze option to remove spaces from sensor names
+
+2007-06-18
+* Initial release
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/README b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/README
new file mode 100644
index 0000000..6c2ffdf
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/README
@@ -0,0 +1,96 @@
+check_lm_sensors is a Nagios plugin to monitor the values of on board
+sensors and hard disk temperatures on Linux systems
+
+------------------------------------------------------------------------------
+usage:
+
+ -?, --help help
+
+ -l, --low specifies a check for a sensor value which is too low.
+ Example:
+ --low fan1=2000,1000
+ will give a warning if the value of the fan1 sensor drops
+ below 2000 RPMs and a critical status if it drops below
+ 1000 RPMs
+
+ -h, --high specifies a check for a sensor value which is too high.
+ Example:
+ --high temp1=50,60
+ will give a warning if the value of the temp1 sensor reaches
+ 50 degrees and a critical status if it reaches 60 degrees
+
+ -r, --range specifies a check for a sensor value which should stay
+ in a given range.
+ Example:
+ --range v1=1,2,12
+ will give a warning if the value of the sensor gets outside
+ the 11-13 range (12+-1) and a critical status if the value is
+ outside the 10-14 range (12+-2)
+
+ --rename renames a sensor in the performance output (useful if you
+ want to have common names for similar sensors across different
+ machines)
+ Example:
+ --rename cputemp=temp1
+
+ --list list all available sensors
+
+ --nosensors disable checks on check lm_sensors
+
+ --nodrives disable checks on drive temperatures
+
+ -d, --drives enable checks on drive temperature
+
+ --hddtemp_bin manually specifies the location of the hddtemp binary
+
+ --sensors_bin manually specified the location of the sensors binary
+
+ -v, --verbose verbose output
+
+ --version prints $prog_name's version and exits
+
+------------------------------------------------------------------------------
+Values
+(see also Documentation/hwmon/sysfs-interface in the kernel documentation)
+
+lm-sensors supports the following sensors
+
+* 'in' voltage channel in millivolt
+* 'cpu' CPU core reference voltage in millivolt
+* 'fan' fan speed in revolutions per minute (RPM)
+* 'pwm' pulse width modulation (255 is 100%)
+* 'temp' temperature in millidegree Celsius (or millivolt)
+* 'curr' current in milliampere
+* 'power' in microWatt
+* 'energy' in microJoule
+
+
+------------------------------------------------------------------------------
+Example:
+
+$ check_lm_sensors --high it8718_temp1=20000,30000 --range it8718_in0=100,200,1200 -v
+hddtemp found at /usr/bin/hddtemp
+Looking for drives in /proc/partitions
+found temperature for drive sda (sda = 47)
+warning: temperature for /dev/sdd not available
+warning: temperature for /dev/sde not available
+found sensor k8temp_temp1 (11000)
+found sensor k8temp_temp2 (7000)
+found sensor k8temp_temp3 (5000)
+found sensor k8temp_temp4 (2000)
+found sensor it8718_in0 (1152)
+found sensor it8718_in1 (0)
+found sensor it8718_in2 (3392)
+found sensor it8718_in3 (3008)
+found sensor it8718_in4 (3024)
+found sensor it8718_in5 (3200)
+found sensor it8718_in6 (3696)
+found sensor it8718_in7 (4016)
+found sensor it8718_in8 (3360)
+found sensor it8718_temp1 (13000)
+found sensor it8718_temp2 (32000)
+found sensor it8718_temp3 (58000)
+found sensor it8718_fan1 (2288)
+found sensor it8718_fan2 (0)
+found sensor it8718_fan3 (0)
+LM_SENSORS OK - it8718_temp1=13000 it8718_in0=1152|it8718_temp1=13000;20000;30000;; it8718_in0=1152;100;200;;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/TODO b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/TODO
new file mode 100644
index 0000000..d776b36
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/TODO
@@ -0,0 +1,3 @@
+* other types of sensors?
+* other OSes?
+ * mac os X: http://cutup.org/code/sh/tp
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/VERSION b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/VERSION
new file mode 100644
index 0000000..627a3f4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/VERSION
@@ -0,0 +1 @@
+4.1.1
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/check_lm_sensors b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/check_lm_sensors
new file mode 100755
index 0000000..174c533
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/check_lm_sensors
@@ -0,0 +1,721 @@
+#!perl
+
+# check_lm_sensors is a Nagios plugin to monitor the values of on board sensors and hard
+# disk temperatures on Linux systems
+#
+# See the INSTALL file for installation instructions
+#
+# Copyright (c) 2009-2010, ETH Zurich.
+# Copyright (c) 2009-2015
+#
+# This module is free software; you can redistribute it and/or modify it
+# under the terms of GNU general public license (gpl) version 3.
+# See the LICENSE file for details.
+#
+
+use 5.00800;
+
+use strict;
+use warnings;
+
+use Carp;
+use Data::Dumper;
+use English qw(-no_match_vars);
+use Getopt::Long;
+use List::MoreUtils qw(apply);
+use Readonly;
+
+my $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' );
+my $plugin_threshold_module =
+ load_module( 'Monitoring::Plugin::Threshold', 'Nagios::Plugin::Threshold' );
+my $plugin_getopt_module =
+ load_module( 'Monitoring::Plugin::Getopt', 'Nagios::Plugin::Getopt' );
+
+# Check which version of the monitoring plugins is available
+
+sub load_module {
+
+ my @names = @_;
+ my $loaded_module;
+
+ for my $name (@names) {
+
+ my $file = $name;
+
+ # requires need either a bare word or a file name
+ $file =~ s{::}{/}gsxm;
+ $file .= '.pm';
+
+ eval { ## no critic (ErrorHandling::RequireCheckingReturnValueOfEval)
+ require $file;
+ $name->import();
+ };
+ if ( !$EVAL_ERROR ) {
+ $loaded_module = $name;
+ last;
+ }
+ }
+
+ if ( !$loaded_module ) {
+ #<<<
+ print 'CHECK_UPDATES: plugin not found: ' . join( ', ', @names ) . "\n"; ## no critic (RequireCheckedSyscall)
+ #>>>
+
+ exit 2;
+ }
+
+ return $loaded_module;
+
+}
+
+use version; our $VERSION = '4.1.1';
+
+my $desc;
+my $drives;
+my $hddtemp_bin;
+my $help;
+my $limits;
+my $list;
+my $name;
+my $plugin;
+my $prog_name;
+my $raw;
+my $result;
+my $sensors;
+my $status;
+my $unknowns;
+my $verbosity;
+my %highs;
+my %lows;
+my %renames;
+my %ranges;
+
+my %sensor_values;
+my %sensor_names;
+
+# initialization
+$desc = q{};
+$drives = 1;
+$help = q{};
+$prog_name = 'LM_SENSORS';
+$plugin = $plugin_module->new( shortname => $prog_name );
+$sensors = 1;
+$status = q{};
+$unknowns = q{};
+$verbosity = 0;
+
+##############################################################################
+# subroutines
+
+##############################################################################
+# Usage : verbose("some message string", $optional_verbosity_level);
+# Purpose : write a message if the verbosity level is high enough
+# Returns : n/a
+# Arguments : message : message string
+# level : options verbosity level
+# Throws : n/a
+# Comments : n/a
+# See also : n/a
+sub verbose {
+
+ # arguments
+ my $message = shift;
+ my $level = shift;
+
+ if ( !defined $message ) {
+ $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ q{Internal error: not enough parameters for 'verbose'} );
+ }
+
+ if ( !defined $level ) {
+ $level = 0;
+ }
+
+ if ( $level < $verbosity ) {
+
+ ## no critic (InputOutput::RequireCheckedSyscalls)
+ print $message;
+
+ ## use critic
+
+ }
+
+ return;
+
+}
+
+##############################################################################
+# Usage : check_arguments( \%arguments, $number_of_expected_arguments )
+# Purpose : performs sanity checks on arguments
+# Returns : n/a
+# Arguments : \%arguments : an arguments hash (highs, lows or ranges)
+# $number_of_expected_arguments : number of numberical arguments
+# Throws : n/a
+# Comments : n/a
+# See also : n/a
+sub check_arguments {
+
+ my ( $checks_ref, $number_of_arguments ) = @_;
+
+ for my $sensor ( keys %{$checks_ref} ) {
+
+ if ( !defined $sensor_names{$sensor} ) {
+ $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ "unknown sensor $sensor" );
+ }
+ else {
+ my @numbers = split /,/mxs, $checks_ref->{$sensor};
+ if ( @numbers != $number_of_arguments ) {
+ $plugin->nagios_exit( $plugin_module->UNKNOWN,
+"wrong number of arguments ($checks_ref->{$sensor}) for $sensor"
+ );
+ }
+ for my $number (@numbers) {
+ if ( !( $number =~ /^-?\d+[.]?\d*$/mxs ) ) {
+ $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ "$number (in $checks_ref->{$sensor}) is not a number" );
+ }
+ }
+ }
+
+ }
+
+ return;
+
+}
+
+##############################################################################
+# Usage : usage() or usage("error message");
+# Purpose : prints the usage of the plugin and exits with unknown status
+# Returns : n/a
+# Arguments : message : message string
+# Throws : n/a
+# Comments : n/a
+# See also : n/a
+sub usage {
+ my $msg = shift;
+
+ if ( defined $msg ) {
+
+ ## no critic (InputOutput::RequireCheckedSyscalls)
+
+ print "$msg\n";
+
+ ## use critic
+
+ }
+
+ ## no critic (InputOutput::RequireCheckedSyscalls)
+
+ print <<'EOT';
+
+check_lm_sensors [--help] [--verbose] [--version] [OPTIONS]
+
+Options:
+
+ -?, --help help
+
+ -l, --low specifies a check for a sensor value which is too low.
+ Example:
+ --low fan1=2000,1000
+ will give a warning if the value of the fan1 sensor drops
+ below 2000 RPMs and a critical status if it drops below
+ 1000 RPMs
+
+ -h, --high specifies a check for a sensor value which is too high.
+ Example:
+ --high temp1=50,60
+ will give a warning if the value of the temp1 sensor reaches
+ 50 degrees and a critical status if it reaches 60 degrees
+
+ -r, --range specifies a check for a sensor value which should stay
+ in a given range.
+ Example:
+ --range v1=1,2,12
+ will give a warning if the value of the sensor gets outside
+ the 11-13 range (12+-1) and a critical status if the value is
+ outside the 10-14 range (12+-2)
+
+ --rename renames a sensor in the performance output (useful if you
+ want to have common names for similar sensors across
+ different machines)
+ Example:
+ --rename cputemp=temp1
+
+ --list list all available sensors
+
+ --nosensors disable checks on check lm_sensors
+
+ --nodrives disable checks on drive temperatures
+
+ -d, --drives enable checks on drive temperature
+
+ --hddtemp_bin manually specifies the location of the hddtemp binary
+
+ --raw use the sensor raw output and do not convert to standard units
+
+ -v, --verbose verbose output
+
+ --version prints the version and exits
+
+EOT
+
+ ## use critic
+
+ $plugin->nagios_exit( $plugin_module->UNKNOWN, 'Invalid arguments' );
+
+ return;
+
+}
+
+##############################################################################
+# Usage : get_path('program_name');
+# Purpose : retrieves the path of an executable file using the
+# 'which' utility
+# Returns : the path of the program (if found)
+# Arguments : the program name
+# Throws : n/a
+# Comments : n/a
+# See also : n/a
+sub get_path {
+
+ my $prog = shift;
+ my $command = "which $prog";
+ my $output;
+ my $path;
+
+ ## no critic (InputOutput::RequireBriefOpen)
+ my $pid = open $output, q{-|},
+ "$command 2>&1"
+ or $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ "Cannot execute $command: $OS_ERROR" );
+ while (<$output>) {
+ chomp;
+ if ( !/^which:/mxs ) {
+ $path = $_;
+ }
+ }
+ if ( !( close $output )
+ && ( $OS_ERROR != 0 ) )
+ {
+
+ # close to a piped open return false if the command with non-zero
+ # status. In this case $! is set to 0
+ $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ "Error while closing pipe to $command: $OS_ERROR\n" );
+ }
+ ## use critic
+
+ return $path;
+
+}
+
+##############################################################################
+# Usage : parse_drives()
+# Purpose : parses /proc/partitions to find available drives and tries to
+# get their temperature
+# Returns : n/a
+# Arguments : n/a
+# Throws : n/a
+# Comments : n/a
+# See also : n/a
+sub parse_drives {
+
+ my $IN;
+
+ if ( -x $hddtemp_bin ) {
+
+ verbose "Looking for drives in /proc/partitions\n";
+
+ my @disks;
+
+ ## no critic (InputOutput::RequireBriefOpen)
+ open $IN, '<',
+ '/proc/partitions'
+ or $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ 'Cannot open /proc/partitions' );
+ ## use critic
+
+ while (<$IN>) {
+ chomp;
+ my ( $major, $minor, $blocs, $device_name ) = split;
+ if ( !defined $major
+ || $major eq 'major'
+ || $major eq q{}
+ || $device_name =~ /[\d]$/mxs )
+ {
+ next;
+ }
+ push @disks, $device_name;
+ }
+
+ close $IN
+ or $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ "Cannot close input: $OS_ERROR\n" );
+
+ for my $name (@disks) {
+
+ verbose " checking disk /dev/$name\n", 1;
+
+ my $command = "$hddtemp_bin -n /dev/$name";
+
+ my $output;
+
+ my $temp;
+
+ my $pid = open $output, q{-|},
+ "$command 2>&1"
+ or $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ "Cannot execute $command: $OS_ERROR" );
+ while (<$output>) {
+ chomp;
+ $temp = $_;
+ last;
+ }
+ close $output
+ or $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ "Error while executing $command: $OS_ERROR\n" );
+
+ if ( $temp =~ /^[\d]+$/mxs ) {
+
+ # check if the sensor has to be renamed
+
+ $sensor_values{$name} = $temp;
+ $sensor_names{$name} = $name;
+ while ( my ( $original_name, $chosen_name ) = each %renames ) {
+ if ( $original_name eq $name ) {
+ $sensor_names{$chosen_name} = $name;
+ }
+ }
+
+ verbose "found temperature for drive $name ($name = $_)\n";
+
+ }
+ else {
+ verbose "warning: temperature for /dev/$name not available\n";
+ }
+
+ }
+
+ }
+ else {
+ verbose
+ "warning: $hddtemp_bin not found: HDD temperatures not checked\n";
+ }
+
+ return;
+
+}
+
+##############################################################################
+# Usage : parse_sensors()
+# Purpose : retrieves the values of the available sensors
+# Returns : n/a
+# Arguments : n/a
+# Throws : n/a
+# Comments : n/a
+# See also : n/a
+sub parse_sensors {
+
+ my $dir_handle;
+
+ Readonly my $DEV_DIR => '/sys/class/hwmon';
+
+ opendir $dir_handle, $DEV_DIR
+ or return;
+
+ my @devices = grep { m/^[^.]/mxs } readdir $dir_handle;
+
+ closedir $dir_handle
+ or $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ "Error closing $DEV_DIR: $OS_ERROR" );
+
+ for my $device (@devices) {
+
+ my $device_name;
+
+ # get device name
+ my $name_handler;
+
+ ## no critic (InputOutput::RequireBriefOpen)
+ open $name_handler, q{<}, "$DEV_DIR/$device/name"
+ or open $name_handler, q{<},
+ "$DEV_DIR/$device/device/name"
+ or $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ "Error reading $DEV_DIR/$device/[device/]name: $OS_ERROR" );
+ while (<$name_handler>) {
+ chomp;
+ $device_name = $_;
+ last;
+ }
+ close $name_handler
+ or $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ "Error closing $DEV_DIR/$device/device/name: $OS_ERROR" );
+ ## use critic
+
+ # list sensors
+ opendir $dir_handle, "$DEV_DIR/$device/device/"
+ or return;
+ my @sensors = apply { s/_input//mxs; }
+ grep { m/^[^.].*_input/mxs } readdir $dir_handle;
+ closedir $dir_handle
+ or $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ "Error closing $DEV_DIR/$device/device: $OS_ERROR" );
+
+ for my $sensor (@sensors) {
+
+ # get device name
+ my $sensor_handler;
+ my $value;
+
+ ## no critic (InputOutput::RequireBriefOpen)
+ open $sensor_handler, q{<},
+ "$DEV_DIR/$device/device/$sensor"
+ . '_input'
+ or $plugin->nagios_exit(
+ $plugin_module->UNKNOWN,
+ "Error reading $DEV_DIR/$device/device/$sensor"
+ . "_input: $OS_ERROR"
+ );
+ while (<$sensor_handler>) {
+ chomp;
+ $value = $_;
+ last;
+ }
+ close $sensor_handler
+ or $plugin->nagios_exit(
+ $plugin_module->UNKNOWN,
+ "Error closing $DEV_DIR/$device/device/$sensor"
+ . "_input: $OS_ERROR"
+ );
+ ## use critic
+
+ my $full_name = $device_name . q{_} . $sensor;
+
+ # check if the sensor has to be renamed
+ $sensor_values{$full_name} = $value;
+ $sensor_names{$full_name} = $full_name;
+ while ( my ( $original_name, $chosen_name ) = each %renames ) {
+ if ( $original_name eq $full_name ) {
+ $sensor_names{$chosen_name} = $full_name;
+ }
+ }
+
+ if ($verbosity) {
+
+ ## no critic (InputOutput::RequireCheckedSyscalls)
+ print "found sensor $full_name ($value)\n";
+ ## use critic
+
+ }
+
+ }
+
+ }
+
+ return;
+
+}
+
+##############################################################################
+# Usage : convert_values()
+# Purpose : converts raw values to standard units
+# Returns : n/a
+# Arguments : n/a
+# Throws : n/a
+# Comments : n/a
+# See also : n/a
+sub convert_values {
+
+ for my $sensor ( keys %sensor_values ) {
+
+ if ( $sensor =~ /\w+_(in|cpu|temp|curr)[\d]+/mxs ) {
+
+ # convert from millidegrees, milliamperes or millivolts
+
+ ## no critic (ValuesAndExpressions::ProhibitMagicNumbers)
+ $sensor_values{$sensor} = $sensor_values{$sensor} / 1_000;
+ ## use critic
+
+ }
+ elsif ( $sensor =~ /\w+_(power|energy)[\d]+/mxs ) {
+
+ # convert from microJoule or microWarr
+
+ ## no critic (ValuesAndExpressions::ProhibitMagicNumbers)
+ $sensor_values{$sensor} = $sensor_values{$sensor} / 1_000_000;
+ ## use critic
+
+ }
+ elsif ( $sensor =~ /\w+_pwm[\d]+/mxs ) {
+
+ # value (0-255) is a percentage
+
+ ## no critic (ValuesAndExpressions::ProhibitMagicNumbers)
+ $sensor_values{$sensor} = $sensor_values{$sensor} / 2.55;
+ ## use critic
+
+ }
+
+ }
+
+ return;
+
+}
+
+##############################################################################
+# main
+#
+
+########################
+# Command line arguments
+
+Getopt::Long::Configure( 'bundling', 'no_ignore_case' );
+$result = GetOptions(
+ 'drives!' => \$drives,
+ 'hddtemp_bin=s' => \$hddtemp_bin,
+ 'help|?' => sub { usage() },
+ 'high|h=s' => \%highs,
+ 'list' => \$list,
+ 'low|l=s' => \%lows,
+ 'range|r=s' => \%ranges,
+ 'rename=s' => \%renames,
+ 'raw' => \$raw,
+ 'sensors!' => \$sensors,
+ 'verbose|v+' => \$verbosity,
+ 'version' => sub {
+
+ ## no critic (InputOutput::RequireCheckedSyscalls)
+ print "check_lm_sensors version $VERSION\n";
+ ## use critic
+
+ exit $plugin_module->UNKNOWN;
+
+ }
+);
+
+if ( !$result ) {
+ usage();
+}
+
+if ( !( defined $list )
+ && !(%highs)
+ && !(%ranges)
+ && !(%lows) )
+{
+ $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ 'at least one check has to be specified' );
+}
+
+if ($drives) {
+ if ( !$hddtemp_bin ) {
+ $hddtemp_bin = get_path('hddtemp');
+ }
+ if ( !$hddtemp_bin ) {
+ verbose "warning: hddtemp not found: HDD temperatures not checked\n";
+ }
+ else {
+ verbose "hddtemp found at $hddtemp_bin\n";
+ parse_drives();
+ }
+}
+
+parse_sensors();
+
+if ( !$raw ) {
+ convert_values();
+}
+
+if ($list) {
+ for my $sensor ( sort keys %sensor_values ) {
+
+ ## no critic (InputOutput::RequireCheckedSyscalls)
+ print "$sensor -> $sensor_values{$sensor}\n";
+ ## use critic
+
+ }
+}
+
+###############
+# sanity checks
+
+## no critic (ValuesAndExpressions::ProhibitMagicNumbers)
+
+check_arguments( \%highs, 2 );
+check_arguments( \%lows, 2 );
+check_arguments( \%ranges, 3 );
+
+## use critic
+
+################
+# perform checks
+
+my $criticals;
+my $warnings;
+
+my @status;
+my @desc;
+
+# highs
+while ( ( $name, $limits ) = each %highs ) {
+
+ my ( $warn, $crit ) = split /,/mxs, $limits;
+
+ my $value = $sensor_values{ $sensor_names{$name} };
+
+ push @status, "$name=$value;$warn;$crit;;";
+ push @desc, "$name=$value";
+
+ $criticals = $criticals || ( $value > $crit );
+ $warnings = $warnings || ( $value > $warn );
+
+}
+
+# lows
+while ( ( $name, $limits ) = each %lows ) {
+
+ my ( $warn, $crit ) = split /,/mxs, $limits;
+
+ my $value = $sensor_values{ $sensor_names{$name} };
+
+ push @status, "$name=$value;$warn;$crit;;";
+ push @desc, "$name=$value";
+
+ $criticals = $criticals || ( $value < $crit );
+ $warnings = $warnings || ( $value < $warn );
+
+}
+
+# ranges
+while ( ( $name, $limits ) = each %ranges ) {
+
+ my ( $warn, $crit, $ref ) = split /,/mxs, $limits;
+
+ my $value = $sensor_values{ $sensor_names{$name} };
+ my $diff = abs( $value - $ref ); ## no critic (ProhibitParensWithBuiltins)
+
+ push @status, "$name=$value;$warn;$crit;;";
+ push @desc, "$name=$value";
+
+ $criticals = $criticals || ( $diff > $crit );
+ $warnings = $warnings || ( $diff > $warn );
+
+}
+
+#########################
+# build the status string
+
+my $output = ( join q{ }, @desc ) . q{|} . ( join q{ }, @status );
+
+if ($criticals) {
+ $plugin->nagios_exit( $plugin_module->CRITICAL, $output );
+}
+
+if ($warnings) {
+ $plugin->nagios_exit( $plugin_module->WARNING, $output );
+}
+
+$plugin->nagios_exit( $plugin_module->OK, $output );
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/check_lm_sensors.pod b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/check_lm_sensors.pod
new file mode 100644
index 0000000..7e6e5a1
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/check_lm_sensors.pod
@@ -0,0 +1,129 @@
+=pod
+
+=head1 NAME
+
+C<check_lm_sensors> is a Nagios plugin to monitor the values of on
+board sensors and hard disk temperatures on Linux systems
+
+=head1 DESCRIPTION
+
+check_lm_sensors is a Nagios plugin to monitor the values of on board
+sensors and hard disk temperatures on Linux systems
+
+=head1 VERSION
+
+Version 3.1.1
+
+=head1 SYNOPSIS
+
+ check_lm_sensors [--help] [--verbose] [--version] [OPTIONS]
+
+ Options
+ -?, --help help
+ -l, --low specifies a check for a sensor value which is too low.
+ -h, --high specifies a check for a sensor value which is too high.
+ -r, --range specifies a check for a sensor value which should stay
+ in a given range.
+ --rename renames a sensor in the performance output (useful if you
+ want to have common names for similar sensors across different
+ machines)
+ --sanitize sanitize sensor names (e.g., removing spaces)
+ --nosensors disable checks on check lm_sensors
+ --nodrives disable checks on drive temperatures
+ -d, --drives enable checks on drive temperature
+ --hddtemp_bin manually specifies the location of the hddtemp binary
+ --sensors_bin manually specified the location of the sensors binary
+ -v, --verbose verbose output
+ --version prints $prog_name's version and exits
+
+=head1 REQUIRED ARGUMENTS
+
+=head1 OPTIONS
+
+=head1 EXAMPLE
+
+=head1 DIAGNOSTICS
+
+You can specify multiple --verbose options to increase the program
+verbosity.
+
+=head1 EXIT STATUS
+
+0 if OK, 1 in case of a warning, 2 in case of a critical status and 3
+in case of an unkown problem
+
+=head1 DEPENDENCIES
+
+check_updates depends on
+
+=over 4
+
+=item * Carp
+
+=item * English
+
+=item * Getopt::Long
+
+=item * Monitoring::Plugin
+
+=item * Monitoring::Plugin::Threshold
+
+=item * version
+
+=back
+
+=head1 CONFIGURATION
+
+=head1 INCOMPATIBILITIES
+
+None reported.
+
+=head1 SEE ALSO
+
+Nagios documentation
+
+=head1 BUGS AND LIMITATIONS
+
+No bugs have been reported.
+
+Please report any bugs or feature requests to matteo@corti.li,
+or through the web interface at https://github.com/matteocorti/check_lm_sensors/issues
+
+=head1 AUTHOR
+
+Matteo Corti <matteo@corti.li>
+
+=head1 LICENSE AND COPYRIGHT
+
+Copyright (c) 2007, ETH Zurich.
+Copyright (c) 2007-2105, Matteo Corti
+
+This module is free software; you can redistribute it and/or modify it
+under the terms of GNU general public license (gpl) version 3.
+See the LICENSE file for details.
+
+=head1 DISCLAIMER OF WARRANTY
+
+BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
+WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
+PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE
+TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+=head1 ACKNOWLEDGMENTS
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/check_lm_sensors.spec b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/check_lm_sensors.spec
new file mode 100644
index 0000000..abc4789
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/check_lm_sensors-4.1.1/check_lm_sensors.spec
@@ -0,0 +1,90 @@
+%define version 4.1.1
+%define release 0
+%define sourcename check_lm_sensors
+%define packagename nagios-plugins-check-lm-sensors
+%define nagiospluginsdir %{_libdir}/nagios/plugins
+
+# No binaries in this package
+%define debug_package %{nil}
+
+Summary: A Nagios plugin to monitor sensors values
+Name: %{packagename}
+Version: %{version}
+Obsoletes: check_lm_sensors
+Release: %{release}%{?dist}
+License: GPLv3+
+Packager: Matteo Corti <matteo@corti.li>
+Group: Applications/System
+BuildRoot: %{_tmppath}/%{packagename}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source: https://github.com/matteocorti/check_lm_sensors/releases/download/v4.1.1/check_lm_sensors-4.1.1.tar.gz
+
+Requires: hddtemp
+
+# Fedora build requirement (not needed for EPEL{4,5})
+BuildRequires: perl(ExtUtils::MakeMaker)
+
+Requires: nagios-plugins
+
+%description
+check_lm_sensors is a Nagios plugin to monitor the values of on board sensors and hard
+disk temperatures on Linux systems
+
+%prep
+%setup -q -n %{sourcename}-%{version}
+
+%build
+%{__perl} Makefile.PL INSTALLDIRS=vendor \
+ INSTALLSCRIPT=%{nagiospluginsdir} \
+ INSTALLVENDORSCRIPT=%{nagiospluginsdir}
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+make pure_install PERL_INSTALL_ROOT=%{buildroot}
+find %{buildroot} -type f -name .packlist -exec rm -f {} \;
+find %{buildroot} -type f -name "*.pod" -exec rm -f {} \;
+find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
+%{_fixperms} %{buildroot}/*
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS Changes NEWS README TODO COPYING COPYRIGHT
+%{nagiospluginsdir}/%{sourcename}
+%{_mandir}/man1/%{sourcename}.1*
+
+%changelog
+* Fri Jan 7 2016 Matteo Corti <matteo@corti.li> - 4.1.1-0
+- Updated to 4.1.1
+
+* Mon Nov 23 2015 Matteo Corti <matteo@corti.li> - 4.1.0-0
+- Updated to 4.1.0
+
+* Fri Oct 17 2008 Matteo Corti <matteo.corti@id.ethz.ch> - 3.1.1-0
+- short pause before reading the output of 'sensors'
+
+* Tue Jun 10 2008 Matteo Corti <matteo.corti@id.ethz.ch> - 3.1.0-0
+- repackaging and cleanup
+
+* Thu Oct 4 2007 Matteo Corti <matteo.corti@id.ethz.ch> - 3.0.1-0
+- packaged version 3.0.1
+
+* Wed Oct 3 2007 Matteo Corti <matteo.corti@id.ethz.ch> - 3.0.0-2
+- added the perl-Nagios-Plugin dependency
+
+* Wed Oct 3 2007 Matteo Corti <matteo.corti@id.ethz.ch> - 3.0.0-1
+- included the updated ChangeLog and NEWS files
+
+* Wed Oct 3 2007 Matteo Corti <matteo.corti@id.ethz.ch> - 3.0.0-0
+- Upgraded to 3.0.0
+
+* Tue Jul 10 2007 Matteo Corti <matteo.corti@id.ethz.ch> - 2.0-1
+- updated to 2.0
+
+* Wed Jun 20 2007 Matteo Corti <matteo.corti@id.ethz.ch> - 1.1-4
+- Requires perl and hddtemp
+
+* Mon Jun 18 2007 Matteo Corti <matteo.corti@id.ethz.ch> - 1.0-0
+- Initial release
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/control
new file mode 100644
index 0000000..85e1fa1
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/control
@@ -0,0 +1,7 @@
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Recommends: libmonitoring-plugin-perl | libnagios-plugin-perl (>= 0.31)
+Version: 4.1.1
+Homepage: https://github.com/matteocorti/check_lm_sensors
+Watch: https://github.com/matteocorti/check_lm_sensors/releases check_lm_sensors-([0-9.]+)\.tar\.gz
+Description: plugin to monitor hardware sensors
+ and disk temperatures
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/copyright
new file mode 100644
index 0000000..10a0ebe
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/copyright
@@ -0,0 +1,6 @@
+Copyright (c) 2007, ETH Zurich.
+
+Author: Matteo Corti <matteo.corti@id.ethz.ch>
+
+This module is free software; you can redistribute it and/or modify it
+under the terms of GNU general public license (gpl) version 3.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/lm_sensors.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/lm_sensors.cfg
new file mode 100644
index 0000000..b65d0d3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/lm_sensors.cfg
@@ -0,0 +1,16 @@
+# 'check_lm_sensors_high' command definition
+define command{
+ command_name check_lm_sensors_high
+ command_line /usr/lib/nagios/plugins/check_lm_sensors --high '$ARG1$'
+}
+# 'check_lm_sensors_low' command definition
+define command{
+ command_name check_lm_sensors_low
+ command_line /usr/lib/nagios/plugins/check_lm_sensors --low '$ARG1$'
+}
+# 'check_lm_sensors_range' command definition
+define command{
+ command_name check_lm_sensors_range
+ command_line /usr/lib/nagios/plugins/check_lm_sensors --range '$ARG1$'
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/src b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/src
new file mode 120000
index 0000000..3f9d0d2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_lm_sensors/src
@@ -0,0 +1 @@
+check_lm_sensors-4.1.1 \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/Makefile
new file mode 100644
index 0000000..82fd410
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/Makefile
@@ -0,0 +1,9 @@
+#/usr/bin/make -f
+CLEANFILES = check_memcached check_memcached.c
+LIBS += $(shell pkg-config --libs libmemcached) -lpthread
+
+include ../common.mk
+
+
+check_memcached: check_memcached.o
+ $(CC) $(LDFLAGS) -o $@ $< $(LIBS)
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/check_memcached.l b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/check_memcached.l
new file mode 100644
index 0000000..9081b27
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/check_memcached.l
@@ -0,0 +1,613 @@
+/*
+ This file is the for the Flex code-generator: http://flex.sourceforge.net/
+ It also requires libmemcached: http://libmemcached.org/libMemcached.html
+
+ For yum based distributions, eg Red Hat/Fedora/SuSE/Mageia
+ yum install gcc flex glibc-devel libmemcached-devel
+
+ For apt based distributions, eg Debian/Ubuntu
+ apt-get install gcc make flex libc6-dev libmemcached-dev
+
+ Build it using:
+ make LDFLAGS=-lmemcached check_memcached
+ or
+ make LDFLAGS="-lmemcached -lpthread" check_memcached
+ (depending on your Linux distro)
+
+ This program was initially developed by Lonely Planet for internal use
+ and has kindly been made available to the Open Source community for
+ redistribution and further development under the terms of the
+ GNU General Public License v3: http://www.gnu.org/licenses/gpl.html
+
+ This program is supplied 'as-is', in the hope that it will be useful, but
+ neither Lonely Planet nor the authors make any warranties or guarantees
+ as to its correct operation, including its intended function.
+
+ Or in other words:
+ Test it yourself, and make sure it works for YOU.
+
+ Author: George Hansper e-mail: george@hansper.id.au
+
+*/
+%{
+
+/* --------------------------- #include ------------------------------ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+/* For getopt() */
+#include <unistd.h>
+extern int optind, opterr, optopt;
+
+#include <errno.h>
+#include <libmemcached/memcached.h>
+
+#define print_v(args...) if ( verbose ) fprintf(stderr,args );
+
+#define DEBUG 0
+#if DEBUG == 1
+ #define print_debug(args...) fprintf(stderr,args );
+#else
+ #define print_debug(args...)
+#endif
+
+YY_BUFFER_STATE yy_memcache_buffer;
+
+#define YY_USER_ACTION buffer_position+=yyleng;
+
+/* --------------------------- static/global variables ------------------------------ */
+
+static int default_port = 11211;
+static int max_n_stats = 30;
+static int min_stats_interval = 30; /* Compare stats at least 30 minutes old, at least */
+static int verbose=0;
+static int perfstats_for_rrdtool=0;
+static double min_hit_miss = 2.0;
+static uint64_t max_evictions = 10;
+static double timeout=1.0;
+
+static char *hostname;
+static int port;
+static char *argv0;
+
+static char *memcached_key = "check_memcached"; /* The key we will store our data under */
+
+/* The expiry time on the stats object, in seconds. Two hours between checks is pretty generous */
+static int memcache_stats_object_expiry_time = 60*60*2;
+
+static char *memory_error_message = "CRITICAL: Could not allocate memory";
+
+static int buffer_position;
+static memcached_stat_st stats;
+static uint64_t obj_time_last = 0;
+static uint64_t obj_time_oldest = 0;
+static uint64_t obj_time = 0;
+static int obj_n_prune = 0;
+static int obj_n_stats;
+static uint64_t obj_get_hits;
+static uint64_t obj_get_misses;
+static uint64_t obj_evictions;
+static uint64_t obj_cmd_get;
+static uint64_t obj_cmd_set;
+static uint64_t *save_to;
+
+/* --------------------------- functions() ------------------------------ */
+void usage();
+int check_memcached();
+char * get_current_stats(memcached_st*);
+char * update_stats_obj(char *, size_t , char *);
+
+/* ===================================================================================== */
+%}
+
+%option yylineno
+
+%s FIND_OFFSET FIND_STATS DUMMY
+
+%%
+<DUMMY>.|\n ECHO;
+time= { save_to = &obj_time_last; obj_n_stats++; }
+get_hits= { save_to = &obj_get_hits; }
+get_misses= { save_to = &obj_get_misses; }
+evictions= { save_to = &obj_evictions; }
+cmd_get= { save_to = &obj_cmd_get; }
+cmd_set= { save_to = &obj_cmd_set; }
+<FIND_STATS>[0-9]+ {
+ if ( save_to != NULL ) {
+ if ( save_to == &obj_time_last ) {
+ /* New time-stamp */
+ (*save_to) = (uint64_t) strtoll(yytext, NULL, 10);
+ save_to = NULL;
+ if ( obj_time_last <= stats.time - 60*min_stats_interval &&
+ obj_time_last > obj_time ) {
+ obj_time = obj_time_last;
+ /* Remove any stale data */
+ obj_get_hits = 0;
+ obj_get_misses = 0;
+ obj_evictions = 0;
+ obj_cmd_get = 0;
+ obj_cmd_set = 0;
+ }
+ if( obj_time_oldest == 0 || obj_time_last < obj_time_oldest ) {
+ obj_time_oldest = obj_time_last;
+ }
+ } else if( obj_time == obj_time_last ) {
+ /* New cadidate data - save it */
+ (*save_to) = (uint64_t) strtoll(yytext, NULL, 10);
+ save_to = NULL;
+ }
+ }
+ }
+<FIND_OFFSET>[0-9]+ ; /* Don't convert or save integers, just find the offset of the 1st item to keep */
+<FIND_OFFSET>\n {
+ if ( obj_n_stats >= obj_n_prune ) {
+ return(buffer_position);
+ }
+ }
+<FIND_OFFSET><<EOF>> { return(buffer_position); }
+"\t"|" " ;
+. { save_to = NULL; }
+\n { save_to = NULL; }
+%%
+/* ==================================================================================================== */
+
+yywrap() {
+ return 1;
+}
+
+/* ==================================================================================================== */
+int main(int argc, char **argv) {
+ char opt_c;
+ int arg_int;
+ char *trail_c;
+ int n;
+ int i;
+ int result;
+ int arg_error = 0;
+ argv0 = argv[0];
+ while ( ( opt_c = getopt(argc, argv, "hvrH:p:w:c:t:T:n:E:k:K:") ) != -1 ) {
+ switch( opt_c ) {
+ case 'H':
+ /* Hostname or IP address - support for comma-separated list */
+ hostname = malloc(sizeof(char) * (strlen(optarg)+1));
+ result = sscanf(optarg, "%[-.0-9a-zA-Z_]%n:%d%n",hostname,&n,&port,&n);
+ print_debug("%d+%d # >>> %s <<< === %d === %s\n",result,n,hostname, port, optarg);
+ switch(result) {
+ case 1:
+ /* Port not specified - use default_port */
+ port = 0;
+ break;
+ case 2:
+ /* OK hostname:port specified */
+ break;
+ default:
+ arg_error = 1;
+ break;
+ }
+ break;
+ case 'p':
+ arg_int = strtol(optarg,&trail_c,10);
+ if ( *trail_c != '\0' ) {
+ fprintf(stderr,"option \"-p port\": port must be a number, not \"%s\"\n",optarg);
+ arg_error = 1;
+ } else {
+ default_port = arg_int;
+ }
+ break;
+ case 'n':
+ arg_int = strtol(optarg,&trail_c,10);
+ if ( *trail_c != '\0' ) {
+ fprintf(stderr,"option \"-n max_stats\": max_stats must be a number, not \"%s\"\n",optarg);
+ arg_error = 1;
+ } else {
+ max_n_stats = arg_int;
+ }
+ break;
+ case 'T':
+ min_stats_interval = strtol(optarg,NULL,10);
+ break;
+ case 'v':
+ verbose=1;
+ break;
+ case 'w':
+ min_hit_miss = strtod(optarg,NULL);
+ break;
+ case 'E':
+ max_evictions = strtoll(optarg,NULL,10);
+ break;
+ case 't':
+ timeout = strtod(optarg,NULL);
+ break;
+ case 'r':
+ perfstats_for_rrdtool=1;
+ break;
+ case 'c':
+ /* Ignored - for now */
+ break;
+ case 'k':
+ if ( optarg != NULL && strlen(optarg) > 1 ) {
+ memcached_key = optarg;
+ }
+ break;
+ case 'K':
+ memcache_stats_object_expiry_time = strtol(optarg,NULL,10);
+ break;
+ case 'h':
+ default:
+ arg_error = 1;
+ break;
+ }
+ }
+ if ( port == 0 ) {
+ port = default_port;
+ }
+ if ( arg_error || hostname == NULL ) {
+ usage();
+ exit(1);
+ }
+
+ return (check_memcached());
+}
+
+/* ==================================================================================================== */
+int check_memcached() {
+ memcached_st *my_memcached;
+ memcached_return error;
+ memcached_result_st *result;
+ uint32_t flags;
+ char *object;
+ char *new_object;
+ size_t object_size;
+ char new_stats;
+ int n;
+ char *current_stats_str;
+ double hit_miss;
+ char *nagios_service_tmp;
+ char *nagios_service_output; /* error/warning message */
+ char *nagios_perfdata; /* Performance data */
+ size_t str_bytes = 0;
+ int nagios_result;
+
+ /* ----------------------------------------------------------------------------------------- */
+ /* Connect to the memcached server */
+
+ my_memcached = memcached_create(NULL);
+ if ( my_memcached == NULL ) {
+ puts("CRITICAL: Could not create memcached_st using memcached_create()\n");
+ exit(2);
+ }
+
+ error = memcached_server_add(my_memcached, hostname, port);
+ if ( error ) {
+ printf("CRITICAL: %s\n",memcached_strerror(my_memcached, error));
+ exit(2);
+ }
+ memcached_behavior_set(my_memcached, MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, (uint64_t) (timeout * 1000));
+ memcached_behavior_set(my_memcached, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, (uint64_t) (timeout * 1000));
+ memcached_behavior_set(my_memcached, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
+
+ print_debug("default timeout = %lu %lu %lu %lu... %1.1f\n",my_memcached->connect_timeout,
+ my_memcached->poll_timeout,
+ my_memcached->snd_timeout,
+ my_memcached->rcv_timeout,
+ timeout);
+ /* ----------------------------------------------------------------------------------------- */
+ /* Get the stats from this server */
+ current_stats_str = get_current_stats(my_memcached);
+
+ /* ----------------------------------------------------------------------------------------- */
+ /* Get our data (if it's there) */
+ /* memcached_behavior_set(my_memcached, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 0); */
+ flags = 0;
+ object = memcached_get(my_memcached, memcached_key, strlen(memcached_key), &object_size, &flags, &error);
+ print_debug("Object = %p, Length = %lu, Error = %d (%s)\n",object,object_size,error,memcached_strerror(my_memcached, error));
+ if ( error ) {
+ print_v("No stats history object found (key=%s)\n",memcached_key);
+ }
+
+ print_debug("uint64_t = %d, long = %d, long long = %d\n",sizeof(uint64_t), sizeof(long int), sizeof(long long int));
+
+ print_debug("Here it is...%d bytes\n%s\n\n",object_size,object);
+
+ obj_n_stats=0;
+ BEGIN(FIND_STATS);
+ yy_memcache_buffer = yy_scan_bytes ( object, object_size );
+ yylex();
+
+ print_debug("Found %d items in stats history\n",obj_n_stats);
+ print_debug("Best stats:\ntime=%llu cmd_get=%llu cmd_set=%llu get_hits=%llu get_misses=%llu evictions=%llu\n",
+ obj_time,obj_cmd_get,obj_cmd_set,obj_get_hits,obj_get_misses,obj_evictions);
+ print_debug("New stats\n%s\n",current_stats_str);
+
+ new_object = update_stats_obj(object, object_size, current_stats_str);
+
+ /* ----------------------------------------------------------------------------------------- */
+ /* Store new data if it's at least 1 minute newer */
+ nagios_result=0;
+ nagios_service_output = NULL;
+ if( new_object != NULL ) {
+ error = memcached_set(my_memcached,
+ memcached_key,
+ strlen(memcached_key),
+ new_object,
+ strlen(new_object), /* trailing \0 is not stored with the object(!) */
+ (time_t) memcache_stats_object_expiry_time, /* Expire after (default) 2 hours */
+ 0
+ );
+ if ( error ) {
+ str_bytes = asprintf(&nagios_service_output,"Could not store updated stats object - %s; ",
+ memcached_strerror(my_memcached, error));
+ nagios_result|=2;
+ }
+ }
+
+ if ( nagios_service_output == NULL ) {
+ str_bytes = asprintf(&nagios_service_output,"");
+ }
+ /* ----------------------------------------------------------------------------------------- */
+ /* ---- Analyze the stats, return 0,1,2 as required ---------------------------------------- */
+
+ if ( obj_time == 0 ) {
+ nagios_service_tmp = nagios_service_output;
+ str_bytes = asprintf(&nagios_service_output,
+ "%sno stats available yet. Come back in %d minutes; ",
+ nagios_service_tmp,
+ min_stats_interval - (stats.time - obj_time_oldest ) / 60
+ );
+ free ( nagios_service_tmp );
+ } else {
+ /* ---- Evictions ---- */
+ if ( max_evictions > 0 && ( stats.evictions - obj_evictions) >= max_evictions ) {
+ nagios_result|=1;
+ nagios_service_tmp = nagios_service_output;
+ str_bytes = asprintf(&nagios_service_output,
+ "%sToo many evictions: %d; ",
+ nagios_service_tmp,
+ stats.evictions - obj_evictions
+ );
+ free ( nagios_service_tmp );
+ }
+
+ /* ---- Hit/Miss ratio ---- */
+ nagios_service_tmp = nagios_service_output;
+ if ( ( stats.get_misses - obj_get_misses ) > 0 ) {
+ hit_miss = ( stats.get_hits - obj_get_hits ) * 1.0 / ( stats.get_misses - obj_get_misses );
+ if ( hit_miss < min_hit_miss ) {
+ nagios_result|=1;
+ str_bytes = asprintf(&nagios_service_output,
+ "%sLow hit/miss rate: %1.1f; ",
+ nagios_service_tmp,
+ hit_miss
+ );
+ free ( nagios_service_tmp );
+ } else {
+ str_bytes = asprintf(&nagios_service_output,
+ "%shit/miss=%1.1f; ",
+ nagios_service_tmp,
+ hit_miss
+ );
+ }
+ } else {
+ hit_miss = 0;
+ str_bytes = asprintf(&nagios_service_output,"%shit/miss=%llu/0; ",
+ nagios_service_tmp,
+ stats.get_hits - obj_get_hits
+ );
+ free ( nagios_service_tmp );
+ }
+
+ nagios_service_tmp = nagios_service_output;
+ str_bytes = asprintf(&nagios_service_output,
+ "%shits=%llu misses=%llu evictions=%llu interval=%lu mins",
+ nagios_service_tmp,
+ stats.get_hits - obj_get_hits,
+ stats.get_misses - obj_get_misses,
+ stats.evictions - obj_evictions,
+ (uint32_t) (stats.time - obj_time ) / 60
+ );
+ free ( nagios_service_tmp );
+ }
+ /* Add the performance data */
+ /* Remove trailing newline from current_stats_str */
+ n = strlen(current_stats_str);
+ if ( n > 1 && *(current_stats_str+n-1) == '\n' ) {
+ *(current_stats_str+n-1) = '\0';
+ }
+ if ( str_bytes == -1 ) {
+ puts(memory_error_message);
+ exit(2);
+ }
+
+ /* Delta times may not apply if no suitable object found. Also, if NO object exists yet, there is nothing to calculate */
+ if ( perfstats_for_rrdtool == 1 ) {
+ if ( obj_time == 0 ) {
+ /* No performance stats available (yet) */
+ nagios_perfdata = "";
+ } else {
+ /*
+ str_bytes = asprintf(&nagios_perfdata,
+ "%s delta_time_s=%lu gets_per_min=%llu sets_per_min=%llu hits_per_min=%llu misses_per_min=%llu evictions_per_min=%llu",
+ current_stats_str,
+ (uint32_t) ( stats.time - obj_time ),
+ 60 * ( stats.cmd_get - obj_cmd_get) / ( stats.time - obj_time ),
+ 60 * ( stats.cmd_set - obj_cmd_set )/ ( stats.time - obj_time ),
+ 60 * ( stats.get_hits - obj_get_hits ) / ( stats.time - obj_time ),
+ 60 * ( stats.get_misses - obj_get_misses ) / ( stats.time - obj_time ),
+ 60 * ( stats.evictions - obj_evictions ) / ( stats.time - obj_time )
+ );
+ */
+ str_bytes = asprintf(&nagios_perfdata,
+ "gets_per_min=%.2f sets_per_min=%.2f hits_per_min=%.2f misses_per_min=%.2f evictions_per_min=%.2f hit_miss_ratio=%.2f",
+ 60.0 * ( stats.cmd_get - obj_cmd_get) / ( stats.time - obj_time ),
+ 60.0 * ( stats.cmd_set - obj_cmd_set )/ ( stats.time - obj_time ),
+ 60.0 * ( stats.get_hits - obj_get_hits ) / ( stats.time - obj_time ),
+ 60.0 * ( stats.get_misses - obj_get_misses ) / ( stats.time - obj_time ),
+ 60.0 * ( stats.evictions - obj_evictions ) / ( stats.time - obj_time ),
+ /* Hit/Miss ratio */
+ 0. + hit_miss
+ );
+ }
+
+ } else if ( obj_time == 0 ) {
+ nagios_perfdata = "";
+ } else {
+ str_bytes = asprintf(&nagios_perfdata,
+ "%s delta_time=%lu delta_cmd_get=%llu delta_cmd_set=%llu delta_get_hits=%llu delta_get_misses=%llu delta_evictions=%llu",
+ current_stats_str,
+ (uint32_t) ( stats.time - obj_time ),
+ stats.cmd_get - obj_cmd_get,
+ stats.cmd_set - obj_cmd_set,
+ stats.get_hits - obj_get_hits,
+ stats.get_misses - obj_get_misses,
+ stats.evictions - obj_evictions
+ );
+ }
+
+ switch(nagios_result) {
+ case 0:
+ printf("OK: %s|%s\n",nagios_service_output,nagios_perfdata);
+ break;
+ case 1:
+ printf("WARNING: %s|%s\n",nagios_service_output,nagios_perfdata);
+ break;
+ default:
+ printf("CRITICAL: %s|%s\n",nagios_service_output,nagios_perfdata);
+ nagios_result = 2;
+ break;
+ }
+
+ if ( ( stats.get_misses - obj_get_misses ) > 0 ) {
+ print_v("\nHit/Miss = %llu / %llu = %1.1f\n",
+ stats.get_hits - obj_get_hits,
+ stats.get_misses - obj_get_misses,
+ hit_miss);
+ } else {
+ print_v("\nNo misses - very good\n");
+ }
+
+ print_v("\nHistory object '%s':\n%s\nNew stats:\n%s (%sstored)\n",memcached_key,object,current_stats_str,
+ new_object== NULL? "not ":"");
+
+ memcached_free(my_memcached);
+
+ return(nagios_result);
+}
+
+/* ==================================================================================================== */
+char *get_current_stats(memcached_st *my_memcached) {
+ memcached_return error;
+ int str_bytes;
+ char * current_stats_str_format;
+ char * current_stats_str;
+ memcached_stat_st *stats_array;
+
+ /* error = memcached_stat_servername(&stats, NULL, hostname, port); - cannot set timeout, but gives better error responses :-( */
+ stats_array = memcached_stat(my_memcached, NULL, &error);
+
+ if ( error ) {
+ printf("CRITICAL: Could not connect to server %s:%d - %s (%d)\n",hostname, port,
+ memcached_strerror(my_memcached, error), error
+ );
+ exit(2);
+ }
+ stats = stats_array[0];
+ free(stats_array);
+
+ current_stats_str_format = "time=%lu cmd_get=%llu cmd_set=%llu get_hits=%llu get_misses=%llu evictions=%llu\n";
+
+ str_bytes = asprintf(&current_stats_str,current_stats_str_format,
+ stats.time,stats.cmd_get,stats.cmd_set,stats.get_hits,stats.get_misses,stats.evictions);
+
+ obj_time_oldest = stats.time;
+
+ if ( str_bytes == -1 ) {
+ puts(memory_error_message);
+ exit(2);
+ }
+
+ return(current_stats_str);
+}
+
+/* ==================================================================================================== */
+char * update_stats_obj(char *object, size_t object_size, char *current_stats_str) {
+ int obj_offset;
+ char *new_object;
+ size_t new_object_size;
+ size_t graft_offset;
+ int graft_size;
+ char *s;
+ if ( stats.time < obj_time_last + 30 ) {
+ /* Only store new stats if at least 1 minute has passed since the last stats were stored */
+ print_v("New stats are less than 30s newer than last entry - not stored\n");
+ return(NULL);
+ }
+ /* Prune stats from the start of the object */
+ obj_n_prune = 1 + obj_n_stats - max_n_stats;
+ if ( obj_n_prune > 0 ) {
+ buffer_position=0;
+ obj_n_stats = 0;
+ BEGIN(FIND_OFFSET);
+ yy_memcache_buffer = yy_scan_bytes ( object, object_size );
+ obj_offset = yylex();
+ } else {
+ obj_offset = 0;
+ }
+ /*
+ while( yylex() ) {
+ }
+ print_debug("Prune %d items / %d chars from start of object\nNew:\n%s\n",obj_n_prune,obj_offset,object+obj_offset);
+ */
+ /* Add extra 2 chars for trailing \n\0 */
+ new_object_size = object_size - obj_offset + (size_t) ( (strlen(current_stats_str)+ 2) * sizeof(char));
+ new_object = malloc(new_object_size * sizeof(char) );
+ if (new_object == NULL ) {
+ puts(memory_error_message);
+ exit(2);
+ }
+ graft_size = object_size - obj_offset;
+ if ( graft_size > 0 ) {
+ memcpy(new_object,object+obj_offset,graft_size);
+ } else {
+ graft_size = 0;
+ }
+ /* Ensure there is a \0 on the end of the object */
+ *(new_object+graft_size)='\0';
+ /* Make sure there is a newline between each item in the list */
+ s = new_object + graft_size;
+ if ( graft_size > 0 ) {
+ while ( ( *s == '\0' || *s == '\n' ) && s > new_object ) {
+ /* Trailing \0 and trailing \n - rewind a char or more */
+ s--;
+ }
+ /* Add \n\0 to end of buffer */
+ strcpy(++s,"\n");
+ }
+ strcat(s,current_stats_str);
+ return(new_object);
+ print_debug("New Object is:\n%s\nNew size: %d\nReal size: %d\n",new_object, new_object_size, (strlen(new_object)+1));
+ return(new_object);
+}
+
+/* ==================================================================================================== */
+
+void usage() {
+ puts("Usage:");
+ printf("\t%s -H hostname[:port] [-v] [-p port] [-t time_out] [-w min_hit_miss] [-n max_stats] [-T min_stats_interval] [-E max_evictions] [-k key] [-K key_expiry_time] [-r]\n", argv0);
+ printf("\t-H ... Hostname or IP address (required)\n\t optional \":port\" overrides -p\n");
+ printf("\t-p ... Port number (default: %u)\n",default_port);
+ printf("\t-v ... verbose messages\n");
+ printf("\t-n ... Keep up to this many items in the history object in memcached (default: %u)\n",max_n_stats);
+ printf("\t-T ... Minimum time interval (in minutes) to use to analyse stats. (default: %u)\n",min_stats_interval);
+ printf("\t-w ... Generate warning if quotient of hits/misses falls below this value (default: %1.1f)\n",min_hit_miss);
+ printf("\t-E ... Generate warning if number of evictions exceeds this threshold. 0=disable. (default: %llu)\n",max_evictions);
+ printf("\t-t ... timeout in seconds (default: %1.1f)\n",timeout);
+ printf("\t-k ... key name for history object (default: %s)\n",memcached_key);
+ printf("\t-K ... expiry time in seconds for history object (default: %u)\n",memcache_stats_object_expiry_time);
+ printf("\t-r ... output performance statistics as rate-per-minute figures (better suited to pnp4nagios)\n");
+ printf("\nExample:\n");
+ printf("\t%s -H 192.168.1.1 -p 11212 -w 10 -E 5 -t 0.3 -T 10 -n 10\n",argv0);
+ printf("\nNote: the history object \"%s\" will not be updated if the new stats are less than 30 seconds old\n",memcached_key);
+ printf( " compared to the most recent stats in the \"%s\" object\n",memcached_key);
+
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/control
new file mode 100644
index 0000000..c342d8d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/control
@@ -0,0 +1,12 @@
+Build-Depends: flex, libmemcached-dev [!hurd-i386]
+Homepage: http://exchange.nagios.org/directory/Plugins/Websites,-Forms-and-Transactions/check_memcached-IV/details
+Version: 1.3
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to check memcached instances
+ It will give a critical message if a partiular memcached host is
+ inaccessible and generate a warning if the hit/miss ratio falls
+ below a given threshold or the number of evictions exceeds a given
+ limit.
+ Hit/miss and evictions are measured over a 30 minute interval,
+ using a memcached object to store the earlier statistics.
+Watch: http://exchange.nagios.org/directory/Plugins/Websites,-Forms-and-Transactions/check_memcached-IV/details Current Version</div><div class="data">([0-9.]+)</div>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/copyright
new file mode 100644
index 0000000..890b104
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/copyright
@@ -0,0 +1,16 @@
+This program was initially developed by Lonely Planet for internal use
+and has kindly been made available to the Open Source community for
+redistribution and further development under the terms of the
+GNU General Public License v3: http://www.gnu.org/licenses/gpl.html
+
+This program is supplied 'as-is', in the hope that it will be useful, but
+neither Lonely Planet nor the authors make any warranties or guarantees
+as to its correct operation, including its intended function.
+
+Or in other words:
+Test it yourself, and make sure it works for YOU.
+
+Author: George Hansper e-mail: George.Hansper@lonelyplanet.com.au
+
+On Debian systems, the complete text of the GNU General
+Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/memcached.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/memcached.cfg
new file mode 100644
index 0000000..3acacef
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memcached/memcached.cfg
@@ -0,0 +1,5 @@
+# 'check_memcached' command definition
+define command{
+ command_name check_memcached
+ command_line /usr/lib/nagios/plugins/check_memcached -H '$HOSTADDRESS$'
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/Makefile
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/Makefile
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/check_memory b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/check_memory
new file mode 100644
index 0000000..bf46711
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/check_memory
@@ -0,0 +1,154 @@
+#!/usr/bin/perl
+#
+# check_memory - Check free(1) data against given tresholds
+#
+# Copyright (C) 2007 Thomas Guyot-Sionnest <tguyot@gmail.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+
+use strict;
+use warnings;
+use vars qw($PROGNAME $VERSION $FREECMD $UNIT);
+use Nagios::Plugin;
+
+$PROGNAME = "check_memory";
+$VERSION = '1.0.1';
+$FREECMD = '/usr/bin/free';
+$UNIT = 'M';
+
+my $np = Nagios::Plugin->new(
+ usage => "Usage: %s [ -w <warning_threshold> ] [ -c <critical_threshold> ]\n"
+ . ' [ -u <unit> ]',
+ version => $VERSION,
+ plugin => $PROGNAME,
+ blurb => 'Check free(1) data against given tresholds',
+ timeout => 30,
+);
+
+$np->add_arg(
+ spec => 'warning|w=s',
+ help => "-w, --warning=THRESHOLD[%]\n"
+ . " Warning threshold (in bytes or percent) for free memory. See\n"
+ . " http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT\n"
+ . " for the threshold format. Alternatively this can be defined as a percentage\n"
+ . ' of minimum free memory (warning and critical must be in the same format).',
+ required => 0,
+);
+
+$np->add_arg(
+ spec => 'critical|c=s',
+ help => "-c, --critical=THRESHOLD[%]\n"
+ . " Critical threshold (in bytes or percent) for free memory. See\n"
+ . " http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT\n"
+ . " for the threshold format. Alternatively this can be defined as a percentage\n"
+ . ' of minimum free memory (warning and critical must be in the same format).',
+ required => 0,
+);
+
+$np->add_arg(
+ spec => 'unit|u=s',
+ help => "-u, --unit=UNIT\n"
+ . " Unit to use for human-redeable output. Can be 'b', 'K' 'M' or 'G' for\n"
+ . " bytes, KiB, MiB or GiB respectively (default: '$UNIT').",
+ default => $UNIT,
+ required => 0,
+);
+
+$np->getopts;
+
+# Assign, then check args
+
+my $multiple;
+my $unit = $np->opts->unit;
+if ($unit eq 'M') {
+ $multiple = 1024 * 1024;
+} elsif ( $unit eq 'K') {
+ $multiple = 1024;
+} elsif ( $unit eq 'b') {
+ $multiple = 1;
+} elsif ( $unit eq 'G') {
+ $multiple = 1024 * 1024 * 1024;
+} else {
+ $np->nagios_exit('UNKNOWN', "Unit must be one of 'b', 'K', 'M' or 'G', case-sensitive.");
+}
+my $verbose = $np->opts->verbose;
+
+# Would better fit later but doing it here validates thresholds
+my $warning = $np->opts->warning;
+my $critical = $np->opts->critical;
+$np->set_thresholds(
+ warning => ((defined($warning) && $warning !~ /^\d+%$/) ? $warning : undef),
+ critical => ((defined($critical) && $critical !~ /^\d+%$/) ? $critical : undef),
+);
+
+# Better safe than sorry
+alarm $np->opts->timeout;
+
+# We always get bytes, then calculate units ourselves
+warn("Running: '$FREECMD -b'\n") if ($verbose);
+open(RESULT, "$FREECMD -b |")
+ or $np->nagios_exit('CRITICAL', "Could not run $FREECMD");
+
+warn("Output from $FREECMD:\n") if ($verbose > 1);
+my ($used, $free);
+while (<RESULT>) {
+ warn(" $_") if ($verbose > 1);
+ next unless (m#^\-/\+\ buffers/cache:\s*(\d+)\s+(\d+)#);
+ $used = $1;
+ $free = $2;
+}
+
+close(RESULT);
+alarm(0);
+
+$np->nagios_exit('CRITICAL', "Unable to interpret $FREECMD output") if (!defined($free));
+
+my $total = $used + $free;
+if (defined($warning) && $warning =~ /^\d+%$/) {
+ if ($warning) {
+ $warning =~ s/%//;
+ $warning = $total / 100 * $warning;
+ $warning .= ':';
+ }
+ warn("Calculated threshold (from percentage): warn=>$warning\n") if ($verbose);
+}
+
+if (defined($critical) && $critical =~ /^\d+%$/) {
+ if ($critical) {
+ $critical =~ s/%//;
+ $critical = $total / 100 * $critical;
+ $critical .= ':';
+ }
+ warn("Calculated threshold (from percentage): crit=>$critical\n") if ($verbose);
+}
+
+$np->set_thresholds(
+ warning => $warning,
+ critical => $critical,
+);
+
+$np->add_perfdata(
+ label => "free",
+ value => $free,
+ uom => 'b',
+ threshold => $np->threshold,
+);
+
+my $freeprint = int($free/$multiple);
+
+$np->nagios_exit($np->check_threshold($free), "$freeprint$unit free");
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/control
new file mode 100644
index 0000000..e201421
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/control
@@ -0,0 +1,9 @@
+Homepage: https://github.com/dermoth/misc-code/blob/master/nagios/plugins/check_memory
+Watch: https://raw.github.com/dermoth/misc-code/master/nagios/plugins/check_memory VERSION = '([0-9.]+)';
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to check for free memory
+ This plugin excludes the system cache and buffer, because
+ on some system with very stable memory usage it is perfectly
+ normal for system cache to fill in all available memory.
+Recommends: libmonitoring-plugin-perl | libnagios-plugin-perl (>= 0.31)
+Version: 1.0.1
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/copyright
new file mode 100644
index 0000000..cbdadcf
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_memory/copyright
@@ -0,0 +1,16 @@
+Copyright (C) 2007 Thomas Guyot-Sionnest <tguyot@gmail.com>
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+MA 02110-1301 USA.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/Makefile
new file mode 100644
index 0000000..e227ff4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/Makefile
@@ -0,0 +1,14 @@
+PLUGIN := check_mongodb
+CLEANFILES := check_mongodb
+DOCFILES := README.md
+
+include ../common.mk
+
+check_mongodb:
+ cp $@.py $@
+ chmod 755 $@
+
+install::
+ install -d $(DESTDIR)$(PLUGINDIR)
+ ln -s $(PLUGINDIR)/$(PLUGIN) $(DESTDIR)$(PLUGINDIR)/$(PLUGIN).py
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/README.md b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/README.md
new file mode 100644
index 0000000..cb81b8d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/README.md
@@ -0,0 +1,325 @@
+# Nagios-MongoDB
+
+## Overview
+
+This is a simple Nagios check script to monitor your MongoDB server(s).
+
+## Authors
+
+### Main Author
+ Mike Zupan mike -(at)- zcentric.com
+### Contributers
+ - Frank Brandewiede <brande -(at)- travel-iq.com> <brande -(at)- bfiw.de> <brande -(at)- novolab.de>
+ - Sam Perman <sam -(at)- brightcove.com>
+ - Shlomo Priymak <shlomoid -(at)- gmail.com>
+ - @jhoff909 on github
+ - Dag Stockstad <dag.stockstad -(at)- gmail.com>
+
+## Installation
+
+In your Nagios plugins directory run
+
+<pre><code>git clone git://github.com/mzupan/nagios-plugin-mongodb.git</code></pre>
+
+Then use pip to ensure you have all pre-requisites.
+
+<pre><code>pip install requirements</code></pre>
+
+## Usage
+
+### Install in Nagios
+
+Edit your commands.cfg and add the following
+
+<pre><code>
+define command {
+ command_name check_mongodb
+ command_line $USER1$/nagios-plugin-mongodb/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$
+}
+
+define command {
+ command_name check_mongodb_database
+ command_line $USER1$/nagios-plugin-mongodb/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -d $ARG5$
+}
+
+define command {
+ command_name check_mongodb_collection
+ command_line $USER1$/nagios-plugin-mongodb/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -d $ARG5$ -c $ARG6$
+}
+
+define command {
+ command_name check_mongodb_replicaset
+ command_line $USER1$/nagios-plugin-mongodb/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -r $ARG5$
+}
+
+define command {
+ command_name check_mongodb_query
+ command_line $USER1$/nagios-plugin-mongodb/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -q $ARG5$
+}
+</code></pre>
+(add -D to the command if you want to add perfdata to the output)
+Then you can reference it like the following. This is is my services.cfg
+
+#### Check Connection
+
+This will check each host that is listed in the Mongo Servers group. It will issue a warning if the connection to the server takes 2 seconds and a critical error if it takes over 4 seconds
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description Mongo Connect Check
+ check_command check_mongodb!connect!27017!2!4
+}
+</code></pre>
+
+#### Check Percentage of Open Connections
+
+This is a test that will check the percentage of free connections left on the Mongo server. In the following example it will send out an warning if the connection pool is 70% used and a critical error if it is 80% used.
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description Mongo Free Connections
+ check_command check_mongodb!connections!27017!70!80
+}
+</code></pre>
+
+#### Check Replication Lag
+
+This is a test that will test the replication lag of Mongo servers. It will send out a warning if the lag is over 15 seconds and a critical error if its over 30 seconds. Please note that this check uses 'optime' from rs.status() which will be behind realtime as heartbeat requests between servers only occur every few seconds. Thus this check may show an apparent lag of < 10 seconds when there really isn't any. Use larger values for reliable monitoring.
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description Mongo Replication Lag
+ check_command check_mongodb!replication_lag!27017!15!30
+}
+</code></pre>
+
+
+#### Check Replication Lag Percentage
+
+This is a test that will test the replication lag percentage of Mongo servers. It will send out a warning if the lag is over 50 percents and a critical error if its over 75 percents. Please note that this check gets oplog timeDiff from primary and compares it to replication lag. When this check reaches 100 percent full resync is needed.
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description Mongo Replication Lag Percentage
+ check_command check_mongodb!replication_lag_percent!27017!50!75
+}
+</code></pre>
+
+
+#### Check Memory Usage
+
+This is a test that will test the memory usage of Mongo server. In my example my Mongo servers have 32 gigs of memory so I'll trigger a warning if Mongo uses over 20 gigs of ram and a error if Mongo uses over 28 gigs of memory.
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description Mongo Memory Usage
+ check_command check_mongodb!memory!27017!20!28
+}
+</code></pre>
+
+#### Check Mapped Memory Usage
+
+This is a test that will check the mapped memory usage of Mongo server.
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description Mongo Mapped Memory Usage
+ check_command check_mongodb!memory_mapped!27017!20!28
+}
+</code></pre>
+
+#### Check Lock Time Percentage
+
+This is a test that will test the lock time percentage of Mongo server. In my example my Mongo I want to be warned if the lock time is above 5% and get an error if it's above 10%. When you start to have lock time it generally means your db is now overloaded.
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description Mongo Lock Percentage
+ check_command check_mongodb!lock!27017!5!10
+}
+</code></pre>
+
+#### Check Average Flush Time
+
+This is a test that will check the average flush time of Mongo server. In my example my Mongo I want to be warned if the average flush time is above 100ms and get an error if it's above 200ms. When you start to get a high average flush time it means your database is write bound.
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description Mongo Flush Average
+ check_command check_mongodb!flushing!27017!100!200
+}
+</code></pre>
+
+#### Check Last Flush Time
+
+This is a test that will check the last flush time of Mongo server. In my example my Mongo I want to be warned if the last flush time is above 200ms and get an error if it's above 400ms. When you start to get a high flush time it means your server might be needing faster disk or its time to shard.
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description Mongo Last Flush Time
+ check_command check_mongodb!last_flush_time!27017!200!400
+}
+</code></pre>
+
+#### Check status of mongodb replicaset
+This is a test that will check the status of nodes within a replicaset. Depending which status it is it sends a waring during status 0, 3 and 5, critical if the status is 4, 6 or 8 and a ok with status 1, 2 and 7.
+
+Note the trailing 2 0's keep those 0's as the check doesn't compare to anything.. So those values need to be there for the check to work.
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description MongoDB state
+ check_command check_mongodb!replset_state!27017!0!0
+}
+</code></pre>
+
+#### Check status of index miss ratio
+This is a test that will check the ratio of index hits to misses. If the ratio is high, you should consider adding indexes. I want to get a warning if the ratio is above .005 and get an error if it's above .01
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description MongoDB Index Miss Ratio
+ check_command check_mongodb!index_miss_ratio!27017!.005!.01
+}
+</code></pre>
+
+#### Check number of databases and number of collections
+These tests will count the number of databases and the number of collections. It is usefull e.g. when your application "leaks" databases or collections. Set the warning, critical level to fit your application.
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description MongoDB Number of databases
+ check_command check_mongodb!databases!27017!300!500
+}
+
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description MongoDB Number of collections
+ check_command check_mongodb!collections!27017!300!500
+}
+</code></pre>
+
+
+
+#### Check size of a database
+This will check the size of a database. This is useful for keeping track of growth of a particular database.
+Replace your-database with the name of your database
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description MongoDB Database size your-database
+ check_command check_mongodb_database!database_size!27017!300!500!your-database
+}
+</code></pre>
+
+
+
+#### Check index size of a database
+This will check the index size of a database. Overlarge indexes eat up memory and indicate a need for compaction.
+Replace your-database with the name of your database
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description MongoDB Database index size your-database
+ check_command check_mongodb_database!database_indexes!27017!50!100!your-database
+}
+</code></pre>
+
+
+
+#### Check index size of a collection
+This will check the index size of a collection. Overlarge indexes eat up memory and indicate a need for compaction.
+Replace your-database with the name of your database and your-collection with the name of your collection
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description MongoDB Database index size your-database
+ check_command check_mongodb_collection!collection_indexes!27017!50!100!your-database!your-collection
+}
+</code></pre>
+
+
+
+#### Check the primary server of replicaset
+This will check the primary server of a replicaset. This is useful for catching unexpected stepdowns of the replica's primary server.
+Replace your-replicaset with the name of your replicaset
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description MongoDB Replicaset Master Monitor: your-replicaset
+ check_command check_mongodb_replicaset!replica_primary!27017!0!1!your-replicaset
+}
+</code></pre>
+
+
+#### Check the number of queries per second
+This will check the number of queries per second on a server. Since MongoDB gives us the number as a running counter, we store the last value in the local
+database in the nagios_check collection. The following types are accepted: query|insert|update|delete|getmore|command
+
+This command will check updates per second and alert if the count is over 200 and warn if over 150
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description MongoDB Updates per Second
+ check_command check_mongodb_query!queries_per_second!27017!200!150!update
+}
+</code></pre>
+
+#### Check Primary Connection
+
+This will check each host that is listed in the Mongo Servers group. It will issue a warning if the connection to the primary server of current replicaset takes 2 seconds and a critical error if it takes over 4 seconds
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description Mongo Connect Check
+ check_command check_mongodb!connect_primary!27017!2!4
+}
+</code></pre>
+
+
+#### Check Collection State
+
+This will check each host that is listed in the Mongo Servers group. It can be useful to check availability of a critical collection (locks, timeout, config server unavailable...). It will issue a critical error if find_one query failed
+
+<pre><code>
+define service {
+ use generic-service
+ hostgroup_name Mongo Servers
+ service_description Mongo Collection State
+ check_command check_mongodb!collection_state!27017!your-database!your-collection
+}
+</code></pre>
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/check_mongodb.py b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/check_mongodb.py
new file mode 100644
index 0000000..6b9be53
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/check_mongodb.py
@@ -0,0 +1,1651 @@
+#!/usr/bin/env python
+
+#
+# A MongoDB Nagios check script
+#
+
+# Script idea taken from a Tag1 script I found and I modified it a lot
+#
+# Main Author
+# - Mike Zupan <mike@zcentric.com>
+# Contributers
+# - Frank Brandewiede <brande@travel-iq.com> <brande@bfiw.de> <brande@novolab.de>
+# - Sam Perman <sam@brightcove.com>
+# - Shlomo Priymak <shlomoid@gmail.com>
+# - @jhoff909 on github
+# - @jbraeuer on github
+# - Dag Stockstad <dag.stockstad@gmail.com>
+# - @Andor on github
+# - Steven Richards - Captainkrtek on github
+# - Max Vernimmen - @mvernimmen-CG / @mvernimmen on github
+# - Kris Nova - @kris@nivenly.com github.com/kris-nova
+# - Jan Kantert - firstname@lastname.net
+#
+# USAGE
+#
+# See the README.md
+#
+
+from __future__ import print_function
+from __future__ import division
+import sys
+import time
+import optparse
+import re
+import os
+import numbers
+
+try:
+ import pymongo
+except ImportError as e:
+ print(e)
+ sys.exit(2)
+
+# As of pymongo v 1.9 the SON API is part of the BSON package, therefore attempt
+# to import from there and fall back to pymongo in cases of older pymongo
+if pymongo.version >= "1.9":
+ import bson.son as son
+else:
+ import pymongo.son as son
+
+
+#
+# thanks to http://stackoverflow.com/a/1229667/72987
+#
+def optional_arg(arg_default):
+ def func(option, opt_str, value, parser):
+ if parser.rargs and not parser.rargs[0].startswith('-'):
+ val = parser.rargs[0]
+ parser.rargs.pop(0)
+ else:
+ val = arg_default
+ setattr(parser.values, option.dest, val)
+ return func
+
+
+def performance_data(perf_data, params):
+ data = ''
+ if perf_data:
+ data = " |"
+ for p in params:
+ p += (None, None, None, None)
+ param, param_name, warning, critical = p[0:4]
+ data += "%s=%s" % (param_name, str(param))
+ if warning or critical:
+ warning = warning or 0
+ critical = critical or 0
+ data += ";%s;%s" % (warning, critical)
+
+ data += " "
+
+ return data
+
+
+def numeric_type(param):
+ return param is None or isinstance(param, numbers.Real)
+
+
+def check_levels(param, warning, critical, message, ok=[]):
+ if (numeric_type(critical) and numeric_type(warning)):
+ if param >= critical:
+ print("CRITICAL - " + message)
+ sys.exit(2)
+ elif param >= warning:
+ print("WARNING - " + message)
+ sys.exit(1)
+ else:
+ print("OK - " + message)
+ sys.exit(0)
+ else:
+ if param in critical:
+ print("CRITICAL - " + message)
+ sys.exit(2)
+
+ if param in warning:
+ print("WARNING - " + message)
+ sys.exit(1)
+
+ if param in ok:
+ print("OK - " + message)
+ sys.exit(0)
+
+ # unexpected param value
+ print("CRITICAL - Unexpected value : %d" % param + "; " + message)
+ return 2
+
+
+def get_server_status(con):
+ try:
+ set_read_preference(con.admin)
+ data = con.admin.command(pymongo.son_manipulator.SON([('serverStatus', 1)]))
+ except:
+ data = con.admin.command(son.SON([('serverStatus', 1)]))
+ return data
+
+
+def main(argv):
+ p = optparse.OptionParser(conflict_handler="resolve", description="This Nagios plugin checks the health of mongodb.")
+
+ p.add_option('-H', '--host', action='store', type='string', dest='host', default='127.0.0.1', help='The hostname you want to connect to')
+ p.add_option('-h', '--host-to-check', action='store', type='string', dest='host_to_check', default=None, help='The hostname you want to check (if this is different from the host you are connecting)')
+ p.add_option('-P', '--port', action='store', type='int', dest='port', default=27017, help='The port mongodb is running on')
+ p.add_option('--port-to-check', action='store', type='int', dest='port_to_check', default=None, help='The port you want to check (if this is different from the port you are connecting)')
+ p.add_option('-u', '--user', action='store', type='string', dest='user', default=None, help='The username you want to login as')
+ p.add_option('-p', '--pass', action='store', type='string', dest='passwd', default=None, help='The password you want to use for that user')
+ p.add_option('-W', '--warning', action='store', dest='warning', default=None, help='The warning threshold you want to set')
+ p.add_option('-C', '--critical', action='store', dest='critical', default=None, help='The critical threshold you want to set')
+ p.add_option('-A', '--action', action='store', type='choice', dest='action', default='connect', help='The action you want to take',
+ choices=['connect', 'connections', 'replication_lag', 'replication_lag_percent', 'replset_state', 'memory', 'memory_mapped', 'lock',
+ 'flushing', 'last_flush_time', 'index_miss_ratio', 'databases', 'collections', 'database_size', 'database_indexes', 'collection_documents', 'collection_indexes', 'collection_size',
+ 'collection_storageSize', 'queues', 'oplog', 'journal_commits_in_wl', 'write_data_files', 'journaled', 'opcounters', 'current_lock', 'replica_primary',
+ 'page_faults', 'asserts', 'queries_per_second', 'page_faults', 'chunks_balance', 'connect_primary', 'collection_state', 'row_count', 'replset_quorum'])
+ p.add_option('--max-lag', action='store_true', dest='max_lag', default=False, help='Get max replication lag (for replication_lag action only)')
+ p.add_option('--mapped-memory', action='store_true', dest='mapped_memory', default=False, help='Get mapped memory instead of resident (if resident memory can not be read)')
+ p.add_option('-D', '--perf-data', action='store_true', dest='perf_data', default=False, help='Enable output of Nagios performance data')
+ p.add_option('-d', '--database', action='store', dest='database', default='admin', help='Specify the database to check')
+ p.add_option('--all-databases', action='store_true', dest='all_databases', default=False, help='Check all databases (action database_size)')
+ p.add_option('-s', '--ssl', dest='ssl', default=False, action='callback', callback=optional_arg(True), help='Connect using SSL')
+ p.add_option('-r', '--replicaset', dest='replicaset', default=None, action='callback', callback=optional_arg(True), help='Connect to replicaset')
+ p.add_option('-q', '--querytype', action='store', dest='query_type', default='query', help='The query type to check [query|insert|update|delete|getmore|command] from queries_per_second')
+ p.add_option('-c', '--collection', action='store', dest='collection', default='admin', help='Specify the collection to check')
+ p.add_option('-T', '--time', action='store', type='int', dest='sample_time', default=1, help='Time used to sample number of pages faults')
+ p.add_option('-M', '--mongoversion', action='store', type='choice', dest='mongo_version', default='2', help='The MongoDB version you are talking with, either 2 or 3',
+ choices=['2','3'])
+ p.add_option('-a', '--authdb', action='store', type='string', dest='authdb', default='admin', help='The database you want to authenticate against')
+ p.add_option('--insecure', action='store_true', dest='insecure', default=False, help="Don't verify SSL/TLS certificates")
+ p.add_option('--ssl-ca-cert-file', action='store', type='string', dest='ssl_ca_cert_file', default=None, help='Path to Certificate Authority file for SSL')
+ p.add_option('-f', '--ssl-cert-file', action='store', type='string', dest='cert_file', default=None, help='Path to PEM encoded key and cert for client authentication')
+ p.add_option('-m','--auth-mechanism', action='store', type='choice', dest='auth_mechanism', default=None, help='Auth mechanism used for auth with mongodb',
+ choices=['MONGODB-X509','SCRAM-SHA-256','SCRAM-SHA-1'])
+
+ options, arguments = p.parse_args()
+ host = options.host
+ host_to_check = options.host_to_check if options.host_to_check else options.host
+ port = options.port
+ port_to_check = options.port_to_check if options.port_to_check else options.port
+ user = options.user
+ passwd = options.passwd
+ authdb = options.authdb
+
+ query_type = options.query_type
+ collection = options.collection
+ sample_time = options.sample_time
+ if (options.action == 'replset_state'):
+ warning = str(options.warning or "")
+ critical = str(options.critical or "")
+ else:
+ warning = float(options.warning or 0)
+ critical = float(options.critical or 0)
+
+ action = options.action
+ perf_data = options.perf_data
+ max_lag = options.max_lag
+ mongo_version = options.mongo_version
+ database = options.database
+ ssl = options.ssl
+ replicaset = options.replicaset
+ insecure = options.insecure
+ ssl_ca_cert_file = options.ssl_ca_cert_file
+ cert_file = options.cert_file
+ auth_mechanism = options.auth_mechanism
+
+ if action == 'replica_primary' and replicaset is None:
+ return "replicaset must be passed in when using replica_primary check"
+ elif not action == 'replica_primary' and replicaset:
+ return "passing a replicaset while not checking replica_primary does not work"
+
+ #
+ # moving the login up here and passing in the connection
+ #
+ start = time.time()
+ err, con = mongo_connect(host, port, ssl, user, passwd, replicaset, authdb, insecure, ssl_ca_cert_file, cert_file)
+
+ if err != 0:
+ return err
+
+ # Autodetect mongo-version and force pymongo to let us know if it can connect or not.
+ err, mongo_version = check_version(con)
+ if err != 0:
+ return err
+
+ conn_time = time.time() - start
+
+ if action == "connections":
+ return check_connections(con, warning, critical, perf_data)
+ elif action == "replication_lag":
+ return check_rep_lag(con, host_to_check, port_to_check, warning, critical, False, perf_data, max_lag, user, passwd)
+ elif action == "replication_lag_percent":
+ return check_rep_lag(con, host_to_check, port_to_check, warning, critical, True, perf_data, max_lag, user, passwd, ssl, insecure, ssl_ca_cert_file, cert_file)
+ elif action == "replset_state":
+ return check_replset_state(con, perf_data, warning, critical)
+ elif action == "memory":
+ return check_memory(con, warning, critical, perf_data, options.mapped_memory, host)
+ elif action == "memory_mapped":
+ return check_memory_mapped(con, warning, critical, perf_data)
+ elif action == "queues":
+ return check_queues(con, warning, critical, perf_data)
+ elif action == "lock":
+ return check_lock(con, warning, critical, perf_data, mongo_version)
+ elif action == "current_lock":
+ return check_current_lock(con, host, port, warning, critical, perf_data)
+ elif action == "flushing":
+ return check_flushing(con, warning, critical, True, perf_data)
+ elif action == "last_flush_time":
+ return check_flushing(con, warning, critical, False, perf_data)
+ elif action == "index_miss_ratio":
+ index_miss_ratio(con, warning, critical, perf_data)
+ elif action == "databases":
+ return check_databases(con, warning, critical, perf_data)
+ elif action == "collections":
+ return check_collections(con, warning, critical, perf_data)
+ elif action == "oplog":
+ return check_oplog(con, warning, critical, perf_data)
+ elif action == "journal_commits_in_wl":
+ return check_journal_commits_in_wl(con, warning, critical, perf_data)
+ elif action == "database_size":
+ if options.all_databases:
+ return check_all_databases_size(con, warning, critical, perf_data)
+ else:
+ return check_database_size(con, database, warning, critical, perf_data)
+ elif action == "database_indexes":
+ return check_database_indexes(con, database, warning, critical, perf_data)
+ elif action == "collection_documents":
+ return check_collection_documents(con, database, collection, warning, critical, perf_data)
+ elif action == "collection_indexes":
+ return check_collection_indexes(con, database, collection, warning, critical, perf_data)
+ elif action == "collection_size":
+ return check_collection_size(con, database, collection, warning, critical, perf_data)
+ elif action == "collection_storageSize":
+ return check_collection_storageSize(con, database, collection, warning, critical, perf_data)
+ elif action == "journaled":
+ return check_journaled(con, warning, critical, perf_data)
+ elif action == "write_data_files":
+ return check_write_to_datafiles(con, warning, critical, perf_data)
+ elif action == "opcounters":
+ return check_opcounters(con, host, port, warning, critical, perf_data)
+ elif action == "asserts":
+ return check_asserts(con, host, port, warning, critical, perf_data)
+ elif action == "replica_primary":
+ return check_replica_primary(con, host, warning, critical, perf_data, replicaset, mongo_version)
+ elif action == "queries_per_second":
+ return check_queries_per_second(con, query_type, warning, critical, perf_data, mongo_version)
+ elif action == "page_faults":
+ check_page_faults(con, sample_time, warning, critical, perf_data)
+ elif action == "chunks_balance":
+ chunks_balance(con, database, collection, warning, critical)
+ elif action == "connect_primary":
+ return check_connect_primary(con, warning, critical, perf_data)
+ elif action == "collection_state":
+ return check_collection_state(con, database, collection)
+ elif action == "row_count":
+ return check_row_count(con, database, collection, warning, critical, perf_data)
+ elif action == "replset_quorum":
+ return check_replset_quorum(con, perf_data)
+ else:
+ return check_connect(host, port, warning, critical, perf_data, user, passwd, conn_time)
+
+
+def mongo_connect(host=None, port=None, ssl=False, user=None, passwd=None, replica=None, authdb="admin", insecure=False, ssl_ca_cert_file=None, ssl_cert=None, auth_mechanism=None):
+ from pymongo.errors import ConnectionFailure
+ from pymongo.errors import PyMongoError
+ import ssl as SSL
+
+ con_args = dict()
+
+ if ssl:
+ if insecure:
+ con_args['ssl_cert_reqs'] = SSL.CERT_NONE
+ else:
+ con_args['ssl_cert_reqs'] = SSL.CERT_REQUIRED
+ con_args['ssl'] = ssl
+ if ssl_ca_cert_file:
+ con_args['ssl_ca_certs'] = ssl_ca_cert_file
+ if ssl_cert:
+ con_args['ssl_certfile'] = ssl_cert
+
+ try:
+ # ssl connection for pymongo > 2.3
+ if pymongo.version >= "2.3":
+ if replica is None:
+ con = pymongo.MongoClient(host, port, **con_args)
+ else:
+ con = pymongo.MongoClient(host, port, read_preference=pymongo.ReadPreference.SECONDARY, replicaSet=replica, **con_args)
+ else:
+ if replica is None:
+ con = pymongo.Connection(host, port, slave_okay=True, network_timeout=10)
+ else:
+ con = pymongo.Connection(host, port, slave_okay=True, network_timeout=10)
+
+ # we must authenticate the connection, otherwise we won't be able to perform certain operations
+ if ssl_cert and ssl_ca_cert_file and user and auth_mechanism == 'SCRAM-SHA-256':
+ con.the_database.authenticate(user, mechanism='SCRAM-SHA-256')
+ elif ssl_cert and ssl_ca_cert_file and user and auth_mechanism == 'SCRAM-SHA-1':
+ con.the_database.authenticate(user, mechanism='SCRAM-SHA-1')
+ elif ssl_cert and ssl_ca_cert_file and user and auth_mechanism == 'MONGODB-X509':
+ con.the_database.authenticate(user, mechanism='MONGODB-X509')
+
+ try:
+ result = con.admin.command("ismaster")
+ except ConnectionFailure:
+ print("CRITICAL - Connection to Mongo server on %s:%s has failed" % (host, port) )
+ sys.exit(2)
+
+ if 'arbiterOnly' in result and result['arbiterOnly'] == True:
+ print("OK - State: 7 (Arbiter on port %s)" % (port))
+ sys.exit(0)
+
+ if user and passwd:
+ db = con[authdb]
+ try:
+ db.authenticate(user, password=passwd)
+ except PyMongoError:
+ sys.exit("Username/Password incorrect")
+
+ # Ping to check that the server is responding.
+ con.admin.command("ping")
+
+ except Exception as e:
+ if isinstance(e, pymongo.errors.AutoReconnect) and str(e).find(" is an arbiter") != -1:
+ # We got a pymongo AutoReconnect exception that tells us we connected to an Arbiter Server
+ # This means: Arbiter is reachable and can answer requests/votes - this is all we need to know from an arbiter
+ print("OK - State: 7 (Arbiter)")
+ sys.exit(0)
+ return exit_with_general_critical(e), None
+ return 0, con
+
+
+def exit_with_general_warning(e):
+ if isinstance(e, SystemExit):
+ return e
+ else:
+ print("WARNING - General MongoDB warning:", e)
+ return 1
+
+
+def exit_with_general_critical(e):
+ if isinstance(e, SystemExit):
+ return e
+ else:
+ print("CRITICAL - General MongoDB Error:", e)
+ return 2
+
+
+def set_read_preference(db):
+ if pymongo.version >= "2.2":
+ pymongo.read_preferences.Secondary
+ else:
+ db.read_preference = pymongo.ReadPreference.SECONDARY
+
+def check_version(con):
+ try:
+ server_info = con.server_info()
+ except Exception as e:
+ return exit_with_general_critical(e), None
+ return 0, int(server_info['version'].split('.')[0].strip())
+
+def check_connect(host, port, warning, critical, perf_data, user, passwd, conn_time):
+ warning = warning or 3
+ critical = critical or 6
+ message = "Connection took %.3f seconds" % conn_time
+ message += performance_data(perf_data, [(conn_time, "connection_time", warning, critical)])
+
+ return check_levels(conn_time, warning, critical, message)
+
+
+def check_connections(con, warning, critical, perf_data):
+ warning = warning or 80
+ critical = critical or 95
+ try:
+ data = get_server_status(con)
+
+ current = float(data['connections']['current'])
+ available = float(data['connections']['available'])
+
+ used_percent = int(float(current / (available + current)) * 100)
+ message = "%i percent (%i of %i connections) used" % (used_percent, current, current + available)
+ message += performance_data(perf_data, [(used_percent, "used_percent", warning, critical),
+ (current, "current_connections"),
+ (available, "available_connections")])
+ return check_levels(used_percent, warning, critical, message)
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_rep_lag(con, host, port, warning, critical, percent, perf_data, max_lag, user, passwd, ssl=None, insecure=None, ssl_ca_cert_file=None, cert_file=None):
+ # Get mongo to tell us replica set member name when connecting locally
+ if "127.0.0.1" == host:
+ if not "me" in list(con.admin.command("ismaster","1").keys()):
+ print("UNKNOWN - This is not replicated MongoDB")
+ return 3
+
+ host = con.admin.command("ismaster","1")["me"].split(':')[0]
+
+ if percent:
+ warning = warning or 50
+ critical = critical or 75
+ else:
+ warning = warning or 600
+ critical = critical or 3600
+ rs_status = {}
+ slaveDelays = {}
+ try:
+ #set_read_preference(con.admin)
+
+ # Get replica set status
+ try:
+ rs_status = con.admin.command("replSetGetStatus")
+ except pymongo.errors.OperationFailure as e:
+ if ((e.code == None and str(e).find('failed: not running with --replSet"')) or (e.code == 76 and str(e).find('not running with --replSet"'))):
+ print("UNKNOWN - Not running with replSet")
+ return 3
+
+ serverVersion = tuple(con.server_info()['version'].split('.'))
+ if serverVersion >= tuple("2.0.0".split(".")):
+ #
+ # check for version greater then 2.0
+ #
+ rs_conf = con.local.system.replset.find_one()
+ for member in rs_conf['members']:
+ if member.get('slaveDelay') is not None:
+ slaveDelays[member['host']] = member.get('slaveDelay')
+ else:
+ slaveDelays[member['host']] = 0
+
+ # Find the primary and/or the current node
+ primary_node = None
+ host_node = None
+
+ for member in rs_status["members"]:
+ if member["stateStr"] == "PRIMARY":
+ primary_node = member
+ if member.get('name') == "{0}:{1}".format(host, port):
+ host_node = member
+
+ # Check if we're in the middle of an election and don't have a primary
+ if primary_node is None:
+ print("WARNING - No primary defined. In an election?")
+ return 1
+
+ # Check if we failed to find the current host
+ # below should never happen
+ if host_node is None:
+ print("CRITICAL - Unable to find host '" + host + "' in replica set.")
+ return 2
+
+ # Is the specified host the primary?
+ if host_node["stateStr"] == "PRIMARY":
+ if max_lag == False:
+ print("OK - This is the primary.")
+ return 0
+ else:
+ #get the maximal replication lag
+ data = ""
+ maximal_lag = 0
+ for member in rs_status['members']:
+ if not member['stateStr'] == "ARBITER":
+ lastSlaveOpTime = member['optimeDate']
+ replicationLag = abs(primary_node["optimeDate"] - lastSlaveOpTime).seconds - slaveDelays[member['name']]
+ data = data + member['name'] + " lag=%d;" % replicationLag
+ maximal_lag = max(maximal_lag, replicationLag)
+ if percent:
+ err, con = mongo_connect(primary_node['name'].split(':')[0], int(primary_node['name'].split(':')[1]), False, user, passwd)
+ if err != 0:
+ return err
+ primary_timediff = replication_get_time_diff(con)
+ maximal_lag = int(float(maximal_lag) / float(primary_timediff) * 100)
+ message = "Maximal lag is " + str(maximal_lag) + " percents"
+ message += performance_data(perf_data, [(maximal_lag, "replication_lag_percent", warning, critical)])
+ else:
+ message = "Maximal lag is " + str(maximal_lag) + " seconds"
+ message += performance_data(perf_data, [(maximal_lag, "replication_lag", warning, critical)])
+ return check_levels(maximal_lag, warning, critical, message)
+ elif host_node["stateStr"] == "ARBITER":
+ print("UNKNOWN - This is an arbiter")
+ return 3
+
+ # Find the difference in optime between current node and PRIMARY
+
+ optime_lag = abs(primary_node["optimeDate"] - host_node["optimeDate"])
+
+ if host_node['name'] in slaveDelays:
+ slave_delay = slaveDelays[host_node['name']]
+ elif host_node['name'].endswith(':27017') and host_node['name'][:-len(":27017")] in slaveDelays:
+ slave_delay = slaveDelays[host_node['name'][:-len(":27017")]]
+ else:
+ raise Exception("Unable to determine slave delay for {0}".format(host_node['name']))
+
+ try: # work starting from python2.7
+ lag = optime_lag.total_seconds()
+ except:
+ lag = float(optime_lag.seconds + optime_lag.days * 24 * 3600)
+
+ if percent:
+ err, con = mongo_connect(primary_node['name'].split(':')[0], int(primary_node['name'].split(':')[1]), ssl, user, passwd, None, None, insecure, ssl_ca_cert_file, cert_file)
+ if err != 0:
+ return err
+ primary_timediff = replication_get_time_diff(con)
+ if primary_timediff != 0:
+ lag = int(float(lag) / float(primary_timediff) * 100)
+ else:
+ lag = 0
+ message = "Lag is " + str(lag) + " percents"
+ message += performance_data(perf_data, [(lag, "replication_lag_percent", warning, critical)])
+ else:
+ message = "Lag is " + str(lag) + " seconds"
+ message += performance_data(perf_data, [(lag, "replication_lag", warning, critical)])
+ return check_levels(lag, warning + slaveDelays[host_node['name']], critical + slaveDelays[host_node['name']], message)
+ else:
+ #
+ # less than 2.0 check
+ #
+ # Get replica set status
+ rs_status = con.admin.command("replSetGetStatus")
+
+ # Find the primary and/or the current node
+ primary_node = None
+ host_node = None
+ for member in rs_status["members"]:
+ if member["stateStr"] == "PRIMARY":
+ primary_node = (member["name"], member["optimeDate"])
+ if member["name"].split(":")[0].startswith(host):
+ host_node = member
+
+ # Check if we're in the middle of an election and don't have a primary
+ if primary_node is None:
+ print("WARNING - No primary defined. In an election?")
+ sys.exit(1)
+
+ # Is the specified host the primary?
+ if host_node["stateStr"] == "PRIMARY":
+ print("OK - This is the primary.")
+ sys.exit(0)
+
+ # Find the difference in optime between current node and PRIMARY
+ optime_lag = abs(primary_node[1] - host_node["optimeDate"])
+ lag = optime_lag.seconds
+ if percent:
+ err, con = mongo_connect(primary_node['name'].split(':')[0], int(primary_node['name'].split(':')[1]))
+ if err != 0:
+ return err
+ primary_timediff = replication_get_time_diff(con)
+ lag = int(float(lag) / float(primary_timediff) * 100)
+ message = "Lag is " + str(lag) + " percents"
+ message += performance_data(perf_data, [(lag, "replication_lag_percent", warning, critical)])
+ else:
+ message = "Lag is " + str(lag) + " seconds"
+ message += performance_data(perf_data, [(lag, "replication_lag", warning, critical)])
+ return check_levels(lag, warning, critical, message)
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+#
+# Check the memory usage of mongo. Alerting on this may be hard to get right
+# because it'll try to get as much memory as it can. And that's probably
+# a good thing.
+#
+def check_memory(con, warning, critical, perf_data, mapped_memory, host):
+ # Get the total system memory of this system (This is totally bogus if you
+ # are running this command remotely) and calculate based on that how much
+ # memory used by Mongodb is ok or not.
+ meminfo = open('/proc/meminfo').read()
+ matched = re.search(r'^MemTotal:\s+(\d+)', meminfo)
+ if matched:
+ mem_total_kB = int(matched.groups()[0])
+
+ if host != "127.0.0.1" and not warning:
+ # Running remotely and value was not set by user, use hardcoded value
+ warning = 12
+ else:
+ # running locally or user provided value
+ warning = warning or (mem_total_kB * 0.8) / 1024.0 / 1024.0
+
+ if host != "127.0.0.1" and not critical:
+ critical = 16
+ else:
+ critical = critical or (mem_total_kB * 0.9) / 1024.0 / 1024.0
+
+ # debugging
+ #print "mem total: {0}kb, warn: {1}GB, crit: {2}GB".format(mem_total_kB,warning, critical)
+
+ try:
+ data = get_server_status(con)
+ if not data['mem']['supported'] and not mapped_memory:
+ print("OK - Platform not supported for memory info")
+ return 0
+ #
+ # convert to gigs
+ #
+ message = "Memory Usage:"
+ try:
+ mem_resident = float(data['mem']['resident']) / 1024.0
+ message += " %.2fGB resident," % (mem_resident)
+ except:
+ mem_resident = 0
+ message += " resident unsupported,"
+ try:
+ mem_virtual = float(data['mem']['virtual']) / 1024.0
+ message += " %.2fGB virtual," % mem_virtual
+ except:
+ mem_virtual = 0
+ message += " virtual unsupported,"
+ try:
+ mem_mapped = float(data['mem']['mapped']) / 1024.0
+ message += " %.2fGB mapped," % mem_mapped
+ except:
+ mem_mapped = 0
+ message += " mapped unsupported,"
+ try:
+ mem_mapped_journal = float(data['mem']['mappedWithJournal']) / 1024.0
+ message += " %.2fGB mappedWithJournal" % mem_mapped_journal
+ except:
+ mem_mapped_journal = 0
+ message += performance_data(perf_data, [("%.2f" % mem_resident, "memory_usage", warning, critical),
+ ("%.2f" % mem_mapped, "memory_mapped"), ("%.2f" % mem_virtual, "memory_virtual"), ("%.2f" % mem_mapped_journal, "mappedWithJournal")])
+ #added for unsupported systems like Solaris
+ if mapped_memory and mem_resident == 0:
+ return check_levels(mem_mapped, warning, critical, message)
+ else:
+ return check_levels(mem_resident, warning, critical, message)
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_memory_mapped(con, warning, critical, perf_data):
+ #
+ # These thresholds are basically meaningless, and must be customized to your application
+ #
+ warning = warning or 8
+ critical = critical or 16
+ try:
+ data = get_server_status(con)
+ if not data['mem']['supported']:
+ print("OK - Platform not supported for memory info")
+ return 0
+ #
+ # convert to gigs
+ #
+ message = "Memory Usage:"
+ try:
+ mem_mapped = float(data['mem']['mapped']) / 1024.0
+ message += " %.2fGB mapped," % mem_mapped
+ except:
+ mem_mapped = -1
+ message += " mapped unsupported,"
+ try:
+ mem_mapped_journal = float(data['mem']['mappedWithJournal']) / 1024.0
+ message += " %.2fGB mappedWithJournal" % mem_mapped_journal
+ except:
+ mem_mapped_journal = 0
+ message += performance_data(perf_data, [("%.2f" % mem_mapped, "memory_mapped", warning, critical), ("%.2f" % mem_mapped_journal, "mappedWithJournal")])
+
+ if not mem_mapped == -1:
+ return check_levels(mem_mapped, warning, critical, message)
+ else:
+ print("OK - Server does not provide mem.mapped info")
+ return 0
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+#
+# Return the percentage of the time there was a global Lock
+#
+def check_lock(con, warning, critical, perf_data, mongo_version):
+ warning = warning or 10
+ critical = critical or 30
+ if mongo_version == 2:
+ try:
+ data = get_server_status(con)
+ lockTime = data['globalLock']['lockTime']
+ totalTime = data['globalLock']['totalTime']
+ #
+ # calculate percentage
+ #
+ if lockTime > totalTime:
+ lock_percentage = 0.00
+ else:
+ lock_percentage = float(lockTime) / float(totalTime) * 100
+ message = "Lock Percentage: %.2f%%" % lock_percentage
+ message += performance_data(perf_data, [("%.2f" % lock_percentage, "lock_percentage", warning, critical)])
+ return check_levels(lock_percentage, warning, critical, message)
+ except Exception as e:
+ print("Couldn't get globalLock lockTime info from mongo, are you sure you're not using version 3? See the -M option.")
+ return exit_with_general_critical(e)
+ else:
+ print("OK - MongoDB version 3 doesn't report on global locks")
+ return 0
+
+
+def check_flushing(con, warning, critical, avg, perf_data):
+ #
+ # These thresholds mean it's taking 5 seconds to perform a background flush to issue a warning
+ # and 10 seconds to issue a critical.
+ #
+ warning = warning or 5000
+ critical = critical or 15000
+ try:
+ data = get_server_status(con)
+ try:
+ data['backgroundFlushing']
+ if avg:
+ flush_time = float(data['backgroundFlushing']['average_ms'])
+ stat_type = "Average"
+ else:
+ flush_time = float(data['backgroundFlushing']['last_ms'])
+ stat_type = "Last"
+
+ message = "%s Flush Time: %.2fms" % (stat_type, flush_time)
+ message += performance_data(perf_data, [("%.2fms" % flush_time, "%s_flush_time" % stat_type.lower(), warning, critical)])
+
+ return check_levels(flush_time, warning, critical, message)
+ except Exception:
+ print("OK - flushing stats not available for this storage engine")
+ return 0
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def index_miss_ratio(con, warning, critical, perf_data):
+ warning = warning or 10
+ critical = critical or 30
+ try:
+ data = get_server_status(con)
+
+ try:
+ data['indexCounters']
+ serverVersion = tuple(con.server_info()['version'].split('.'))
+ if serverVersion >= tuple("2.4.0".split(".")):
+ miss_ratio = float(data['indexCounters']['missRatio'])
+ else:
+ miss_ratio = float(data['indexCounters']['btree']['missRatio'])
+ except KeyError:
+ not_supported_msg = "not supported on this platform"
+ try:
+ data['indexCounters']
+ if 'note' in data['indexCounters']:
+ print("OK - MongoDB says: " + not_supported_msg)
+ return 0
+ else:
+ print("WARNING - Can't get counter from MongoDB")
+ return 1
+ except Exception:
+ print("OK - MongoDB says: " + not_supported_msg)
+ return 0
+
+ message = "Miss Ratio: %.2f" % miss_ratio
+ message += performance_data(perf_data, [("%.2f" % miss_ratio, "index_miss_ratio", warning, critical)])
+
+ return check_levels(miss_ratio, warning, critical, message)
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+def check_replset_quorum(con, perf_data):
+ db = con['admin']
+ warning = 1
+ critical = 2
+ primary = 0
+
+ try:
+ rs_members = db.command("replSetGetStatus")['members']
+
+ for member in rs_members:
+ if member['state'] == 1:
+ primary += 1
+
+ if primary == 1:
+ state = 0
+ message = "Cluster is quorate"
+ else:
+ state = 2
+ message = "Cluster is not quorate and cannot operate"
+
+ return check_levels(state, warning, critical, message)
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+
+def check_replset_state(con, perf_data, warning="", critical=""):
+ try:
+ warning = [int(x) for x in warning.split(",")]
+ except:
+ warning = [0, 3, 5]
+ try:
+ critical = [int(x) for x in critical.split(",")]
+ except:
+ critical = [8, 4, -1]
+
+ ok = list(range(-1, 8)) # should include the range of all posiible values
+ try:
+ worst_state = -2
+ message = ""
+ try:
+ try:
+ set_read_preference(con.admin)
+ data = con.admin.command(pymongo.son_manipulator.SON([('replSetGetStatus', 1)]))
+ except:
+ data = con.admin.command(son.SON([('replSetGetStatus', 1)]))
+ members = data['members']
+ my_state = int(data['myState'])
+ worst_state = my_state
+ for member in members:
+ their_state = int(member['state'])
+ message += " %s: %i (%s)" % (member['name'], their_state, state_text(their_state))
+ if state_is_worse(their_state, worst_state, warning, critical):
+ worst_state = their_state
+ message += performance_data(perf_data, [(my_state, "state")])
+
+ except pymongo.errors.OperationFailure as e:
+ if ((e.code == None and str(e).find('failed: not running with --replSet"')) or (e.code == 76 and str(e).find('not running with --replSet"'))):
+ worst_state = -1
+
+ return check_levels(worst_state, warning, critical, message, ok)
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+def state_is_worse(state, worst_state, warning, critical):
+ if worst_state in critical:
+ return False
+ if worst_state in warning:
+ return state in critical
+ return (state in warning) or (state in critical)
+
+def state_text(state):
+ if state == 8:
+ return "Down"
+ elif state == 4:
+ return "Fatal error"
+ elif state == 0:
+ return "Starting up, phase1"
+ elif state == 3:
+ return "Recovering"
+ elif state == 5:
+ return "Starting up, phase2"
+ elif state == 1:
+ return "Primary"
+ elif state == 2:
+ return "Secondary"
+ elif state == 7:
+ return "Arbiter"
+ elif state == -1:
+ return "Not running with replSet"
+ else:
+ return "Unknown state"
+
+
+def check_databases(con, warning, critical, perf_data=None):
+ try:
+ try:
+ set_read_preference(con.admin)
+ data = con.admin.command(pymongo.son_manipulator.SON([('listDatabases', 1)]))
+ except:
+ data = con.admin.command(son.SON([('listDatabases', 1)]))
+
+ count = len(data['databases'])
+ message = "Number of DBs: %.0f" % count
+ message += performance_data(perf_data, [(count, "databases", warning, critical, message)])
+ return check_levels(count, warning, critical, message)
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_collections(con, warning, critical, perf_data=None):
+ try:
+ try:
+ set_read_preference(con.admin)
+ data = con.admin.command(pymongo.son_manipulator.SON([('listDatabases', 1)]))
+ except:
+ data = con.admin.command(son.SON([('listDatabases', 1)]))
+
+ count = 0
+ for db in data['databases']:
+ dbase = con[db['name']]
+ set_read_preference(dbase)
+ count += len(dbase.collection_names())
+
+ message = "Number of collections: %.0f" % count
+ message += performance_data(perf_data, [(count, "collections", warning, critical, message)])
+ return check_levels(count, warning, critical, message)
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_all_databases_size(con, warning, critical, perf_data):
+ warning = warning or 100
+ critical = critical or 1000
+ try:
+ set_read_preference(con.admin)
+ all_dbs_data = con.admin.command(pymongo.son_manipulator.SON([('listDatabases', 1)]))
+ except:
+ all_dbs_data = con.admin.command(son.SON([('listDatabases', 1)]))
+
+ total_storage_size = 0
+ message = ""
+ perf_data_param = [()]
+ for db in all_dbs_data['databases']:
+ database = db['name']
+ data = con[database].command('dbstats')
+ storage_size = round(data['storageSize'] / 1024 / 1024, 1)
+ message += "; Database %s size: %.0f MB" % (database, storage_size)
+ perf_data_param.append((storage_size, database + "_database_size"))
+ total_storage_size += storage_size
+
+ perf_data_param[0] = (total_storage_size, "total_size", warning, critical)
+ message += performance_data(perf_data, perf_data_param)
+ message = "Total size: %.0f MB" % total_storage_size + message
+ return check_levels(total_storage_size, warning, critical, message)
+
+
+def check_database_size(con, database, warning, critical, perf_data):
+ warning = warning or 100
+ critical = critical or 1000
+ perfdata = ""
+ try:
+ set_read_preference(con.admin)
+ data = con[database].command('dbstats')
+ storage_size = data['storageSize'] // 1024 // 1024
+ if perf_data:
+ perfdata += " | database_size=%i;%i;%i" % (storage_size, warning, critical)
+ #perfdata += " database=%s" %(database)
+
+ if storage_size >= critical:
+ print("CRITICAL - Database size: %.0f MB, Database: %s%s" % (storage_size, database, perfdata))
+ return 2
+ elif storage_size >= warning:
+ print("WARNING - Database size: %.0f MB, Database: %s%s" % (storage_size, database, perfdata))
+ return 1
+ else:
+ print("OK - Database size: %.0f MB, Database: %s%s" % (storage_size, database, perfdata))
+ return 0
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_database_indexes(con, database, warning, critical, perf_data):
+ #
+ # These thresholds are basically meaningless, and must be customized to your application
+ #
+ warning = warning or 100
+ critical = critical or 1000
+ perfdata = ""
+ try:
+ set_read_preference(con.admin)
+ data = con[database].command('dbstats')
+ index_size = data['indexSize'] / 1024 // 1024
+ if perf_data:
+ perfdata += " | database_indexes=%i;%i;%i" % (index_size, warning, critical)
+
+ if index_size >= critical:
+ print("CRITICAL - %s indexSize: %.0f MB %s" % (database, index_size, perfdata))
+ return 2
+ elif index_size >= warning:
+ print("WARNING - %s indexSize: %.0f MB %s" % (database, index_size, perfdata))
+ return 1
+ else:
+ print("OK - %s indexSize: %.0f MB %s" % (database, index_size, perfdata))
+ return 0
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_collection_documents(con, database, collection, warning, critical, perf_data):
+ perfdata = ""
+ try:
+ set_read_preference(con.admin)
+ data = con[database].command('collstats', collection)
+ documents = data['count']
+ if perf_data:
+ perfdata += " | collection_documents=%i;%i;%i" % (documents, warning, critical)
+
+ if documents >= critical:
+ print("CRITICAL - %s.%s documents: %s %s" % (database, collection, documents, perfdata))
+ return 2
+ elif documents >= warning:
+ print("WARNING - %s.%s documents: %s %s" % (database, collection, documents, perfdata))
+ return 1
+ else:
+ print("OK - %s.%s documents: %s %s" % (database, collection, documents, perfdata))
+ return 0
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_collection_indexes(con, database, collection, warning, critical, perf_data):
+ #
+ # These thresholds are basically meaningless, and must be customized to your application
+ #
+ warning = warning or 100
+ critical = critical or 1000
+ perfdata = ""
+ try:
+ set_read_preference(con.admin)
+ data = con[database].command('collstats', collection)
+ total_index_size = data['totalIndexSize'] / 1024 / 1024
+ if perf_data:
+ perfdata += " | collection_indexes=%i;%i;%i" % (total_index_size, warning, critical)
+
+ if total_index_size >= critical:
+ print("CRITICAL - %s.%s totalIndexSize: %.0f MB %s" % (database, collection, total_index_size, perfdata))
+ return 2
+ elif total_index_size >= warning:
+ print("WARNING - %s.%s totalIndexSize: %.0f MB %s" % (database, collection, total_index_size, perfdata))
+ return 1
+ else:
+ print("OK - %s.%s totalIndexSize: %.0f MB %s" % (database, collection, total_index_size, perfdata))
+ return 0
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_queues(con, warning, critical, perf_data):
+ warning = warning or 10
+ critical = critical or 30
+ try:
+ data = get_server_status(con)
+
+ total_queues = float(data['globalLock']['currentQueue']['total'])
+ readers_queues = float(data['globalLock']['currentQueue']['readers'])
+ writers_queues = float(data['globalLock']['currentQueue']['writers'])
+ message = "Current queue is : total = %d, readers = %d, writers = %d" % (total_queues, readers_queues, writers_queues)
+ message += performance_data(perf_data, [(total_queues, "total_queues", warning, critical), (readers_queues, "readers_queues"), (writers_queues, "writers_queues")])
+ return check_levels(total_queues, warning, critical, message)
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+def check_collection_size(con, database, collection, warning, critical, perf_data):
+ warning = warning or 100
+ critical = critical or 1000
+ perfdata = ""
+ try:
+ set_read_preference(con.admin)
+ data = con[database].command('collstats', collection)
+ size = data['size'] / 1024 / 1024
+ if perf_data:
+ perfdata += " | collection_size=%i;%i;%i" % (size, warning, critical)
+
+ if size >= critical:
+ print("CRITICAL - %s.%s size: %.0f MB %s" % (database, collection, size, perfdata))
+ return 2
+ elif size >= warning:
+ print("WARNING - %s.%s size: %.0f MB %s" % (database, collection, size, perfdata))
+ return 1
+ else:
+ print("OK - %s.%s size: %.0f MB %s" % (database, collection, size, perfdata))
+ return 0
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_collection_storageSize(con, database, collection, warning, critical, perf_data):
+ warning = warning or 100
+ critical = critical or 1000
+ perfdata = ""
+ try:
+ set_read_preference(con.admin)
+ data = con[database].command('collstats', collection)
+ storageSize = data['storageSize'] / 1024 / 1024
+ if perf_data:
+ perfdata += " | collection_storageSize=%i;%i;%i" % (storageSize, warning, critical)
+
+ if storageSize >= critical:
+ print("CRITICAL - %s.%s storageSize: %.0f MB %s" % (database, collection, storageSize, perfdata))
+ return 2
+ elif storageSize >= warning:
+ print("WARNING - %s.%s storageSize: %.0f MB %s" % (database, collection, storageSize, perfdata))
+ return 1
+ else:
+ print("OK - %s.%s storageSize: %.0f MB %s" % (database, collection, storageSize, perfdata))
+ return 0
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_queries_per_second(con, query_type, warning, critical, perf_data, mongo_version):
+ warning = warning or 250
+ critical = critical or 500
+
+ if query_type not in ['insert', 'query', 'update', 'delete', 'getmore', 'command']:
+ return exit_with_general_critical("The query type of '%s' is not valid" % query_type)
+
+ try:
+ db = con.local
+ data = get_server_status(con)
+
+ # grab the count
+ num = int(data['opcounters'][query_type])
+
+ # do the math
+ last_count = db.nagios_check.find_one({'check': 'query_counts'})
+ try:
+ ts = int(time.time())
+ diff_query = num - last_count['data'][query_type]['count']
+ diff_ts = ts - last_count['data'][query_type]['ts']
+
+ if diff_ts == 0:
+ message = "diff_query = " + str(diff_query) + " diff_ts = " + str(diff_ts)
+ return check_levels(0, warning, critical, message)
+
+ query_per_sec = float(diff_query) / float(diff_ts)
+
+ # update the count now
+ if mongo_version == 2:
+ db.nagios_check.update({u'_id': last_count['_id']}, {'$set': {"data.%s" % query_type: {'count': num, 'ts': int(time.time())}}})
+ else:
+ db.nagios_check.update_one({u'_id': last_count['_id']}, {'$set': {"data.%s" % query_type: {'count': num, 'ts': int(time.time())}}})
+
+ message = "Queries / Sec: %f" % query_per_sec
+ message += performance_data(perf_data, [(query_per_sec, "%s_per_sec" % query_type, warning, critical, message)])
+ except KeyError:
+ #
+ # since it is the first run insert it
+ query_per_sec = 0
+ message = "First run of check.. no data"
+ if mongo_version == 2:
+ db.nagios_check.update({u'_id': last_count['_id']}, {'$set': {"data.%s" % query_type: {'count': num, 'ts': int(time.time())}}})
+ else:
+ db.nagios_check.update_one({u'_id': last_count['_id']}, {'$set': {"data.%s" % query_type: {'count': num, 'ts': int(time.time())}}})
+
+ except TypeError:
+ #
+ # since it is the first run insert it
+ query_per_sec = 0
+ message = "First run of check.. no data"
+ if mongo_version == 2:
+ db.nagios_check.insert({'check': 'query_counts', 'data': {query_type: {'count': num, 'ts': int(time.time())}}})
+ else:
+ db.nagios_check.insert_one({'check': 'query_counts', 'data': {query_type: {'count': num, 'ts': int(time.time())}}})
+
+ return check_levels(query_per_sec, warning, critical, message)
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_oplog(con, warning, critical, perf_data):
+ """ Checking the oplog time - the time of the log currntly saved in the oplog collection
+ defaults:
+ critical 4 hours
+ warning 24 hours
+ those can be changed as usual with -C and -W parameters"""
+ warning = warning or 24
+ critical = critical or 4
+ try:
+ db = con.local
+ ol = db.system.namespaces.find_one({"name": "local.oplog.rs"})
+ if (db.system.namespaces.find_one({"name": "local.oplog.rs"}) != None):
+ oplog = "oplog.rs"
+ else:
+ ol = db.system.namespaces.find_one({"name": "local.oplog.$main"})
+ if (db.system.namespaces.find_one({"name": "local.oplog.$main"}) != None):
+ oplog = "oplog.$main"
+ else:
+ message = "neither master/slave nor replica set replication detected"
+ return check_levels(None, warning, critical, message)
+
+ try:
+ set_read_preference(con.admin)
+ data = con.local.command(pymongo.son_manipulator.SON([('collstats', oplog)]))
+ except:
+ data = con.admin.command(son.SON([('collstats', oplog)]))
+
+ ol_size = data['size']
+ ol_storage_size = data['storageSize']
+ ol_used_storage = int(float(ol_size) / ol_storage_size * 100 + 1)
+ ol = con.local[oplog]
+ firstc = ol.find().sort("$natural", pymongo.ASCENDING).limit(1)[0]['ts']
+ lastc = ol.find().sort("$natural", pymongo.DESCENDING).limit(1)[0]['ts']
+ time_in_oplog = (lastc.as_datetime() - firstc.as_datetime())
+ message = "Oplog saves " + str(time_in_oplog) + " %d%% used" % ol_used_storage
+ try: # work starting from python2.7
+ hours_in_oplog = time_in_oplog.total_seconds() / 60 / 60
+ except:
+ hours_in_oplog = float(time_in_oplog.seconds + time_in_oplog.days * 24 * 3600) / 60 / 60
+ approx_level = hours_in_oplog * 100 / ol_used_storage
+ message += performance_data(perf_data, [("%.2f" % hours_in_oplog, 'oplog_time', warning, critical), ("%.2f " % approx_level, 'oplog_time_100_percent_used')])
+ return check_levels(-approx_level, -warning, -critical, message)
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_journal_commits_in_wl(con, warning, critical, perf_data):
+ """ Checking the number of commits which occurred in the db's write lock.
+Most commits are performed outside of this lock; committed while in the write lock is undesirable.
+Under very high write situations it is normal for this value to be nonzero. """
+
+ warning = warning or 10
+ critical = critical or 40
+ try:
+ data = get_server_status(con)
+ j_commits_in_wl = data['dur']['commitsInWriteLock']
+ message = "Journal commits in DB write lock : %d" % j_commits_in_wl
+ message += performance_data(perf_data, [(j_commits_in_wl, "j_commits_in_wl", warning, critical)])
+ return check_levels(j_commits_in_wl, warning, critical, message)
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_journaled(con, warning, critical, perf_data):
+ """ Checking the average amount of data in megabytes written to the recovery log in the last four seconds"""
+
+ warning = warning or 20
+ critical = critical or 40
+ try:
+ data = get_server_status(con)
+ journaled = data['dur']['journaledMB']
+ message = "Journaled : %.2f MB" % journaled
+ message += performance_data(perf_data, [("%.2f" % journaled, "journaled", warning, critical)])
+ return check_levels(journaled, warning, critical, message)
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_write_to_datafiles(con, warning, critical, perf_data):
+ """ Checking the average amount of data in megabytes written to the databases datafiles in the last four seconds.
+As these writes are already journaled, they can occur lazily, and thus the number indicated here may be lower
+than the amount physically written to disk."""
+ warning = warning or 20
+ critical = critical or 40
+ try:
+ data = get_server_status(con)
+ writes = data['dur']['writeToDataFilesMB']
+ message = "Write to data files : %.2f MB" % writes
+ message += performance_data(perf_data, [("%.2f" % writes, "write_to_data_files", warning, critical)])
+ return check_levels(writes, warning, critical, message)
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def get_opcounters(data, opcounters_name, host, port):
+ try:
+ insert = data[opcounters_name]['insert']
+ query = data[opcounters_name]['query']
+ update = data[opcounters_name]['update']
+ delete = data[opcounters_name]['delete']
+ getmore = data[opcounters_name]['getmore']
+ command = data[opcounters_name]['command']
+ except KeyError as e:
+ return 0, [0] * 100
+ total_commands = insert + query + update + delete + getmore + command
+ new_vals = [total_commands, insert, query, update, delete, getmore, command]
+ return maintain_delta(new_vals, host, port, opcounters_name)
+
+
+def check_opcounters(con, host, port, warning, critical, perf_data):
+ """ A function to get all opcounters delta per minute. In case of a replication - gets the opcounters+opcountersRepl"""
+ warning = warning or 10000
+ critical = critical or 15000
+
+ data = get_server_status(con)
+ err1, delta_opcounters = get_opcounters(data, 'opcounters', host, port)
+ err2, delta_opcounters_repl = get_opcounters(data, 'opcountersRepl', host, port)
+ if err1 == 0 and err2 == 0:
+ delta = [(x + y) for x, y in zip(delta_opcounters, delta_opcounters_repl)]
+ delta[0] = delta_opcounters[0] # only the time delta shouldn't be summarized
+ per_minute_delta = [int(x / delta[0] * 60) for x in delta[1:]]
+ message = "Test succeeded , old values missing"
+ message = "Opcounters: total=%d,insert=%d,query=%d,update=%d,delete=%d,getmore=%d,command=%d" % tuple(per_minute_delta)
+ message += performance_data(perf_data, ([(per_minute_delta[0], "total", warning, critical), (per_minute_delta[1], "insert"),
+ (per_minute_delta[2], "query"), (per_minute_delta[3], "update"), (per_minute_delta[4], "delete"),
+ (per_minute_delta[5], "getmore"), (per_minute_delta[6], "command")]))
+ return check_levels(per_minute_delta[0], warning, critical, message)
+ else:
+ return exit_with_general_critical("problem reading data from temp file")
+
+
+def check_current_lock(con, host, port, warning, critical, perf_data):
+ """ A function to get current lock percentage and not a global one, as check_lock function does"""
+ warning = warning or 10
+ critical = critical or 30
+ data = get_server_status(con)
+
+ lockTime = float(data['globalLock']['lockTime'])
+ totalTime = float(data['globalLock']['totalTime'])
+
+ err, delta = maintain_delta([totalTime, lockTime], host, port, "locktime")
+ if err == 0:
+ lock_percentage = delta[2] / delta[1] * 100 # lockTime/totalTime*100
+ message = "Current Lock Percentage: %.2f%%" % lock_percentage
+ message += performance_data(perf_data, [("%.2f" % lock_percentage, "current_lock_percentage", warning, critical)])
+ return check_levels(lock_percentage, warning, critical, message)
+ else:
+ return exit_with_general_warning("problem reading data from temp file")
+
+
+def check_page_faults(con, host, port, warning, critical, perf_data):
+ """ A function to get page_faults per second from the system"""
+ warning = warning or 10
+ critical = critical or 30
+ data = get_server_status(con)
+
+ try:
+ page_faults = float(data['extra_info']['page_faults'])
+ except:
+ # page_faults unsupported on the underlaying system
+ return exit_with_general_critical("page_faults unsupported on the underlaying system")
+
+ err, delta = maintain_delta([page_faults], host, port, "page_faults")
+ if err == 0:
+ page_faults_ps = delta[1] / delta[0]
+ message = "Page faults : %.2f ps" % page_faults_ps
+ message += performance_data(perf_data, [("%.2f" % page_faults_ps, "page_faults_ps", warning, critical)])
+ return check_levels(page_faults_ps, warning, critical, message)
+ else:
+ return exit_with_general_warning("problem reading data from temp file")
+
+
+def check_asserts(con, host, port, warning, critical, perf_data):
+ """ A function to get asserts from the system"""
+ warning = warning or 1
+ critical = critical or 10
+ data = get_server_status(con)
+
+ asserts = data['asserts']
+
+ #{ "regular" : 0, "warning" : 6, "msg" : 0, "user" : 12, "rollovers" : 0 }
+ regular = asserts['regular']
+ warning_asserts = asserts['warning']
+ msg = asserts['msg']
+ user = asserts['user']
+ rollovers = asserts['rollovers']
+
+ err, delta = maintain_delta([regular, warning_asserts, msg, user, rollovers], host, port, "asserts")
+
+ if err == 0:
+ if delta[5] != 0:
+ #the number of rollovers were increased
+ warning = -1 # no matter the metrics this situation should raise a warning
+ # if this is normal rollover - the warning will not appear again, but if there will be a lot of asserts
+ # the warning will stay for a long period of time
+ # although this is not a usual situation
+
+ regular_ps = delta[1] / delta[0]
+ warning_ps = delta[2] / delta[0]
+ msg_ps = delta[3] / delta[0]
+ user_ps = delta[4] / delta[0]
+ rollovers_ps = delta[5] / delta[0]
+ total_ps = regular_ps + warning_ps + msg_ps + user_ps
+ message = "Total asserts : %.2f ps" % total_ps
+ message += performance_data(perf_data, [(total_ps, "asserts_ps", warning, critical), (regular_ps, "regular"),
+ (warning_ps, "warning"), (msg_ps, "msg"), (user_ps, "user")])
+ return check_levels(total_ps, warning, critical, message)
+ else:
+ return exit_with_general_warning("problem reading data from temp file")
+
+
+def get_stored_primary_server_name(db):
+ """ get the stored primary server name from db. """
+ if "last_primary_server" in db.collection_names():
+ stored_primary_server = db.last_primary_server.find_one()["server"]
+ else:
+ stored_primary_server = None
+
+ return stored_primary_server
+
+
+def check_replica_primary(con, host, warning, critical, perf_data, replicaset, mongo_version):
+ """ A function to check if the primary server of a replica set has changed """
+ if warning is None and critical is None:
+ warning = 1
+ warning = warning or 2
+ critical = critical or 2
+
+ primary_status = 0
+ message = "Primary server has not changed"
+ db = con["nagios"]
+ data = get_server_status(con)
+ if replicaset != data['repl'].get('setName'):
+ message = "Replica set requested: %s differs from the one found: %s" % (replicaset, data['repl'].get('setName'))
+ primary_status = 2
+ return check_levels(primary_status, warning, critical, message)
+ current_primary = data['repl'].get('primary')
+ saved_primary = get_stored_primary_server_name(db)
+ if current_primary is None:
+ current_primary = "None"
+ if saved_primary is None:
+ saved_primary = "None"
+ if current_primary != saved_primary:
+ last_primary_server_record = {"server": current_primary}
+ if mongo_version == 2:
+ db.last_primary_server.update({"_id": "last_primary"}, {"$set": last_primary_server_record}, upsert=True)
+ else:
+ db.last_primary_server.update_one({"_id": "last_primary"}, {"$set": last_primary_server_record}, upsert=True)
+ message = "Primary server has changed from %s to %s" % (saved_primary, current_primary)
+ primary_status = 1
+ return check_levels(primary_status, warning, critical, message)
+
+
+def check_page_faults(con, sample_time, warning, critical, perf_data):
+ warning = warning or 10
+ critical = critical or 20
+ try:
+ try:
+ set_read_preference(con.admin)
+ data1 = con.admin.command(pymongo.son_manipulator.SON([('serverStatus', 1)]))
+ time.sleep(sample_time)
+ data2 = con.admin.command(pymongo.son_manipulator.SON([('serverStatus', 1)]))
+ except:
+ data1 = con.admin.command(son.SON([('serverStatus', 1)]))
+ time.sleep(sample_time)
+ data2 = con.admin.command(son.SON([('serverStatus', 1)]))
+
+ try:
+ #on linux servers only
+ page_faults = (int(data2['extra_info']['page_faults']) - int(data1['extra_info']['page_faults'])) // sample_time
+ except KeyError:
+ print("WARNING - Can't get extra_info.page_faults counter from MongoDB")
+ sys.exit(1)
+
+ message = "Page Faults: %i" % (page_faults)
+
+ message += performance_data(perf_data, [(page_faults, "page_faults", warning, critical)])
+ check_levels(page_faults, warning, critical, message)
+
+ except Exception as e:
+ exit_with_general_critical(e)
+
+
+def chunks_balance(con, database, collection, warning, critical):
+ warning = warning or 10
+ critical = critical or 20
+ nsfilter = database + "." + collection
+ try:
+ try:
+ set_read_preference(con.admin)
+ col = con.config.chunks
+ nscount = col.find({"ns": nsfilter}).count()
+ shards = col.distinct("shard")
+
+ except:
+ print("WARNING - Can't get chunks infos from MongoDB")
+ sys.exit(1)
+
+ if nscount == 0:
+ print("WARNING - Namespace %s is not sharded" % (nsfilter))
+ sys.exit(1)
+
+ avgchunksnb = nscount // len(shards)
+ warningnb = avgchunksnb * warning // 100
+ criticalnb = avgchunksnb * critical // 100
+
+ for shard in shards:
+ delta = abs(avgchunksnb - col.find({"ns": nsfilter, "shard": shard}).count())
+ message = "Namespace: %s, Shard name: %s, Chunk delta: %i" % (nsfilter, shard, delta)
+
+ if delta >= criticalnb and delta > 0:
+ print("CRITICAL - Chunks not well balanced " + message)
+ sys.exit(2)
+ elif delta >= warningnb and delta > 0:
+ print("WARNING - Chunks not well balanced " + message)
+ sys.exit(1)
+
+ print("OK - Chunks well balanced across shards")
+ sys.exit(0)
+
+ except Exception as e:
+ exit_with_general_critical(e)
+
+ print("OK - Chunks well balanced across shards")
+ sys.exit(0)
+
+
+def check_connect_primary(con, warning, critical, perf_data):
+ warning = warning or 3
+ critical = critical or 6
+
+ try:
+ try:
+ set_read_preference(con.admin)
+ data = con.admin.command(pymongo.son_manipulator.SON([('isMaster', 1)]))
+ except:
+ data = con.admin.command(son.SON([('isMaster', 1)]))
+
+ if data['ismaster'] == True:
+ print("OK - This server is primary")
+ return 0
+
+ phost = data['primary'].split(':')[0]
+ pport = int(data['primary'].split(':')[1])
+ start = time.time()
+
+ err, con = mongo_connect(phost, pport)
+ if err != 0:
+ return err
+
+ pconn_time = time.time() - start
+ pconn_time = round(pconn_time, 0)
+ message = "Connection to primary server " + data['primary'] + " took %i seconds" % pconn_time
+ message += performance_data(perf_data, [(pconn_time, "connection_time", warning, critical)])
+
+ return check_levels(pconn_time, warning, critical, message)
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_collection_state(con, database, collection):
+ try:
+ con[database][collection].find_one()
+ print("OK - Collection %s.%s is reachable " % (database, collection))
+ return 0
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def check_row_count(con, database, collection, warning, critical, perf_data):
+ try:
+ count = con[database][collection].count()
+ message = "Row count: %i" % (count)
+ message += performance_data(perf_data, [(count, "row_count", warning, critical)])
+
+ return check_levels(count, warning, critical, message)
+
+ except Exception as e:
+ return exit_with_general_critical(e)
+
+
+def build_file_name(host, port, action):
+ #done this way so it will work when run independently and from shell
+ module_name = re.match('(.*//*)*(.*)\..*', __file__).group(2)
+
+ if (port == 27017):
+ return "/tmp/" + module_name + "_data/" + host + "-" + action + ".data"
+ else:
+ return "/tmp/" + module_name + "_data/" + host + "-" + str(port) + "-" + action + ".data"
+
+
+def ensure_dir(f):
+ d = os.path.dirname(f)
+ if not os.path.exists(d):
+ os.makedirs(d)
+
+
+def write_values(file_name, string):
+ f = None
+ try:
+ f = open(file_name, 'w')
+ except IOError as e:
+ #try creating
+ if (e.errno == 2):
+ ensure_dir(file_name)
+ f = open(file_name, 'w')
+ else:
+ raise IOError(e)
+ f.write(string)
+ f.close()
+ return 0
+
+
+def read_values(file_name):
+ data = None
+ try:
+ f = open(file_name, 'r')
+ data = f.read()
+ f.close()
+ return 0, data
+ except IOError as e:
+ if (e.errno == 2):
+ #no previous data
+ return 1, ''
+ except Exception as e:
+ return 2, None
+
+
+def calc_delta(old, new):
+ delta = []
+ if (len(old) != len(new)):
+ raise Exception("unequal number of parameters")
+ for i in range(0, len(old)):
+ val = float(new[i]) - float(old[i])
+ if val < 0:
+ val = new[i]
+ delta.append(val)
+ return 0, delta
+
+
+def maintain_delta(new_vals, host, port, action):
+ file_name = build_file_name(host, port, action)
+ err, data = read_values(file_name)
+ old_vals = data.split(';')
+ new_vals = [str(int(time.time()))] + new_vals
+ delta = None
+ try:
+ err, delta = calc_delta(old_vals, new_vals)
+ except:
+ err = 2
+ write_res = write_values(file_name, ";" . join(str(x) for x in new_vals))
+ return err + write_res, delta
+
+
+def replication_get_time_diff(con):
+ col = 'oplog.rs'
+ local = con.local
+ ol = local.system.namespaces.find_one({"name": "local.oplog.$main"})
+ if ol:
+ col = 'oplog.$main'
+ firstc = local[col].find().sort("$natural", 1).limit(1)
+ lastc = local[col].find().sort("$natural", -1).limit(1)
+ first = next(firstc)
+ last = next(lastc)
+ tfirst = first["ts"]
+ tlast = last["ts"]
+ delta = tlast.time - tfirst.time
+ return delta
+
+#
+# main app
+#
+if __name__ == "__main__":
+ sys.exit(main(sys.argv[1:]))
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/control
new file mode 100644
index 0000000..6a07311
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/control
@@ -0,0 +1,6 @@
+Uploaders: Jan Wagner <waja@cyconet.org>
+Recommends: python-pymongo
+Version: b33e763
+Homepage: https://github.com/mzupan/nagios-plugin-mongodb
+Watch: https://github.com/mzupan/nagios-plugin-mongodb <a class="commit-tease-sha"[^>]*>\s+([0-9a-f]+)\s+</a>
+Description: Plugin script to monitor your MongoDB server(s)
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/copyright
new file mode 100644
index 0000000..eb4e92d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/copyright
@@ -0,0 +1,21 @@
+Copyright: (c) 2012, Mike Zupan <mike@zcentric.com>
+License: BSD
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice, this
+list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/mongodb.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/mongodb.cfg
new file mode 100644
index 0000000..2be03c2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mongodb/mongodb.cfg
@@ -0,0 +1,29 @@
+# 'check_mongodb' command definition
+define command {
+ command_name check_mongodb
+ command_line /usr/lib/nagios/plugins/check_mongodb -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$
+}
+
+# 'check_mongodb_database' command definition
+define command {
+ command_name check_mongodb_database
+ command_line /usr/lib/nagios/plugins/check_mongodb -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -d $ARG5$
+}
+
+# 'check_mongodb_collection' command definition
+define command {
+ command_name check_mongodb_collection
+ command_line /usr/lib/nagios/plugins/check_mongodb -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -d $ARG5$ -c $ARG6$
+}
+
+# 'check_mongodb_replicaset' command definition
+define command {
+ command_name check_mongodb_replicaset
+ command_line /usr/lib/nagios/plugins/check_mongodb -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -r $ARG5$
+}
+
+# 'check_mongodb_query' command definition
+define command {
+ command_name check_mongodb_query
+ command_line /usr/lib/nagios/plugins/check_mongodb -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -q $ARG5$
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/Makefile
new file mode 100644
index 0000000..d9f449d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/Makefile
@@ -0,0 +1,9 @@
+PLUGIN := check_multipath
+CLEANFILES := check_multipath
+
+include ../common.mk
+
+check_multipath: check-multipath.pl
+ cp $< $@
+ chmod 755 $@
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/check-multipath.pl b/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/check-multipath.pl
new file mode 100644
index 0000000..7ae3c0c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/check-multipath.pl
@@ -0,0 +1,1556 @@
+#!/usr/bin/perl
+#
+# DESCRIPTION: Nagios plugin for checking the status of multipath devices on Linux servers.
+#
+#
+# AUTHOR: Hinnerk Rümenapf (hinnerk.ruemenapf@rrz.uni-hamburg.de)
+# Based on work by
+# - Trond H. Amundsen <t.h.amundsen@usit.uio.no>
+# - Gunther Schlegel <schlegel@riege.com>
+# - Matija Nalis <mnalis+debian@carnet.hr>
+#
+#-------------------------------------------------------------
+#
+# == IMPORTANT ==
+#
+# "sudo" must be configured to allow 'multipath -l'
+# and/or 'multipath -ll' if you intend to use the option -ll
+# (and also 'multipath -r', if you intend to use the --reload option)
+# for the NAGIOS-user without password
+#
+#-------------------------------------------------------------
+#
+#
+# Copyright (C) 2011-2016
+# Hinnerk Rümenapf, Trond H. Amundsen, Gunther Schlegel, Matija Nalis,
+# Bernd Zeimetz, Sven Anders, Ben Evans
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#
+# Vs 0.0.1 Initial Version
+# 0.0.2 added check if path is 'active', fixed messages sorting,
+# shorter messages, path state line check more flexible
+#
+# 0.1.0 added support for older 'multipath'-tool version, added
+# testcase 14 and 15
+#
+# 0.1.1 bugfix, improved flexibility, added testcases 16 and 17
+# 0.1.2 added support for more 'multipath'-tool versions, added testcases 18 and 19
+# 0.1.3 minor improvements
+# 0.1.4 add hostname to "unknown error" message, improve help text
+# 0.1.5 add debian testcases and patch by Bernd Zeimetz
+# 0.1.6 Added checklunline test for "-" character, thanks to Sven Anders <s.anders@digitec.de> also for test data (testcase 22)
+# 0.1.7 Added test option
+# 0.1.8 Added Support for LUN names without WWID (e.g. iSCSI LUNs)
+# 0.1.9 Added extraconfig option
+#
+# 0.2.0 Improved flexibility, more testcases. Thanks to Benjamin von Mossner and Ben Evans
+# Warning if data for LUNs in --extraconfig is missing
+# Added --reload option (based on Ben Evans' idea)
+# 0.2.1 Improved LUN-line check, thanks to Michal Svamberg
+# 0.2.2 Improved path error check, extended extraconfig capabilities (thanks to Nasimuddin Ansari for his comment)
+#
+# 0.3.0 Added Option --ll, added handling of checker messages. Thanks to Andreas Steinel <Andreas.Steinel@exirius.de>
+#
+# 0.4.0 Added check if multipathd is running (suggested by Dmitry Sakoun) 11. Dec. 2015
+# Added --group option (based on comments by Robert Towster and Tom Schier)
+# 0.4.1 minor changes 14. Dec. 2015
+#
+# 0.4.5 distinguish between different attributes identifying a LUN (OPTIONAL) (based on suggestions by Séverin Launiau)
+# for output and extraconfig LUN-selector (see usage message)
+# Added ability to check counts of policies per LUN (suggested by Jim Clark)
+# Added ability to check counts of scsi-hosts and scsi-ids per LUN 3. Aug. 2016
+# 0.4.6 Bugfix (output)
+# 0.4.7 Compatibility with CentOS/RHEL 5-7: no "switch", check second directory for multipath binary (thanks to Christian Zettel) 25. Aug. 2016
+#
+
+
+use strict;
+use warnings;
+#use Switch; ## causes compatibility issues (perl version)
+use POSIX qw(isatty);
+use Getopt::Long qw(:config no_ignore_case);
+
+# Global (package) variables used throughout the code
+use vars qw( $NAME $VERSION $AUTHOR $CONTACT $E_OK $E_WARNING $E_CRITICAL
+ $E_UNKNOWN $USAGE $HELP $LICENSE $SUDO $MULTIPATH_LIST $MULTIPATH_LIST_LONG $MULTIPATH_RELOAD
+ $linebreak $counter $exit_code
+ %opt %reverse_exitcode %text2exit @multipathStateLines %nagios_level_count
+ @perl_warnings @reports @ok_reports @debugInput
+ );
+
+#---------------------------------------------------------------------
+# Initialization and global variables
+#---------------------------------------------------------------------
+
+
+# === Version and similar info ===
+$NAME = 'check-multipath.pl';
+$VERSION = '0.4.7 25. AUG 2016';
+$AUTHOR = 'Hinnerk Rümenapf';
+$CONTACT = 'hinnerk [DOT] ruemenapf [AT] uni-hamburg [DOT] de (hinnerk [DOT] ruemenapf [AT] gmx [DOT] de)';
+
+
+
+# Collect perl warnings in an array
+$SIG{__WARN__} = sub { push @perl_warnings, [@_]; };
+
+
+#---------------------------------------------
+# TESTCASES
+#
+# These testcases are important documentation
+# and thus included in the script!
+#---------------------------------------------
+@debugInput=(
+
+# 0. DUMMY
+"",
+
+# 1. OK, 2 LUNs, 4 paths each (REAL example)
+"mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n"
+."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+." |- 4:0:1:1 sdd 8:48 active ready running\n"
+." |- 4:0:0:1 sdf 8:80 active ready running\n"
+." |- 3:0:0:1 sdh 8:112 active ready running\n"
+." `- 3:0:1:1 sdk 8:160 active ready running\n"
+."mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n"
+."size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+." |- 4:0:1:0 sdc 8:32 active ready running\n"
+." |- 4:0:0:0 sde 8:64 active ready running\n"
+." |- 3:0:0:0 sdg 8:96 active ready running\n"
+." `- 3:0:1:0 sdi 8:128 active ready running\n",
+
+
+# 2. WARN, 2 LUNs, one path missing (REAL example)
+"mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n"
+."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+." |- 3:0:0:1 sdf 8:80 active ready running\n"
+." |- 4:0:0:1 sdi 8:128 active ready running\n"
+." `- 4:0:1:1 sdk 8:160 active ready running\n"
+."mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n"
+."size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+." |- 3:0:0:0 sdc 8:32 active ready running\n"
+." |- 4:0:0:0 sdg 8:96 active ready running\n"
+." |- 3:0:1:0 sdh 8:112 active ready running\n"
+." `- 4:0:1:0 sde 8:64 active ready running\n",
+
+
+# 3. ERR, 2 LUNs, no paths (REAL example)
+"mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 \n"
+."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 \n"
+."size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw\n",
+
+
+#4. OK, 1 LUN, 4 paths (edit)
+"mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n"
+."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+." |- 4:0:1:1 sdd 8:48 active ready running\n"
+." |- 4:0:0:1 sdf 8:80 active ready running\n"
+." |- 3:0:0:1 sdh 8:112 active ready running\n"
+." `- 3:0:1:1 sdk 8:160 active ready running\n",
+
+
+#5. WARN, 1 LUN, 2 paths (edit)
+"mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n"
+."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+." |- 4:0:1:1 sdd 8:48 active ready running\n"
+." `- 3:0:1:1 sdk 8:160 active ready running\n",
+
+
+#6. WARN, 1 LUN, 1 path (edit)
+"mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n"
+."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+." `- 3:0:1:1 sdk 8:160 active ready running\n",
+
+
+#7. WARN, 1 LUN, 1 no paths (edit)
+"mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 \n"
+."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n",
+
+
+
+#8. WARN 2 LUNs, 4 paths each, TEST: failed/faulty (edit)
+"mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n"
+."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+." |- 4:0:1:1 sdd 8:48 active ready running\n"
+." |- 4:0:0:1 sdf 8:80 failed ready running\n"
+." |- 3:0:0:1 sdh 8:112 active faulty running\n"
+." `- 3:0:1:1 sdk 8:160 dadada ready running\n"
+."mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n"
+."size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+." |- 4:0:1:0 sdc 8:32 faulty ready running\n"
+." |- 4:0:0:0 sde 8:64 dadada ready failed\n"
+." `- 3:0:1:0 sdi 8:128 active ready running\n",
+
+
+#9. NO LUN
+"",
+
+
+#10. Syntax error 1
+"mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n"
+."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+."4:0:1:1 sdd 8:48 active ready running\n"
+." |- 4:0:0:1 sdf 8:80 failed ready running\n"
+." |- 3:0:0:1 sdh 8:112 active faulty running\n"
+." `- 3:0:1:1 sdk 8:160 active ready running\n",
+
+
+# 11. Syntax error 2
+"mpatha 36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n"
+."size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+." |- 4:0:1:0 sdc 8:32 faulty ready running\n"
+." |- 4:0:0:0 sde 8:64 active ready failed\n"
+." `- 3:0:1:0 sdi 8:128 active ready running\n",
+
+
+# 12. Syntax error 3
+"mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n"
+."sisze=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+." |- 4:0:1:0 sdc 8:32 faulty ready running\n"
+." |- 4:0:0:0 sde 8:64 active ready failed\n"
+." `- 3:0:1:0 sdi 8:128 active ready running\n",
+
+
+#13. Syntax error 4
+" |- 4:0:1:1 sdd 8:48 active ready running\n"
+." `- 3:0:1:1 sdk 8:160 active ready running\n",
+
+
+#14. old syntax OK (REAL example)
+"mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n"
+."[size=1.9T][features=1 queue_if_no_path][hwhandler=0][rw]\n"
+."\\_ round-robin 0 [prio=-4][active]\n"
+." \\_ 3:0:1:1 sde 8:64 [active][undef]\n"
+." \\_ 3:0:0:1 sdi 8:128 [active][undef]\n"
+." \\_ 4:0:1:1 sdj 8:144 [active][undef]\n"
+." \\_ 4:0:0:1 sdf 8:80 [active][undef]\n"
+."mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n"
+."[size=2.0T][features=1 queue_if_no_path][hwhandler=0][rw]\n"
+."\\_ round-robin 0 [prio=-4][active]\n"
+." \\_ 3:0:0:0 sdg 8:96 [active][undef]\n"
+." \\_ 3:0:1:0 sdc 8:32 [active][undef]\n"
+." \\_ 4:0:0:0 sdd 8:48 [active][undef]\n"
+." \\_ 4:0:1:0 sdh 8:112 [active][undef]\n",
+
+
+#15. old syntax ERR (edit)
+"mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK\n"
+."[size=1.9T][features=1 queue_if_no_path][hwhandler=0][rw]\n"
+."\\_ round-robin 0 [prio=-4][active]\n"
+." \\_ 3:0:1:1 sde 8:64 [fault][undef]\n"
+." \\_ 4:0:1:1 sdj 8:144 [active][undef]\n"
+." \\_ 4:0:0:1 sdf 8:80 [active][undef]\n"
+."mpatha (36000d77b000048d117c68c81bf7c160a) dm-0 FALCON,IPSTOR DISK\n"
+."[size=2.0T][features=1 queue_if_no_path][hwhandler=0][rw]\n"
+."\\_ round-robin 0 [prio=-4][active]\n"
+." \\_ 3:0:0:0 sdg 8:96 [active][undef]\n"
+." \\_ 3:0:1:0 sdc 8:32 [dadada][undef]\n"
+." \\_ 4:0:0:0 sdd 8:48 [active][fail]\n"
+." \\_ 4:0:1:0 sdh 8:112 [fault][undef]\n",
+
+
+#16. Other sample (REAL example, thanks to Kai Groshert)
+"36006016019e02a00d009495ddbf3e011 dm-2 DGC,VRAID\n"
+."size=450G features='1 queue_if_no_path' hwhandler='1 emc' wp=rw\n"
+."|-+- policy='round-robin 0' prio=0 status=active\n"
+."| |- 2:0:0:1 sdi 8:128 active undef running\n"
+."| `- 1:0:0:1 sdc 8:32 active undef running\n"
+."`-+- policy='round-robin 0' prio=0 status=enabled\n"
+." |- 1:0:1:1 sdf 8:80 active undef running\n"
+." `- 2:0:1:1 sdl 8:176 active undef running\n"
+."36006016019e02a008e1c5f67dbf3e011 dm-5 DGC,VRAID\n"
+."size=550G features='1 queue_if_no_path' hwhandler='1 emc' wp=rw\n"
+."|-+- policy='round-robin 0' prio=0 status=active\n"
+."| |- 1:0:1:2 sdg 8:96 active undef running\n"
+."| `- 2:0:1:2 sdm 8:192 active undef running\n"
+."`-+- policy='round-robin 0' prio=0 status=enabled\n"
+." |- 1:0:0:2 sdd 8:48 active undef running\n"
+." `- 2:0:0:2 sdj 8:144 active undef running\n"
+."36003005700f0eb70160c9b590a77c13e dm-0 LSI,RAID 5/6 SAS 6G\n"
+."size=136G features='0' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=0 status=active\n"
+." `- 0:2:0:0 sda 8:0 active undef running\n",
+
+
+#17. Other sample, modified (thanks to Kai Groshert)
+"36006016019e02a00d009495ddbf3e011 dm-2 DGC,VRAID\n"
+."size=450G features='1 queue_if_no_path' hwhandler='1 emc' wp=rw\n"
+."|-+- policy='round-robin 0' prio=0 status=active\n"
+."| |- 2:0:0:1 sdi 8:128 active undef running\n"
+."| `- 1:0:0:1 sdc 8:32 undef undef running\n"
+."`-+- policy='round-robin 0' prio=0 status=enabled\n"
+." |- 1:0:1:1 sdf 8:80 active undef running\n"
+." `- 2:0:1:1 sdl 8:176 active undef running\n"
+."36006016019e02a008e1c5f67dbf3e011 dm-5 DGC,VRAID\n"
+."size=550G features='1 queue_if_no_path' hwhandler='1 emc' wp=rw\n"
+."|-+- policy='round-robin 0' prio=0 status=active\n"
+."| |- 1:0:1:2 sdg 8:96 active undef running\n"
+."`-+- policy='round-robin 0' prio=0 status=enabled\n"
+." |- 1:0:0:2 sdd 8:48 active undef running\n"
+." `- 2:0:0:2 sdj 8:144 failed undef dadada\n"
+."36003005700f0eb70160c9b590a77c13e dm-0 LSI,RAID 5/6 SAS 6G\n"
+."size=136G features='0' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=0 status=active\n"
+." `- 0:2:0:0 sda 8:0 active undef running\n",
+
+
+#18. RedHat 4 sample, (thanks to Sébastien Maury)
+"MYVOLUME (36005076801810523100000000000006f)\n"
+."[size=576 GB][features=\"1 queue_if_no_path\"][hwhandler=\"0\"]\n"
+."\\_ round-robin 0 [active]\n"
+." \\_ 13:0:1:0 sdc 8:32 [active]\n"
+." \\_ 13:0:2:0 sdd 8:48 [active]\n"
+." \\_ 13:0:3:0 sde 8:64 [active]\n"
+." \\_ 13:0:4:0 sdf 8:80 [active]\n"
+." \\_ 14:0:1:0 sdh 8:112 [active]\n"
+." \\_ 14:0:2:0 sdi 8:128 [active]\n"
+." \\_ 14:0:3:0 sdj 8:144 [active]\n"
+." \\_ 14:0:4:0 sdk 8:160 [active]\n",
+
+
+#19. RedHat 4 sample, modified (thanks to Sébastien Maury)
+"MYVOLUME (36005076801810523100000000000006f)\n"
+."[size=576 GB][features=\"1 queue_if_no_path\"][hwhandler=\"0\"]\n"
+."\\_ round-robin 0 [active]\n"
+." \\_ 13:0:1:0 sdc 8:32 [active]\n"
+." \\_ 13:0:2:0 sdd 8:48 [active]\n"
+." \\_ 13:0:3:0 sde 8:64 [failed]\n"
+." \\_ 13:0:4:0 sdf 8:80 [active]\n"
+." \\_ 14:0:1:0 sdh 8:112 [faulty]\n"
+." \\_ 14:0:2:0 sdi 8:128 [active]\n"
+." \\_ 14:0:3:0 sdj 8:144 [dadada]\n"
+." \\_ 14:0:4:0 sdk 8:160 [active]\n",
+
+
+#20. netapp / Debian Squeeze sample (thanks to Bernd Zeimetz)
+"foobar_backup_lun0 (360a98aaaa72d444e423464685a786175) dm-1 NETAPP,LUN\n"
+."size=299G features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."|-+- policy='round-robin 0' prio=8 status=active\n"
+."| |- 0:0:0:0 sda 8:0 active ready running\n"
+."| `- 1:0:0:0 sde 8:64 active ready running\n"
+."`-+- policy='round-robin 0' prio=2 status=enabled\n"
+." |- 0:0:1:0 sdb 8:16 active ready running\n"
+." `- 1:0:1:0 sdf 8:80 active ready running\n"
+."foobar_postgresql_lun0 (360a98aaaa470505a684a656930385a4a) dm-2 NETAPP,LUN\n"
+."size=4.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."|-+- policy='round-robin 0' prio=8 status=active\n"
+."| |- 0:0:2:0 sdc 8:32 active ready running\n"
+."| `- 1:0:2:0 sdg 8:96 active ready running\n"
+."`-+- policy='round-robin 0' prio=2 status=enabled\n"
+." |- 0:0:3:0 sdd 8:48 active ready running\n"
+." `- 1:0:3:0 sdh 8:112 active ready running\n",
+
+
+#21. netapp / Debian Squeeze failed path sample (thanks to Bernd Zeimetz)
+"foobar_postgresql_lun0 (360a98aaaa470505a684a656930385a4a) dm-2 NETAPP,LUN\n"
+."size=299G features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=0 status=enabled\n"
+." `- #:#:#:# - #:# active faulty running\n",
+
+#22. "-" in LUN name (thanks to Sven Anders <s.anders@digitec.de>)
+"tex-lun4 (3600000e00d0000000002161200120000) dm-7 FUJITSU ,ETERNUS_DXL\n"
+."[size=1.2T][features=1 queue_if_no_path][hwhandler=0]\n"
+."\\_ round-robin 0 [prio=0][active]\n"
+." \\_ 7:0:1:4 sdt 65:48 [active][undef]\n"
+." \\_ 2:0:1:4 sdu 65:64 [active][undef]\n"
+."tex-lun3 (3600000e00d0000000002161200110000) dm-8 FUJITSU ,ETERNUS_DXL\n"
+."[size=1.0T][features=1 queue_if_no_path][hwhandler=0]\n"
+."\\_ round-robin 0 [prio=0][active]\n"
+." \\_ 2:0:1:3 sds 65:32 [active][undef]\n"
+." \\_ 7:0:1:3 sdr 65:16 [active][undef]\n",
+
+#23. LUN without WWID (iSCSI) thanks to Ernest Beinrohr <Ernest.Beinrohr@axonpro.sk>
+"1STORAGE_server_target2 dm-2 IET,VIRTUAL-DISK\n"
+."size=1.0T features='0' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=0 status=active\n"
+." |- 9:0:0:1 sdc 8:32 active undef running\n"
+." `- 10:0:0:1 sdd 8:48 active undef running\n",
+
+#24. LUN without WWID (iSCSI) thanks to Ernest Beinrohr <Ernest.Beinrohr@axonpro.sk>
+"1STORAGE_server_target2 dm-2 IET,VIRTUAL-DISK\n"
+."size=1.0T features='0' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+." |- 9:0:0:1 sdc 8:32 active ready running\n"
+." `- 10:0:0:1 sdd 8:48 failed faulty running\n",
+
+#25. Old Debian Lenny example (edited) thanks to Benjamin von Mossner <benjamin.von.mossner@insparx.com>
+"360a98000503361754b5a58724f6f7a59dm-2 NETAPP ,LUN\n"
+."size=450G features='1 queue_if_no_path' hwhandler='1 emc' wp=rw\n"
+."|-+- policy='round-robin 0' prio=0 status=active\n"
+."| |- 2:0:0:1 sdi 8:128 active undef running\n"
+."| `- 1:0:0:1 sdc 8:32 active undef running\n"
+."`-+- policy='round-robin 0' prio=0 status=enabled\n"
+." |- 1:0:1:1 sdf 8:80 active undef running\n"
+." `- 2:0:1:1 sdl 8:176 active undef running\n",
+
+#26. thanks to Ben Evans <Ben.Evans@terascala.com>
+"map00 (36d4ae52000a2666a0000083751e90c16) dm-1 DELL,MD32xx\n"
+."size=9.1T features='2 pg_init_retries 50' hwhandler='1 rdac' wp=rw\n"
+."|-+- policy='round-robin 0' prio=0 status=active\n"
+."| `- 1:0:0:0 sdb 8:16 active undef running\n"
+."`-+- policy='round-robin 0' prio=0 status=enabled\n"
+." `- 2:0:0:0 sdf 8:80 active failed running\n",
+
+#27. thanks to Ben Evans <Ben.Evans@terascala.com>
+"map00 (36d4ae52000a2666a0000083751e90c16) dm-1 DELL,MD32xx\n"
+."size=9.1T features='2 pg_init_retries 50' hwhandler='1 rdac' wp=rw\n"
+."|-+- policy='round-robin 0' prio=0 status=active\n"
+."| `- 1:0:0:0 sdb 8:16 active undef running\n"
+."`-+- policy='round-robin 0' prio=0 status=enabled\n"
+." `- #:#:#:# - #:# active undef running\n",
+
+#28. thanks to Michal Svamberg <svamberg@civ.zcu.cz>
+"fc-p6-vicepb (1Proware_FF010000333001EC) dm-1 Proware,R_laila\n"
+."size=4.8T features='0' hwhandler='0' wp=rw\n"
+."|-+- policy='round-robin 0' prio=1 status=active\n"
+."| `- 9:0:1:0 sdd 8:48 active ready running\n"
+."|-+- policy='round-robin 0' prio=1 status=enabled\n"
+."| `- 9:0:0:0 sdc 8:32 active ready running\n"
+."|-+- policy='round-robin 0' prio=1 status=enabled\n"
+."| `- 9:0:2:0 sde 8:64 active ready running\n"
+."`-+- policy='round-robin 0' prio=1 status=enabled\n"
+." `- 9:0:5:0 sdh 8:112 active ready running",
+
+#29. more errors (edited)
+"mpathb (36000d7700000c5780d68e963a7d30695) dm-1 FALCON,IPSTOR DISK\n"
+."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='service-time 0' prio=1 status=active\n"
+." |- 7:0:0:1 sdd 8:48 active ready running\n"
+." |- 7:0:1:1 sdg 8:96 active ready running\n"
+." |- 8:0:0:1 sdj 8:144 failed faulty offline\n"
+." `- 8:0:1:1 sdm 8:192 active ready running\n"
+."mpatha (36000d77e0000c9f549b7b04ab12f4f29) dm-0 FALCON,IPSTOR DISK\n"
+."size=1.9T features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."`-+- policy='service-time 0' prio=1 status=active\n"
+." |- 7:0:0:0 sdc 8:32 active shaky running\n"
+." |- 7:0:1:0 sdf 8:80 active ready running\n"
+." |- 8:0:0:0 sdi 8:128 failed faulty offline\n"
+." `- 8:0:1:0 sdl 8:176 active ready running\n",
+
+#30. thanks to Andreas Steinel <Andreas.Steinel@exirius.de>
+"sddv: checker msg is \"tur checker reports path is down\"\n"
+."mpatha (3aaaabbbbccccddddeeeeffff00001111) dm-16 DGC,VRAID\n"
+."[size=300G][features=1 queue_if_no_path][hwhandler=1 alua][rw]\n"
+."\\_ round-robin 0 [prio=100][active]\n"
+." \\_ 2:0:2:10 sdao 66:128 [active][ready] \n"
+." \\_ 1:0:2:10 sddk 71:32 [active][ready] \n"
+."\\_ round-robin 0 [prio=10][enabled]\n"
+." \\_ 2:0:3:10 sdaz 67:48 [active][ready] \n"
+."\\_ round-robin 0 [prio=0][enabled]\n"
+." \\_ 1:0:3:10 sddv 71:208 [active][faulty]\n",
+
+#31. thanks to Robert Towster
+"3600507606700440c1d0bba930b81dd65 dm-1 IBM,ServeRAID M1210e\n"
+."size=185G features='0' hwhandler='0' wp=rw\n"
+."`-+- policy='round-robin 0' prio=1 status=active\n"
+." `- 2:2:0:0 sdaa 65:160 active ready running\n"
+."360050768018106d97800000000000134 dm-13 IBM,2145\n"
+."size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw\n"
+."|-+- policy='round-robin 0' prio=50 status=active\n"
+."| |- 0:0:2:11 sdt 65:48 active ready running\n"
+."| `- 1:0:2:11 sdau 66:224 active ready running\n"
+."`-+- policy='round-robin 0' prio=10 status=enabled\n"
+." |- 0:0:3:11 sdz 65:144 active ready running\n"
+." `- 1:0:3:11 sdba 67:64 active ready running\n",
+
+#32. thanks to Séverin Launiau
+"3600a098038303039492b473242384661 dm-19 NETAPP ,LUN C-Mode\n"
+."size=5.0T features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw\n"
+."|-+- policy='service-time 0' prio=50 status=active\n"
+."| `- 7:0:0:0 sdb 8:16 active ready running\n"
+."`-+- policy='service-time 0' prio=10 status=enabled\n"
+." `- 11:0:0:0 sdg 8:96 active ready running\n"
+."360a98000375432714a3f336733636843 dm-3 NETAPP ,LUN\n"
+."size=10T features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='0' wp=rw\n"
+."`-+- policy='service-time 0' prio=2 status=active\n"
+." |- 8:0:0:0 sdd 8:48 active ready running\n"
+." |- 9:0:0:0 sde 8:64 active ready running\n"
+." |- 10:0:0:0 sdf 8:80 active ready running\n"
+." `- 12:0:0:0 sdi 8:128 active ready running\n"
+."3600a098038303039365d4671616a756e dm-2 NETAPP ,LUN C-Mode\n"
+."size=150G features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw\n"
+."|-+- policy='service-time 0' prio=50 status=active\n"
+."| `- 11:0:0:1 sdh 8:112 active ready running\n"
+."`-+- policy='service-time 0' prio=10 status=enabled\n"
+." `- 7:0:0:1 sdc 8:32 active ready running\n"
+ );
+
+
+# Commands with full path
+$SUDO = '/usr/bin/sudo';
+
+
+# check path for multipath command
+my $multipathCmd = '/usr/sbin/multipath';
+if (! -e $multipathCmd ) {
+ $multipathCmd = '/sbin/multipath';
+ if ( ! -e $multipathCmd ) {
+ $multipathCmd = '';
+ } # if
+} # if
+
+# commands with options
+$MULTIPATH_LIST_LONG = $multipathCmd.' -ll';
+$MULTIPATH_LIST = $multipathCmd.' -l';
+$MULTIPATH_RELOAD = $multipathCmd.' -r';
+
+
+# Exit codes
+$E_OK = 0;
+$E_WARNING = 1;
+$E_CRITICAL = 2;
+$E_UNKNOWN = 3;
+
+# Nagios error levels reversed
+%reverse_exitcode
+ = (
+ 0 => 'OK',
+ 1 => 'WARNING',
+ 2 => 'CRITICAL',
+ 3 => 'UNKNOWN',
+ );
+
+
+# Translate text exit codes to values
+%text2exit
+ = ( 'ok' => $E_OK,
+ 'warning' => $E_WARNING,
+ 'critical' => $E_CRITICAL,
+ 'unknown' => $E_UNKNOWN,
+ );
+
+
+# Usage text
+$USAGE = <<"END_USAGE";
+
+Usage: $NAME [OPTIONS]
+END_USAGE
+
+# Help text
+$HELP = <<'END_HELP';
+
+check-multipath.pl - Nagios plugin to check multipath connections
+see:
+ http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check-2Dmultipath-2Epl/details
+ http://www.nagios.org/documentation
+
+The number of parameters and options has increased over the time, as a result of feature requests by users.
+You might not need most of them.
+
+A configuration for a specific LUN name via --extraconfig has highest priority and overrides group and global config.
+If a regex defined in --group matches a LUN line the specified group values are used. (First regex in List, checked from left to right)
+Otherwise the global defaults are used (--min-paths, --ok-paths).
+
+OPTIONS:
+ -m, --min-paths Low mark, less paths per LUN are CRITICAL [2]
+ -o, --ok-paths High mark, less paths per LUN raise WARNING [4]
+ -n, --no-multipath Exitcode for no LUNs, no multipath driver and multipathd not running [warning]
+ -M, --mdskip Skip extra check if multipathd is running (check uses '--no-multipath' returncode)
+
+ -a, --addchecks define low/high marks for additional checks
+ number of policies per LUN p,<LOW>,<HIGH> DEFAULT: p,0,0
+ number of scsi-hosts per LUN sh,<LOW>,<HIGH> DEFAULT: sh,0,0
+ number of scsi-ids, per LUN si,<LOW>,<HIGH> DEFAULT: si,0,0
+ e.g. 'p,1,2,sh,1,2'; 'si,1,2,p,1,2,sh,2,4'; 'p,1,2'
+ See documentation of multipath output. If the HIGH value is 0, the check is skipped.
+ A typical standard-configuration uses 2 scsi-hosts and 2 scsi-ids, resulting in four paths
+ representing all possible combinations: h0-i0, h0-i1, h1-i0, h1-i1.
+
+ --scsi-all Count all scsi-hosts and scsi-ids, even from paths that report an error state.
+
+ -r, --reload force devmap reload if status is WARNING or CRITICAL
+ (multipath -r)
+ Can help to pick up LUNs coming back to life.
+
+ -L, --ll use multipath -ll instead of multipath -l
+ Can improve detection of failed paths with older versions of multipath tools
+
+
+ -l, --linebreak Define end-of-line string:
+ REG regular UNIX-Newline
+ HTML <br/>
+ -other- use specified string as linebreak symbol,
+ e.g. ', ' (all in one line, comma seperated)
+
+ -g, --group Specify perl-regex to identify groups of LUNs with other default-thresholds.
+ Overrides global config for LUNs with LUN lines that math a group regex.
+ In most cases a simple String should be sufficient. NOTE: special regex characters must be escaped!
+ "<LUN_LINE_REGEX>,<LOW>,<HIGH>[@#,<ADDCHECKS>]:" for each group with deviant thresholds (see explanation of --addchecks)
+ e.g. "IBM,ServeRAID,1,1:HAL,ChpRAID,1,2:" or "IBM,ServeRAID,1,1@#,p,1,2:HAL,ChpRAID,1,2@#,sh,1,2,si,1,2:"
+ Use command multipath -l to see the LUN lines and to identify groups.
+
+ -e, --extraconfig Specify different low/high thresholds for LUNs.
+ Overrides group and global config for the specified LUNs.
+ optional: specify return code if no data for LUN selector was found
+ (ok, warning, critical), default is warning
+ the return code MAY be followed by definitions of additional check, see explanation of --addchecks above
+ "<LUN-selector>,<LOW>,<HIGH>[,<RETURNCODE>[,<ADDCHECKS>]]:" for each LUN with deviant thresholds
+ e.g. "iscsi_lun_01,2,2:dummyLun,1,1,ok:paranoid_lun,8,16,critical:"
+ "oddLun,3,5:"
+ "paranoidOddLun,5,11,critical,p,3,5,sh,5,9,si,3,7:"
+ "default,2,4,warning:DonalLunny,6,8,warning,sh,1,4,si,1,4:"
+
+ <LUN-selector> is by default checked against the "generic Name", as used in older plugin versions.
+ You can specify a prefix to select a LUN attribute as identifier.
+ Not all attributes may be available, depending on the specific multipath configuration.
+ Use command multipath -l to see the complete LUN lines.
+ "G!" generic name, as used in older versions. Exists always. Content depends on the specific configuration. DEFAULT
+ "W!" WWID as reported by the multipath command
+ "D!" dm Identifier (dm-3 or similar)
+ "N!" user-firendly name
+ e.g. 'W!36000d774000045f655ea91cb4ea41d6f,4,8,critical:DonalLunny,6,8:D!dm-3,1,2,warning,sh,1,2,si,1,2:'
+ NOTE: enclose parameter value in SINGLE-quotes for this notation!
+
+ -p, --print List to determine which attribute of the LUN should be printed as identifier in the output
+ The letters in the list are checked from left to right, the first coresponding attribute that exists is printed.
+ The letter G is always appended to the list.
+ Avalible are:
+ G: generic name, as used in older versions. Exists always. Content depends on the specific configuration.
+ W: WWID as reported by the multipath command
+ D: dm Identifier (dm-3 or similar)
+ N: user-firendly name
+ e.g. "DN": print dm-identifier (if present), else user friendly name (if present) else generic name (as G is always appended to the list)
+ "WDN": print WWID (if present), else print dm-identifier (if present), else user friendly name (if present) else generic name (as G ist always appended to the list)
+
+ -s, --state Prefix alerts with alert state
+ -S, --short-state Prefix alerts with alert state abbreviated
+ -h, --help Display this help text
+ -V, --version Display version info
+ -v, --verbose More text output
+
+ -d, --di Run testcase instead of real check [0]
+ -t, --test Do not display testcase input, just result
+
+ -h, --help Display this message
+
+
+NOTE: 'sudo' must be configured to allow the nagios-user to call
+ multipath -l and/or multipath -ll if you use the -ll option
+ (and also multipath -r, if you intend to use the --reload option)
+ *without* password.
+
+END_HELP
+
+# Version and license text
+$LICENSE = <<"END_LICENSE";
+
+$NAME $VERSION
+
+Copyright (C) 2011-2016 $AUTHOR
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Written by
+$AUTHOR <$CONTACT>
+
+Thanks for contributions to
+Bernd Zeimetz, Sven Anders, Ben Evans and others
+
+Based on work by
+- Trond H. Amundsen <t.h.amundsen\@usit.uio.no>
+- Gunther Schlegel <schlegel\@riege.com>
+- Matija Nalis <mnalis+debian\@carnet.hr>
+END_LICENSE
+
+
+# Options with default values
+%opt
+ = ( #'timeout' => 5, # default timeout is 5 seconds
+ 'help' => 0,
+ 'version' => 0,
+ 'no_multipath' => 'warning',
+ 'min-paths' => 2,
+ 'ok-paths' => 4,
+ 'state' => 0,
+ 'di' => 0,
+ 'shortstate' => 0,
+ 'linebreak' => undef,
+ 'extraconfig' => '',
+ 'verbose' => 0,
+ 'test' => 0,
+ 'reload' => 0,
+ 'll' => 0,
+ 'mdskip' => 0,
+ 'group' => '',
+ 'print' => '',
+ 'scsi-all' => 0,
+ 'addchecks' => '',
+ );
+
+
+# the hash keys define the valid check identifiers. only \w characters for IDs!
+# Initialize the hash with defaults (no checks)
+my %addChecks
+ = (
+ 'sh' => [0,0], # scsi-hosts
+ 'si' => [0,0], # scsi-ids
+ 'p' => [0,0], # policies
+ );
+
+# short human readable description
+my %addCheckNames
+ = (
+ 'sh' => 'scsi-hosts',
+ 'si' => 'scsi-ids',
+ 'p' => 'policies',
+ );
+
+
+# Get options
+GetOptions(#'t|timeout=i' => \$opt{timeout},
+ 'h|help' => \$opt{'help'},
+ 'V|version' => \$opt{'version'},
+ 'n|no-multipath=s' => \$opt{'no_multipath'},
+ 'm|min-paths=i' => \$opt{"min-paths"},
+ 'o|ok-paths=i' => \$opt{"ok-paths"},
+ 'd|di=i' => \$opt{"di"},
+ 's|state' => \$opt{'state'},
+ 'S|short-state' => \$opt{'shortstate'},
+ 'l|linebreak=s' => \$opt{'linebreak'},
+ 'e|extraconfig=s' => \$opt{'extraconfig'},
+ 'v|verbose' => \$opt{'verbose'},
+ 't|test' => \$opt{'test'},
+ 'r|reload' => \$opt{'reload'},
+ 'L|ll' => \$opt{'ll'},
+ 'M|mdskip' => \$opt{'mdskip'},
+ 'g|group=s' => \$opt{'group'},
+ 'p|print=s' => \$opt{'print'},
+ 'scsi-all' => \$opt{'scsi-all'},
+ 'a|addchecks=s' => \$opt{'addchecks'},
+ ) or do { print $USAGE; exit $E_UNKNOWN };
+
+# If user requested help
+if ($opt{'help'}) {
+ print $USAGE, $HELP;
+ exit $E_OK;
+}
+
+# If user requested version info
+if ($opt{'version'}) {
+ print $LICENSE;
+ exit $E_OK;
+}
+
+# Reports (messages) are gathered in this array
+@reports = ();
+
+#
+# DOES NOT WORK when calling commands with qx()
+#
+# Setting timeout
+#$SIG{ALRM} = sub {
+# print "PLUGIN TIMEOUT: $NAME timed out after $opt{timeout} seconds\n";
+# exit $E_UNKNOWN;
+#};
+#alarm $opt{timeout};
+
+
+
+#---------------------------------------
+#
+# Initialise a hash with current addcheck defaults
+# copy the arrays, not just the references!
+#
+sub getNewAddCheckHash {
+ my %h;
+
+ foreach my $k (keys %addChecks) {
+ #print "getNewAddCheckHash : '$k'\n";
+ my @arr = @{$addChecks{$k}};
+ $h{$k}= \@arr;
+ } # foreach
+
+ return \%h;
+} # sub
+
+
+#---------------------------------------
+#
+# analyse definition of additional checks, write check-values to referenced hash
+#
+sub getAddChecks {
+ my ($inString, $rOuthash, $errPrefix) = @_;
+
+ if ( !defined($inString) ) { # undefined or empty means no change
+ return;
+ } elsif ($inString eq '') {
+ return;
+ } # if
+
+ if ( !defined($errPrefix) ) { # errorPrefix should give information about the call context
+ $errPrefix = '';
+ } # if
+
+ if ($inString !~ m!^\w+,\d+,\d+(,\w+,\d+,\d+)*$! ) {
+ unknown_error($errPrefix."invalid addcheck definition: '$inString', syntax error. See help information.");
+ } # if
+
+ while ($inString =~ m!(\w+),(\d+),(\d+)!g) {
+ my ( $id, $low, $high ) = ($1, $2, $3);
+ #print "AddCheck: id='$id', low='$low', high='$high', errprefix='$errPrefix'\n";
+
+ if ( defined($$rOuthash{$id}) ) { # hash keys define valid ids
+ if ( $low <= $high ) { # make sure low and high value are in the right order
+ @{$$rOuthash{$id}} = ($low, $high); # only set values found in input string, leave the others untouched
+ } else {
+ unknown_error($errPrefix."invalid addcheck definition for id '$id', low value bigger than high value. See help information.");
+ } # if
+ } else {
+ unknown_error($errPrefix."invalid addcheck identifier '$id' in '$inString', syntax error. See help information.");
+ } # if
+ } # while
+} # sub
+
+#---------------------------------------
+
+
+
+# Default line break
+$linebreak = isatty(*STDOUT) ? "\n" : '<br/>';
+
+
+# Line break from option
+if (defined $opt{linebreak}) {
+ if ($opt{linebreak} eq 'REG') {
+ $linebreak = "\n";
+ }
+ elsif ($opt{linebreak} eq 'HTML') {
+ $linebreak = '<br/>';
+ }
+ else {
+ $linebreak = $opt{linebreak};
+ }
+} # if
+
+# Analyse additional check definitions. Parameter sets defaults
+# exit on Error
+getAddChecks( $opt{'addchecks'}, \%addChecks, "Parameter '--addchecks'; " );
+
+
+# group option
+my @group = ();
+
+#print "--group='".$opt{'group'}."'\n";
+if ($opt{'group'} ne '') {
+ if ( $opt{'group'} !~ m!^(.+?,\d+,\d+(?:@#(,\w+,\d+,\d+)*)?:)+$! ) {
+ unknown_error("Wrong usage of '--group' option: '"
+ . $opt{'group'}
+ . "' syntax error. See help information.");
+ } # if
+
+ while ( $opt{'group'} =~ m/(.+?),(\d+),(\d+)(?:@#,([\w\d,]+))?:/g ) {
+ my $regex = $1;
+ my $crit = $2;
+ my $warn = $3;
+ my $addchecks = $4;
+ if ( !defined($addchecks) ) {
+ $addchecks = '';
+ } # if
+ #print "GROUP: Regex='$regex', c=$crit, w=$warn, addchecks='$addchecks'\n";
+
+ if ($crit > $warn) {
+ unknown_error("Error in '--group' option '"
+ . $opt{'group'}
+ . "' for group rule '$regex': critical threshold ($crit) must not be higher than warning threshold ($warn).");
+ } # if
+
+ my $rHash = getNewAddCheckHash(); # initialise with default
+ getAddChecks( $addchecks, $rHash, "Parameter '--group'; " );
+ push ( @group, { 'regex' => $regex, 'warn' => $warn, 'crit' => $crit, 'addchecks' => $rHash } );
+ } # while
+} # if
+
+
+# print option
+$opt{'print'} .= 'G'; # last resort: "generic name" (always present) als default
+if ($opt{'print'} !~ m!^[GWND]+$!) {
+ unknown_error("Error in '--print' option: invalid character in value '". $opt{'print'} ."'. Please check usage.");
+} # if
+
+
+# extraconfig option
+my @extraconfig = ();
+
+if ($opt{extraconfig} ne '') {
+ if ( $opt{extraconfig} !~ m/^([GWDN]!)?([\w\-]+,\d+,\d+(?:,(?:ok|warning|critical)(?:,\w+,\d+,\d+)*)?:)+$/ ) {
+ unknown_error("Wrong usage of '--extraconfig' option: '"
+ . $opt{extraconfig}
+ . "' syntax error. See help information.");
+ } # if
+
+ #print "EXTRA-Param '$opt{extraconfig}'\n";
+ while ( $opt{extraconfig} =~ m/(?:([GWDN])!)?([\w\-]+),(\d+),(\d+)(?:,(ok|warning|critical)(?:,([\w\d,]+))?)?:+/g ) {
+ my $attribute = $1;
+ my $attribValue = $2;
+ my $crit = $3;
+ my $warn = $4;
+ my $ret = $5;
+ my $addchecks = $6;
+ my $missingRet = $E_WARNING; # set default
+
+ if ( defined($ret) ) { # if retcode is given: convert and store
+ $missingRet=$text2exit{$ret};
+ } else {
+ $ret = '#UNDEF#';
+ } # if
+ if ( !defined($addchecks) ) {
+ $addchecks = '';
+ } # if
+ if ( !defined($attribute) ) {
+ $attribute = 'G'; # DEFAULT: generic Name
+ } # if
+
+ #print "EXTRA: attrib='$attribute', val='$attribValue', c=$crit, w=$warn, m=$missingRet, '$ret', addchecks='$addchecks'\n";
+
+ if ($crit > $warn) {
+ unknown_error("Error in '--extraconfig' option '"
+ . $opt{extraconfig}
+ . "' for LUN selector '".$attribute.'!'.$attribValue."': critical threshold ($crit) must not be higher than warning threshold ($warn).");
+ } # if
+
+ my $rHash = getNewAddCheckHash (); # initialise with default
+ getAddChecks( $addchecks, $rHash, "Parameter '--extraconfig'; " );
+ push ( @extraconfig, {'attrib' => $attribute, 'val' =>$attribValue, 'warn' => $warn, 'crit' => $crit, 'missingRet' => $missingRet, 'addchecks' => $rHash, 'found' => 0 });
+ } # while
+} # if
+
+
+
+# Check syntax of '--no-multipath' option
+if (!exists $text2exit{$opt{no_multipath}}) {
+ unknown_error("Wrong usage of '--no-multipath' option: '"
+ . $opt{no_multipath}
+ . "' is not a recognized keyword");
+}
+
+# Check min-paths option
+if ( $opt{"min-paths"} < 1 ) {
+ unknown_error("Wrong usage of '--min-paths' option: '"
+ . $opt{"min-paths"}
+ . "' (must be at least 1)");
+}
+
+# Check ok-paths option
+if ( $opt{"ok-paths"} < $opt{"min-paths"} ) {
+ unknown_error("Wrong usage of '--ok-paths' option: '"
+ . $opt{"ok-paths"}
+ . "' (must NOT be less than '--min-paths': "
+ . $opt{"min-paths"}
+ . ")") ;
+}
+
+# Check di (Debug-Input) option
+if ( $opt{"di"} > $#debugInput ) {
+ unknown_error("Wrong usage of '--di' option: '"
+ . $opt{"di"}
+ . "' (must NOT be bigger than: "
+ . $#debugInput
+ . ")") ;
+}
+
+
+#---------------------------------------------------------------------
+# Functions
+#---------------------------------------------------------------------
+
+#---------------------------------------
+#
+# Store a message in the message array
+#
+sub report {
+ my ($msg, $exval) = @_;
+ return push @reports, [ $msg, $exval ];
+}
+
+#---------------------------------------
+#
+# Give an error and exit with unknown state
+#
+sub unknown_error {
+ my $msg = shift;
+
+ if ($opt{"test"}) {
+ print "ERROR: $msg |TESTCASE|\n";
+ } else {
+ my $hostname = qx('hostname'); # add hostname to error message
+ chomp $hostname;
+ print "ERROR: $msg |Host: $hostname|\n";
+ }
+ exit $E_UNKNOWN;
+}
+
+#---------------------------------------
+#
+# get attribute to print from LUN data
+#
+sub getLunPrintName {
+ my ( $rLunDef ) = @_;
+
+ my $lunPrintName = 'UNDEF';
+ my $displayPrio = $opt{'print'};
+ for(my $i = 0; $i < length($displayPrio); $i++) { # all characters in prio-string
+ my $c = substr ($displayPrio, $i, 1);
+ #print "i=$i, c='$c'\n";
+ if ($$rLunDef{$c}) { # first non-empty attribute wins
+ $lunPrintName = $$rLunDef{$c};
+ #print "FOUND: $lunPrintName i=$i, c='$c'\n";
+ last;
+ } # if
+ } # for
+
+ return $lunPrintName;
+} # sub
+
+
+#---------------------------------------
+#
+# get output of multipath -l
+# or debug input (testcase)
+#
+sub get_multipath_text {
+ my ( $cmd ) = @_;
+
+ if ( !defined($cmd) || $cmd !~ m!^/\w+! ) {
+ unknown_error ("INVALID system command '$cmd' specified.");
+ }
+ my $cmdFull = $cmd.' 2>/dev/null'; # ignore error output
+
+ my $output = "";
+
+ if ( ! $opt{"di"} ) { # normal action, NO debug input
+ #print "Reale USER-ID : $< Effektive USER-ID : $>\n";
+ #print getpwuid( $< )."\n";
+ my $command = "";
+ if ($< == 0 ) { # called by root?
+ $command = $cmdFull; # use command "as is"
+ } else {
+ $command = "$SUDO $cmdFull"; # otherwise: use sudo
+ }
+ #print "exec [$command]\n";
+
+ $output = qx($command);
+ my $err = $!;
+ if ($? != 0) {
+
+ # if no multipath driver found just set empty string (no LUNs)
+ if ( $output =~ m/multipath kernel driver not loaded/ ) {
+ $output = "";
+ } else {
+ if ($< != 0) {
+ # (root) NOPASSWD: /sbin/multipath -l
+ # (root) NOPASSWD: /sbin/multipath -ll
+ # (root) NOPASSWD: /sbin/multipath -r
+ my $sudoListCommand = "$SUDO -l 2>/dev/null";
+ my $sudoList = qx($sudoListCommand);
+ if ($sudoList !~ m!\(root\) \s+ NOPASSWD\: \s+ $cmd!x ) {
+ unknown_error ("Command failed, 'sudo' not configured for command: '$cmd'?" );
+ } # if
+ } # if
+
+ unknown_error ("command '$command' FAILED: '$output', '$err'");
+ }
+ }
+ #print "-----\ndi=". $opt{"di"} ."\n-----\n[". $output ."]\n-----\n\n";
+ } else { # TESTCASE
+ $output = $debugInput[$opt{"di"}];
+ if (!$opt{"test"} ) {
+ print "=====\nTESTCASE di=". $opt{"di"} ."\n-----\n". $output ."=====\n";
+ } # if
+ }
+
+ $output =~ s/[\[\]\\]+/ /g; # substitute special characters with space
+ my @textArray = split (/[\n\r]+/, $output); # Array of text lines
+ return \@textArray;
+}
+
+
+#---------------------------------------
+#
+# check if text is a LUN description line
+# if so, set variables for new LUN
+#
+sub checkLunLine {
+ my ($textLine, $rCurrentLun, $rLunData) = @_;
+ #print "checkLunLine: '$textLine'\n";
+
+ my $idGeneric = '';
+ my $idWWID = '';
+ my $idDm = '';
+ my $idName = '';
+
+ # mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1 FALCON,IPSTOR DISK
+ # mpathb (36000d774000045f655ea91cb4ea41d6f) dm-1
+ # MYVOLUME (36005076801810523100000000000006f)
+ # tex-lun4 (3600000e00d0000000002161200120000) dm-7 FUJITSU ,ETERNUS_DXL
+ # fc-p6-vicepb (1Proware_FF010000333001EC) dm-1 Proware,R_laila thanks to Michal Svamberg
+ #if ($textLine =~ m/^([\w\-]+) \s+ \([\w\-]+\)/x) {
+ if ($textLine =~ m/^([\w\-]+) \s+ \(([\w\-]+)\) (?: \s+ ([\w\-]+))?/x) {
+ $$rCurrentLun = $1;
+ $idGeneric = $1;
+ $idName = $1;
+ $idWWID = $2;
+ $idDm = $3;
+
+ if ( !defined($idDm) ) {
+ $idDm ='';
+ }
+ #report("named LUN $$rCurrentLun found, G='$idGeneric', W='$idWWID', D='$idDm', N='$idName'", $E_OK);
+ }
+ # 36006016019e02a00d009495ddbf3e011 dm-2 DGC,VRAID
+ # 360a98000503361754b5a58724f6f7a59 dm-2 NETAPP ,LUN
+ # 360a98000503361754b5a58724f6f7a59 dm-2 NETAPP ,LUN C-Mode
+ #elsif ($textLine =~ m/^[0-9a-fA-F]+ \s+ ([\w\-\_]+)/x) {
+ elsif ($textLine =~ m/^([0-9a-fA-F]+) \s+ ([\w\-\_]+)/x) {
+ $$rCurrentLun = $2;
+ $idGeneric = $2;
+ $idWWID = $1;
+ $idDm = $2;
+ #report("simple (1) LUN $$rCurrentLun found, G='$idGeneric', W='$idWWID', D='$idDm', N='$idName'", $E_OK);
+ }
+ # 360a98000503361754b5a58724f6f7a59dm-2 NETAPP ,LUN
+ #elsif ($textLine =~ m/^[0-9a-fA-F]{3,33} \s* ([\w\-\_]+) \s+/x) {
+ elsif ($textLine =~ m/^([0-9a-fA-F]{33}) ([\w\-]+) \s+ ([\w\-\_]+)/x) {
+ $$rCurrentLun = $2;
+ $idGeneric = $2;
+ $idWWID = $1;
+ $idDm = $2;
+ #report("simple (2) LUN $$rCurrentLun found, G='$idGeneric', W='$idWWID', D='$idDm', N='$idName'", $E_OK);
+ }
+ # iscsi-LUN example
+ # 1STORAGE_server_target2 dm-2 IET,VIRTUAL-DISK
+ #elsif ($textLine =~ m/^([\w\-]+) \s+ [a-z]+\-\d+ \s+ [\w\-\,]+/x) {
+ elsif ($textLine =~ m/^([\w\-_]+) \s+ ([\w\-]+) \s+ [\w\-\_]+/x) {
+ $$rCurrentLun = $1;
+ $idGeneric = $1;
+ $idName = $1;
+ $idDm = $2;
+
+ #report("LUN without WWID $$rCurrentLun found, G='$idGeneric', W='$idWWID', D='$idDm', N='$idName'", $E_OK);
+ }
+ else {
+ return 0; ## Not a LUN line, stop here and return zero
+ } # if
+
+ # initialise data of found LUN
+ ${$rLunData}{$$rCurrentLun} = { 'paths' => 0, 'policies' => 0,
+ 'lunline' => $textLine,
+ 'G' => $idGeneric, 'W' => $idWWID, 'D' => $idDm, 'N' => $idName,
+ 'sh-hash' => {}, 'si-hash' => {}
+ };
+ return 1;
+} # sub
+
+
+#---------------------------------------
+#
+# check if text is a policy description line
+#
+sub checkPolicyLine {
+ my ($textLine, $currentLun, $rLunData) = @_;
+ #print "checkPolicyLine: '$textLine'\n";
+
+ # `-+- policy='round-robin 0' prio=-1 status=active
+ # |-+- policy='round-robin 0' prio=0 status=active
+ ##\_ round-robin 0 [prio=-4][active]
+ ## _ round-robin 0 prio=-4 active
+ #\_ round-robin 0 [active]
+ # _ round-robin 0 active
+ #if ( $textLine =~ m/^[|\`\-\+_\s]+ \s+ (?:policy=\')?[\w\.\-\_]+ \s \d(?:\')? \s+ prio=/x ) {
+ if ( $textLine =~ m/^[|\`\-\+_\s]+ \s+ (?:policy=\')?[\w\.\-\_]+ \s \d(?:\')? \s+ \w+/x ) {
+ ${$$rLunData{$currentLun}}{'policies'}++;
+ #print "checkPolicyLine: found policy no. ".${$$rLunData{$currentLun}}{'policies'}."\n";
+ return 1;
+ } else {
+ return 0;
+ } # if
+} # sub
+
+
+#---------------------------------------
+#
+# analyse multipath state
+# (output lines)
+#
+sub checkMultipathText {
+ my ($rTextArray) = @_;
+
+ my $state = "pathDesc";
+ my $currentLun = "";
+ my %lunData = ();
+ my $i = 0;
+
+ foreach my $textLine (@$rTextArray) {
+ $i++;
+ #print "$i:\n";
+ if ($state eq 'pathDesc') { # initial state: look for path state, new LUN Name, policy
+ # check for path status line
+ # |- 3:0:0:1 sdf 8:80 active undef running
+ ## \_ 3:0:1:1 sde 8:64 [active][undef]
+ ## _ 3:0:1:1 sde 8:64 active undef
+ ## \_ 13:0:1:0 sdc 8:32 [active]
+ ## _ 13:0:1:0 sdc 8:32 active
+
+ # (thanks to Bernd Zeimetz)
+ # `- #:#:#:# - #:# active faulty running
+
+ # (thanks to Ben Evans)
+ # `- #:#:#:# - #:# active undef running
+
+ #if ( $textLine =~ m/^[\s_\|\-\`\\\+]+ [#\d\:]+ \s+ ([\w\-]+) \s+ [#\d\:]+ \s+ \w+/xi ) {
+ if ( $textLine =~ m/^[\s_\|\-\`\\\+]+ ([#\d]+):[#\d]+:([#\d]+):[#\d]+ \s+ ([\w\-]+) \s+ [#\d\:]+ \s+ \w+/xi ) {
+ my $sh = $1;
+ my $si = $2;
+ my $pathName = $3;
+ my $ok = 0;
+
+ my $rLunData = $lunData{$currentLun};
+
+ #print "pathDesc: [$textLine], ";
+ #print "LUN '$currentLun', path '$pathName', sh='$sh', si='$si'\n";
+
+ if ($textLine =~ m/fail|fault|offline|shaky/) { # fail or fault, offline or shaky?
+ #print "ERROR: $textLine\n";
+ report("LUN ".getLunPrintName ($rLunData).", path $pathName: ERROR.", $E_WARNING);
+ }
+ elsif ($textLine !~ m/\sactive\s/) { # path is active?
+ #print "NOT active: $textLine\n";
+ report("LUN ".getLunPrintName ($rLunData).", path $pathName: NOT active.", $E_WARNING);
+ }
+ elsif ($pathName eq "-") { # empty path name => path is missing (thanks to Ben Evans)
+ report("LUN ".getLunPrintName ($rLunData).": missing path (empty path name)", $E_WARNING);
+ }
+ else {
+ if ( $currentLun eq "") { # YES => check logic, increase path count for LUN
+ unknown_error ("Path info before LUN name. Line $i:\n'$textLine'")
+ }
+ $$rLunData{'paths'}++;
+ $ok =1;
+ } # if
+
+
+ if ( $ok || $opt{'scsi-all'}) { # if path is OK or ALL paths are to be counted
+ if ($sh =~ m!^\d+$! ) {
+ ${$$rLunData{'sh-hash'}}{$sh}=1; # store scsi-host as hash key
+ } # if
+
+ if ($si =~ m!^\d+$! ) {
+ ${$$rLunData{'si-hash'}}{$si}=1; # store scsi-id as hash key
+ } # if
+ } # if
+ } # check for new LUN name
+ elsif ( checkLunLine ($textLine, \$currentLun, \%lunData) ) {
+ $state="lunInfo";
+ } # check for new LUN name
+ elsif ( ($currentLun ne "") && checkPolicyLine ($textLine, $currentLun, \%lunData) ) {
+ ; # SKIP NESTED POLICY
+ }
+ elsif ( $textLine =~ m/checker msg is /) {
+ ; # SKIP tur message stuff
+ }
+ else { # error: unknown line format
+ unknown_error ("Line $i not recognised. Expected path info, new LUN or nested policy:\n'$textLine'")
+ }
+ } # case
+
+ # after new LUN was found skip the INFO-Line (nothing else...)
+ elsif ($state eq 'lunInfo') {
+ if ( $currentLun eq "" ) { # check logic
+ unknown_error ("No current LUN while looking for LUN info. Line $i:\n'$textLine'")
+ }
+ # size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw
+ ##[size=1.9T][features=1 queue_if_no_path][hwhandler=0][rw]
+ ## size=1.9T features=1 queue_if_no_path hwhandler=0 rw
+ #[size=576 GB][features="1 queue_if_no_path"][hwhandler="0"]
+ # size=576 GB features="1 queue_if_no_path" hwhandler="0"
+
+ #if ($textLine =~ m/^\s*size=[\w\.]+\s+features=/x) {
+ if ($textLine =~ m/^\s*size=[\w\.]+\s+ ([a-zA-Z]+\s+)? features=/x) {
+ $state = "pathPolicy";
+ } else { # error: unknown line format
+ unknown_error ("Line $i not recognised. Expected LUN info:\n'$textLine'")
+ }
+ } # case
+
+ # after LUN info was found skip the path policy (nothing else...)
+ # or handle new LUN if no paths available
+ elsif ($state eq 'pathPolicy') {
+ if ( $currentLun eq "") { # check logic
+ unknown_error ("No current LUN while looking for path policy. Line $i:\'$textLine'")
+ }
+
+ if ( checkPolicyLine ($textLine, $currentLun, \%lunData)) {
+ $state = "pathDesc";
+ } # new LUN found
+ elsif ( checkLunLine ($textLine, \$currentLun, \%lunData) ) {
+ $state = "lunInfo";
+ } else { # error: unknown line format
+ unknown_error ("Line $i not recognised. Expected path policy or new LUN:\n'$textLine'")
+ }
+ }
+ else {
+ unknown_error ("Internal error: unknown state '$state' of parser")
+ } # if
+ } # foreach
+
+ return \%lunData
+} # sub
+
+
+
+#---------------------------------------
+#
+# test value
+#
+sub testValue {
+ my ($val, $low, $high, $lunPrintName, $txtErr, $txtOk) = @_;
+
+ if ( !defined($txtOk) ) {
+ $txtOk = '';
+ } elsif ($txtOk ne '') {
+ $txtOk .= ' ';
+ } #if
+
+ #print "TEST val='$val', low='$low', high='$high', LUN='$lunPrintName', txtErr='$txtErr', txtOk='$txtOk'\n";
+
+ if ($val < $low){
+ report("LUN $lunPrintName: less than $low $txtErr ($val/$high)!", $E_CRITICAL);
+ } elsif ($val < $high){
+ report("LUN $lunPrintName: less than $high $txtErr ($val/$high).", $E_WARNING);
+ } else {
+ report("LUN $lunPrintName: $txtOk$val/$high.", $E_OK);
+ } # if
+} # sub
+
+#---------------------------------------
+#
+# test additional checks
+#
+sub testAddChecks {
+ my ($rDefHash, $rValueHash, $lunPrintName) = @_;
+
+ foreach my $id (sort keys %{$rDefHash} ) {
+ my $rDefArr = $$rDefHash{$id};
+
+ if ($$rDefArr[1] > 0 ) { # high mark 0 => NO check
+ testValue ($$rValueHash{$id}, $$rDefArr[0], $$rDefArr[1], $lunPrintName, $addCheckNames{$id}, $addCheckNames{$id});
+ } else {
+ #print "SKIP $$rValueHash{$id}, $$rDefArr[0], $$rDefArr[1], $lunPrintName, $addCheckNames{$id}, $addCheckNames{$id} \n"
+ }# if
+ } # foreach
+} # sub
+
+#=====================================================================
+# Main program
+#=====================================================================
+
+
+# check if multipathd is running
+if ( !$opt{'mdskip'} ) { # check is not disabled
+ my $cmd = 'ps -e';
+ my $output = qx($cmd);
+ #print "####\n$output\n####\n";
+
+ my $err = $!;
+ if ($? != 0) {
+ report("Check if multipathd is running FAILED. (There is an option to disable this check.) Command '$cmd': '$err'", $E_WARNING);
+ } else {
+ if ( $output !~ m!\smultipathd\n!s ) {
+ report ("No multipathd running. (Not found in process list.)", $text2exit{$opt{'no_multipath'}} );
+ } else {
+ #print "FOUND: multipathd process.\n";
+ }# if
+ }# if
+} # if
+
+
+if ( ($opt{'di'} == 0) && ($multipathCmd eq '') ) {
+ # No testcase called and no multipath binary found
+ unknown_error ("No multipath binary found. Unable to perform check.");
+} # if
+
+
+my $mpListCmd = $MULTIPATH_LIST;
+if ($opt{'ll'}) {
+ $mpListCmd = $MULTIPATH_LIST_LONG;
+}
+
+my @multipathStateText = @{ get_multipath_text( $mpListCmd ) }; # get input data
+
+my %lunData = %{checkMultipathText ( \@multipathStateText )}; # analyse it
+
+
+# if no LUN found...
+if (scalar keys %lunData == 0) {
+ report ("No LUN found or no multipath driver.", $text2exit{$opt{'no_multipath'}});
+}
+
+
+#
+# Check path count for each LUN
+#
+foreach my $lunName ( sort {$a cmp $b} keys %lunData) {
+ my $rLunDef = $lunData{$lunName};
+ my $pathCount = $$rLunDef{'paths'};
+ my $policiesCount = $$rLunDef{'policies'};
+ my $lunLine = $$rLunDef{'lunline'};
+
+ my $warn = $opt{'ok-paths'};
+ my $crit = $opt{'min-paths'};
+
+ my $rAddChecks = \%addChecks; # initialise with default
+
+ # Get the LUN-ID to be displayed, a 'G' in appended to the option-string at parameter check
+ my $lunPrintName = getLunPrintName ($rLunDef);
+
+ # check if an extraconfig entry matches
+ my $extraconfigMatched = 0;
+ foreach my $rExtraConf( @extraconfig ) {
+ if ( $$rExtraConf{'val'} eq $$rLunDef{$$rExtraConf{'attrib'}}) {
+ $warn = $$rExtraConf{'warn'};
+ $crit = $$rExtraConf{'crit'};
+
+ $rAddChecks = $$rExtraConf{'addchecks'};
+ $$rExtraConf{'found'} = 1;
+ $extraconfigMatched = 1;
+ #print "EXTRA: ".$$rExtraConf{'attrib'}."!".$$rExtraConf{'val'}." c=$crit w=$warn \n";
+ last;
+ } # if
+ } # foreach
+
+ if ( !$extraconfigMatched ) { # NO extaconfig entry matched
+ foreach my $rGroupDef ( @group ) { # LUN-Line matches a group definition?
+ my $regex = ${$rGroupDef}{'regex'};
+ #print "GRP: '$regex'\n";
+ if ($lunLine =~ m!$regex! ) {
+ $warn = ${$rGroupDef}{'warn'};
+ $crit = ${$rGroupDef}{'crit'};
+ $rAddChecks = ${$rGroupDef}{'addchecks'};
+ #print "GRP: '$regex' MATCH: c=$crit w=$warn\n";
+ last;
+ } # if
+ } # foreach
+ }# if
+
+ #print "LUN '$lunPrintName'\n";
+
+ testValue ($pathCount, $crit, $warn, $lunPrintName, 'paths', '' );
+
+ my %addCheckValues = (
+ 'sh' => scalar( keys %{$$rLunDef{'sh-hash'}}),
+ 'si' => scalar( keys %{$$rLunDef{'si-hash'}}),
+ 'p' => $policiesCount
+ );
+ testAddChecks ( $rAddChecks, \%addCheckValues, $lunPrintName);
+} # foreach
+
+
+#
+# Check if all LUNs in extraconfig were found
+#
+foreach my $rExtraConf ( @extraconfig ) {
+ if (! $$rExtraConf{'found'} ) {
+ report("NO DATA found for extra-config LUN selector '". $$rExtraConf{'attrib'}.'!'.$$rExtraConf{'val'}."'", $$rExtraConf{'missingRet'} );
+ }
+} # foreach
+
+
+
+# Counter variable
+%nagios_level_count
+ = (
+ 'OK' => 0,
+ 'WARNING' => 0,
+ 'CRITICAL' => 0,
+ 'UNKNOWN' => 0,
+ );
+
+# holds only ok messages
+@ok_reports = ();
+
+# Reset the WARN signal
+$SIG{__WARN__} = 'DEFAULT';
+
+# Print any perl warnings that have occured
+if (@perl_warnings) {
+ foreach (@perl_warnings) {
+ chop @$_;
+ report("INTERNAL ERROR: @$_", $E_UNKNOWN);
+ } # foreach
+} # if
+
+$counter = 0;
+ALERT:
+foreach (sort {$a->[1] <= $b->[1]} @reports) {
+ my ($msg, $level) = @{ $_ };
+ $nagios_level_count{$reverse_exitcode{$level}}++;
+
+ # Prefix with nagios level if specified with option '--state'
+ $msg = $reverse_exitcode{$level} . ": $msg" if $opt{state};
+
+ # Prefix with one-letter nagios level if specified with option '--short-state'
+ $msg = (substr $reverse_exitcode{$level}, 0, 1) . ": $msg" if $opt{shortstate};
+
+ if ($level == $E_OK && !$opt{verbose}) {
+ push @ok_reports, $msg;
+ next ALERT;
+ }
+
+ ($counter++ == 0) ? print $msg : print $linebreak, $msg;
+} # foreach
+
+# Determine our exit code
+$exit_code = $E_OK;
+if ($nagios_level_count{UNKNOWN} > 0) { $exit_code = $E_UNKNOWN; }
+if ($nagios_level_count{WARNING} > 0) { $exit_code = $E_WARNING; }
+if ($nagios_level_count{CRITICAL} > 0) { $exit_code = $E_CRITICAL; }
+
+
+# Print OK messages
+$counter = 0;
+if ($exit_code == $E_OK && !$opt{verbose}) {
+ if ( (!$opt{'state'}) && (!$opt{'shortstate'}) ) {
+ print 'OK'.$linebreak;
+ }
+ foreach my $msg (@ok_reports) {
+ ($counter++ == 0) ? print $msg : print $linebreak, $msg;
+ } # foreach
+} # if
+
+# Call reload command if NOT ok and parameter --reload is set
+if ( ($exit_code != $E_OK) && $opt{'reload'} ){
+ my $txt = get_multipath_text($MULTIPATH_RELOAD);
+ print $linebreak.'Reload was issued.';
+}
+
+print $linebreak;
+#print "$exit_code\n";
+# Exit with proper exit code
+exit $exit_code;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/control
new file mode 100644
index 0000000..264d554
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/control
@@ -0,0 +1,6 @@
+Watch: http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check-2Dmultipath-2Epl/details Current Version</div><div class="data">([0-9.]+)</div>
+Version: 0.4.7
+Homepage: http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check-2Dmultipath-2Epl/details
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to monitor the number of available and
+ failed paths of multipath devices
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/copyright
new file mode 100644
index 0000000..b7ea735
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/copyright
@@ -0,0 +1,16 @@
+Copyright (C) 2011 Hinnerk Rümenapf, Trond H. Amundsen, Gunther Schlegel, Matija Nalis,
+Bernd Zeimetz
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/multipath.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/multipath.cfg
new file mode 100644
index 0000000..1bbfabb
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/multipath.cfg
@@ -0,0 +1,5 @@
+# 'multipath' command definition
+define command{
+ command_name check_multipath
+ command_line /usr/lib/nagios/plugins/check_multipath
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/version b/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/version
new file mode 100644
index 0000000..9faa1b7
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_multipath/version
@@ -0,0 +1 @@
+0.1.5
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/Makefile
new file mode 100644
index 0000000..18da99f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/Makefile
@@ -0,0 +1,16 @@
+PLUGIN := check_mysql_health
+CLEANFILES := check_mysql_health
+
+include ../common.mk
+
+check_mysql_health:
+ set -e; for i in guess sub; do if [ ! -e src/config.$$i.bak ]; then cp src/config.$$i src/config.$$i.bak; fi; done
+ cp /usr/share/misc/config.* src
+ cd src && ./configure --prefix=/usr --enable-perfdata --enable-extendedinfo --with-nagios-user=nagios --with-nagios-group=nagios --with-statefiles-dir=/var/cache/nagios/ --with-mymodules-dir=/usr/lib/nagios/plugins/ --with-mymodules-dyn-dir=/usr/lib/nagios/plugins/
+ make -C src
+ cp src/plugins-scripts/check_mysql_health $@
+# sed '2s,^,# nagios: -epn\n,' src/plugins-scripts/check_mysql_health > $@
+
+clean::
+ [ ! -f src/Makefile ] || make -C src distclean
+ set -e; for i in guess sub; do if [ -e src/config.$$i.bak ]; then mv src/config.$$i.bak src/config.$$i; fi; done
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/AUTHORS b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/AUTHORS
new file mode 100755
index 0000000..6206f02
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/AUTHORS
@@ -0,0 +1 @@
+Gerhard Lausser <gerhard.lausser@consol.de>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/COPYING b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/COPYING
new file mode 100755
index 0000000..60549be
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/ChangeLog b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/ChangeLog
new file mode 100755
index 0000000..7792d9b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/ChangeLog
@@ -0,0 +1,83 @@
+* 2.2.2 2016-05-13
+ handle permission/syntax problems for mode sql
+* 2.2.1 2015-08-18
+ fix the autoconf m4, so the debian-builds don't fail (thanks Jan Wagner)
+* 2.2 2015-04-23
+ add rfc3986-encoded passwords
+* 2.1.9.2 2014-12-22
+ bugfix in InnoDB initialization & versions > 5.6.1 (Thanks Jorg Veit)
+* 2.1.9.1 2014-06-12
+ add connections_aborted, open_files to the pnp template (Thanks Simon Meggle)
+* 2.1.9 2014-06-12
+ bugfix in pnp template (Thanks Simon Meggle)
+ bugfix in qcache calculation (Thanks lermit)
+* 2.1.8.4 2014-04-01
+ implement --negate old_level=new_level
+ allow floating point numbers in thresholds
+* 2.1.8.3 2012-10-15
+ output also ok-messages for my-modes
+* 2.1.8.2 2012-08-08
+ bugfix in querycache-hitrate (div by 0 after db restart). (Thanks Gianluca Varisco)
+* 2.1.8.1 2012-01-21
+ bugfix in timeout-alarm handling under windows
+ fix warnings for newest perl versions
+* 2.1.8 2011-09-29
+ new parameters --mycnf and --mycnfgroup
+ single ticks around the --name argument under Windows CMD will be removed auto
+matically
+* 2.1.7 2011-08-23
+ innodb modes now detect problems with the innodb engine
+* 2.1.6 2011-08-12
+ fix a bug with statefilesdir and capital letters
+ add --labelformat so that groundwork no longer complains (max label length is 19 characters)
+* 2.1.5.2 2011-06-03
+ sites in an OMD (http://omdistro.org) environment have now private statefile directories
+* 2.1.5.1 2011-01-03
+ bugfix in --mode sql (numeric vs. regexp result)
+* 2.1.5 2010-12-20
+ fixed a division by zero bug in index-usage (Thanks Wiltmut Gerdes)
+ fixed a severe bug when loading dynamic extensions (Thanks Ralph Schneider)
+ added mode table-fragmentation
+ fixed a bug in table-lock-contention (thanks mayukmok00)
+ mode sql can now have a non-numerical output which is compared to a string/regexp
+ new parameter --dbthresholds
+ new mode report can be used to output only the bad news (short,long,html)
+* 2.1.4 2010-10-02
+ added modes threads-created, threads-running, threads-cached
+ added connects-aborted, clients-aborted
+* 2.1.3 2010-09-29
+ added mode open-files
+ fix a bug in the pnp template
+ add extra-opts
+* 2.1.2 2010-06-10
+ changed statements for 4.x compatibility (show variables like) (Thanks Florian)
+* 2.1.1 2010-03-30
+ added more tracing (touch /tmp/check_mysql_health.trace to watch)
+ fixed a bug in master-slave modes, so it outputs a more meaningful error message (Thanks Will Oberman)
+ fixed a typo (Thanks Larsen)
+* 2.1
+ parameter --lookback uses custom intervals for _now-values
+* 2.0.5 2009-09-21
+ fixed another bug in master-slave modes. (Thanks Thomas Mueller)
+ fixed a bug in bufferpool-wait-free. (Thanks Matthias Flacke)
+ fixed a bug in the PNP template. (Thanks Matthias Flacke)
+ slave-lag now handles failed io threads. (Thanks Greg)
+ fixed a bug in connections with non-standard sockets (Thanks Stephan Huiser)
+* 2.0.4
+ fixed a bug in --mode cluster-ndbd-running where dead api nodes were overseen
+ fixed a bug in master-slave modes. (Thanks Arkadiusz Miskiewicz)
+* 2.0.3
+ fixed a bug with 0 warning/critical
+ fixed a bug in long-running-procs (affects only mysql 5.0 and below). (Thanks Bodo Schulz)
+* 2.0.2
+ $NAGIOS__HOSTMYSQL_HOST etc. is now possible
+* 2.0.1 2009-03-09
+ fixed a (harmless) bug which caused uninitialized-messages. (Thanks John Alberts & Thomas Borger)
+ enabled password-less login to localhost.
+* 2.0 2009-03-06
+ This is the first release of the new plugin check_mysql_health
+ It replaces check_mysql_perf which is a nightmare to install
+ It is written in Perl
+ It can use either DBD::mysql, the mysql command or DBD::SQLrelay
+ It can monitor mysql clusters (the ndb stuff)
+ It can execute custom sql statements
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/INSTALL b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/INSTALL
new file mode 100755
index 0000000..6b31d1a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/INSTALL
@@ -0,0 +1,233 @@
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2008 Free Software
+Foundation, Inc.
+
+ This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory. After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
+Joerg
+=====
+
+Na, hast du alles brav durchgelesen?
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/Makefile.am b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/Makefile.am
new file mode 100755
index 0000000..a40a4a5
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/Makefile.am
@@ -0,0 +1,13 @@
+## Process this file with automake to produce Makefile.in
+
+# find . \( -type d -and -name .svn -and -prune \) -or -type f -exec fromdos -v {} \;
+
+SUBDIRS = plugins-scripts t
+EXTRA_DIST = contrib
+
+dist-hook:
+ rm -f t/var/tmp/*
+ rm -f t/var/adm/*
+ find $(distdir) -depth -name .svn -exec rm -rf {} \;
+ find $(distdir) -type f -exec fromdos -v {} \;
+ make
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/Makefile.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/Makefile.in
new file mode 100644
index 0000000..bcf3797
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/Makefile.in
@@ -0,0 +1,761 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# find . \( -type d -and -name .svn -and -prune \) -or -type f -exec fromdos -v {} \;
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
+ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) COPYING TODO \
+ config.guess config.sub install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAT = @CAT@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+GREP = @GREP@
+GZIP = @GZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_OPTS = @INSTALL_OPTS@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MYMODULES_DIR = @MYMODULES_DIR@
+MYMODULES_DYN_DIR = @MYMODULES_DYN_DIR@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+RELEASE = @RELEASE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SH = @SH@
+SHELL = @SHELL@
+STATEFILES_DIR = @STATEFILES_DIR@
+STRIP = @STRIP@
+SUPPORT = @SUPPORT@
+VERSION = @VERSION@
+WARRANTY = @WARRANTY@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+with_nagios_group = @with_nagios_group@
+with_nagios_user = @with_nagios_user@
+SUBDIRS = plugins-scripts t
+EXTRA_DIST = contrib
+all: all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
+
+dist-tarZ: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__post_remove_distdir)
+
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
+ && ../configure \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=.. --prefix="$$dc_install_base" \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__post_remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
+ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \
+ dist-zip distcheck distclean distclean-generic distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-am uninstall uninstall-am
+
+
+dist-hook:
+ rm -f t/var/tmp/*
+ rm -f t/var/adm/*
+ find $(distdir) -depth -name .svn -exec rm -rf {} \;
+ find $(distdir) -type f -exec fromdos -v {} \;
+ make
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/NEWS b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/NEWS
new file mode 100755
index 0000000..f235db6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/NEWS
@@ -0,0 +1 @@
+buy a newspaper if you want to read news
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/README b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/README
new file mode 100755
index 0000000..e98b9b3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/README
@@ -0,0 +1,140 @@
+check_mysql_health Nagios Plugin README
+---------------------
+
+This plugin is used to monitor a variety of mysql database metrics.
+
+* For instructions on installing this plugin for use with Nagios,
+ see below. In addition, generic instructions for the GNU toolchain
+ can be found in the INSTALL file.
+
+* For major changes between releases, read the CHANGES file.
+
+* For information on detailed changes that have been made,
+ read the Changelog file.
+
+* This plugin is self documenting. All plugins that comply with
+ the basic guidelines for development will provide detailed help when
+ invoked with the '-h' or '--help' options.
+
+You can check for the latest plugin at:
+ http://www.consol.com/opensource/nagios/check-mysql-health
+
+The documentation in this README covers only the most common features.
+To view the full documentation and examples, go to
+ http://www.consol.com/opensource/nagios/check-mysql-health or
+ http://www.consol.de/opensource/nagios/check-mysql-health
+
+Send mail to gerhard.lausser@consol.de for assistance.
+Please include the OS type/version and the Perl DBI/DBD version
+that you are using.
+Also, run the plugin with the '-vvv' option and provide the resulting
+version information. Of course, there may be additional diagnostic information
+required as well. Use good judgment.
+
+For patch submissions and bug reports, please send me a mail. You can also find
+me at http://www.nagios-portal.de
+
+
+
+
+How to "compile" the check_mysql_health script.
+--------------------------------------------------------
+
+1) Run the configure script to initialize variables and create a Makefile, etc.
+
+ ./configure --prefix=BASEDIRECTORY --with-nagios-user=SOMEUSER --with-nagios-group=SOMEGROUP --with-perl=PATH_TO_PERL --with-statefiles-dir=STATE_PATH
+
+ a) Replace BASEDIRECTORY with the path of the directory under which Nagios
+ is installed (default is '/usr/local/nagios')
+ b) Replace SOMEUSER with the name of a user on your system that will be
+ assigned permissions to the installed plugins (default is 'nagios')
+ c) Replace SOMEGRP with the name of a group on your system that will be
+ assigned permissions to the installed plugins (default is 'nagios')
+ d) Replace PATH_TO_PERL with the path where a perl binary can be found.
+ Besides the system wide perl you might have installed a private perl
+ just for the nagios plugins (default is the perl in your path).
+ e) Replace STATE_PATH with the directory where you want the script to
+ write state files which transport information from one run to the next.
+ (default is /tmp)
+
+ Simply running ./configure will be sufficient to create a check_mysql_health
+ script which you can customize later.
+
+
+2) "Compile" the plugin with the following command:
+
+ make
+
+ This will produce a "check_mysql_health" script. You will also find
+ a "check_mysql_health.pl" which you better ignore. It is the base for
+ the compilation filled with placeholders. These will be replaced during
+ the make process.
+
+
+3) Install the compiled plugin script with the following command:
+
+ make install
+
+ The installation procedure will attempt to place the plugin in a
+ 'libexec/' subdirectory in the base directory you specified with
+ the --prefix argument to the configure script.
+
+
+4) Verify that your configuration files for Nagios contains
+ the correct paths to the new plugin.
+
+
+Command line parameters
+-----------------------
+
+--hostname=<the mysql connect string>
+ This is what you would also use with tnsping and sqlplus.
+
+--username=<username>
+ This is the user which reads the system tables.
+
+--password=<secret>
+ This is the user's password.
+
+--mode=<operation mode>
+ This parameter tells the plugin what it should check.
+ The list of known modes may grow frequently. Please look at
+ http://www.consol.com/opensource/nagios/check-mysql-health for a list
+ of features.
+
+--replication-user=<username of replication user>
+ This is the username used to authenticated mysql replication, this is useful
+ with the longprocs mode where the replication users process is not counted as
+ a longrunning process.
+
+--warning=<warning threshold>
+ If the metric is out of this range, the plugin returns a warning.
+
+--critical=<critical threshold>
+ If the metric is out of this range, the plugin returns a critical.
+
+
+
+How to prepare the database for monitoring
+--------------------------------------
+
+GRANT USAGE ON *.* TO 'nagios'@'nagiosserver' IDENTIFIED BY 'nagiospassword';
+
+--------------------------------------
+
+That's it. If you have any problems or questions, feel free to send mail
+to gerhard.lausser@consol.de
+
+Please do not send me a mail like this:
+
++-------------------------------------------------+
+| I need monitor of database urgent. Please help. |
+| Suresh |
++-------------------------------------------------+
+
+I will answer you:
+
++-------------------------------------------------+
+| A drumm Schelln konnst hom |
+| Gerhard |
++-------------------------------------------------+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/TODO b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/TODO
new file mode 100755
index 0000000..1f04b23
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/TODO
@@ -0,0 +1,3 @@
+a lot
+
+http://blog.it4sport.de/2010/10/10/optimize-table-fallig/
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/acinclude.m4 b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/acinclude.m4
new file mode 100755
index 0000000..efc8cad
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/acinclude.m4
@@ -0,0 +1,734 @@
+# generated automatically by aclocal 1.14 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.65])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+# @synopsis ACX_FEATURE(ENABLE_OR_WITH,NAME[,VALUE])
+AC_DEFUN([ACX_FEATURE],
+ [echo "builtin([substr],[ ],len(--$1-$2))--$1-$2: ifelse($3,,[$]translit($1-$2,-,_),$3)"])
+
+# @synopsis ACX_HELP_STRING(OPTION,DESCRIPTION)
+AC_DEFUN([ACX_HELP_STRING],
+ [ $1 builtin([substr],[ ],len($1))[$2]])
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/aclocal.m4 b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/aclocal.m4
new file mode 100644
index 0000000..96f193a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/aclocal.m4
@@ -0,0 +1,128 @@
+# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.14'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.14.1], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.14.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+ [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+ am_maintainer_other[ make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer])],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+m4_include([acinclude.m4])
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/config.guess b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/config.guess
new file mode 100755
index 0000000..b79252d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/config.guess
@@ -0,0 +1,1558 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-06-10'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ or1k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+esac
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/config.sub b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/config.sub
new file mode 100755
index 0000000..8b612ab
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/config.sub
@@ -0,0 +1,1788 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-04-24'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
+ | ns16k | ns32k \
+ | open8 \
+ | or1k | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* | -plan9* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or1k-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/configure b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/configure
new file mode 100755
index 0000000..36d070f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/configure
@@ -0,0 +1,4190 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for check_mysql_health 2.2.2.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='check_mysql_health'
+PACKAGE_TARNAME='check_mysql_health'
+PACKAGE_VERSION='2.2.2'
+PACKAGE_STRING='check_mysql_health 2.2.2'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_default_prefix=/usr/local/nagios
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+GZIP
+PERL
+SH
+CAT
+GREP
+SED
+ECHO
+INSTALL
+MYMODULES_DYN_DIR
+MYMODULES_DIR
+STATEFILES_DIR
+INSTALL_OPTS
+with_nagios_group
+with_nagios_user
+SUPPORT
+WARRANTY
+RELEASE
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_maintainer_mode
+with_nagios_user
+with_nagios_group
+with_statefiles_dir
+with_mymodules_dir
+with_mymodules_dyn_dir
+with_perl
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures check_mysql_health 2.2.2 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root
+ [DATAROOTDIR/doc/check_mysql_health]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of check_mysql_health 2.2.2:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-maintainer-mode
+ enable make rules and dependencies not useful (and
+ sometimes confusing) to the casual installer
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-nagios-user=USER set user name to run nagios
+ --with-nagios-group=GROUP set group name to run nagios
+ --with-statefiles-dir=PATH sets directory for the state files (default=/var/tmp/check_mysql_health)
+ --with-mymodules-dir=PATH sets directory for own extensions which will be included during the build process (default=/usr/local/nagios/libexec)
+ --with-mymodules-dyn-dir=PATH sets directory for own extensions which will be included at runtime (default=/usr/local/nagios/libexec)
+ --with-perl=PATH sets path to perl executable
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+check_mysql_health configure 2.2.2
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by check_mysql_health $as_me 2.2.2, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+am__api_version='1.14'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='check_mysql_health'
+ VERSION='2.2.2'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5
+$as_echo_n "checking how to create a pax tar archive... " >&6; }
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_pax-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ { echo "$as_me:$LINENO: $_am_tar --version" >&5
+ ($_am_tar --version) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && break
+ done
+ am__tar="$_am_tar --format=posix -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=posix -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x pax -w "$$tardir"'
+ am__tar_='pax -L -x pax -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H pax -L'
+ am__tar_='find "$tardir" -print | cpio -o -H pax -L'
+ am__untar='cpio -i -H pax -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_pax}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
+ (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
+ ($am__untar <conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
+ (cat conftest.dir/file) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ if ${am_cv_prog_tar_pax+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ am_cv_prog_tar_pax=$_am_tool
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5
+$as_echo "$am_cv_prog_tar_pax" >&6; }
+
+
+
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+RELEASE=1
+
+
+
+
+WARRANTY="This plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugin under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n"
+
+
+SUPPORT="Send email to gerhard.lausser@consol.de if you have questions\nregarding use of this software.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n"
+
+
+
+# Check whether --with-nagios_user was given.
+if test "${with_nagios_user+set}" = set; then :
+ withval=$with_nagios_user; with_nagios_user=$withval
+else
+ with_nagios_user=nagios
+fi
+
+
+# Check whether --with-nagios_group was given.
+if test "${with_nagios_group+set}" = set; then :
+ withval=$with_nagios_group; with_nagios_group=$withval
+else
+ with_nagios_group=nagios
+fi
+
+
+
+INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group"
+
+
+
+# Check whether --with-statefiles_dir was given.
+if test "${with_statefiles_dir+set}" = set; then :
+ withval=$with_statefiles_dir; with_statefiles_dir=$withval
+else
+ with_statefiles_dir=/var/tmp/check_mysql_health
+fi
+
+STATEFILES_DIR=$with_statefiles_dir
+
+echo variable with_statefiles_dir is $with_statefiles_dir
+
+
+# Check whether --with-mymodules_dir was given.
+if test "${with_mymodules_dir+set}" = set; then :
+ withval=$with_mymodules_dir; with_mymodules_dir=$withval
+else
+ with_mymodules_dir=/usr/local/nagios/libexec
+fi
+
+MYMODULES_DIR=$with_mymodules_dir
+
+echo variable with_mymodules_dir is $with_mymodules_dir
+
+
+# Check whether --with-mymodules_dyn_dir was given.
+if test "${with_mymodules_dyn_dir+set}" = set; then :
+ withval=$with_mymodules_dyn_dir; with_mymodules_dyn_dir=$withval
+else
+ with_mymodules_dyn_dir=/usr/local/nagios/libexec
+fi
+
+MYMODULES_DYN_DIR=$with_mymodules_dyn_dir
+
+echo variable with_mymodules_dyn_dir is $with_mymodules_dyn_dir
+
+
+EXTRAS=
+# PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH
+
+
+# Checks for programs.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Figure out how to invoke "install" and what install options to use.
+
+
+# Extract the first word of "echo", so it can be a program name with args.
+set dummy echo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ECHO+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ECHO in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ECHO=$ac_cv_path_ECHO
+if test -n "$ECHO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
+$as_echo "$ECHO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "sed", so it can be a program name with args.
+set dummy sed; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $SED in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SED="$SED" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+SED=$ac_cv_path_SED
+if test -n "$SED"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
+$as_echo "$SED" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "grep", so it can be a program name with args.
+set dummy grep; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GREP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GREP=$ac_cv_path_GREP
+if test -n "$GREP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
+$as_echo "$GREP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "cat", so it can be a program name with args.
+set dummy cat; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CAT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CAT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+CAT=$ac_cv_path_CAT
+if test -n "$CAT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
+$as_echo "$CAT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "sh", so it can be a program name with args.
+set dummy sh; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SH+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $SH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SH="$SH" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+SH=$ac_cv_path_SH
+if test -n "$SH"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
+$as_echo "$SH" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PERL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "gzip", so it can be a program name with args.
+set dummy gzip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GZIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GZIP=$ac_cv_path_GZIP
+if test -n "$GZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
+$as_echo "$GZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+for ac_prog in gawk nawk /usr/xpg4/bin/awk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $AWK in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+AWK=$ac_cv_path_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+# allow them to override the path of perl
+
+# Check whether --with-perl was given.
+if test "${with_perl+set}" = set; then :
+ withval=$with_perl; with_perl=$withval
+else
+ with_perl=$PERL
+fi
+
+PERL=$with_perl
+
+
+# Checks for libraries.
+
+# Checks for header files.
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+
+ac_config_files="$ac_config_files Makefile plugins-scripts/Makefile plugins-scripts/subst t/Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by check_mysql_health $as_me 2.2.2, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+check_mysql_health config.status 2.2.2
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "plugins-scripts/Makefile") CONFIG_FILES="$CONFIG_FILES plugins-scripts/Makefile" ;;
+ "plugins-scripts/subst") CONFIG_FILES="$CONFIG_FILES plugins-scripts/subst" ;;
+ "t/Makefile") CONFIG_FILES="$CONFIG_FILES t/Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES "
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+
+ esac
+
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+echo " --with-perl: $with_perl"
+echo " --with-statefiles-dir: $with_statefiles_dir"
+echo " --with-nagios-user: $with_nagios_user"
+echo " --with-nagios-group: $with_nagios_group"
+echo " --with-mymodules-dir: $with_mymodules_dir"
+echo " --with-mymodules-dyn-dir: $with_mymodules_dyn_dir"
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/configure.ac b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/configure.ac
new file mode 100755
index 0000000..c4bf9a4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/configure.ac
@@ -0,0 +1,103 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT(check_mysql_health,2.2.2)
+AM_INIT_AUTOMAKE([1.9 tar-pax])
+AM_MAINTAINER_MODE([disable])
+AC_CANONICAL_HOST
+RELEASE=1
+AC_SUBST(RELEASE)
+
+AC_PREFIX_DEFAULT(/usr/local/nagios)
+
+WARRANTY="This plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugin under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n"
+AC_SUBST(WARRANTY)
+
+SUPPORT="Send email to gerhard.lausser@consol.de if you have questions\nregarding use of this software.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n"
+AC_SUBST(SUPPORT)
+
+AC_ARG_WITH(nagios_user,
+ ACX_HELP_STRING([--with-nagios-user=USER],
+ [set user name to run nagios]),
+ with_nagios_user=$withval,
+ with_nagios_user=nagios)
+AC_ARG_WITH(nagios_group,
+ ACX_HELP_STRING([--with-nagios-group=GROUP],
+ [set group name to run nagios]),
+ with_nagios_group=$withval,
+ with_nagios_group=nagios)
+AC_SUBST(with_nagios_user)
+AC_SUBST(with_nagios_group)
+INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group"
+AC_SUBST(INSTALL_OPTS)
+
+AC_ARG_WITH(statefiles_dir,
+ ACX_HELP_STRING([--with-statefiles-dir=PATH],
+ [sets directory for the state files (default=/var/tmp/check_mysql_health)]),
+ with_statefiles_dir=$withval,
+ with_statefiles_dir=/var/tmp/check_mysql_health)
+AC_SUBST(STATEFILES_DIR, $with_statefiles_dir)
+echo variable with_statefiles_dir is $with_statefiles_dir
+
+AC_ARG_WITH(mymodules_dir,
+ ACX_HELP_STRING([--with-mymodules-dir=PATH],
+ [sets directory for own extensions which will be included during the build process (default=/usr/local/nagios/libexec)]),
+ with_mymodules_dir=$withval,
+ with_mymodules_dir=/usr/local/nagios/libexec)
+AC_SUBST(MYMODULES_DIR, $with_mymodules_dir)
+echo variable with_mymodules_dir is $with_mymodules_dir
+
+AC_ARG_WITH(mymodules_dyn_dir,
+ ACX_HELP_STRING([--with-mymodules-dyn-dir=PATH],
+ [sets directory for own extensions which will be included at runtime (default=/usr/local/nagios/libexec)]),
+ with_mymodules_dyn_dir=$withval,
+ with_mymodules_dyn_dir=/usr/local/nagios/libexec)
+AC_SUBST(MYMODULES_DYN_DIR, $with_mymodules_dyn_dir)
+echo variable with_mymodules_dyn_dir is $with_mymodules_dyn_dir
+
+
+EXTRAS=
+# PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH
+
+
+# Checks for programs.
+AC_PROG_MAKE_SET
+# Figure out how to invoke "install" and what install options to use.
+AC_PROG_INSTALL
+AC_SUBST(INSTALL)
+AC_PATH_PROG(ECHO,echo)
+AC_PATH_PROG(SED,sed)
+AC_PATH_PROG(GREP,grep)
+AC_PATH_PROG(CAT,cat)
+AC_PATH_PROG(SH,sh)
+AC_PATH_PROG(PERL,perl)
+AC_PATH_PROG(GZIP,gzip)
+AC_PATH_PROGS(AWK,gawk nawk /usr/xpg4/bin/awk awk)
+# allow them to override the path of perl
+AC_ARG_WITH(perl,
+ ACX_HELP_STRING([--with-perl=PATH],
+ [sets path to perl executable]),
+ with_perl=$withval,with_perl=$PERL)
+AC_SUBST(PERL, $with_perl)
+
+# Checks for libraries.
+
+# Checks for header files.
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+
+AC_CONFIG_FILES([Makefile
+ plugins-scripts/Makefile
+ plugins-scripts/subst
+ t/Makefile])
+AC_OUTPUT
+ACX_FEATURE([with],[perl])
+ACX_FEATURE([with],[statefiles-dir])
+ACX_FEATURE([with],[nagios-user])
+ACX_FEATURE([with],[nagios-group])
+ACX_FEATURE([with],[mymodules-dir])
+ACX_FEATURE([with],[mymodules-dyn-dir])
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/contrib/CheckMySQLHealthExt1.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/contrib/CheckMySQLHealthExt1.pm
new file mode 100755
index 0000000..c5bb9d3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/contrib/CheckMySQLHealthExt1.pm
@@ -0,0 +1,68 @@
+package MyQueue;
+
+our @ISA = qw(DBD::MySQL::Server);
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ $self->{running} = 0;
+ $self->{waiting} = 0;
+ $self->{held} = 20;
+ $self->{cancelled} = 0;
+ $self->{length} = 100;
+ if ($params{mode} =~ /my::queue::status/) {
+ ($self->{running}, $self->{waiting}, $self->{held}, $self->{cancelled}) =
+ $self->{handle}->fetchrow_array(q{
+ SELECT COUNT(*) FROM queues WHERE
+ status IN ('running', 'waiting', 'held', 'cancelled')
+ GROUP BY status
+ });
+ } elsif ($params{mode} =~ /my::queue::length/) {
+ $self->{length} = $self->{handle}->fetchrow_array(q{
+ SELECT COUNT(*) FROM queues
+ });
+ } elsif ($params{mode} =~ /my::queue::througput/) {
+ $self->{processed_items} = $self->{handle}->fetchrow_array(q{
+ SELECT processed FROM queue_status
+ });
+ $self->valdiff(\%params, qw(processed_items));
+ # this automatically creates
+ # $self->{delta_timestamp}
+ # the time in seconds since the last run of check_mysql_health
+ # $self->{delta_processed_items}
+ # the difference between processed_items now and
+ # processed_items when check_mysql_health was run last time
+ $self->{throughput} = $self->{delta_processed_items} / $self->{delta_timestamp};
+ } else {
+ }
+}
+
+sub nagios {
+ my $self = shift;
+ my %params = @_;
+ if ($params{mode} =~ /my::queue::status/) {
+ if ($self->{held} > 10 || $self->{cancelled} > 10) {
+ $self->add_nagios_critical("more than 10 queues are held or cancelled");
+ } elsif ($self->{waiting} > 20 && $self->{running} < 3) {
+ $self->add_nagios_warning("more than 20 queues are waiting and less than 3 queues are running");
+ } else {
+ $self->add_nagios_ok("queues are running normal");
+ }
+ $self->add_perfdata(sprintf "held=%d cancelled=%d waiting=%d running=%d",
+ $self->{running}, $self->{waiting}, $self->{held}, $self->{cancelled});
+ } elsif ($params{mode} =~ /my::queue::length/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{length}, 100, 500),
+ sprintf "queue length is %d", $self->{length});
+ $self->add_perfdata(sprintf "queuelen=%d;%d;%d",
+ $self->{length}, $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~ /my::queue::througput/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{throughput}, "50:", "10:"),
+ sprintf "queue throughput is %d", $self->{throughput});
+ $self->add_perfdata(sprintf "throughput=%.2f;%d;%d",
+ $self->{throughput}, $self->{warningrange}, $self->{criticalrange});
+ } else {
+ $self->add_nagios_unknown("unknown mode");
+ }
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/contrib/README.my-extensions b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/contrib/README.my-extensions
new file mode 100755
index 0000000..92aec08
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/contrib/README.my-extensions
@@ -0,0 +1,139 @@
+# you will find instructions how to write extensions here
+
+Self-written code is addressed by using a mode which starts with my-
+--mode=my-thing-does ?
+
+check_mysql_health will then look for a package named MyThing.
+
+So you first have to write a Module which describes MyThing. Such a thing iinherits from DBD::MySQL::Server and needs two methods: init and nagios.
+
+Start with a file called CheckMySQLHealthExt1.pm and skeleton code:
+
+###################################################
+package MyThing;
+
+our @ISA = qw(DBD::MySQL::Server);
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+}
+
+sub nagios {
+ my $self = shift;
+ my %params = @_;
+}
+###################################################
+
+When you call check_mysql_health with --mode=my-thing-does, it will
+- create a DBD::MySQL::Server object
+ $obj = DBD::MySQL::Server->new()
+- connect to the database
+ $obj->connect()
+- re-bless the object
+ bless $obj, "MyThing"
+- call $obj->init()
+- if that was ok, call $obj->nagios()
+
+
+So you need to write code which
+- initializes the parameters you want to check
+- calculates the nagios result from these parameters
+
+For your convenience there are some predefined methods and variables:
+
+Variable $self
+ $self is a hash-based object of type My::Thing
+ You can pass metrics from the init() method to the nagios() method by
+ adding attributes to the hash.
+ One important predefined attribute is $self->{handle} which points to
+ a database Connection object. You surely will use this.
+
+Variable %params
+ $params{mode} contains the string you passed to the
+ --mode command line parameter, only with the "-" replaced by "::".
+ In the above example it will be "my::thing::does".
+ Because you can have only one init() method for your MyThing object but
+ more than one related modes (my-thing-does, my-thing-length, my-thing-rate)
+ you use $params{mode} for branching in your code. (see the example file)
+
+Method add_nagios
+ $self->add_nagios(1, "i warn you");
+ This method can be called several times. The messages will be concatenated.
+ The first parameter is one of 0..3 and sets the nagios level. The worst level
+ among several calls to add_nagios will determine the plugin's exit code.
+
+Method add_nagios_[ok|warning|critical|unknown]
+ $self->add_nagios_critical("i warned you!!! now it's too late");
+ $self->add_nagios_ok("everything is ok. i am the exit message");
+ These methods are wrappers for add_nagios which make your code more readable.
+
+Method add_perfdata
+ $self->add_perfdata("metric1=0 metric2=100");
+ $self->add_perfdata("metric3=0);
+ $self->add_perfdata(sprintf "metric_xy=%d", $self->{xy});
+ You can call add_perfdata as often as you like.
+ The strings will be concatenated.
+
+Method valdiff
+ $self->valdiff(\%params, qw(metric1 metric2));
+ Use this if you want to know how a metric has changed since the last run
+ of check_mysql_health.
+ Provided you have attributes metric1 and metric2 this method will create
+ new attributes for your $self object.
+ $self->{delta_metric1} which is the difference between the value of
+ $self->{metric1} during the current run and $self->{metric1} during the
+ last run.
+ $self->{delta_timestamp} which is the number of seconds which passed
+ since the last run of check_mysql_health.
+ If you have ever-growing values, you can simply calculate the rate:
+ $self->{metric1_per_second} = $self->{delta_metric1} / $self->{delta_timestamp}
+ The valdiff method will automatically save the current value to a state file
+ and read the past value from this file.
+ If you used the --name parameter which appears as $params{name} in your code
+ then you probably need to separate the saved values from each other. Otherwise
+ name1 would read the same saved value as name2. They would overwrite the
+ saved values. Use $params{differentiator} to use different state files.
+ $params{differenciator} = lc $self->{name};
+ $self->valdiff(\%params, qw(gets misses));
+
+Method fetchrow_array
+ my($column1, $column2) = $self->{handle}->fetchrow_array(q{
+ SELECT col1, col2 FROM table1 where col1 = 'val1'
+ });
+ $self->{connected_users} = $self->{handle}->fetchrow_array(q{
+ SELECT COUNT(*) FROM v$session WHERE type = 'USER'
+ });
+ This method is used like the Perl DBI method fetchrow_array.
+
+
+Method fetchall_array
+ my @results = $self->{handle}->fetchall_array(q{
+ SELECT col1, col2, col3 FROM table1
+ });
+ foreach (@results) {
+ my($column1, $column2, $column3) = @{$_};
+ ...
+ }
+ This method is used like the Perl DBI method fetchall_array.
+
+
+
+
+Now you have written your first extension to check_mysql_health. Maybe you
+just modified the example file contrib/CheckMySQLHealthExt1.pm
+There are two methods how to import your own code into check_mysql_health:
+
+- the static method
+with ./configure --with-mymodules-dir=<dir> parameter you build a plugin which
+contains both my code and your code in a single file. When you call "make"
+every file in <dir> which matches CheckMySQLHealthExt*.pm is appended
+to the final plugin check_mysql_health.
+
+- the dynamic method
+with ./configure --with-mymodules-dyn-dir=<dir> you build a plugin which will
+search at runtime the <dir> for files matching CheckMySQLHealthExt*.pm and
+import them. This way you can have different extensions on different hosts.
+You also can modify your extension without having to rebuild the plugin.
+On the other hand you have to distribute your extensions along with the plugin.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/contrib/check_mysql_health.php b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/contrib/check_mysql_health.php
new file mode 100755
index 0000000..8bcd516
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/contrib/check_mysql_health.php
@@ -0,0 +1,370 @@
+<?php
+#
+# Copyright (c) 2009 Gerhard Lausser (gerhard.lausser@consol.de)
+# Plugin: check_mysql_health (http://www.consol.com/opensource/nagios/check-mysql-health)
+# Release 1.0 2009-03-02
+#
+# This is a template for the visualisation addon PNP (http://www.pnp4nagios.org)
+#
+
+$defcnt = 1;
+
+$green = "33FF00E0";
+$yellow = "FFFF00E0";
+$red = "F83838E0";
+$now = "FF00FF";
+$ds_count = count($DS);
+
+for ($i = 1; $i <= $ds_count; $i++) {
+ $warning = ($WARN[$i] != "") ? $WARN[$i] : "";
+ $warnmin = ($WARN_MIN[$i] != "") ? $WARN_MIN[$i] : "";
+ $warnmax = ($WARN_MAX[$i] != "") ? $WARN_MAX[$i] : "";
+ $critical = ($CRIT[$i] != "") ? $CRIT[$i] : "";
+ $critmin = ($CRIT_MIN[$i] != "") ? $CRIT_MIN[$i] : "";
+ $critmax = ($CRIT_MAX[$i] != "") ? $CRIT_MAX[$i] : "";
+ $minimum = ($MIN[$i] != "") ? $MIN[$i] : "";
+ $maximum = ($MAX[$i] != "") ? $MAX[$i] : "";
+
+ if(preg_match('/^pct_open_files$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Open Files Usage";
+ $opt[$defcnt] = "--vertical-label \"Percent\" --title \"Open files usage on $hostname\" --upper-limit 100 --lower-limit 0";
+ $def[$defcnt] = "";
+ $def[$defcnt] .= "DEF:openfiles_pct=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "AREA:openfiles_pct#111111:\" \" ";
+ $def[$defcnt] .= "VDEF:vopenfiles=openfiles_pct,LAST " ;
+ $def[$defcnt] .= "GPRINT:vopenfiles:\"Open files usage is %3.2lf percent\\n\" " ;
+ $defcnt++;
+ }
+ if(preg_match('/^connects_aborted_per_sec$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Aborted connections per second";
+ $opt[$defcnt] = "--vertical-label \"Seconds\" --title \"Aborted connections per second on $hostname\" ";
+ $def[$defcnt] = "";
+ $def[$defcnt] .= "DEF:aborted_conn=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "AREA:aborted_conn#444444:\" \" ";
+ $def[$defcnt] .= "VDEF:vaborted_conn=aborted_conn,LAST " ;
+ $def[$defcnt] .= "GPRINT:vaborted_conn:\"Aborted connections per sec is %3.2lf \\n\" " ;
+ $defcnt++;
+ }
+ if(preg_match('/^connection_time$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Time to connect";
+ $opt[$defcnt] = "--vertical-label \"Seconds\" --title \"Time to establish a connection to $hostname\" ";
+ $def[$defcnt] = "";
+ $def[$defcnt] .= "DEF:connectiontime=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "AREA:connectiontime#111111 ";
+ $def[$defcnt] .= "VDEF:vconnetiontime=connectiontime,LAST " ;
+ $def[$defcnt] .= "GPRINT:vconnetiontime:\"is %3.2lf Seconds \" " ;
+ $defcnt++;
+ }
+ if(preg_match('/^uptime$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Uptime";
+ $opt[$defcnt] = "--vertical-label \"Seconds\" --title \"Uptime of the database at $hostname\" ";
+ $def[$defcnt] = "";
+ $def[$defcnt] .= "DEF:uptime=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "AREA:uptime#111111 ";
+ $def[$defcnt] .= "CDEF:uptimed=uptime,86400,/ " ;
+ $def[$defcnt] .= "CDEF:uptimew=uptimed,7,/ " ;
+ $def[$defcnt] .= "VDEF:vuptime=uptime,LAST " ;
+ $def[$defcnt] .= "VDEF:vuptimed=uptimed,LAST " ;
+ $def[$defcnt] .= "VDEF:vuptimew=uptimew,LAST " ;
+ $def[$defcnt] .= "GPRINT:vuptime:\"%.0lf Seconds \" " ;
+ $def[$defcnt] .= "GPRINT:vuptimed:\"%.0lf Days \" " ;
+ $def[$defcnt] .= "GPRINT:vuptimew:\"%.0lf Weeks \" " ;
+ $defcnt++;
+ }
+ if(preg_match('/^index_usage_now$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Index usage";
+ $opt[$defcnt] = "--vertical-label \"Percent\" --title \"Index usage $hostname\" --upper-limit 100 --lower-limit 0 ";
+ $def[$defcnt] = "";
+ for ($ii = 1; $ii <= $ds_count; $ii++) {
+ if(preg_match('/^index_usage$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:indexusage=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "CDEF:ar=indexusage,$CRIT_MIN[$ii],LE,indexusage,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,indexusage,0,IF ";
+ $def[$defcnt] .= "CDEF:ay=indexusage,$WARN_MIN[$ii],LE,indexusage,$CRIT_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,indexusage,0,IF ";
+ $def[$defcnt] .= "CDEF:ag=indexusage,100,LE,indexusage,$WARN_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,indexusage,0,IF ";
+ $def[$defcnt] .= "AREA:ag#$green: " ;
+ $def[$defcnt] .= "AREA:ay#$yellow: " ;
+ $def[$defcnt] .= "AREA:ar#$red: " ;
+ $def[$defcnt] .= "LINE:indexusage#111111:\" \" ";
+ $def[$defcnt] .= "VDEF:vindexusage=indexusage,LAST " ;
+ $def[$defcnt] .= "GPRINT:vindexusage:\"Index usage (since epoch) is %3.2lf percent\\n\" " ;
+ }
+ if(preg_match('/^index_usage_now$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:indexusagenow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "LINE1.5:indexusagenow#$now:\" \" ";
+ $def[$defcnt] .= "VDEF:vindexusagenow=indexusagenow,LAST " ;
+ $def[$defcnt] .= "GPRINT:vindexusagenow:\"Index usage (current) is %3.2lf percent\\n\" ";
+ }
+ }
+ $defcnt++;
+ }
+ if(preg_match('/^bufferpool_hitrate_now$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Innodb buffer pool hitrate";
+ $opt[$defcnt] = "--vertical-label \"Percent\" --title \"Innodb buffer pool hitrate on $hostname\" --upper-limit 100 --lower-limit 0 ";
+ $def[$defcnt] = "";
+ for ($ii = 1; $ii <= $ds_count; $ii++) {
+ if(preg_match('/^bufferpool_hitrate$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:hitrate=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "CDEF:ar=hitrate,$CRIT_MIN[$ii],LE,hitrate,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "CDEF:ay=hitrate,$WARN_MIN[$ii],LE,hitrate,$CRIT_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "CDEF:ag=hitrate,100,LE,hitrate,$WARN_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "AREA:ag#$green: " ;
+ $def[$defcnt] .= "AREA:ay#$yellow: " ;
+ $def[$defcnt] .= "AREA:ar#$red: " ;
+ $def[$defcnt] .= "LINE1.5:hitrate#111111:\" \" ";
+ $def[$defcnt] .= "VDEF:vhitrate=hitrate,LAST " ;
+ $def[$defcnt] .= "GPRINT:vhitrate:\"Hitratio (since epoch) is %3.2lf percent \\n\" ";
+ }
+ if(preg_match('/^bufferpool_hitrate_now$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:hitratenow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "LINE1.5:hitratenow#$now:\" \" ";
+ $def[$defcnt] .= "VDEF:vhitratenow=hitratenow,LAST " ;
+ $def[$defcnt] .= "GPRINT:vhitratenow:\"Hitratio (current) is %3.2lf percent \\n\" ";
+ }
+ }
+ $defcnt++;
+ }
+ if(preg_match('/^bufferpool_free_waits_rate$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Innodb buffer pool waits rate";
+ $opt[$defcnt] = "--vertical-label \"Waits/sec\" --title \"Innodb buffer pool waits on $hostname\" ";
+ $def[$defcnt] = "";
+ $def[$defcnt] .= "DEF:logwait=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "AREA:logwait#111111 ";
+ $def[$defcnt] .= "VDEF:vlogwait=logwait,LAST " ;
+ $def[$defcnt] .= "GPRINT:vlogwait:\"Rate is %3.2lf Waits / Second \" " ;
+ $defcnt++;
+ }
+ if(preg_match('/^innodb_log_waits_rate$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Innodb log buffer waits rate";
+ $opt[$defcnt] = "--vertical-label \"Waits/sec\" --title \"Innodb waits for log buffer $hostname\" ";
+ $def[$defcnt] = "";
+ $def[$defcnt] .= "DEF:logwait=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "AREA:logwait#111111 ";
+ $def[$defcnt] .= "VDEF:vlogwait=logwait,LAST " ;
+ $def[$defcnt] .= "GPRINT:vlogwait:\"Rate is %3.2lf Waits / Second \" " ;
+ $defcnt++;
+ }
+ if(preg_match('/^long_running_procs$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Long running processes";
+ $opt[$defcnt] = "--vertical-label \"Processes\" --title \"Long running processes (>60s) on $hostname\" ";
+ $def[$defcnt] = "";
+ $def[$defcnt] .= "DEF:longrun=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "AREA:longrun#111111 ";
+ $def[$defcnt] .= "VDEF:vlongrun=longrun,LAST " ;
+ $def[$defcnt] .= "GPRINT:vlongrun:\"%.0lf long running processes \" " ;
+ $defcnt++;
+ }
+ if(preg_match('/^keycache_hitrate_now$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "MyISAM key cache hitrate";
+ $opt[$defcnt] = "--vertical-label \"Percent\" --title \"MyISAM key cache hitrate on $hostname\" --upper-limit 100 --lower-limit 0 ";
+ $def[$defcnt] = "";
+ for ($ii = 1; $ii <= $ds_count; $ii++) {
+ if(preg_match('/^keycache_hitrate$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:hitrate=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "CDEF:ar=hitrate,$CRIT_MIN[$ii],LE,hitrate,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "CDEF:ay=hitrate,$WARN_MIN[$ii],LE,hitrate,$CRIT_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "CDEF:ag=hitrate,100,LE,hitrate,$WARN_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "AREA:ag#$green: " ;
+ $def[$defcnt] .= "AREA:ay#$yellow: " ;
+ $def[$defcnt] .= "AREA:ar#$red: " ;
+ $def[$defcnt] .= "LINE1.5:hitrate#111111:\" \" ";
+ $def[$defcnt] .= "VDEF:vhitrate=hitrate,LAST " ;
+ $def[$defcnt] .= "GPRINT:vhitrate:\"Hitratio (since epoch) is %3.2lf percent \\n\" ";
+ }
+ if(preg_match('/^keycache_hitrate_now$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:hitratenow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "LINE1.5:hitratenow#$now:\" \" ";
+ $def[$defcnt] .= "VDEF:vhitratenow=hitratenow,LAST " ;
+ $def[$defcnt] .= "GPRINT:vhitratenow:\"Hitratio (current) is %3.2lf percent \\n\" ";
+ }
+ }
+ $defcnt++;
+ }
+ if(preg_match('/^qcache_hitrate_now$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Query cache hitrate";
+ $opt[$defcnt] = "--vertical-label \"Percent\" --title \"Query cache hitrate on $hostname\" --upper-limit 100 --lower-limit 0 ";
+ $def[$defcnt] = "";
+ for ($ii = 1; $ii <= $ds_count; $ii++) {
+ if(preg_match('/^qcache_hitrate$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:hitrate=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "CDEF:ar=hitrate,$CRIT_MIN[$ii],LE,hitrate,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "CDEF:ay=hitrate,$WARN_MIN[$ii],LE,hitrate,$CRIT_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "CDEF:ag=hitrate,100,LE,hitrate,$WARN_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "AREA:ag#$green: " ;
+ $def[$defcnt] .= "AREA:ay#$yellow: " ;
+ $def[$defcnt] .= "AREA:ar#$red: " ;
+ $def[$defcnt] .= "LINE1.5:hitrate#111111:\" \" ";
+ $def[$defcnt] .= "VDEF:vhitrate=hitrate,LAST " ;
+ $def[$defcnt] .= "GPRINT:vhitrate:\"Hitratio (since epoch) is %3.2lf percent \\n\" ";
+ }
+ if(preg_match('/^qcache_hitrate_now$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:hitratenow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "LINE1.5:hitratenow#$now:\" \" ";
+ $def[$defcnt] .= "VDEF:vhitratenow=hitratenow,LAST " ;
+ $def[$defcnt] .= "GPRINT:vhitratenow:\"Hitratio (current) is %3.2lf percent \\n\" ";
+ }
+ }
+ $defcnt++;
+ $ds_name[$defcnt] = "Selects per second";
+ $opt[$defcnt] = "--vertical-label \"Selects / sec\" --title \"Selects per second on $hostname\" ";
+ $def[$defcnt] = "";
+ for ($ii = 1; $ii <= $ds_count; $ii++) {
+ if(preg_match('/^selects_per_sec$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:sps=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "AREA:sps#$now:\" \" ";
+ $def[$defcnt] .= "VDEF:vsps=sps,LAST " ;
+ $def[$defcnt] .= "GPRINT:vsps:\"%3.2lf Selects per second \\n\" ";
+ }
+ }
+ $defcnt++;
+ }
+ if(preg_match('/^qcache_lowmem_prunes_rate$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Query cache low memory prunes";
+ $opt[$defcnt] = "--vertical-label \"Prunes / sec\" --title \"Query cache low mem prunes on $hostname\" ";
+ $def[$defcnt] = "";
+ $def[$defcnt] .= "DEF:prunes=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "AREA:prunes#111111 ";
+ $def[$defcnt] .= "VDEF:vprunes=prunes,LAST " ;
+ $def[$defcnt] .= "GPRINT:vprunes:\"Rate is %3.2lf Prunes / Second \" " ;
+ $defcnt++;
+ }
+ if(preg_match('/^slow_queries_rate$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Slow query rate";
+ $opt[$defcnt] = "--vertical-label \"Slow queries / sec\" --title \"Slow queries on $hostname\" ";
+ $def[$defcnt] = "";
+ $def[$defcnt] .= "DEF:prunes=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "AREA:prunes#111111 ";
+ $def[$defcnt] .= "VDEF:vprunes=prunes,LAST " ;
+ $def[$defcnt] .= "GPRINT:vprunes:\"%3.2lf Slow queries / Second \" " ;
+ $defcnt++;
+ }
+ if(preg_match('/^tablelock_contention_now$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Table lock contention";
+ # set upper limit to 10, because 3 means an already dead database
+ $opt[$defcnt] = "--vertical-label \"Percent\" --title \"Table lock contention on $hostname\" --upper-limit 10 --lower-limit 0 ";
+ $def[$defcnt] = "";
+ for ($ii = 1; $ii <= $ds_count; $ii++) {
+ if(preg_match('/^tablelock_contention$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:tbllckcont=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "CDEF:ag=tbllckcont,$WARN[$ii],LE,tbllckcont,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,tbllckcont,0,IF ";
+ $def[$defcnt] .= "CDEF:ay=tbllckcont,$CRIT[$ii],LE,tbllckcont,$WARN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,tbllckcont,0,IF ";
+ $def[$defcnt] .= "CDEF:ar=tbllckcont,100,LE,tbllckcont,$CRIT[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,tbllckcont,0,IF ";
+ $def[$defcnt] .= "AREA:ag#$green: " ;
+ $def[$defcnt] .= "AREA:ay#$yellow: " ;
+ $def[$defcnt] .= "AREA:ar#$red: " ;
+ $def[$defcnt] .= "LINE:tbllckcont#111111:\" \" ";
+ $def[$defcnt] .= "VDEF:vtbllckcont=tbllckcont,LAST " ;
+ $def[$defcnt] .= "GPRINT:vtbllckcont:\"Lock contention (since epoch) is %3.2lf%%\\n\" " ;
+ }
+ if(preg_match('/^tablelock_contention_now$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:tbllckcontnow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "LINE1.5:tbllckcontnow#$now:\" \" ";
+ $def[$defcnt] .= "VDEF:vtbllckcontnow=tbllckcontnow,LAST " ;
+ $def[$defcnt] .= "GPRINT:vtbllckcontnow:\"Lock contention (current) is %3.2lf%%\" ";
+ }
+ }
+ $defcnt++;
+ }
+ if(preg_match('/^tablecache_fillrate$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Table cache hitrate";
+ $opt[$defcnt] = "--vertical-label \"Percent\" --title \"Table cache hitrate on $hostname\" --upper-limit 100 --lower-limit 0 ";
+ $def[$defcnt] = "";
+ for ($ii = 1; $ii <= $ds_count; $ii++) {
+ if(preg_match('/^tablecache_hitrate$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:hitrate=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "CDEF:ar=hitrate,$CRIT_MIN[$ii],LE,hitrate,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "CDEF:ay=hitrate,$WARN_MIN[$ii],LE,hitrate,$CRIT_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "CDEF:ag=hitrate,100,LE,hitrate,$WARN_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "AREA:ag#$green: " ;
+ $def[$defcnt] .= "AREA:ay#$yellow: " ;
+ $def[$defcnt] .= "AREA:ar#$red: " ;
+ $def[$defcnt] .= "LINE:hitrate#111111:\" \" ";
+ $def[$defcnt] .= "VDEF:vhitrate=hitrate,LAST " ;
+ $def[$defcnt] .= "GPRINT:vhitrate:\"Hitratio is %3.2lf percent \\n\" ";
+ }
+ if(preg_match('/^tablecache_fillrate$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:hitratenow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "LINE1.5:hitratenow#$now:\" \" ";
+ $def[$defcnt] .= "VDEF:vhitratenow=hitratenow,LAST " ;
+ $def[$defcnt] .= "GPRINT:vhitratenow:\"%3.2lf%% of the cache is filled \\n\" ";
+ }
+ }
+ $defcnt++;
+ }
+ if(preg_match('/^pct_tmp_table_on_disk_now$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Temporary tables created on disk ";
+ $opt[$defcnt] = "--vertical-label \"Percent\" --title \"Temporary tables created on disk on $hostname\" --upper-limit 10 --lower-limit 0 ";
+ $def[$defcnt] = "";
+ for ($ii = 1; $ii <= $ds_count; $ii++) {
+ if(preg_match('/^pct_tmp_table_on_disk$/', $NAME[$ii])) {
+
+ $def[$defcnt] .= "DEF:tmptbldsk=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "CDEF:ag=tmptbldsk,$WARN[$ii],LE,tmptbldsk,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,tmptbldsk,0,IF ";
+ $def[$defcnt] .= "CDEF:ay=tmptbldsk,$CRIT[$ii],LE,tmptbldsk,$WARN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,tmptbldsk,0,IF ";
+ $def[$defcnt] .= "CDEF:ar=tmptbldsk,100,LE,tmptbldsk,$CRIT[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,tmptbldsk,0,IF ";
+ $def[$defcnt] .= "AREA:ag#$green: " ;
+ $def[$defcnt] .= "AREA:ay#$yellow: " ;
+ $def[$defcnt] .= "AREA:ar#$red: " ;
+ $def[$defcnt] .= "LINE:tmptbldsk#111111:\" \" ";
+ $def[$defcnt] .= "VDEF:vtmptbldsk=tmptbldsk,LAST " ;
+ $def[$defcnt] .= "GPRINT:vtmptbldsk:\"%3.2lf percent of temp tables were created on disk (since epoch)\\n\" " ;
+ }
+ if(preg_match('/^pct_tmp_table_on_disk_now$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:tmptbldsknow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "LINE1.5:tmptbldsknow#$now:\" \" ";
+ $def[$defcnt] .= "VDEF:vtmptbldsknow=tmptbldsknow,LAST " ;
+ $def[$defcnt] .= "GPRINT:vtmptbldsknow:\"%3.2lf percent of temp tables were created on disk (recently)\\n\" " ;
+ }
+ }
+ $defcnt++;
+ }
+ if(preg_match('/^thread_cache_hitrate_now$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Thread cache hitrate";
+ $opt[$defcnt] = "--vertical-label \"Percent\" --title \"Thread cache hitrate on $hostname\" --upper-limit 100 --lower-limit 0 ";
+ $def[$defcnt] = "";
+ for ($ii = 1; $ii <= $ds_count; $ii++) {
+ if(preg_match('/^thread_cache_hitrate$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:hitrate=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "CDEF:ar=hitrate,$CRIT_MIN[$ii],LE,hitrate,0,GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "CDEF:ay=hitrate,$WARN_MIN[$ii],LE,hitrate,$CRIT_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "CDEF:ag=hitrate,100,LE,hitrate,$WARN_MIN[$ii],GT,INF,UNKN,IF,UNKN,IF,ISINF,hitrate,0,IF ";
+ $def[$defcnt] .= "AREA:ag#$green: " ;
+ $def[$defcnt] .= "AREA:ay#$yellow: " ;
+ $def[$defcnt] .= "AREA:ar#$red: " ;
+ $def[$defcnt] .= "LINE:hitrate#111111:\" \" ";
+ $def[$defcnt] .= "VDEF:vhitrate=hitrate,LAST " ;
+ $def[$defcnt] .= "GPRINT:vhitrate:\"Hitratio (since epoch) is %3.2lf percent \\n\" ";
+ }
+ if(preg_match('/^thread_cache_hitrate_now$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:hitratenow=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "LINE1.5:hitratenow#$now:\" \" ";
+ $def[$defcnt] .= "VDEF:vhitratenow=hitratenow,LAST " ;
+ $def[$defcnt] .= "GPRINT:vhitratenow:\"Hitratio (current) is %3.2lf percent \\n\" ";
+ }
+ }
+ $defcnt++;
+ $ds_name[$defcnt] = "Connects per second";
+ $opt[$defcnt] = "--vertical-label \"Conects / sec\" --title \"Connects per second on $hostname\" ";
+ $def[$defcnt] = "";
+ for ($ii = 1; $ii <= $ds_count; $ii++) {
+ if(preg_match('/^connections_per_sec$/', $NAME[$ii])) {
+ $def[$defcnt] .= "DEF:sps=$RRDFILE[$ii]:$DS[$ii]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "AREA:sps#$now:\" \" ";
+ $def[$defcnt] .= "VDEF:vsps=sps,LAST " ;
+ $def[$defcnt] .= "GPRINT:vsps:\"%3.2lf Connects per second \\n\" ";
+ }
+ }
+ $defcnt++;
+ }
+ if(preg_match('/^threads_connected$/', $NAME[$i])) {
+ $ds_name[$defcnt] = "Connection threads";
+ $opt[$defcnt] = "--vertical-label \"Threads\" --title \"Connection threads on $hostname\" ";
+ $def[$defcnt] = "";
+ $def[$defcnt] .= "DEF:threads=$RRDFILE[$i]:$DS[$i]:AVERAGE:reduce=LAST " ;
+ $def[$defcnt] .= "AREA:threads#111111 ";
+ $def[$defcnt] .= "VDEF:vthreads=threads,LAST " ;
+ $def[$defcnt] .= "GPRINT:vthreads:\"%.0lf Connection threads \" " ;
+ $defcnt++;
+ }
+}
+?>
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/install-sh b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/install-sh
new file mode 100755
index 0000000..377bb86
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/install-sh
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-11-20.07; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call 'install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for 'test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/missing b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/missing
new file mode 100755
index 0000000..cdea514
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2012-06-26.16; # UTC
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+fi
+
+case $1 in
+
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
+
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
+
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'automa4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Makefile.am b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Makefile.am
new file mode 100755
index 0000000..e457f45
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Makefile.am
@@ -0,0 +1,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 $@
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Makefile.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Makefile.in
new file mode 100644
index 0000000..f6113cb
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Makefile.in
@@ -0,0 +1,516 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = plugins-scripts
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(srcdir)/subst.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = subst
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libexecdir)"
+SCRIPTS = $(libexec_SCRIPTS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+VPATH = $(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAT = @CAT@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+GREP = @GREP@
+GZIP = @GZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_OPTS = @INSTALL_OPTS@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MYMODULES_DIR = @MYMODULES_DIR@
+MYMODULES_DYN_DIR = @MYMODULES_DYN_DIR@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+RELEASE = @RELEASE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SH = @SH@
+SHELL = @SHELL@
+STATEFILES_DIR = @STATEFILES_DIR@
+STRIP = @STRIP@
+SUPPORT = @SUPPORT@
+VERSION = @VERSION@
+WARRANTY = @WARRANTY@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+with_nagios_group = @with_nagios_group@
+with_nagios_user = @with_nagios_user@
+SUFFIXES = .pl .pm .sh
+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@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .pl .pm .sh
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins-scripts/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu plugins-scripts/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+subst: $(top_builddir)/config.status $(srcdir)/subst.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(libexecdir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+ for dir in "$(DESTDIR)$(libexecdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libexecSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libexecSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
+ ctags-am distclean distclean-generic distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libexecSCRIPTS install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags-am uninstall uninstall-am \
+ uninstall-libexecSCRIPTS
+
+
+.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 $@
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Cluster.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Cluster.pm
new file mode 100755
index 0000000..7e83842
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Cluster.pm
@@ -0,0 +1,620 @@
+package DBD::MySQL::Cluster;
+
+use strict;
+use Time::HiRes;
+use IO::File;
+use Data::Dumper;
+
+my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );
+my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );
+
+{
+ our $verbose = 0;
+ our $scream = 0; # scream if something is not implemented
+ our $access = "dbi"; # how do we access the database.
+ our $my_modules_dyn_dir = ""; # where we look for self-written extensions
+
+ my @clusters = ();
+ my $initerrors = undef;
+
+ sub add_cluster {
+ push(@clusters, shift);
+ }
+
+ sub return_clusters {
+ return @clusters;
+ }
+
+ sub return_first_cluster() {
+ return $clusters[0];
+ }
+
+}
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ hostname => $params{hostname},
+ port => $params{port},
+ username => $params{username},
+ password => $params{password},
+ timeout => $params{timeout},
+ warningrange => $params{warningrange},
+ criticalrange => $params{criticalrange},
+ version => 'unknown',
+ nodes => [],
+ ndbd_nodes => 0,
+ ndb_mgmd_nodes => 0,
+ mysqld_nodes => 0,
+ };
+ bless $self, $class;
+ $self->init_nagios();
+ if ($self->connect(%params)) {
+ DBD::MySQL::Cluster::add_cluster($self);
+ $self->init(%params);
+ }
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ if ($self->{show}) {
+ my $type = undef;
+ foreach (split /\n/, $self->{show}) {
+ if (/\[(\w+)\((\w+)\)\]\s+(\d+) node/) {
+ $type = uc $2;
+ } elsif (/id=(\d+)(.*)/) {
+ push(@{$self->{nodes}}, DBD::MySQL::Cluster::Node->new(
+ type => $type,
+ id => $1,
+ status => $2,
+ ));
+ }
+ }
+ } else {
+ }
+ if ($params{mode} =~ /^cluster::ndbdrunning/) {
+ foreach my $node (@{$self->{nodes}}) {
+ $node->{type} eq "NDB" && $node->{status} eq "running" && $self->{ndbd_nodes}++;
+ $node->{type} eq "MGM" && $node->{status} eq "running" && $self->{ndb_mgmd_nodes}++;
+ $node->{type} eq "API" && $node->{status} eq "running" && $self->{mysqld_nodes}++;
+ }
+ } else {
+ printf "broken mode %s\n", $params{mode};
+ }
+}
+
+sub dump {
+ my $self = shift;
+ my $message = shift || "";
+ printf "%s %s\n", $message, Data::Dumper::Dumper($self);
+}
+
+sub nagios {
+ my $self = shift;
+ my %params = @_;
+ my $dead_ndb = 0;
+ my $dead_api = 0;
+ if (! $self->{nagios_level}) {
+ if ($params{mode} =~ /^cluster::ndbdrunning/) {
+ foreach my $node (grep { $_->{type} eq "NDB"} @{$self->{nodes}}) {
+ next if $params{selectname} && $params{selectname} ne $_->{id};
+ if (! $node->{connected}) {
+ $self->add_nagios_critical(
+ sprintf "ndb node %d is not connected", $node->{id});
+ $dead_ndb++;
+ }
+ }
+ foreach my $node (grep { $_->{type} eq "API"} @{$self->{nodes}}) {
+ next if $params{selectname} && $params{selectname} ne $_->{id};
+ if (! $node->{connected}) {
+ $self->add_nagios_critical(
+ sprintf "api node %d is not connected", $node->{id});
+ $dead_api++;
+ }
+ }
+ if (! $dead_ndb) {
+ $self->add_nagios_ok("all ndb nodes are connected");
+ }
+ if (! $dead_api) {
+ $self->add_nagios_ok("all api nodes are connected");
+ }
+ }
+ }
+ $self->add_perfdata(sprintf "ndbd_nodes=%d ndb_mgmd_nodes=%d mysqld_nodes=%d",
+ $self->{ndbd_nodes}, $self->{ndb_mgmd_nodes}, $self->{mysqld_nodes});
+}
+
+
+sub init_nagios {
+ my $self = shift;
+ no strict 'refs';
+ if (! ref($self)) {
+ my $nagiosvar = $self."::nagios";
+ my $nagioslevelvar = $self."::nagios_level";
+ $$nagiosvar = {
+ messages => {
+ 0 => [],
+ 1 => [],
+ 2 => [],
+ 3 => [],
+ },
+ perfdata => [],
+ };
+ $$nagioslevelvar = $ERRORS{OK},
+ } else {
+ $self->{nagios} = {
+ messages => {
+ 0 => [],
+ 1 => [],
+ 2 => [],
+ 3 => [],
+ },
+ perfdata => [],
+ };
+ $self->{nagios_level} = $ERRORS{OK},
+ }
+}
+
+sub check_thresholds {
+ my $self = shift;
+ my $value = shift;
+ my $defaultwarningrange = shift;
+ my $defaultcriticalrange = shift;
+ my $level = $ERRORS{OK};
+ $self->{warningrange} = $self->{warningrange} ?
+ $self->{warningrange} : $defaultwarningrange;
+ $self->{criticalrange} = $self->{criticalrange} ?
+ $self->{criticalrange} : $defaultcriticalrange;
+ if ($self->{warningrange} !~ /:/ && $self->{criticalrange} !~ /:/) {
+ # warning = 10, critical = 20, warn if > 10, crit if > 20
+ $level = $ERRORS{WARNING} if $value > $self->{warningrange};
+ $level = $ERRORS{CRITICAL} if $value > $self->{criticalrange};
+ } elsif ($self->{warningrange} =~ /([\d\.]+):/ &&
+ $self->{criticalrange} =~ /([\d\.]+):/) {
+ # warning = 98:, critical = 95:, warn if < 98, crit if < 95
+ $self->{warningrange} =~ /([\d\.]+):/;
+ $level = $ERRORS{WARNING} if $value < $1;
+ $self->{criticalrange} =~ /([\d\.]+):/;
+ $level = $ERRORS{CRITICAL} if $value < $1;
+ }
+ return $level;
+ #
+ # syntax error must be reported with returncode -1
+ #
+}
+
+sub add_nagios {
+ my $self = shift;
+ my $level = shift;
+ my $message = shift;
+ push(@{$self->{nagios}->{messages}->{$level}}, $message);
+ # recalc current level
+ foreach my $llevel (qw(CRITICAL WARNING UNKNOWN OK)) {
+ if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$llevel}}})) {
+ $self->{nagios_level} = $ERRORS{$llevel};
+ }
+ }
+}
+
+sub add_nagios_ok {
+ my $self = shift;
+ my $message = shift;
+ $self->add_nagios($ERRORS{OK}, $message);
+}
+
+sub add_nagios_warning {
+ my $self = shift;
+ my $message = shift;
+ $self->add_nagios($ERRORS{WARNING}, $message);
+}
+
+sub add_nagios_critical {
+ my $self = shift;
+ my $message = shift;
+ $self->add_nagios($ERRORS{CRITICAL}, $message);
+}
+
+sub add_nagios_unknown {
+ my $self = shift;
+ my $message = shift;
+ $self->add_nagios($ERRORS{UNKNOWN}, $message);
+}
+
+sub add_perfdata {
+ my $self = shift;
+ my $data = shift;
+ push(@{$self->{nagios}->{perfdata}}, $data);
+}
+
+sub merge_nagios {
+ my $self = shift;
+ my $child = shift;
+ foreach my $level (0..3) {
+ foreach (@{$child->{nagios}->{messages}->{$level}}) {
+ $self->add_nagios($level, $_);
+ }
+ #push(@{$self->{nagios}->{messages}->{$level}},
+ # @{$child->{nagios}->{messages}->{$level}});
+ }
+ push(@{$self->{nagios}->{perfdata}}, @{$child->{nagios}->{perfdata}});
+}
+
+
+sub calculate_result {
+ my $self = shift;
+ if ($ENV{NRPE_MULTILINESUPPORT} &&
+ length join(" ", @{$self->{nagios}->{perfdata}}) > 200) {
+ foreach my $level ("CRITICAL", "WARNING", "UNKNOWN", "OK") {
+ # first the bad news
+ if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$level}}})) {
+ $self->{nagios_message} .=
+ "\n".join("\n", @{$self->{nagios}->{messages}->{$ERRORS{$level}}});
+ }
+ }
+ $self->{nagios_message} =~ s/^\n//g;
+ $self->{perfdata} = join("\n", @{$self->{nagios}->{perfdata}});
+ } else {
+ foreach my $level ("CRITICAL", "WARNING", "UNKNOWN", "OK") {
+ # first the bad news
+ if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$level}}})) {
+ $self->{nagios_message} .=
+ join(", ", @{$self->{nagios}->{messages}->{$ERRORS{$level}}}).", ";
+ }
+ }
+ $self->{nagios_message} =~ s/, $//g;
+ $self->{perfdata} = join(" ", @{$self->{nagios}->{perfdata}});
+ }
+ foreach my $level ("OK", "UNKNOWN", "WARNING", "CRITICAL") {
+ if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$level}}})) {
+ $self->{nagios_level} = $ERRORS{$level};
+ }
+ }
+}
+
+sub debug {
+ my $self = shift;
+ my $msg = shift;
+ if ($DBD::MySQL::Cluster::verbose) {
+ printf "%s %s\n", $msg, ref($self);
+ }
+}
+
+sub connect {
+ my $self = shift;
+ my %params = @_;
+ my $retval = undef;
+ $self->{tic} = Time::HiRes::time();
+ eval {
+ use POSIX ':signal_h';
+ local $SIG{'ALRM'} = sub {
+ die "alarm\n";
+ };
+ my $mask = POSIX::SigSet->new( SIGALRM );
+ my $action = POSIX::SigAction->new(
+ sub { die "connection timeout\n" ; }, $mask);
+ my $oldaction = POSIX::SigAction->new();
+ sigaction(SIGALRM ,$action ,$oldaction );
+ alarm($self->{timeout} - 1); # 1 second before the global unknown timeout
+ my $ndb_mgm = "ndb_mgm";
+ $params{hostname} = "127.0.0.1" if ! $params{hostname};
+ $ndb_mgm .= sprintf " --ndb-connectstring=%s", $params{hostname}
+ if $params{hostname};
+ $ndb_mgm .= sprintf ":%d", $params{port}
+ if $params{port};
+ $self->{show} = `$ndb_mgm -e show 2>&1`;
+ if ($? == -1) {
+ $self->add_nagios_critical("ndb_mgm failed to execute $!");
+ } elsif ($? & 127) {
+ $self->add_nagios_critical("ndb_mgm failed to execute $!");
+ } elsif ($? >> 8 != 0) {
+ $self->add_nagios_critical("ndb_mgm unable to connect");
+ } else {
+ if ($self->{show} !~ /Cluster Configuration/) {
+ $self->add_nagios_critical("got no cluster configuration");
+ } else {
+ $retval = 1;
+ }
+ }
+ };
+ if ($@) {
+ $self->{errstr} = $@;
+ $self->{errstr} =~ s/at $0 .*//g;
+ chomp $self->{errstr};
+ $self->add_nagios_critical($self->{errstr});
+ $retval = undef;
+ }
+ $self->{tac} = Time::HiRes::time();
+ return $retval;
+}
+
+sub trace {
+ my $self = shift;
+ my $format = shift;
+ $self->{trace} = -f "/tmp/check_mysql_health.trace" ? 1 : 0;
+ if ($self->{verbose}) {
+ printf("%s: ", scalar localtime);
+ printf($format, @_);
+ }
+ if ($self->{trace}) {
+ my $logfh = new IO::File;
+ $logfh->autoflush(1);
+ if ($logfh->open("/tmp/check_mysql_health.trace", "a")) {
+ $logfh->printf("%s: ", scalar localtime);
+ $logfh->printf($format, @_);
+ $logfh->printf("\n");
+ $logfh->close();
+ }
+ }
+}
+
+sub DESTROY {
+ my $self = shift;
+ my $handle1 = "null";
+ my $handle2 = "null";
+ if (defined $self->{handle}) {
+ $handle1 = ref($self->{handle});
+ if (defined $self->{handle}->{handle}) {
+ $handle2 = ref($self->{handle}->{handle});
+ }
+ }
+ $self->trace(sprintf "DESTROY %s with handle %s %s", ref($self), $handle1, $handle2);
+ if (ref($self) eq "DBD::MySQL::Cluster") {
+ }
+ $self->trace(sprintf "DESTROY %s exit with handle %s %s", ref($self), $handle1, $handle2);
+ if (ref($self) eq "DBD::MySQL::Cluster") {
+ #printf "humpftata\n";
+ }
+}
+
+sub save_state {
+ my $self = shift;
+ my %params = @_;
+ my $extension = "";
+ mkdir $params{statefilesdir} unless -d $params{statefilesdir};
+ my $statefile = sprintf "%s/%s_%s",
+ $params{statefilesdir}, $params{hostname}, $params{mode};
+ $extension .= $params{differenciator} ? "_".$params{differenciator} : "";
+ $extension .= $params{socket} ? "_".$params{socket} : "";
+ $extension .= $params{port} ? "_".$params{port} : "";
+ $extension .= $params{database} ? "_".$params{database} : "";
+ $extension .= $params{tablespace} ? "_".$params{tablespace} : "";
+ $extension .= $params{datafile} ? "_".$params{datafile} : "";
+ $extension .= $params{name} ? "_".$params{name} : "";
+ $extension =~ s/\//_/g;
+ $extension =~ s/\(/_/g;
+ $extension =~ s/\)/_/g;
+ $extension =~ s/\*/_/g;
+ $extension =~ s/\s/_/g;
+ $statefile .= $extension;
+ $statefile = lc $statefile;
+ open(STATE, ">$statefile");
+ if ((ref($params{save}) eq "HASH") && exists $params{save}->{timestamp}) {
+ $params{save}->{localtime} = scalar localtime $params{save}->{timestamp};
+ }
+ printf STATE Data::Dumper::Dumper($params{save});
+ close STATE;
+ $self->debug(sprintf "saved %s to %s",
+ Data::Dumper::Dumper($params{save}), $statefile);
+}
+
+sub load_state {
+ my $self = shift;
+ my %params = @_;
+ my $extension = "";
+ my $statefile = sprintf "%s/%s_%s",
+ $params{statefilesdir}, $params{hostname}, $params{mode};
+ $extension .= $params{differenciator} ? "_".$params{differenciator} : "";
+ $extension .= $params{socket} ? "_".$params{socket} : "";
+ $extension .= $params{port} ? "_".$params{port} : "";
+ $extension .= $params{database} ? "_".$params{database} : "";
+ $extension .= $params{tablespace} ? "_".$params{tablespace} : "";
+ $extension .= $params{datafile} ? "_".$params{datafile} : "";
+ $extension .= $params{name} ? "_".$params{name} : "";
+ $extension =~ s/\//_/g;
+ $extension =~ s/\(/_/g;
+ $extension =~ s/\)/_/g;
+ $extension =~ s/\*/_/g;
+ $extension =~ s/\s/_/g;
+ $statefile .= $extension;
+ $statefile = lc $statefile;
+ if ( -f $statefile) {
+ our $VAR1;
+ eval {
+ require $statefile;
+ };
+ if($@) {
+printf "rumms\n";
+ }
+ $self->debug(sprintf "load %s", Data::Dumper::Dumper($VAR1));
+ return $VAR1;
+ } else {
+ return undef;
+ }
+}
+
+sub valdiff {
+ my $self = shift;
+ my $pparams = shift;
+ my %params = %{$pparams};
+ my @keys = @_;
+ my $last_values = $self->load_state(%params) || eval {
+ my $empty_events = {};
+ foreach (@keys) {
+ $empty_events->{$_} = 0;
+ }
+ $empty_events->{timestamp} = 0;
+ $empty_events;
+ };
+ foreach (@keys) {
+ $self->{'delta_'.$_} = $self->{$_} - $last_values->{$_};
+ $self->debug(sprintf "delta_%s %f", $_, $self->{'delta_'.$_});
+ }
+ $self->{'delta_timestamp'} = time - $last_values->{timestamp};
+ $params{save} = eval {
+ my $empty_events = {};
+ foreach (@keys) {
+ $empty_events->{$_} = $self->{$_};
+ }
+ $empty_events->{timestamp} = time;
+ $empty_events;
+ };
+ $self->save_state(%params);
+}
+
+sub requires_version {
+ my $self = shift;
+ my $version = shift;
+ my @instances = DBD::MySQL::Cluster::return_clusters();
+ my $instversion = $instances[0]->{version};
+ if (! $self->version_is_minimum($version)) {
+ $self->add_nagios($ERRORS{UNKNOWN},
+ sprintf "not implemented/possible for MySQL release %s", $instversion);
+ }
+}
+
+sub version_is_minimum {
+ # the current version is newer or equal
+ my $self = shift;
+ my $version = shift;
+ my $newer = 1;
+ my @instances = DBD::MySQL::Cluster::return_clusters();
+ my @v1 = map { $_ eq "x" ? 0 : $_ } split(/\./, $version);
+ my @v2 = split(/\./, $instances[0]->{version});
+ if (scalar(@v1) > scalar(@v2)) {
+ push(@v2, (0) x (scalar(@v1) - scalar(@v2)));
+ } elsif (scalar(@v2) > scalar(@v1)) {
+ push(@v1, (0) x (scalar(@v2) - scalar(@v1)));
+ }
+ foreach my $pos (0..$#v1) {
+ if ($v2[$pos] > $v1[$pos]) {
+ $newer = 1;
+ last;
+ } elsif ($v2[$pos] < $v1[$pos]) {
+ $newer = 0;
+ last;
+ }
+ }
+ #printf STDERR "check if %s os minimum %s\n", join(".", @v2), join(".", @v1);
+ return $newer;
+}
+
+sub instance_rac {
+ my $self = shift;
+ my @instances = DBD::MySQL::Cluster::return_clusters();
+ return (lc $instances[0]->{parallel} eq "yes") ? 1 : 0;
+}
+
+sub instance_thread {
+ my $self = shift;
+ my @instances = DBD::MySQL::Cluster::return_clusters();
+ return $instances[0]->{thread};
+}
+
+sub windows_cluster {
+ my $self = shift;
+ my @instances = DBD::MySQL::Cluster::return_clusters();
+ if ($instances[0]->{os} =~ /Win/i) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+sub system_vartmpdir {
+ my $self = shift;
+ if ($^O =~ /MSWin/) {
+ return $self->system_tmpdir();
+ } else {
+ return "/var/tmp/check_mysql_health";
+ }
+}
+
+sub system_oldvartmpdir {
+ my $self = shift;
+ return "/tmp";
+}
+
+sub system_tmpdir {
+ my $self = shift;
+ if ($^O =~ /MSWin/) {
+ return $ENV{TEMP} if defined $ENV{TEMP};
+ return $ENV{TMP} if defined $ENV{TMP};
+ return File::Spec->catfile($ENV{windir}, 'Temp')
+ if defined $ENV{windir};
+ return 'C:\Temp';
+ } else {
+ return "/tmp";
+ }
+}
+
+
+package DBD::MySQL::Cluster::Node;
+
+use strict;
+
+our @ISA = qw(DBD::MySQL::Cluster);
+
+my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );
+my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ mode => $params{mode},
+ timeout => $params{timeout},
+ type => $params{type},
+ id => $params{id},
+ status => $params{status},
+ };
+ bless $self, $class;
+ $self->init(%params);
+ if ($params{type} eq "NDB") {
+ bless $self, "DBD::MySQL::Cluster::Node::NDB";
+ $self->init(%params);
+ }
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ if ($self->{status} =~ /@(\d+\.\d+\.\d+\.\d+)\s/) {
+ $self->{addr} = $1;
+ $self->{connected} = 1;
+ } elsif ($self->{status} =~ /accepting connect from (\d+\.\d+\.\d+\.\d+)/) {
+ $self->{addr} = $1;
+ $self->{connected} = 0;
+ }
+ if ($self->{status} =~ /starting,/) {
+ $self->{status} = "starting";
+ } elsif ($self->{status} =~ /shutting,/) {
+ $self->{status} = "shutting";
+ } else {
+ $self->{status} = $self->{connected} ? "running" : "dead";
+ }
+}
+
+
+package DBD::MySQL::Cluster::Node::NDB;
+
+use strict;
+
+our @ISA = qw(DBD::MySQL::Cluster::Node);
+
+my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );
+my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ if ($self->{status} =~ /Nodegroup:\s*(\d+)/) {
+ $self->{nodegroup} = $1;
+ }
+ $self->{master} = ($self->{status} =~ /Master\)/) ? 1 : 0;
+}
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server.pm
new file mode 100755
index 0000000..d7b5691
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server.pm
@@ -0,0 +1,1652 @@
+package DBD::MySQL::Server;
+
+use strict;
+use Time::HiRes;
+use IO::File;
+use File::Copy 'cp';
+use Data::Dumper;
+
+my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );
+my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );
+
+{
+ our $verbose = 0;
+ our $scream = 0; # scream if something is not implemented
+ our $access = "dbi"; # how do we access the database.
+ our $my_modules_dyn_dir = ""; # where we look for self-written extensions
+
+ my @servers = ();
+ my $initerrors = undef;
+
+ sub add_server {
+ push(@servers, shift);
+ }
+
+ sub return_servers {
+ return @servers;
+ }
+
+ sub return_first_server() {
+ return $servers[0];
+ }
+
+}
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ mode => $params{mode},
+ access => $params{method} || 'dbi',
+ hostname => $params{hostname},
+ database => $params{database} || 'information_schema',
+ port => $params{port},
+ socket => $params{socket},
+ username => $params{username},
+ password => $params{password},
+ replication_user => $params{replication_user},
+ mycnf => $params{mycnf},
+ mycnfgroup => $params{mycnfgroup},
+ timeout => $params{timeout},
+ warningrange => $params{warningrange},
+ criticalrange => $params{criticalrange},
+ verbose => $params{verbose},
+ report => $params{report},
+ negate => $params{negate},
+ labelformat => $params{labelformat},
+ version => 'unknown',
+ instance => undef,
+ handle => undef,
+ };
+ bless $self, $class;
+ $self->init_nagios();
+ if ($self->dbconnect(%params)) {
+ ($self->{dummy}, $self->{version}) = $self->{handle}->fetchrow_array(
+ #q{ SHOW VARIABLES WHERE Variable_name = 'version' }
+ q{ SHOW VARIABLES LIKE 'version' }
+ );
+ $self->{version} = (split "-", $self->{version})[0];
+ ($self->{dummy}, $self->{uptime}) = $self->{handle}->fetchrow_array(
+ q{ SHOW STATUS LIKE 'Uptime' }
+ );
+ DBD::MySQL::Server::add_server($self);
+ $self->init(%params);
+ }
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ $params{handle} = $self->{handle};
+ $params{uptime} = $self->{uptime};
+ $self->set_global_db_thresholds(\%params);
+ if ($params{mode} =~ /^server::instance/) {
+ $self->{instance} = DBD::MySQL::Server::Instance->new(%params);
+ } elsif ($params{mode} =~ /^server::sql/) {
+ $self->set_local_db_thresholds(%params);
+ if ($params{regexp}) {
+ # sql output is treated as text
+ if ($params{name2} eq $params{name}) {
+ $self->add_nagios_unknown(sprintf "where's the regexp????");
+ } else {
+ $self->{genericsql} =
+ $self->{handle}->fetchrow_array($params{selectname});
+ if (! defined $self->{genericsql}) {
+ $self->add_nagios_unknown(sprintf "got no valid response for %s",
+ $params{selectname});
+ }
+ }
+ } else {
+ # sql output must be a number (or array of numbers)
+ @{$self->{genericsql}} =
+ $self->{handle}->fetchrow_array($params{selectname});
+ if ($self->{handle}->{errstr}) {
+ $self->add_nagios_unknown(sprintf "got no valid response for %s: %s",
+ $params{selectname}, $self->{handle}->{errstr});
+ } elsif (! (defined $self->{genericsql} &&
+ (scalar(grep {
+ /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)$/
+ } @{$self->{genericsql}})) ==
+ scalar(@{$self->{genericsql}}))) {
+ $self->add_nagios_unknown(sprintf "got no valid response for %s",
+ $params{selectname});
+ } elsif (! defined $self->{genericsql}) {
+ $self->add_nagios_unknown(sprintf "got no valid response for %s",
+ $params{selectname});
+ } else {
+ # name2 in array
+ # units in array
+ }
+ }
+ } elsif ($params{mode} =~ /^server::uptime/) {
+ # already set with the connection. but use minutes here
+ } elsif ($params{mode} =~ /^server::connectiontime/) {
+ $self->{connection_time} = $self->{tac} - $self->{tic};
+ } elsif ($params{mode} =~ /^my::([^:.]+)/) {
+ my $class = $1;
+ my $loaderror = undef;
+ substr($class, 0, 1) = uc substr($class, 0, 1);
+ foreach my $libpath (split(":", $DBD::MySQL::Server::my_modules_dyn_dir)) {
+ foreach my $extmod (glob $libpath."/CheckMySQLHealth*.pm") {
+ eval {
+ $self->trace(sprintf "loading module %s", $extmod);
+ require $extmod;
+ };
+ if ($@) {
+ $loaderror = $extmod;
+ $self->trace(sprintf "failed loading module %s: %s", $extmod, $@);
+ }
+ }
+ }
+ my $obj = {
+ handle => $params{handle},
+ warningrange => $params{warningrange},
+ criticalrange => $params{criticalrange},
+ };
+ bless $obj, "My$class";
+ $self->{my} = $obj;
+ if ($self->{my}->isa("DBD::MySQL::Server")) {
+ my $dos_init = $self->can("init");
+ my $dos_nagios = $self->can("nagios");
+ my $my_init = $self->{my}->can("init");
+ my $my_nagios = $self->{my}->can("nagios");
+ if ($my_init == $dos_init) {
+ $self->add_nagios_unknown(
+ sprintf "Class %s needs an init() method", ref($self->{my}));
+ } elsif ($my_nagios == $dos_nagios) {
+ $self->add_nagios_unknown(
+ sprintf "Class %s needs a nagios() method", ref($self->{my}));
+ } else {
+ $self->{my}->init_nagios(%params);
+ $self->{my}->init(%params);
+ }
+ } else {
+ $self->add_nagios_unknown(
+ sprintf "Class %s is not a subclass of DBD::MySQL::Server%s",
+ ref($self->{my}),
+ $loaderror ? sprintf " (syntax error in %s?)", $loaderror : "" );
+ }
+ } else {
+ printf "broken mode %s\n", $params{mode};
+ }
+}
+
+sub dump {
+ my $self = shift;
+ my $message = shift || "";
+ printf "%s %s\n", $message, Data::Dumper::Dumper($self);
+}
+
+sub nagios {
+ my $self = shift;
+ my %params = @_;
+ if (! $self->{nagios_level}) {
+ if ($params{mode} =~ /^server::instance/) {
+ $self->{instance}->nagios(%params);
+ $self->merge_nagios($self->{instance});
+ } elsif ($params{mode} =~ /^server::database/) {
+ $self->{database}->nagios(%params);
+ $self->merge_nagios($self->{database});
+ } elsif ($params{mode} =~ /^server::uptime/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{uptime} / 60, "10:", "5:"),
+ sprintf "database is up since %d minutes", $self->{uptime} / 60);
+ $self->add_perfdata(sprintf "uptime=%ds",
+ $self->{uptime});
+ } elsif ($params{mode} =~ /^server::connectiontime/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{connection_time}, 1, 5),
+ sprintf "%.2f seconds to connect as %s",
+ $self->{connection_time}, ($self->{username} || getpwuid($<)));
+ $self->add_perfdata(sprintf "connection_time=%.4fs;%d;%d",
+ $self->{connection_time},
+ $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~ /^server::sql/) {
+ if ($params{regexp}) {
+ if (substr($params{name2}, 0, 1) eq '!') {
+ $params{name2} =~ s/^!//;
+ if ($self->{genericsql} !~ /$params{name2}/) {
+ $self->add_nagios_ok(
+ sprintf "output %s does not match pattern %s",
+ $self->{genericsql}, $params{name2});
+ } else {
+ $self->add_nagios_critical(
+ sprintf "output %s matches pattern %s",
+ $self->{genericsql}, $params{name2});
+ }
+ } else {
+ if ($self->{genericsql} =~ /$params{name2}/) {
+ $self->add_nagios_ok(
+ sprintf "output %s matches pattern %s",
+ $self->{genericsql}, $params{name2});
+ } else {
+ $self->add_nagios_critical(
+ sprintf "output %s does not match pattern %s",
+ $self->{genericsql}, $params{name2});
+ }
+ }
+ } else {
+ $self->add_nagios(
+ # the first item in the list will trigger the threshold values
+ $self->check_thresholds($self->{genericsql}[0], 1, 5),
+ sprintf "%s: %s%s",
+ $params{name2} ? lc $params{name2} : lc $params{selectname},
+ # float as float, integers as integers
+ join(" ", map {
+ (sprintf("%d", $_) eq $_) ? $_ : sprintf("%f", $_)
+ } @{$self->{genericsql}}),
+ $params{units} ? $params{units} : "");
+ my $i = 0;
+ # workaround... getting the column names from the database would be nicer
+ my @names2_arr = split(/\s+/, $params{name2});
+ foreach my $t (@{$self->{genericsql}}) {
+ $self->add_perfdata(sprintf "\'%s\'=%s%s;%s;%s",
+ $names2_arr[$i] ? lc $names2_arr[$i] : lc $params{selectname},
+ # float as float, integers as integers
+ (sprintf("%d", $t) eq $t) ? $t : sprintf("%f", $t),
+ $params{units} ? $params{units} : "",
+ ($i == 0) ? $self->{warningrange} : "",
+ ($i == 0) ? $self->{criticalrange} : ""
+ );
+ $i++;
+ }
+ }
+ } elsif ($params{mode} =~ /^my::([^:.]+)/) {
+ $self->{my}->nagios(%params);
+ $self->merge_nagios($self->{my});
+ }
+ }
+}
+
+
+sub init_nagios {
+ my $self = shift;
+ no strict 'refs';
+ if (! ref($self)) {
+ my $nagiosvar = $self."::nagios";
+ my $nagioslevelvar = $self."::nagios_level";
+ $$nagiosvar = {
+ messages => {
+ 0 => [],
+ 1 => [],
+ 2 => [],
+ 3 => [],
+ },
+ perfdata => [],
+ };
+ $$nagioslevelvar = $ERRORS{OK},
+ } else {
+ $self->{nagios} = {
+ messages => {
+ 0 => [],
+ 1 => [],
+ 2 => [],
+ 3 => [],
+ },
+ perfdata => [],
+ };
+ $self->{nagios_level} = $ERRORS{OK},
+ }
+}
+
+sub check_thresholds {
+ my $self = shift;
+ my $value = shift;
+ my $defaultwarningrange = shift;
+ my $defaultcriticalrange = shift;
+ my $level = $ERRORS{OK};
+ $self->{warningrange} = defined $self->{warningrange} ?
+ $self->{warningrange} : $defaultwarningrange;
+ $self->{criticalrange} = defined $self->{criticalrange} ?
+ $self->{criticalrange} : $defaultcriticalrange;
+
+ if ($self->{warningrange} =~ /^([-+]?[0-9]*\.?[0-9]+)$/) {
+ # warning = 10, warn if > 10 or < 0
+ $level = $ERRORS{WARNING}
+ if ($value > $1 || $value < 0);
+ } elsif ($self->{warningrange} =~ /^([-+]?[0-9]*\.?[0-9]+):$/) {
+ # warning = 10:, warn if < 10
+ $level = $ERRORS{WARNING}
+ if ($value < $1);
+ } elsif ($self->{warningrange} =~ /^~:([-+]?[0-9]*\.?[0-9]+)$/) {
+ # warning = ~:10, warn if > 10
+ $level = $ERRORS{WARNING}
+ if ($value > $1);
+ } elsif ($self->{warningrange} =~ /^([-+]?[0-9]*\.?[0-9]+):([-+]?[0-9]*\.?[0-9]+)$/) {
+ # warning = 10:20, warn if < 10 or > 20
+ $level = $ERRORS{WARNING}
+ if ($value < $1 || $value > $2);
+ } elsif ($self->{warningrange} =~ /^@([-+]?[0-9]*\.?[0-9]+):([-+]?[0-9]*\.?[0-9]+)$/) {
+ # warning = @10:20, warn if >= 10 and <= 20
+ $level = $ERRORS{WARNING}
+ if ($value >= $1 && $value <= $2);
+ }
+ if ($self->{criticalrange} =~ /^([-+]?[0-9]*\.?[0-9]+)$/) {
+ # critical = 10, crit if > 10 or < 0
+ $level = $ERRORS{CRITICAL}
+ if ($value > $1 || $value < 0);
+ } elsif ($self->{criticalrange} =~ /^([-+]?[0-9]*\.?[0-9]+):$/) {
+ # critical = 10:, crit if < 10
+ $level = $ERRORS{CRITICAL}
+ if ($value < $1);
+ } elsif ($self->{criticalrange} =~ /^~:([-+]?[0-9]*\.?[0-9]+)$/) {
+ # critical = ~:10, crit if > 10
+ $level = $ERRORS{CRITICAL}
+ if ($value > $1);
+ } elsif ($self->{criticalrange} =~ /^([-+]?[0-9]*\.?[0-9]+):([-+]?[0-9]*\.?[0-9]+)$/) {
+ # critical = 10:20, crit if < 10 or > 20
+ $level = $ERRORS{CRITICAL}
+ if ($value < $1 || $value > $2);
+ } elsif ($self->{criticalrange} =~ /^@([-+]?[0-9]*\.?[0-9]+):([-+]?[0-9]*\.?[0-9]+)$/) {
+ # critical = @10:20, crit if >= 10 and <= 20
+ $level = $ERRORS{CRITICAL}
+ if ($value >= $1 && $value <= $2);
+ }
+ return $level;
+ #
+ # syntax error must be reported with returncode -1
+ #
+}
+
+sub add_nagios {
+ my $self = shift;
+ my $level = shift;
+ my $message = shift;
+ push(@{$self->{nagios}->{messages}->{$level}}, $message);
+ # recalc current level
+ foreach my $llevel (qw(CRITICAL WARNING UNKNOWN OK)) {
+ if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$llevel}}})) {
+ $self->{nagios_level} = $ERRORS{$llevel};
+ }
+ }
+}
+
+sub add_nagios_ok {
+ my $self = shift;
+ my $message = shift;
+ $self->add_nagios($ERRORS{OK}, $message);
+}
+
+sub add_nagios_warning {
+ my $self = shift;
+ my $message = shift;
+ $self->add_nagios($ERRORS{WARNING}, $message);
+}
+
+sub add_nagios_critical {
+ my $self = shift;
+ my $message = shift;
+ $self->add_nagios($ERRORS{CRITICAL}, $message);
+}
+
+sub add_nagios_unknown {
+ my $self = shift;
+ my $message = shift;
+ $self->add_nagios($ERRORS{UNKNOWN}, $message);
+}
+
+sub add_perfdata {
+ my $self = shift;
+ my $data = shift;
+ push(@{$self->{nagios}->{perfdata}}, $data);
+}
+
+sub merge_nagios {
+ my $self = shift;
+ my $child = shift;
+ foreach my $level (0..3) {
+ foreach (@{$child->{nagios}->{messages}->{$level}}) {
+ $self->add_nagios($level, $_);
+ }
+ #push(@{$self->{nagios}->{messages}->{$level}},
+ # @{$child->{nagios}->{messages}->{$level}});
+ }
+ push(@{$self->{nagios}->{perfdata}}, @{$child->{nagios}->{perfdata}});
+}
+
+sub calculate_result {
+ my $self = shift;
+ my $labels = shift || {};
+ my $multiline = 0;
+ map {
+ $self->{nagios_level} = $ERRORS{$_} if
+ (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$_}}}));
+ } ("OK", "UNKNOWN", "WARNING", "CRITICAL");
+ if ($ENV{NRPE_MULTILINESUPPORT} &&
+ length join(" ", @{$self->{nagios}->{perfdata}}) > 200) {
+ $multiline = 1;
+ }
+ my $all_messages = join(($multiline ? "\n" : ", "), map {
+ join(($multiline ? "\n" : ", "), @{$self->{nagios}->{messages}->{$ERRORS{$_}}})
+ } grep {
+ scalar(@{$self->{nagios}->{messages}->{$ERRORS{$_}}})
+ } ("CRITICAL", "WARNING", "UNKNOWN", "OK"));
+ my $bad_messages = join(($multiline ? "\n" : ", "), map {
+ join(($multiline ? "\n" : ", "), @{$self->{nagios}->{messages}->{$ERRORS{$_}}})
+ } grep {
+ scalar(@{$self->{nagios}->{messages}->{$ERRORS{$_}}})
+ } ("CRITICAL", "WARNING", "UNKNOWN"));
+ my $good_messages = join(($multiline ? "\n" : ", "), map {
+ join(($multiline ? "\n" : ", "), @{$self->{nagios}->{messages}->{$ERRORS{$_}}})
+ } grep {
+ scalar(@{$self->{nagios}->{messages}->{$ERRORS{$_}}})
+ } ("OK"));
+ my $all_messages_short = $bad_messages ? $bad_messages : 'no problems';
+ # if mode = my-....
+ # and there are some ok-messages
+ # output them instead of "no problems"
+ if ($self->{mode} =~ /^my\:\:/ && $good_messages) {
+ $all_messages_short = $bad_messages ? $bad_messages : $good_messages;
+ }
+ my $all_messages_html = "<table style=\"border-collapse: collapse;\">".
+ join("", map {
+ my $level = $_;
+ join("", map {
+ sprintf "<tr valign=\"top\"><td class=\"service%s\">%s</td></tr>",
+ $level, $_;
+ } @{$self->{nagios}->{messages}->{$ERRORS{$_}}});
+ } grep {
+ scalar(@{$self->{nagios}->{messages}->{$ERRORS{$_}}})
+ } ("CRITICAL", "WARNING", "UNKNOWN", "OK")).
+ "</table>";
+ if (exists $self->{identstring}) {
+ $self->{nagios_message} .= $self->{identstring};
+ }
+ if ($self->{report} eq "long") {
+ $self->{nagios_message} .= $all_messages;
+ } elsif ($self->{report} eq "short") {
+ $self->{nagios_message} .= $all_messages_short;
+ } elsif ($self->{report} eq "html") {
+ $self->{nagios_message} .= $all_messages_short."\n".$all_messages_html;
+ }
+ foreach my $from (keys %{$self->{negate}}) {
+ if ((uc $from) =~ /^(OK|WARNING|CRITICAL|UNKNOWN)$/ &&
+ (uc $self->{negate}->{$from}) =~ /^(OK|WARNING|CRITICAL|UNKNOWN)$/) {
+ if ($self->{nagios_level} == $ERRORS{uc $from}) {
+ $self->{nagios_level} = $ERRORS{uc $self->{negate}->{$from}};
+ }
+ }
+ }
+ if ($self->{labelformat} eq "pnp4nagios") {
+ $self->{perfdata} = join(" ", @{$self->{nagios}->{perfdata}});
+ } else {
+ $self->{perfdata} = join(" ", map {
+ my $perfdata = $_;
+ if ($perfdata =~ /^(.*?)=(.*)/) {
+ my $label = $1;
+ my $data = $2;
+ if (exists $labels->{$label} &&
+ exists $labels->{$label}->{$self->{labelformat}}) {
+ $labels->{$label}->{$self->{labelformat}}."=".$data;
+ } else {
+ $perfdata;
+ }
+ } else {
+ $perfdata;
+ }
+ } @{$self->{nagios}->{perfdata}});
+ }
+}
+
+sub set_global_db_thresholds {
+ my $self = shift;
+ my $params = shift;
+ my $warning = undef;
+ my $critical = undef;
+ return unless defined $params->{dbthresholds};
+ $params->{name0} = $params->{dbthresholds};
+ # :pluginmode :name :warning :critical
+ # mode empty
+ #
+ eval {
+ if ($self->{handle}->fetchrow_array(q{
+ SELECT table_name FROM information_schema.tables
+ WHERE table_schema = ?
+ AND table_name = 'CHECK_MYSQL_HEALTH_THRESHOLDS';
+ }, $self->{database})) { # either --database... or information_schema
+ my @dbthresholds = $self->{handle}->fetchall_array(q{
+ SELECT * FROM check_mysql_health_thresholds
+ });
+ $params->{dbthresholds} = \@dbthresholds;
+ foreach (@dbthresholds) {
+ if (($_->[0] eq $params->{cmdlinemode}) &&
+ (! defined $_->[1] || ! $_->[1])) {
+ ($warning, $critical) = ($_->[2], $_->[3]);
+ }
+ }
+ }
+ };
+ if (! $@) {
+ if ($warning) {
+ $params->{warningrange} = $warning;
+ $self->trace("read warningthreshold %s from database", $warning);
+ }
+ if ($critical) {
+ $params->{criticalrange} = $critical;
+ $self->trace("read criticalthreshold %s from database", $critical);
+ }
+ }
+}
+
+sub set_local_db_thresholds {
+ my $self = shift;
+ my %params = @_;
+ my $warning = undef;
+ my $critical = undef;
+ # :pluginmode :name :warning :critical
+ # mode name0
+ # mode name2
+ # mode name
+ #
+ # first: argument of --dbthresholds, it it exists
+ # second: --name2
+ # third: --name
+ if (ref($params{dbthresholds}) eq 'ARRAY') {
+ my $marker;
+ foreach (@{$params{dbthresholds}}) {
+ if ($_->[0] eq $params{cmdlinemode}) {
+ if (defined $_->[1] && $params{name0} && $_->[1] eq $params{name0}) {
+ ($warning, $critical) = ($_->[2], $_->[3]);
+ $marker = $params{name0};
+ last;
+ } elsif (defined $_->[1] && $params{name2} && $_->[1] eq $params{name2}) {
+ ($warning, $critical) = ($_->[2], $_->[3]);
+ $marker = $params{name2};
+ last;
+ } elsif (defined $_->[1] && $params{name} && $_->[1] eq $params{name}) {
+ ($warning, $critical) = ($_->[2], $_->[3]);
+ $marker = $params{name};
+ last;
+ }
+ }
+ }
+ if ($warning) {
+ $self->{warningrange} = $warning;
+ $self->trace("read warningthreshold %s for %s from database",
+ $marker, $warning);
+ }
+ if ($critical) {
+ $self->{criticalrange} = $critical;
+ $self->trace("read criticalthreshold %s for %s from database",
+ $marker, $critical);
+ }
+ }
+}
+
+sub debug {
+ my $self = shift;
+ my $msg = shift;
+ if ($DBD::MySQL::Server::verbose) {
+ printf "%s %s\n", $msg, ref($self);
+ }
+}
+
+sub dbconnect {
+ my $self = shift;
+ my %params = @_;
+ my $retval = undef;
+ $self->{tic} = Time::HiRes::time();
+ $self->{handle} = DBD::MySQL::Server::Connection->new(%params);
+ if ($self->{handle}->{errstr}) {
+ if ($params{mode} =~ /^server::tnsping/ &&
+ $self->{handle}->{errstr} =~ /ORA-01017/) {
+ $self->add_nagios($ERRORS{OK},
+ sprintf "connection established to %s.", $self->{connect});
+ $retval = undef;
+ } elsif ($self->{handle}->{errstr} eq "alarm\n") {
+ $self->add_nagios($ERRORS{CRITICAL},
+ sprintf "connection could not be established within %d seconds",
+ $self->{timeout});
+ } else {
+ $self->add_nagios($ERRORS{CRITICAL},
+ sprintf "cannot connect to %s. %s",
+ $self->{database}, $self->{handle}->{errstr});
+ $retval = undef;
+ }
+ } else {
+ $retval = $self->{handle};
+ }
+ $self->{tac} = Time::HiRes::time();
+ return $retval;
+}
+
+sub trace {
+ my $self = shift;
+ my $format = shift;
+ $self->{trace} = -f "/tmp/check_mysql_health.trace" ? 1 : 0;
+ if ($self->{verbose}) {
+ printf("%s: ", scalar localtime);
+ printf($format, @_);
+ }
+ if ($self->{trace}) {
+ my $logfh = new IO::File;
+ $logfh->autoflush(1);
+ if ($logfh->open("/tmp/check_mysql_health.trace", "a")) {
+ $logfh->printf("%s: ", scalar localtime);
+ $logfh->printf($format, @_);
+ $logfh->printf("\n");
+ $logfh->close();
+ }
+ }
+}
+
+sub DESTROY {
+ my $self = shift;
+ my $handle1 = "null";
+ my $handle2 = "null";
+ if (defined $self->{handle}) {
+ $handle1 = ref($self->{handle});
+ if (defined $self->{handle}->{handle}) {
+ $handle2 = ref($self->{handle}->{handle});
+ }
+ }
+ $self->trace(sprintf "DESTROY %s with handle %s %s", ref($self), $handle1, $handle2);
+ if (ref($self) eq "DBD::MySQL::Server") {
+ }
+ $self->trace(sprintf "DESTROY %s exit with handle %s %s", ref($self), $handle1, $handle2);
+ if (ref($self) eq "DBD::MySQL::Server") {
+ #printf "humpftata\n";
+ }
+}
+
+sub save_state {
+ my $self = shift;
+ my %params = @_;
+ my $extension = "";
+ my $mode = $params{mode};
+ if ($params{connect} && $params{connect} =~ /(\w+)\/(\w+)@(\w+)/) {
+ $params{connect} = $3;
+ } elsif ($params{connect}) {
+ # just to be sure
+ $params{connect} =~ s/\//_/g;
+ }
+ if ($^O =~ /MSWin/) {
+ $mode =~ s/::/_/g;
+ $params{statefilesdir} = $self->system_vartmpdir();
+ }
+ if (! -d $params{statefilesdir}) {
+ eval {
+ use File::Path;
+ mkpath $params{statefilesdir};
+ };
+ }
+ if ($@ || ! -w $params{statefilesdir}) {
+ $self->add_nagios($ERRORS{CRITICAL},
+ sprintf "statefilesdir %s does not exist or is not writable\n",
+ $params{statefilesdir});
+ return;
+ }
+ my $statefile = sprintf "%s_%s", $params{hostname}, $mode;
+ $extension .= $params{differenciator} ? "_".$params{differenciator} : "";
+ $extension .= $params{socket} ? "_".$params{socket} : "";
+ $extension .= $params{port} ? "_".$params{port} : "";
+ $extension .= $params{database} ? "_".$params{database} : "";
+ $extension .= $params{tablespace} ? "_".$params{tablespace} : "";
+ $extension .= $params{datafile} ? "_".$params{datafile} : "";
+ $extension .= $params{name} ? "_".$params{name} : "";
+ $extension =~ s/\//_/g;
+ $extension =~ s/\(/_/g;
+ $extension =~ s/\)/_/g;
+ $extension =~ s/\*/_/g;
+ $extension =~ s/\s/_/g;
+ $statefile .= $extension;
+ $statefile = lc $statefile;
+ $statefile = sprintf "%s/%s", $params{statefilesdir}, $statefile;
+ if (open(STATE, ">$statefile")) {
+ if ((ref($params{save}) eq "HASH") && exists $params{save}->{timestamp}) {
+ $params{save}->{localtime} = scalar localtime $params{save}->{timestamp};
+ }
+ printf STATE Data::Dumper::Dumper($params{save});
+ close STATE;
+ } else {
+ $self->add_nagios($ERRORS{CRITICAL},
+ sprintf "statefile %s is not writable", $statefile);
+ }
+ $self->debug(sprintf "saved %s to %s",
+ Data::Dumper::Dumper($params{save}), $statefile);
+}
+
+sub load_state {
+ my $self = shift;
+ my %params = @_;
+ my $extension = "";
+ my $mode = $params{mode};
+ if ($params{connect} && $params{connect} =~ /(\w+)\/(\w+)@(\w+)/) {
+ $params{connect} = $3;
+ } elsif ($params{connect}) {
+ # just to be sure
+ $params{connect} =~ s/\//_/g;
+ }
+ if ($^O =~ /MSWin/) {
+ $mode =~ s/::/_/g;
+ $params{statefilesdir} = $self->system_vartmpdir();
+ }
+ my $statefile = sprintf "%s_%s", $params{hostname}, $mode;
+ $extension .= $params{differenciator} ? "_".$params{differenciator} : "";
+ $extension .= $params{socket} ? "_".$params{socket} : "";
+ $extension .= $params{port} ? "_".$params{port} : "";
+ $extension .= $params{database} ? "_".$params{database} : "";
+ $extension .= $params{tablespace} ? "_".$params{tablespace} : "";
+ $extension .= $params{datafile} ? "_".$params{datafile} : "";
+ $extension .= $params{name} ? "_".$params{name} : "";
+ $extension =~ s/\//_/g;
+ $extension =~ s/\(/_/g;
+ $extension =~ s/\)/_/g;
+ $extension =~ s/\*/_/g;
+ $extension =~ s/\s/_/g;
+ $statefile .= $extension;
+ $statefile = lc $statefile;
+ $statefile = sprintf "%s/%s", $params{statefilesdir}, $statefile;
+ if ( -f $statefile) {
+ our $VAR1;
+ eval {
+ require $statefile;
+ };
+ if($@) {
+ $self->add_nagios($ERRORS{CRITICAL},
+ sprintf "statefile %s is corrupt", $statefile);
+ }
+ $self->debug(sprintf "load %s", Data::Dumper::Dumper($VAR1));
+ return $VAR1;
+ } else {
+ return undef;
+ }
+}
+
+sub valdiff {
+ my $self = shift;
+ my $pparams = shift;
+ my %params = %{$pparams};
+ my @keys = @_;
+ my $now = time;
+ my $last_values = $self->load_state(%params) || eval {
+ my $empty_events = {};
+ foreach (@keys) {
+ $empty_events->{$_} = 0;
+ }
+ $empty_events->{timestamp} = 0;
+ if ($params{lookback}) {
+ $empty_events->{lookback_history} = {};
+ }
+ $empty_events;
+ };
+ foreach (@keys) {
+ if ($params{lookback}) {
+ # find a last_value in the history which fits lookback best
+ # and overwrite $last_values->{$_} with historic data
+ if (exists $last_values->{lookback_history}->{$_}) {
+ foreach my $date (sort {$a <=> $b} keys %{$last_values->{lookback_history}->{$_}}) {
+ if ($date >= ($now - $params{lookback})) {
+ $last_values->{$_} = $last_values->{lookback_history}->{$_}->{$date};
+ $last_values->{timestamp} = $date;
+ last;
+ } else {
+ delete $last_values->{lookback_history}->{$_}->{$date};
+ }
+ }
+ }
+ }
+ $last_values->{$_} = 0 if ! exists $last_values->{$_};
+ if ($self->{$_} >= $last_values->{$_}) {
+ $self->{'delta_'.$_} = $self->{$_} - $last_values->{$_};
+ } else {
+ # vermutlich db restart und zaehler alle auf null
+ $self->{'delta_'.$_} = $self->{$_};
+ }
+ $self->debug(sprintf "delta_%s %f", $_, $self->{'delta_'.$_});
+ }
+ $self->{'delta_timestamp'} = $now - $last_values->{timestamp};
+ $params{save} = eval {
+ my $empty_events = {};
+ foreach (@keys) {
+ $empty_events->{$_} = $self->{$_};
+ }
+ $empty_events->{timestamp} = $now;
+ if ($params{lookback}) {
+ $empty_events->{lookback_history} = $last_values->{lookback_history};
+ foreach (@keys) {
+ $empty_events->{lookback_history}->{$_}->{$now} = $self->{$_};
+ }
+ }
+ $empty_events;
+ };
+ $self->save_state(%params);
+}
+
+sub requires_version {
+ my $self = shift;
+ my $version = shift;
+ my @instances = DBD::MySQL::Server::return_servers();
+ my $instversion = $instances[0]->{version};
+ if (! $self->version_is_minimum($version)) {
+ $self->add_nagios($ERRORS{UNKNOWN},
+ sprintf "not implemented/possible for MySQL release %s", $instversion);
+ }
+}
+
+sub version_is_minimum {
+ # the current version is newer or equal
+ my $self = shift;
+ my $version = shift;
+ my $newer = 1;
+ my @instances = DBD::MySQL::Server::return_servers();
+ my @v1 = map { $_ eq "x" ? 0 : $_ } split(/\./, $version);
+ my @v2 = split(/\./, $instances[0]->{version});
+ if (scalar(@v1) > scalar(@v2)) {
+ push(@v2, (0) x (scalar(@v1) - scalar(@v2)));
+ } elsif (scalar(@v2) > scalar(@v1)) {
+ push(@v1, (0) x (scalar(@v2) - scalar(@v1)));
+ }
+ foreach my $pos (0..$#v1) {
+ if ($v2[$pos] > $v1[$pos]) {
+ $newer = 1;
+ last;
+ } elsif ($v2[$pos] < $v1[$pos]) {
+ $newer = 0;
+ last;
+ }
+ }
+ #printf STDERR "check if %s os minimum %s\n", join(".", @v2), join(".", @v1);
+ return $newer;
+}
+
+sub instance_thread {
+ my $self = shift;
+ my @instances = DBD::MySQL::Server::return_servers();
+ return $instances[0]->{thread};
+}
+
+sub windows_server {
+ my $self = shift;
+ my @instances = DBD::MySQL::Server::return_servers();
+ if ($instances[0]->{os} =~ /Win/i) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+sub system_vartmpdir {
+ my $self = shift;
+ if ($^O =~ /MSWin/) {
+ return $self->system_tmpdir();
+ } else {
+ return "/var/tmp/check_mysql_health";
+ }
+}
+
+sub system_oldvartmpdir {
+ my $self = shift;
+ return "/tmp";
+}
+
+sub system_tmpdir {
+ my $self = shift;
+ if ($^O =~ /MSWin/) {
+ return $ENV{TEMP} if defined $ENV{TEMP};
+ return $ENV{TMP} if defined $ENV{TMP};
+ return File::Spec->catfile($ENV{windir}, 'Temp')
+ if defined $ENV{windir};
+ return 'C:\Temp';
+ } else {
+ return "/tmp";
+ }
+}
+
+sub decode_password {
+ my $self = shift;
+ my $password = shift;
+ if ($password && $password =~ /^rfc3986:\/\/(.*)/) {
+ $password = $1;
+ $password =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg;
+ }
+ return $password;
+}
+
+
+package DBD::MySQL::Server::Connection;
+
+use strict;
+
+our @ISA = qw(DBD::MySQL::Server);
+
+my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );
+my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ mode => $params{mode},
+ timeout => $params{timeout},
+ access => $params{method} || "dbi",
+ hostname => $params{hostname},
+ database => $params{database} || "information_schema",
+ port => $params{port},
+ socket => $params{socket},
+ username => $params{username},
+ password => $params{password},
+ mycnf => $params{mycnf},
+ mycnfgroup => $params{mycnfgroup},
+ handle => undef,
+ };
+ bless $self, $class;
+ if ($params{method} eq "dbi") {
+ bless $self, "DBD::MySQL::Server::Connection::Dbi";
+ } elsif ($params{method} eq "mysql") {
+ bless $self, "DBD::MySQL::Server::Connection::Mysql";
+ } elsif ($params{method} eq "sqlrelay") {
+ bless $self, "DBD::MySQL::Server::Connection::Sqlrelay";
+ }
+ $self->init(%params);
+ return $self;
+}
+
+
+package DBD::MySQL::Server::Connection::Dbi;
+
+use strict;
+use Net::Ping;
+
+our @ISA = qw(DBD::MySQL::Server::Connection);
+
+my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );
+my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $retval = undef;
+ if ($self->{mode} =~ /^server::tnsping/) {
+ if (! $self->{connect}) {
+ $self->{errstr} = "Please specify a database";
+ } else {
+ $self->{sid} = $self->{connect};
+ $self->{username} ||= time; # prefer an existing user
+ $self->{password} = time;
+ }
+ } else {
+ if (
+ ($self->{hostname} ne 'localhost' && (! $self->{username} || ! $self->{password})) &&
+ (! $self->{mycnf}) ) {
+ $self->{errstr} = "Please specify hostname, username and password or a .cnf file";
+ return undef;
+ }
+ $self->{dsn} = "DBI:mysql:";
+ $self->{dsn} .= sprintf "database=%s", $self->{database};
+ if ($self->{mycnf}) {
+ $self->{dsn} .= sprintf ";mysql_read_default_file=%s", $self->{mycnf};
+ if ($self->{mycnfgroup}) {
+ $self->{dsn} .= sprintf ";mysql_read_default_group=%s", $self->{mycnfgroup};
+ }
+ } else {
+ $self->{dsn} .= sprintf ";host=%s", $self->{hostname};
+ $self->{dsn} .= sprintf ";port=%s", $self->{port}
+ unless $self->{socket} || $self->{hostname} eq 'localhost';
+ $self->{dsn} .= sprintf ";mysql_socket=%s", $self->{socket}
+ if $self->{socket};
+ }
+ }
+ if (! exists $self->{errstr}) {
+ eval {
+ require DBI;
+ use POSIX ':signal_h';
+ if ($^O =~ /MSWin/) {
+ local $SIG{'ALRM'} = sub {
+ die "alarm\n";
+ };
+ } else {
+ my $mask = POSIX::SigSet->new( SIGALRM );
+ my $action = POSIX::SigAction->new(
+ sub { die "alarm\n" ; }, $mask);
+ my $oldaction = POSIX::SigAction->new();
+ sigaction(SIGALRM ,$action ,$oldaction );
+ }
+ alarm($self->{timeout} - 1); # 1 second before the global unknown timeout
+ if ($self->{handle} = DBI->connect(
+ $self->{dsn},
+ $self->{username},
+ $self->decode_password($self->{password}),
+ { RaiseError => 0, AutoCommit => 0, PrintError => 1 })) {
+# $self->{handle}->do(q{
+# ALTER SESSION SET NLS_NUMERIC_CHARACTERS=".," });
+ $retval = $self;
+ } else {
+ $self->{errstr} = DBI::errstr();
+ }
+ };
+ if ($@) {
+ $self->{errstr} = $@;
+ $retval = undef;
+ }
+ }
+ $self->{tac} = Time::HiRes::time();
+ return $retval;
+}
+
+sub selectrow_hashref {
+ my $self = shift;
+ my $sql = shift;
+ my @arguments = @_;
+ my $sth = undef;
+ my $hashref = undef;
+ eval {
+ $self->trace(sprintf "SQL:\n%s\nARGS:\n%s\n",
+ $sql, Data::Dumper::Dumper(\@arguments));
+ # helm auf! jetzt wirds dreckig.
+ if ($sql =~ /^\s*SHOW/) {
+ $hashref = $self->{handle}->selectrow_hashref($sql);
+ } else {
+ $sth = $self->{handle}->prepare($sql);
+ if (scalar(@arguments)) {
+ $sth->execute(@arguments);
+ } else {
+ $sth->execute();
+ }
+ $hashref = $sth->selectrow_hashref();
+ }
+ $self->trace(sprintf "RESULT:\n%s\n",
+ Data::Dumper::Dumper($hashref));
+ };
+ if ($@) {
+ $self->debug(sprintf "bumm %s", $@);
+ }
+ if (-f "/tmp/check_mysql_health_simulation/".$self->{mode}) {
+ my $simulation = do { local (@ARGV, $/) =
+ "/tmp/check_mysql_health_simulation/".$self->{mode}; <> };
+ # keine lust auf den scheiss
+ }
+ return $hashref;
+}
+
+sub fetchrow_array {
+ my $self = shift;
+ my $sql = shift;
+ my @arguments = @_;
+ my $sth = undef;
+ my @row = ();
+ my $stderrvar;
+ *SAVEERR = *STDERR;
+ open ERR ,'>',\$stderrvar;
+ *STDERR = *ERR;
+ eval {
+ $self->trace(sprintf "SQL:\n%s\nARGS:\n%s\n",
+ $sql, Data::Dumper::Dumper(\@arguments));
+ $sth = $self->{handle}->prepare($sql);
+ if (scalar(@arguments)) {
+ $sth->execute(@arguments);
+ } else {
+ $sth->execute();
+ }
+ @row = $sth->fetchrow_array();
+ $self->trace(sprintf "RESULT:\n%s\n",
+ Data::Dumper::Dumper(\@row));
+ };
+ *STDERR = *SAVEERR;
+ if ($@) {
+ $self->debug(sprintf "bumm %s", $@);
+ $self->{errstr} = $@;
+ return (undef);
+ } elsif ($stderrvar) {
+ $self->{errstr} = $stderrvar;
+ return (undef);
+ } elsif ($sth->errstr()) {
+ $self->{errstr} = $sth->errstr();
+ return (undef);
+ }
+ if (-f "/tmp/check_mysql_health_simulation/".$self->{mode}) {
+ my $simulation = do { local (@ARGV, $/) =
+ "/tmp/check_mysql_health_simulation/".$self->{mode}; <> };
+ @row = split(/\s+/, (split(/\n/, $simulation))[0]);
+ }
+ return $row[0] unless wantarray;
+ return @row;
+}
+
+sub fetchall_array {
+ my $self = shift;
+ my $sql = shift;
+ my @arguments = @_;
+ my $sth = undef;
+ my $rows = undef;
+ eval {
+ $self->trace(sprintf "SQL:\n%s\nARGS:\n%s\n",
+ $sql, Data::Dumper::Dumper(\@arguments));
+ $sth = $self->{handle}->prepare($sql);
+ if (scalar(@arguments)) {
+ $sth->execute(@arguments);
+ } else {
+ $sth->execute();
+ }
+ $rows = $sth->fetchall_arrayref();
+ $self->trace(sprintf "RESULT:\n%s\n",
+ Data::Dumper::Dumper($rows));
+ };
+ if ($@) {
+ printf STDERR "bumm %s\n", $@;
+ }
+ if (-f "/tmp/check_mysql_health_simulation/".$self->{mode}) {
+ my $simulation = do { local (@ARGV, $/) =
+ "/tmp/check_mysql_health_simulation/".$self->{mode}; <> };
+ @{$rows} = map { [ split(/\s+/, $_) ] } split(/\n/, $simulation);
+ }
+ return @{$rows};
+}
+
+sub func {
+ my $self = shift;
+ $self->{handle}->func(@_);
+}
+
+
+sub execute {
+ my $self = shift;
+ my $sql = shift;
+ eval {
+ my $sth = $self->{handle}->prepare($sql);
+ $sth->execute();
+ };
+ if ($@) {
+ printf STDERR "bumm %s\n", $@;
+ }
+}
+
+sub errstr {
+ my $self = shift;
+ return $self->{errstr};
+}
+
+sub DESTROY {
+ my $self = shift;
+ $self->trace(sprintf "disconnecting DBD %s",
+ $self->{handle} ? "with handle" : "without handle");
+ $self->{handle}->disconnect() if $self->{handle};
+}
+
+package DBD::MySQL::Server::Connection::Mysql;
+
+use strict;
+use File::Temp qw/tempfile/;
+
+our @ISA = qw(DBD::MySQL::Server::Connection);
+
+my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );
+my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $retval = undef;
+ $self->{loginstring} = "traditional";
+ ($self->{sql_commandfile_handle}, $self->{sql_commandfile}) =
+ tempfile($self->{mode}."XXXXX", SUFFIX => ".sql",
+ DIR => $self->system_tmpdir() );
+ close $self->{sql_commandfile_handle};
+ ($self->{sql_resultfile_handle}, $self->{sql_resultfile}) =
+ tempfile($self->{mode}."XXXXX", SUFFIX => ".out",
+ DIR => $self->system_tmpdir() );
+ close $self->{sql_resultfile_handle};
+ if ($self->{mode} =~ /^server::tnsping/) {
+ if (! $self->{connect}) {
+ $self->{errstr} = "Please specify a database";
+ } else {
+ $self->{sid} = $self->{connect};
+ $self->{username} ||= time; # prefer an existing user
+ $self->{password} = time;
+ }
+ } else {
+ if (! $self->{username} || ! $self->{password}) {
+ $self->{errstr} = "Please specify database, username and password";
+ return undef;
+ } elsif (! (($self->{hostname} && $self->{port}) || $self->{socket})) {
+ $self->{errstr} = "Please specify hostname and port or socket";
+ return undef;
+ }
+ }
+ if (! exists $self->{errstr}) {
+ $self->{password} = $self->decode_password($self->{password});
+ eval {
+ my $mysql = '/'.'usr'.'/'.'bin'.'/'.'mysql';
+ if (! -x $mysql) {
+ die "nomysql\n";
+ }
+ if ($self->{loginstring} eq "traditional") {
+ $self->{sqlplus} = sprintf "%s ", $mysql;
+ $self->{sqlplus} .= sprintf "--batch --raw --skip-column-names ";
+ $self->{sqlplus} .= sprintf "--database=%s ", $self->{database};
+ $self->{sqlplus} .= sprintf "--host=%s ", $self->{hostname};
+ $self->{sqlplus} .= sprintf "--port=%s ", $self->{port}
+ unless $self->{socket} || $self->{hostname} eq "localhost";
+ $self->{sqlplus} .= sprintf "--socket=%s ", $self->{socket}
+ if $self->{socket};
+ $self->{sqlplus} .= sprintf "--user=%s --password='%s' < %s > %s",
+ $self->{username}, $self->{password},
+ $self->{sql_commandfile}, $self->{sql_resultfile};
+ }
+
+ use POSIX ':signal_h';
+ if ($^O =~ /MSWin/) {
+ local $SIG{'ALRM'} = sub {
+ die "alarm\n";
+ };
+ } else {
+ my $mask = POSIX::SigSet->new( SIGALRM );
+ my $action = POSIX::SigAction->new(
+ sub { die "alarm\n" ; }, $mask);
+ my $oldaction = POSIX::SigAction->new();
+ sigaction(SIGALRM ,$action ,$oldaction );
+ }
+ alarm($self->{timeout} - 1); # 1 second before the global unknown timeout
+
+ my $answer = $self->fetchrow_array(
+ q{ SELECT 42 FROM dual});
+ die unless defined $answer and $answer == 42;
+ $retval = $self;
+ };
+ if ($@) {
+ $self->{errstr} = $@;
+ $self->{errstr} =~ s/at $0 .*//g;
+ chomp $self->{errstr};
+ $retval = undef;
+ }
+ }
+ $self->{tac} = Time::HiRes::time();
+ return $retval;
+}
+
+sub selectrow_hashref {
+ my $self = shift;
+ my $sql = shift;
+ my @arguments = @_;
+ my $sth = undef;
+ my $hashref = undef;
+ foreach (@arguments) {
+ # replace the ? by the parameters
+ if (/^\d+$/) {
+ $sql =~ s/\?/$_/;
+ } else {
+ $sql =~ s/\?/'$_'/;
+ }
+ }
+ if ($sql =~ /^\s*SHOW/) {
+ $sql .= '\G'; # http://dev.mysql.com/doc/refman/5.1/de/show-slave-status.html
+ }
+ $self->trace(sprintf "SQL (? resolved):\n%s\nARGS:\n%s\n",
+ $sql, Data::Dumper::Dumper(\@arguments));
+ $self->create_commandfile($sql);
+ my $exit_output = `$self->{sqlplus}`;
+ if ($?) {
+ printf STDERR "fetchrow_array exit bumm \n";
+ my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> };
+ my @oerrs = map {
+ /((ERROR \d+).*)/ ? $1 : ();
+ } split(/\n/, $output);
+ $self->{errstr} = join(" ", @oerrs);
+ } else {
+ my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> };
+ if ($sql =~ /^\s*SHOW/) {
+ map {
+ if (/^\s*([\w_]+):\s*(.*)/) {
+ $hashref->{$1} = $2;
+ }
+ } split(/\n/, $output);
+ } else {
+ # i dont mess around here and you shouldn't either
+ }
+ $self->trace(sprintf "RESULT:\n%s\n",
+ Data::Dumper::Dumper($hashref));
+ }
+ unlink $self->{sql_commandfile};
+ unlink $self->{sql_resultfile};
+ return $hashref;
+}
+
+sub fetchrow_array {
+ my $self = shift;
+ my $sql = shift;
+ my @arguments = @_;
+ my $sth = undef;
+ my @row = ();
+ foreach (@arguments) {
+ # replace the ? by the parameters
+ if (/^\d+$/) {
+ $sql =~ s/\?/$_/;
+ } else {
+ $sql =~ s/\?/'$_'/;
+ }
+ }
+ $self->trace(sprintf "SQL (? resolved):\n%s\nARGS:\n%s\n",
+ $sql, Data::Dumper::Dumper(\@arguments));
+ $self->create_commandfile($sql);
+ my $exit_output = `$self->{sqlplus}`;
+ if ($?) {
+ printf STDERR "fetchrow_array exit bumm \n";
+ my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> };
+ my @oerrs = map {
+ /((ERROR \d+).*)/ ? $1 : ();
+ } split(/\n/, $output);
+ $self->{errstr} = join(" ", @oerrs);
+ } else {
+ my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> };
+ @row = map { convert($_) }
+ map { s/^\s+([\.\d]+)$/$1/g; $_ } # strip leading space from numbers
+ map { s/\s+$//g; $_ } # strip trailing space
+ split(/\t/, (split(/\n/, $output))[0]);
+ $self->trace(sprintf "RESULT:\n%s\n",
+ Data::Dumper::Dumper(\@row));
+ }
+ if ($@) {
+ $self->debug(sprintf "bumm %s", $@);
+ }
+ unlink $self->{sql_commandfile};
+ unlink $self->{sql_resultfile};
+ return $row[0] unless wantarray;
+ return @row;
+}
+
+sub fetchall_array {
+ my $self = shift;
+ my $sql = shift;
+ my @arguments = @_;
+ my $sth = undef;
+ my $rows = undef;
+ foreach (@arguments) {
+ # replace the ? by the parameters
+ if (/^\d+$/) {
+ $sql =~ s/\?/$_/;
+ } else {
+ $sql =~ s/\?/'$_'/;
+ }
+ }
+ $self->trace(sprintf "SQL (? resolved):\n%s\nARGS:\n%s\n",
+ $sql, Data::Dumper::Dumper(\@arguments));
+ $self->create_commandfile($sql);
+ my $exit_output = `$self->{sqlplus}`;
+ if ($?) {
+ printf STDERR "fetchrow_array exit bumm %s\n", $exit_output;
+ my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> };
+ my @oerrs = map {
+ /((ERROR \d+).*)/ ? $1 : ();
+ } split(/\n/, $output);
+ $self->{errstr} = join(" ", @oerrs);
+ } else {
+ my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> };
+ my @rows = map { [
+ map { convert($_) }
+ map { s/^\s+([\.\d]+)$/$1/g; $_ }
+ map { s/\s+$//g; $_ }
+ split /\t/
+ ] } grep { ! /^\d+ rows selected/ }
+ grep { ! /^Elapsed: / }
+ grep { ! /^\s*$/ } split(/\n/, $output);
+ $rows = \@rows;
+ $self->trace(sprintf "RESULT:\n%s\n",
+ Data::Dumper::Dumper($rows));
+ }
+ if ($@) {
+ $self->debug(sprintf "bumm %s", $@);
+ }
+ unlink $self->{sql_commandfile};
+ unlink $self->{sql_resultfile};
+ return @{$rows};
+}
+
+sub func {
+ my $self = shift;
+ my $function = shift;
+ $self->{handle}->func(@_);
+}
+
+sub convert {
+ my $n = shift;
+ # mostly used to convert numbers in scientific notation
+ if ($n =~ /^\s*\d+\s*$/) {
+ return $n;
+ } elsif ($n =~ /^\s*([-+]?)(\d*[\.,]*\d*)[eE]{1}([-+]?)(\d+)\s*$/) {
+ my ($vor, $num, $sign, $exp) = ($1, $2, $3, $4);
+ $n =~ s/E/e/g;
+ $n =~ s/,/\./g;
+ $num =~ s/,/\./g;
+ my $sig = $sign eq '-' ? "." . ($exp - 1 + length $num) : '';
+ my $dec = sprintf "%${sig}f", $n;
+ $dec =~ s/\.[0]+$//g;
+ return $dec;
+ } elsif ($n =~ /^\s*([-+]?)(\d+)[\.,]*(\d*)\s*$/) {
+ return $1.$2.".".$3;
+ } elsif ($n =~ /^\s*(.*?)\s*$/) {
+ return $1;
+ } else {
+ return $n;
+ }
+}
+
+
+sub execute {
+ my $self = shift;
+ my $sql = shift;
+ eval {
+ my $sth = $self->{handle}->prepare($sql);
+ $sth->execute();
+ };
+ if ($@) {
+ printf STDERR "bumm %s\n", $@;
+ }
+}
+
+sub errstr {
+ my $self = shift;
+ return $self->{errstr};
+}
+
+sub DESTROY {
+ my $self = shift;
+ $self->trace("try to clean up command and result files");
+ unlink $self->{sql_commandfile} if -f $self->{sql_commandfile};
+ unlink $self->{sql_resultfile} if -f $self->{sql_resultfile};
+}
+
+sub create_commandfile {
+ my $self = shift;
+ my $sql = shift;
+ open CMDCMD, "> $self->{sql_commandfile}";
+ printf CMDCMD "%s\n", $sql;
+ close CMDCMD;
+}
+
+sub decode_password {
+ my $self = shift;
+ my $password = shift;
+ $password = $self->SUPER::decode_password($password);
+ # we call '...%s/%s@...' inside backticks where the second %s is the password
+ # abc'xcv -> ''abc'\''xcv''
+ # abc'`xcv -> ''abc'\''\`xcv''
+ if ($password && $password =~ /'/) {
+ $password = "'".join("\\'", map { "'".$_."'"; } split("'", $password))."'";
+ }
+ return $password;
+}
+
+
+package DBD::MySQL::Server::Connection::Sqlrelay;
+
+use strict;
+use Net::Ping;
+
+our @ISA = qw(DBD::MySQL::Server::Connection);
+
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $retval = undef;
+ if ($self->{mode} =~ /^server::tnsping/) {
+ if (! $self->{connect}) {
+ $self->{errstr} = "Please specify a database";
+ } else {
+ if ($self->{connect} =~ /([\.\w]+):(\d+)/) {
+ $self->{host} = $1;
+ $self->{port} = $2;
+ $self->{socket} = "";
+ } elsif ($self->{connect} =~ /([\.\w]+):([\w\/]+)/) {
+ $self->{host} = $1;
+ $self->{socket} = $2;
+ $self->{port} = "";
+ }
+ }
+ } else {
+ if (! $self->{hostname} || ! $self->{username} || ! $self->{password}) {
+ if ($self->{hostname} && $self->{hostname} =~ /(\w+?)\/(.+)@([\.\w]+):(\d+)/) {
+ $self->{username} = $1;
+ $self->{password} = $2;
+ $self->{hostname} = $3;
+ $self->{port} = $4;
+ $self->{socket} = "";
+ } elsif ($self->{hostname} && $self->{hostname} =~ /(\w+?)\/(.+)@([\.\w]+):([\w\/]+)/) {
+ $self->{username} = $1;
+ $self->{password} = $2;
+ $self->{hostname} = $3;
+ $self->{socket} = $4;
+ $self->{port} = "";
+ } else {
+ $self->{errstr} = "Please specify database, username and password";
+ return undef;
+ }
+ } else {
+ if ($self->{hostname} =~ /([\.\w]+):(\d+)/) {
+ $self->{hostname} = $1;
+ $self->{port} = $2;
+ $self->{socket} = "";
+ } elsif ($self->{hostname} =~ /([\.\w]+):([\w\/]+)/) {
+ $self->{hostname} = $1;
+ $self->{socket} = $2;
+ $self->{port} = "";
+ } else {
+ $self->{errstr} = "Please specify hostname, username, password and port/socket";
+ return undef;
+ }
+ }
+ }
+ if (! exists $self->{errstr}) {
+ eval {
+ require DBI;
+ use POSIX ':signal_h';
+ if ($^O =~ /MSWin/) {
+ local $SIG{'ALRM'} = sub {
+ die "alarm\n";
+ };
+ } else {
+ my $mask = POSIX::SigSet->new( SIGALRM );
+ my $action = POSIX::SigAction->new(
+ sub { die "alarm\n" ; }, $mask);
+ my $oldaction = POSIX::SigAction->new();
+ sigaction(SIGALRM ,$action ,$oldaction );
+ }
+ alarm($self->{timeout} - 1); # 1 second before the global unknown timeout
+ if ($self->{handle} = DBI->connect(
+ sprintf("DBI:SQLRelay:host=%s;port=%d;socket=%s",
+ $self->{hostname}, $self->{port}, $self->{socket}),
+ $self->{username},
+ $self->decode_password($self->{password}),
+ { RaiseError => 1, AutoCommit => 0, PrintError => 1 })) {
+ $retval = $self;
+ if ($self->{mode} =~ /^server::tnsping/ && $self->{handle}->ping()) {
+ # database connected. fake a "unknown user"
+ $self->{errstr} = "ORA-01017";
+ }
+ } else {
+ $self->{errstr} = DBI::errstr();
+ }
+ };
+ if ($@) {
+ $self->{errstr} = $@;
+ $self->{errstr} =~ s/at [\w\/\.]+ line \d+.*//g;
+ $retval = undef;
+ }
+ }
+ $self->{tac} = Time::HiRes::time();
+ return $retval;
+}
+
+sub fetchrow_array {
+ my $self = shift;
+ my $sql = shift;
+ my @arguments = @_;
+ my $sth = undef;
+ my @row = ();
+ $self->trace(sprintf "fetchrow_array: %s", $sql);
+ eval {
+ $sth = $self->{handle}->prepare($sql);
+ if (scalar(@arguments)) {
+ $sth->execute(@arguments);
+ } else {
+ $sth->execute();
+ }
+ @row = $sth->fetchrow_array();
+ };
+ if ($@) {
+ $self->debug(sprintf "bumm %s", $@);
+ }
+ if (-f "/tmp/check_mysql_health_simulation/".$self->{mode}) {
+ my $simulation = do { local (@ARGV, $/) =
+ "/tmp/check_mysql_health_simulation/".$self->{mode}; <> };
+ @row = split(/\s+/, (split(/\n/, $simulation))[0]);
+ }
+ return $row[0] unless wantarray;
+ return @row;
+}
+
+sub fetchall_array {
+ my $self = shift;
+ my $sql = shift;
+ my @arguments = @_;
+ my $sth = undef;
+ my $rows = undef;
+ $self->trace(sprintf "fetchall_array: %s", $sql);
+ eval {
+ $sth = $self->{handle}->prepare($sql);
+ if (scalar(@arguments)) {
+ $sth->execute(@arguments);
+ } else {
+ $sth->execute();
+ }
+ $rows = $sth->fetchall_arrayref();
+ };
+ if ($@) {
+ printf STDERR "bumm %s\n", $@;
+ }
+ if (-f "/tmp/check_mysql_health_simulation/".$self->{mode}) {
+ my $simulation = do { local (@ARGV, $/) =
+ "/tmp/check_mysql_health_simulation/".$self->{mode}; <> };
+ @{$rows} = map { [ split(/\s+/, $_) ] } split(/\n/, $simulation);
+ }
+ return @{$rows};
+}
+
+sub func {
+ my $self = shift;
+ $self->{handle}->func(@_);
+}
+
+sub execute {
+ my $self = shift;
+ my $sql = shift;
+ eval {
+ my $sth = $self->{handle}->prepare($sql);
+ $sth->execute();
+ };
+ if ($@) {
+ printf STDERR "bumm %s\n", $@;
+ }
+}
+
+sub DESTROY {
+ my $self = shift;
+ #$self->trace(sprintf "disconnecting DBD %s",
+ # $self->{handle} ? "with handle" : "without handle");
+ #$self->{handle}->disconnect() if $self->{handle};
+}
+
+1;
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance.pm
new file mode 100755
index 0000000..82ed675
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance.pm
@@ -0,0 +1,512 @@
+package DBD::MySQL::Server::Instance;
+
+use strict;
+
+our @ISA = qw(DBD::MySQL::Server);
+
+my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );
+my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ handle => $params{handle},
+ uptime => $params{uptime},
+ replication_user => $params{replication_user},
+ warningrange => $params{warningrange},
+ criticalrange => $params{criticalrange},
+ threads_connected => undef,
+ threads_created => undef,
+ connections => undef,
+ threadcache_hitrate => undef,
+ querycache_hitrate => undef,
+ lowmem_prunes_per_sec => undef,
+ slow_queries_per_sec => undef,
+ longrunners => undef,
+ tablecache_hitrate => undef,
+ index_usage => undef,
+ engine_innodb => undef,
+ engine_myisam => undef,
+ replication => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $dummy;
+ $self->init_nagios();
+ if ($params{mode} =~ /server::instance::connectedthreads/) {
+ ($dummy, $self->{threads_connected}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Threads_connected'
+ });
+ } elsif ($params{mode} =~ /server::instance::createdthreads/) {
+ ($dummy, $self->{threads_created}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Threads_created'
+ });
+ $self->valdiff(\%params, qw(threads_created));
+ $self->{threads_created_per_sec} = $self->{delta_threads_created} /
+ $self->{delta_timestamp};
+ } elsif ($params{mode} =~ /server::instance::runningthreads/) {
+ ($dummy, $self->{threads_running}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Threads_running'
+ });
+ } elsif ($params{mode} =~ /server::instance::cachedthreads/) {
+ ($dummy, $self->{threads_cached}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Threads_cached'
+ });
+ } elsif ($params{mode} =~ /server::instance::abortedconnects/) {
+ ($dummy, $self->{connects_aborted}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Aborted_connects'
+ });
+ $self->valdiff(\%params, qw(connects_aborted));
+ $self->{connects_aborted_per_sec} = $self->{delta_connects_aborted} /
+ $self->{delta_timestamp};
+ } elsif ($params{mode} =~ /server::instance::abortedclients/) {
+ ($dummy, $self->{clients_aborted}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Aborted_clients'
+ });
+ $self->valdiff(\%params, qw(clients_aborted));
+ $self->{clients_aborted_per_sec} = $self->{delta_clients_aborted} /
+ $self->{delta_timestamp};
+ } elsif ($params{mode} =~ /server::instance::threadcachehitrate/) {
+ ($dummy, $self->{threads_created}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Threads_created'
+ });
+ ($dummy, $self->{connections}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Connections'
+ });
+ $self->valdiff(\%params, qw(threads_created connections));
+ if ($self->{delta_connections} > 0) {
+ $self->{threadcache_hitrate_now} =
+ 100 - ($self->{delta_threads_created} * 100.0 /
+ $self->{delta_connections});
+ } else {
+ $self->{threadcache_hitrate_now} = 100;
+ }
+ $self->{threadcache_hitrate} = 100 -
+ ($self->{threads_created} * 100.0 / $self->{connections});
+ $self->{connections_per_sec} = $self->{delta_connections} /
+ $self->{delta_timestamp};
+ } elsif ($params{mode} =~ /server::instance::querycachehitrate/) {
+ ($dummy, $self->{qcache_inserts}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Qcache_inserts'
+ });
+ ($dummy, $self->{qcache_not_cached}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Qcache_not_cached'
+ });
+ ($dummy, $self->{com_select}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Com_select'
+ });
+ ($dummy, $self->{qcache_hits}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Qcache_hits'
+ });
+ # SHOW VARIABLES WHERE Variable_name = 'have_query_cache' for 5.x, but LIKE is compatible
+ ($dummy, $self->{have_query_cache}) = $self->{handle}->fetchrow_array(q{
+ SHOW VARIABLES LIKE 'have_query_cache'
+ });
+ # SHOW VARIABLES WHERE Variable_name = 'query_cache_size'
+ ($dummy, $self->{query_cache_size}) = $self->{handle}->fetchrow_array(q{
+ SHOW VARIABLES LIKE 'query_cache_size'
+ });
+ $self->valdiff(\%params, qw(com_select qcache_hits));
+ $self->{querycache_hitrate_now} =
+ ($self->{delta_com_select} + $self->{delta_qcache_hits}) > 0 ?
+ 100 * $self->{delta_qcache_hits} /
+ ($self->{delta_com_select} + $self->{delta_qcache_hits}) :
+ 0;
+ $self->{querycache_hitrate} =
+ ($self->{qcache_not_cached} + $self->{qcache_inserts} + $self->{qcache_hits}) > 0 ?
+ 100 * $self->{qcache_hits} /
+ ($self->{qcache_not_cached} + $self->{qcache_inserts} + $self->{qcache_hits}) :
+ 0;
+ $self->{selects_per_sec} =
+ $self->{delta_com_select} / $self->{delta_timestamp};
+ } elsif ($params{mode} =~ /server::instance::querycachelowmemprunes/) {
+ ($dummy, $self->{lowmem_prunes}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Qcache_lowmem_prunes'
+ });
+ $self->valdiff(\%params, qw(lowmem_prunes));
+ $self->{lowmem_prunes_per_sec} = $self->{delta_lowmem_prunes} /
+ $self->{delta_timestamp};
+ } elsif ($params{mode} =~ /server::instance::slowqueries/) {
+ ($dummy, $self->{slow_queries}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Slow_queries'
+ });
+ $self->valdiff(\%params, qw(slow_queries));
+ $self->{slow_queries_per_sec} = $self->{delta_slow_queries} /
+ $self->{delta_timestamp};
+ } elsif ($params{mode} =~ /server::instance::longprocs/) {
+ if (DBD::MySQL::Server::return_first_server()->version_is_minimum("5.1")) {
+ ($self->{longrunners}) = $self->{handle}->fetchrow_array(qq(
+ SELECT
+ COUNT(*)
+ FROM
+ information_schema.processlist
+ WHERE user <> ?
+ AND id <> CONNECTION_ID()
+ AND time > 60
+ AND command <> 'Sleep'
+ ), $self->{replication_user});
+ } else {
+ $self->{longrunners} = 0 if ! defined $self->{longrunners};
+ foreach ($self->{handle}->fetchall_array(q{
+ SHOW PROCESSLIST
+ })) {
+ my($id, $user, $host, $db, $command, $tme, $state, $info) = @{$_};
+ if (($user ne $self->{replication_user}) &&
+ ($tme > 60) &&
+ ($command ne 'Sleep')) {
+ $self->{longrunners}++;
+ }
+ }
+ }
+ } elsif ($params{mode} =~ /server::instance::tablecachehitrate/) {
+ ($dummy, $self->{open_tables}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Open_tables'
+ });
+ ($dummy, $self->{opened_tables}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Opened_tables'
+ });
+ if (DBD::MySQL::Server::return_first_server()->version_is_minimum("5.1.3")) {
+ # SHOW VARIABLES WHERE Variable_name = 'table_open_cache'
+ ($dummy, $self->{table_cache}) = $self->{handle}->fetchrow_array(q{
+ SHOW VARIABLES LIKE 'table_open_cache'
+ });
+ } else {
+ # SHOW VARIABLES WHERE Variable_name = 'table_cache'
+ ($dummy, $self->{table_cache}) = $self->{handle}->fetchrow_array(q{
+ SHOW VARIABLES LIKE 'table_cache'
+ });
+ }
+ $self->{table_cache} ||= 0;
+ #$self->valdiff(\%params, qw(open_tables opened_tables table_cache));
+ # _now ist hier sinnlos, da opened_tables waechst, aber open_tables wieder
+ # schrumpfen kann weil tabellen geschlossen werden.
+ if ($self->{opened_tables} != 0 && $self->{table_cache} != 0) {
+ $self->{tablecache_hitrate} =
+ 100 * $self->{open_tables} / $self->{opened_tables};
+ $self->{tablecache_fillrate} =
+ 100 * $self->{open_tables} / $self->{table_cache};
+ } elsif ($self->{opened_tables} == 0 && $self->{table_cache} != 0) {
+ $self->{tablecache_hitrate} = 100;
+ $self->{tablecache_fillrate} =
+ 100 * $self->{open_tables} / $self->{table_cache};
+ } else {
+ $self->{tablecache_hitrate} = 0;
+ $self->{tablecache_fillrate} = 0;
+ $self->add_nagios_critical("no table cache");
+ }
+ } elsif ($params{mode} =~ /server::instance::tablelockcontention/) {
+ ($dummy, $self->{table_locks_waited}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Table_locks_waited'
+ });
+ ($dummy, $self->{table_locks_immediate}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Table_locks_immediate'
+ });
+ $self->valdiff(\%params, qw(table_locks_waited table_locks_immediate));
+ $self->{table_lock_contention} =
+ ($self->{table_locks_waited} + $self->{table_locks_immediate}) > 0 ?
+ 100 * $self->{table_locks_waited} /
+ ($self->{table_locks_waited} + $self->{table_locks_immediate}) :
+ 100;
+ $self->{table_lock_contention_now} =
+ ($self->{delta_table_locks_waited} + $self->{delta_table_locks_immediate}) > 0 ?
+ 100 * $self->{delta_table_locks_waited} /
+ ($self->{delta_table_locks_waited} + $self->{delta_table_locks_immediate}) :
+ 100;
+ } elsif ($params{mode} =~ /server::instance::tableindexusage/) {
+ # http://johnjacobm.wordpress.com/2007/06/
+ # formula for calculating the percentage of full table scans
+ ($dummy, $self->{handler_read_first}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Handler_read_first'
+ });
+ ($dummy, $self->{handler_read_key}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Handler_read_key'
+ });
+ ($dummy, $self->{handler_read_next}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Handler_read_next'
+ });
+ ($dummy, $self->{handler_read_prev}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Handler_read_prev'
+ });
+ ($dummy, $self->{handler_read_rnd}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Handler_read_rnd'
+ });
+ ($dummy, $self->{handler_read_rnd_next}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Handler_read_rnd_next'
+ });
+ $self->valdiff(\%params, qw(handler_read_first handler_read_key
+ handler_read_next handler_read_prev handler_read_rnd
+ handler_read_rnd_next));
+ my $delta_reads = $self->{delta_handler_read_first} +
+ $self->{delta_handler_read_key} +
+ $self->{delta_handler_read_next} +
+ $self->{delta_handler_read_prev} +
+ $self->{delta_handler_read_rnd} +
+ $self->{delta_handler_read_rnd_next};
+ my $reads = $self->{handler_read_first} +
+ $self->{handler_read_key} +
+ $self->{handler_read_next} +
+ $self->{handler_read_prev} +
+ $self->{handler_read_rnd} +
+ $self->{handler_read_rnd_next};
+ $self->{index_usage_now} = ($delta_reads == 0) ? 0 :
+ 100 - (100.0 * ($self->{delta_handler_read_rnd} +
+ $self->{delta_handler_read_rnd_next}) /
+ $delta_reads);
+ $self->{index_usage} = ($reads == 0) ? 0 :
+ 100 - (100.0 * ($self->{handler_read_rnd} +
+ $self->{handler_read_rnd_next}) /
+ $reads);
+ } elsif ($params{mode} =~ /server::instance::tabletmpondisk/) {
+ ($dummy, $self->{created_tmp_tables}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Created_tmp_tables'
+ });
+ ($dummy, $self->{created_tmp_disk_tables}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Created_tmp_disk_tables'
+ });
+ $self->valdiff(\%params, qw(created_tmp_tables created_tmp_disk_tables));
+ $self->{pct_tmp_on_disk} = $self->{created_tmp_tables} > 0 ?
+ 100 * $self->{created_tmp_disk_tables} / $self->{created_tmp_tables} :
+ 100;
+ $self->{pct_tmp_on_disk_now} = $self->{delta_created_tmp_tables} > 0 ?
+ 100 * $self->{delta_created_tmp_disk_tables} / $self->{delta_created_tmp_tables} :
+ 100;
+ } elsif ($params{mode} =~ /server::instance::openfiles/) {
+ ($dummy, $self->{open_files_limit}) = $self->{handle}->fetchrow_array(q{
+ SHOW VARIABLES LIKE 'open_files_limit'
+ });
+ ($dummy, $self->{open_files}) = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Open_files'
+ });
+ $self->{pct_open_files} = 100 * $self->{open_files} / $self->{open_files_limit};
+ } elsif ($params{mode} =~ /server::instance::needoptimize/) {
+ $self->{fragmented} = [];
+ #http://www.electrictoolbox.com/optimize-tables-mysql-php/
+ my @result = $self->{handle}->fetchall_array(q{
+ SHOW TABLE STATUS
+ });
+ foreach (@result) {
+ my ($name, $engine, $data_length, $data_free) =
+ ($_->[0], $_->[1], $_->[6 ], $_->[9]);
+ next if ($params{name} && $params{name} ne $name);
+ my $fragmentation = $data_length ? $data_free * 100 / $data_length : 0;
+ push(@{$self->{fragmented}},
+ [$name, $fragmentation, $data_length, $data_free]);
+ }
+ } elsif ($params{mode} =~ /server::instance::myisam/) {
+ $self->{engine_myisam} = DBD::MySQL::Server::Instance::MyISAM->new(
+ %params
+ );
+ } elsif ($params{mode} =~ /server::instance::innodb/) {
+ $self->{engine_innodb} = DBD::MySQL::Server::Instance::Innodb->new(
+ %params
+ );
+ } elsif ($params{mode} =~ /server::instance::replication/) {
+ $self->{replication} = DBD::MySQL::Server::Instance::Replication->new(
+ %params
+ );
+ }
+}
+
+sub nagios {
+ my $self = shift;
+ my %params = @_;
+ if (! $self->{nagios_level}) {
+ if ($params{mode} =~ /server::instance::connectedthreads/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{threads_connected}, 10, 20),
+ sprintf "%d client connection threads", $self->{threads_connected});
+ $self->add_perfdata(sprintf "threads_connected=%d;%d;%d",
+ $self->{threads_connected},
+ $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~ /server::instance::createdthreads/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{threads_created_per_sec}, 10, 20),
+ sprintf "%.2f threads created/sec", $self->{threads_created_per_sec});
+ $self->add_perfdata(sprintf "threads_created_per_sec=%.2f;%.2f;%.2f",
+ $self->{threads_created_per_sec},
+ $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~ /server::instance::runningthreads/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{threads_running}, 10, 20),
+ sprintf "%d running threads", $self->{threads_running});
+ $self->add_perfdata(sprintf "threads_running=%d;%d;%d",
+ $self->{threads_running},
+ $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~ /server::instance::cachedthreads/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{threads_cached}, 10, 20),
+ sprintf "%d cached threads", $self->{threads_cached});
+ $self->add_perfdata(sprintf "threads_cached=%d;%d;%d",
+ $self->{threads_cached},
+ $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~ /server::instance::abortedconnects/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{connects_aborted_per_sec}, 1, 5),
+ sprintf "%.2f aborted connections/sec", $self->{connects_aborted_per_sec});
+ $self->add_perfdata(sprintf "connects_aborted_per_sec=%.2f;%.2f;%.2f",
+ $self->{connects_aborted_per_sec},
+ $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~ /server::instance::abortedclients/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{clients_aborted_per_sec}, 1, 5),
+ sprintf "%.2f aborted (client died) connections/sec", $self->{clients_aborted_per_sec});
+ $self->add_perfdata(sprintf "clients_aborted_per_sec=%.2f;%.2f;%.2f",
+ $self->{clients_aborted_per_sec},
+ $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~ /server::instance::threadcachehitrate/) {
+ my $refkey = 'threadcache_hitrate'.($params{lookback} ? '_now' : '');
+ $self->add_nagios(
+ $self->check_thresholds($self->{$refkey}, "90:", "80:"),
+ sprintf "thread cache hitrate %.2f%%", $self->{$refkey});
+ $self->add_perfdata(sprintf "thread_cache_hitrate=%.2f%%;%s;%s",
+ $self->{threadcache_hitrate},
+ $self->{warningrange}, $self->{criticalrange});
+ $self->add_perfdata(sprintf "thread_cache_hitrate_now=%.2f%%",
+ $self->{threadcache_hitrate_now});
+ $self->add_perfdata(sprintf "connections_per_sec=%.2f",
+ $self->{connections_per_sec});
+ } elsif ($params{mode} =~ /server::instance::querycachehitrate/) {
+ my $refkey = 'querycache_hitrate'.($params{lookback} ? '_now' : '');
+ if ((lc $self->{have_query_cache} eq 'yes') && ($self->{query_cache_size})) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{$refkey}, "90:", "80:"),
+ sprintf "query cache hitrate %.2f%%", $self->{$refkey});
+ } else {
+ $self->check_thresholds($self->{$refkey}, "90:", "80:");
+ $self->add_nagios_ok(
+ sprintf "query cache hitrate %.2f%% (because it's turned off)",
+ $self->{querycache_hitrate});
+ }
+ $self->add_perfdata(sprintf "qcache_hitrate=%.2f%%;%s;%s",
+ $self->{querycache_hitrate},
+ $self->{warningrange}, $self->{criticalrange});
+ $self->add_perfdata(sprintf "qcache_hitrate_now=%.2f%%",
+ $self->{querycache_hitrate_now});
+ $self->add_perfdata(sprintf "selects_per_sec=%.2f",
+ $self->{selects_per_sec});
+ } elsif ($params{mode} =~ /server::instance::querycachelowmemprunes/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{lowmem_prunes_per_sec}, "1", "10"),
+ sprintf "%d query cache lowmem prunes in %d seconds (%.2f/sec)",
+ $self->{delta_lowmem_prunes}, $self->{delta_timestamp},
+ $self->{lowmem_prunes_per_sec});
+ $self->add_perfdata(sprintf "qcache_lowmem_prunes_rate=%.2f;%s;%s",
+ $self->{lowmem_prunes_per_sec},
+ $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~ /server::instance::slowqueries/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{slow_queries_per_sec}, "0.1", "1"),
+ sprintf "%d slow queries in %d seconds (%.2f/sec)",
+ $self->{delta_slow_queries}, $self->{delta_timestamp},
+ $self->{slow_queries_per_sec});
+ $self->add_perfdata(sprintf "slow_queries_rate=%.2f%%;%s;%s",
+ $self->{slow_queries_per_sec},
+ $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~ /server::instance::longprocs/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{longrunners}, 10, 20),
+ sprintf "%d long running processes", $self->{longrunners});
+ $self->add_perfdata(sprintf "long_running_procs=%d;%d;%d",
+ $self->{longrunners},
+ $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~ /server::instance::tablecachehitrate/) {
+ if ($self->{tablecache_fillrate} < 95) {
+ $self->add_nagios_ok(
+ sprintf "table cache hitrate %.2f%%, %.2f%% filled",
+ $self->{tablecache_hitrate},
+ $self->{tablecache_fillrate});
+ $self->check_thresholds($self->{tablecache_hitrate}, "99:", "95:");
+ } else {
+ $self->add_nagios(
+ $self->check_thresholds($self->{tablecache_hitrate}, "99:", "95:"),
+ sprintf "table cache hitrate %.2f%%", $self->{tablecache_hitrate});
+ }
+ $self->add_perfdata(sprintf "tablecache_hitrate=%.2f%%;%s;%s",
+ $self->{tablecache_hitrate},
+ $self->{warningrange}, $self->{criticalrange});
+ $self->add_perfdata(sprintf "tablecache_fillrate=%.2f%%",
+ $self->{tablecache_fillrate});
+ } elsif ($params{mode} =~ /server::instance::tablelockcontention/) {
+ my $refkey = 'table_lock_contention'.($params{lookback} ? '_now' : '');
+ if ($self->{uptime} > 10800) { # MySQL Bug #30599
+ $self->add_nagios(
+ $self->check_thresholds($self->{$refkey}, "1", "2"),
+ sprintf "table lock contention %.2f%%", $self->{$refkey});
+ } else {
+ $self->check_thresholds($self->{$refkey}, "1", "2");
+ $self->add_nagios_ok(
+ sprintf "table lock contention %.2f%% (uptime < 10800)",
+ $self->{$refkey});
+ }
+ $self->add_perfdata(sprintf "tablelock_contention=%.2f%%;%s;%s",
+ $self->{table_lock_contention},
+ $self->{warningrange}, $self->{criticalrange});
+ $self->add_perfdata(sprintf "tablelock_contention_now=%.2f%%",
+ $self->{table_lock_contention_now});
+ } elsif ($params{mode} =~ /server::instance::tableindexusage/) {
+ my $refkey = 'index_usage'.($params{lookback} ? '_now' : '');
+ $self->add_nagios(
+ $self->check_thresholds($self->{$refkey}, "90:", "80:"),
+ sprintf "index usage %.2f%%", $self->{$refkey});
+ $self->add_perfdata(sprintf "index_usage=%.2f%%;%s;%s",
+ $self->{index_usage},
+ $self->{warningrange}, $self->{criticalrange});
+ $self->add_perfdata(sprintf "index_usage_now=%.2f%%",
+ $self->{index_usage_now});
+ } elsif ($params{mode} =~ /server::instance::tabletmpondisk/) {
+ my $refkey = 'pct_tmp_on_disk'.($params{lookback} ? '_now' : '');
+ $self->add_nagios(
+ $self->check_thresholds($self->{$refkey}, "25", "50"),
+ sprintf "%.2f%% of %d tables were created on disk",
+ $self->{$refkey}, $self->{delta_created_tmp_tables});
+ $self->add_perfdata(sprintf "pct_tmp_table_on_disk=%.2f%%;%s;%s",
+ $self->{pct_tmp_on_disk},
+ $self->{warningrange}, $self->{criticalrange});
+ $self->add_perfdata(sprintf "pct_tmp_table_on_disk_now=%.2f%%",
+ $self->{pct_tmp_on_disk_now});
+ } elsif ($params{mode} =~ /server::instance::openfiles/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{pct_open_files}, 80, 95),
+ sprintf "%.2f%% of the open files limit reached (%d of max. %d)",
+ $self->{pct_open_files},
+ $self->{open_files}, $self->{open_files_limit});
+ $self->add_perfdata(sprintf "pct_open_files=%.3f%%;%.3f;%.3f",
+ $self->{pct_open_files},
+ $self->{warningrange},
+ $self->{criticalrange});
+ $self->add_perfdata(sprintf "open_files=%d;%d;%d",
+ $self->{open_files},
+ $self->{open_files_limit} * $self->{warningrange} / 100,
+ $self->{open_files_limit} * $self->{criticalrange} / 100);
+ } elsif ($params{mode} =~ /server::instance::needoptimize/) {
+ foreach (@{$self->{fragmented}}) {
+ $self->add_nagios(
+ $self->check_thresholds($_->[1], 10, 25),
+ sprintf "table %s is %.2f%% fragmented", $_->[0], $_->[1]);
+ if ($params{name}) {
+ $self->add_perfdata(sprintf "'%s_frag'=%.2f%%;%d;%d",
+ $_->[0], $_->[1], $self->{warningrange}, $self->{criticalrange});
+ }
+ }
+ } elsif ($params{mode} =~ /server::instance::myisam/) {
+ $self->{engine_myisam}->nagios(%params);
+ $self->merge_nagios($self->{engine_myisam});
+ } elsif ($params{mode} =~ /server::instance::innodb/) {
+ $self->{engine_innodb}->nagios(%params);
+ $self->merge_nagios($self->{engine_innodb});
+ } elsif ($params{mode} =~ /server::instance::replication/) {
+ $self->{replication}->nagios(%params);
+ $self->merge_nagios($self->{replication});
+ }
+ }
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Innodb.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Innodb.pm
new file mode 100755
index 0000000..8f60000
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Innodb.pm
@@ -0,0 +1,190 @@
+package DBD::MySQL::Server::Instance::Innodb;
+
+use strict;
+
+our @ISA = qw(DBD::MySQL::Server::Instance);
+
+my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );
+my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ handle => $params{handle},
+ internals => undef,
+ warningrange => $params{warningrange},
+ criticalrange => $params{criticalrange},
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ $self->init_nagios();
+ if ($params{mode} =~ /server::instance::innodb/) {
+ $self->{internals} =
+ DBD::MySQL::Server::Instance::Innodb::Internals->new(%params);
+ }
+}
+
+sub nagios {
+ my $self = shift;
+ my %params = @_;
+ if ($params{mode} =~ /server::instance::innodb/) {
+ $self->{internals}->nagios(%params);
+ $self->merge_nagios($self->{internals});
+ }
+}
+
+
+package DBD::MySQL::Server::Instance::Innodb::Internals;
+
+use strict;
+
+our @ISA = qw(DBD::MySQL::Server::Instance::Innodb);
+
+our $internals; # singleton, nur ein einziges mal instantiierbar
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ unless ($internals) {
+ $internals = {
+ handle => $params{handle},
+ bufferpool_hitrate => undef,
+ wait_free => undef,
+ log_waits => undef,
+ have_innodb => undef,
+ warningrange => $params{warningrange},
+ criticalrange => $params{criticalrange},
+ };
+ bless($internals, $class);
+ $internals->init(%params);
+ }
+ return($internals);
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $dummy;
+ $self->debug("enter init");
+ $self->init_nagios();
+ if (DBD::MySQL::Server::return_first_server()->version_is_minimum("5.1")) {
+ ($dummy, $self->{have_innodb}) = $self->{handle}->fetchrow_array(q{
+ SELECT ENGINE, SUPPORT FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='InnoDB'
+ });
+ } else {
+ ($dummy, $self->{have_innodb}) = $self->{handle}->fetchrow_array(q{
+ SHOW VARIABLES LIKE 'have_innodb'
+ });
+ }
+ if ($self->{have_innodb} eq "NO") {
+ $self->add_nagios_critical("the innodb engine has a problem (have_innodb=no)");
+ } elsif ($self->{have_innodb} eq "DISABLED") {
+ # add_nagios_ok later
+ } elsif ($params{mode} =~ /server::instance::innodb::bufferpool::hitrate/) {
+ ($dummy, $self->{bufferpool_reads})
+ = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Innodb_buffer_pool_reads'
+ });
+ ($dummy, $self->{bufferpool_read_requests})
+ = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Innodb_buffer_pool_read_requests'
+ });
+ if (! defined $self->{bufferpool_reads}) {
+ $self->add_nagios_critical("no innodb buffer pool info available");
+ } else {
+ $self->valdiff(\%params, qw(bufferpool_reads
+ bufferpool_read_requests));
+ $self->{bufferpool_hitrate_now} =
+ $self->{delta_bufferpool_read_requests} > 0 ?
+ 100 - (100 * $self->{delta_bufferpool_reads} /
+ $self->{delta_bufferpool_read_requests}) : 100;
+ $self->{bufferpool_hitrate} =
+ $self->{bufferpool_read_requests} > 0 ?
+ 100 - (100 * $self->{bufferpool_reads} /
+ $self->{bufferpool_read_requests}) : 100;
+ }
+ } elsif ($params{mode} =~ /server::instance::innodb::bufferpool::waitfree/) {
+ ($dummy, $self->{bufferpool_wait_free})
+ = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Innodb_buffer_pool_wait_free'
+ });
+ if (! defined $self->{bufferpool_wait_free}) {
+ $self->add_nagios_critical("no innodb buffer pool info available");
+ } else {
+ $self->valdiff(\%params, qw(bufferpool_wait_free));
+ $self->{bufferpool_wait_free_rate} =
+ $self->{delta_bufferpool_wait_free} / $self->{delta_timestamp};
+ }
+ } elsif ($params{mode} =~ /server::instance::innodb::logwaits/) {
+ ($dummy, $self->{log_waits})
+ = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Innodb_log_waits'
+ });
+ if (! defined $self->{log_waits}) {
+ $self->add_nagios_critical("no innodb log info available");
+ } else {
+ $self->valdiff(\%params, qw(log_waits));
+ $self->{log_waits_rate} =
+ $self->{delta_log_waits} / $self->{delta_timestamp};
+ }
+ } elsif ($params{mode} =~ /server::instance::innodb::needoptimize/) {
+#fragmentation=$(($datafree * 100 / $datalength))
+
+#http://www.electrictoolbox.com/optimize-tables-mysql-php/
+ my @result = $self->{handle}->fetchall_array(q{
+SHOW TABLE STATUS WHERE Data_free / Data_length > 0.1 AND Data_free > 102400
+});
+printf "%s\n", Data::Dumper::Dumper(\@result);
+
+ }
+}
+
+sub nagios {
+ my $self = shift;
+ my %params = @_;
+ my $now = $params{lookback} ? '_now' : '';
+ if ($self->{have_innodb} eq "DISABLED") {
+ $self->add_nagios_ok("the innodb engine has been disabled");
+ } elsif (! $self->{nagios_level}) {
+ if ($params{mode} =~ /server::instance::innodb::bufferpool::hitrate/) {
+ my $refkey = 'bufferpool_hitrate'.($params{lookback} ? '_now' : '');
+ $self->add_nagios(
+ $self->check_thresholds($self->{$refkey}, "99:", "95:"),
+ sprintf "innodb buffer pool hitrate at %.2f%%", $self->{$refkey});
+ $self->add_perfdata(sprintf "bufferpool_hitrate=%.2f%%;%s;%s;0;100",
+ $self->{bufferpool_hitrate},
+ $self->{warningrange}, $self->{criticalrange});
+ $self->add_perfdata(sprintf "bufferpool_hitrate_now=%.2f%%",
+ $self->{bufferpool_hitrate_now});
+ } elsif ($params{mode} =~ /server::instance::innodb::bufferpool::waitfree/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{bufferpool_wait_free_rate}, "1", "10"),
+ sprintf "%ld innodb buffer pool waits in %ld seconds (%.4f/sec)",
+ $self->{delta_bufferpool_wait_free}, $self->{delta_timestamp},
+ $self->{bufferpool_wait_free_rate});
+ $self->add_perfdata(sprintf "bufferpool_free_waits_rate=%.4f;%s;%s;0;100",
+ $self->{bufferpool_wait_free_rate},
+ $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~ /server::instance::innodb::logwaits/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{log_waits_rate}, "1", "10"),
+ sprintf "%ld innodb log waits in %ld seconds (%.4f/sec)",
+ $self->{delta_log_waits}, $self->{delta_timestamp},
+ $self->{log_waits_rate});
+ $self->add_perfdata(sprintf "innodb_log_waits_rate=%.4f;%s;%s;0;100",
+ $self->{log_waits_rate},
+ $self->{warningrange}, $self->{criticalrange});
+ }
+ }
+}
+
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Myisam.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Myisam.pm
new file mode 100755
index 0000000..5dc9b86
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Myisam.pm
@@ -0,0 +1,119 @@
+package DBD::MySQL::Server::Instance::MyISAM;
+
+use strict;
+
+our @ISA = qw(DBD::MySQL::Server::Instance);
+
+my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );
+my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ handle => $params{handle},
+ internals => undef,
+ warningrange => $params{warningrange},
+ criticalrange => $params{criticalrange},
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ $self->init_nagios();
+ if ($params{mode} =~ /server::instance::myisam/) {
+ $self->{internals} =
+ DBD::MySQL::Server::Instance::MyISAM::Internals->new(%params);
+ }
+}
+
+sub nagios {
+ my $self = shift;
+ my %params = @_;
+ if ($params{mode} =~ /server::instance::myisam/) {
+ $self->{internals}->nagios(%params);
+ $self->merge_nagios($self->{internals});
+ }
+}
+
+
+package DBD::MySQL::Server::Instance::MyISAM::Internals;
+
+use strict;
+
+our @ISA = qw(DBD::MySQL::Server::Instance::MyISAM);
+
+our $internals; # singleton, nur ein einziges mal instantiierbar
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ unless ($internals) {
+ $internals = {
+ handle => $params{handle},
+ keycache_hitrate => undef,
+ warningrange => $params{warningrange},
+ criticalrange => $params{criticalrange},
+ };
+ bless($internals, $class);
+ $internals->init(%params);
+ }
+ return($internals);
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $dummy;
+ $self->debug("enter init");
+ $self->init_nagios();
+ if ($params{mode} =~ /server::instance::myisam::keycache::hitrate/) {
+ ($dummy, $self->{key_reads})
+ = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Key_reads'
+ });
+ ($dummy, $self->{key_read_requests})
+ = $self->{handle}->fetchrow_array(q{
+ SHOW /*!50000 global */ STATUS LIKE 'Key_read_requests'
+ });
+ if (! defined $self->{key_read_requests}) {
+ $self->add_nagios_critical("no myisam keycache info available");
+ } else {
+ $self->valdiff(\%params, qw(key_reads key_read_requests));
+ $self->{keycache_hitrate} =
+ $self->{key_read_requests} > 0 ?
+ 100 - (100 * $self->{key_reads} /
+ $self->{key_read_requests}) : 100;
+ $self->{keycache_hitrate_now} =
+ $self->{delta_key_read_requests} > 0 ?
+ 100 - (100 * $self->{delta_key_reads} /
+ $self->{delta_key_read_requests}) : 100;
+ }
+ } elsif ($params{mode} =~ /server::instance::myisam::sonstnochwas/) {
+ }
+}
+
+sub nagios {
+ my $self = shift;
+ my %params = @_;
+ if (! $self->{nagios_level}) {
+ if ($params{mode} =~ /server::instance::myisam::keycache::hitrate/) {
+ my $refkey = 'keycache_hitrate'.($params{lookback} ? '_now' : '');
+ $self->add_nagios(
+ $self->check_thresholds($self->{$refkey}, "99:", "95:"),
+ sprintf "myisam keycache hitrate at %.2f%%", $self->{$refkey});
+ $self->add_perfdata(sprintf "keycache_hitrate=%.2f%%;%s;%s",
+ $self->{keycache_hitrate},
+ $self->{warningrange}, $self->{criticalrange});
+ $self->add_perfdata(sprintf "keycache_hitrate_now=%.2f%%;%s;%s",
+ $self->{keycache_hitrate_now},
+ $self->{warningrange}, $self->{criticalrange});
+ }
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Replication.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Replication.pm
new file mode 100755
index 0000000..fb75970
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/DBD/MySQL/Server/Instance/Replication.pm
@@ -0,0 +1,144 @@
+package DBD::MySQL::Server::Instance::Replication;
+
+use strict;
+
+our @ISA = qw(DBD::MySQL::Server::Instance);
+
+my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );
+my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ handle => $params{handle},
+ internals => undef,
+ warningrange => $params{warningrange},
+ criticalrange => $params{criticalrange},
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ $self->init_nagios();
+ if ($params{mode} =~ /server::instance::replication/) {
+ $self->{internals} =
+ DBD::MySQL::Server::Instance::Replication::Internals->new(%params);
+ }
+}
+
+sub nagios {
+ my $self = shift;
+ my %params = @_;
+ if ($params{mode} =~ /server::instance::replication/) {
+ $self->{internals}->nagios(%params);
+ $self->merge_nagios($self->{internals});
+ }
+}
+
+
+package DBD::MySQL::Server::Instance::Replication::Internals;
+
+use strict;
+
+our @ISA = qw(DBD::MySQL::Server::Instance::Replication);
+
+our $internals; # singleton, nur ein einziges mal instantiierbar
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ unless ($internals) {
+ $internals = {
+ handle => $params{handle},
+ seconds_behind_master => undef,
+ slave_io_running => undef,
+ slave_sql_running => undef,
+ warningrange => $params{warningrange},
+ criticalrange => $params{criticalrange},
+ };
+ bless($internals, $class);
+ $internals->init(%params);
+ }
+ return($internals);
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ $self->debug("enter init");
+ $self->init_nagios();
+ if ($params{mode} =~ /server::instance::replication::slavelag/) {
+ # "show slave status", "Seconds_Behind_Master"
+ my $slavehash = $self->{handle}->selectrow_hashref(q{
+ SHOW SLAVE STATUS
+ });
+ if ((! defined $slavehash->{Seconds_Behind_Master}) &&
+ (lc $slavehash->{Slave_IO_Running} eq 'no')) {
+ $self->add_nagios_critical(
+ "unable to get slave lag, because io thread is not running");
+ } elsif (! defined $slavehash->{Seconds_Behind_Master}) {
+ $self->add_nagios_critical(sprintf "unable to get replication info%s",
+ $self->{handle}->{errstr} ? $self->{handle}->{errstr} : "");
+ } else {
+ $self->{seconds_behind_master} = $slavehash->{Seconds_Behind_Master};
+ }
+ } elsif ($params{mode} =~ /server::instance::replication::slaveiorunning/) {
+ # "show slave status", "Slave_IO_Running"
+ my $slavehash = $self->{handle}->selectrow_hashref(q{
+ SHOW SLAVE STATUS
+ });
+ if (! defined $slavehash->{Slave_IO_Running}) {
+ $self->add_nagios_critical(sprintf "unable to get replication info%s",
+ $self->{handle}->{errstr} ? $self->{handle}->{errstr} : "");
+ } else {
+ $self->{slave_io_running} = $slavehash->{Slave_IO_Running};
+ }
+ } elsif ($params{mode} =~ /server::instance::replication::slavesqlrunning/) {
+ # "show slave status", "Slave_SQL_Running"
+ my $slavehash = $self->{handle}->selectrow_hashref(q{
+ SHOW SLAVE STATUS
+ });
+ if (! defined $slavehash->{Slave_SQL_Running}) {
+ $self->add_nagios_critical(sprintf "unable to get replication info%s",
+ $self->{handle}->{errstr} ? $self->{handle}->{errstr} : "");
+ } else {
+ $self->{slave_sql_running} = $slavehash->{Slave_SQL_Running};
+ }
+ }
+}
+
+sub nagios {
+ my $self = shift;
+ my %params = @_;
+ if (! $self->{nagios_level}) {
+ if ($params{mode} =~ /server::instance::replication::slavelag/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{seconds_behind_master}, "10", "20"),
+ sprintf "Slave is %d seconds behind master",
+ $self->{seconds_behind_master});
+ $self->add_perfdata(sprintf "slave_lag=%d;%s;%s",
+ $self->{seconds_behind_master},
+ $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~ /server::instance::replication::slaveiorunning/) {
+ if (lc $self->{slave_io_running} eq "yes") {
+ $self->add_nagios_ok("Slave io is running");
+ } else {
+ $self->add_nagios_critical("Slave io is not running");
+ }
+ } elsif ($params{mode} =~ /server::instance::replication::slavesqlrunning/) {
+ if (lc $self->{slave_sql_running} eq "yes") {
+ $self->add_nagios_ok("Slave sql is running");
+ } else {
+ $self->add_nagios_critical("Slave sql is not running");
+ }
+ }
+ }
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/Extraopts.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/Extraopts.pm
new file mode 100755
index 0000000..49e13bb
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/Nagios/Extraopts.pm
@@ -0,0 +1,103 @@
+package Extraopts;
+
+use strict;
+use File::Basename;
+use Data::Dumper;
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ file => $params{file},
+ commandline => $params{commandline},
+ config => {},
+ section => 'default_no_section',
+ };
+ bless $self, $class;
+ $self->prepare_file_and_section();
+ $self->init();
+ return $self;
+}
+
+sub prepare_file_and_section {
+ my $self = shift;
+ if (! defined $self->{file}) {
+ # ./check_stuff --extra-opts
+ $self->{section} = basename($0);
+ $self->{file} = $self->get_default_file();
+ } elsif ($self->{file} =~ /^[^@]+$/) {
+ # ./check_stuff --extra-opts=special_opts
+ $self->{section} = $self->{file};
+ $self->{file} = $self->get_default_file();
+ } elsif ($self->{file} =~ /^@(.*)/) {
+ # ./check_stuff --extra-opts=@/etc/myconfig.ini
+ $self->{section} = basename($0);
+ $self->{file} = $1;
+ } elsif ($self->{file} =~ /^(.*?)@(.*)/) {
+ # ./check_stuff --extra-opts=special_opts@/etc/myconfig.ini
+ $self->{section} = $1;
+ $self->{file} = $2;
+ }
+}
+
+sub get_default_file {
+ my $self = shift;
+ foreach my $default (qw(/etc/nagios/plugins.ini
+ /usr/local/nagios/etc/plugins.ini
+ /usr/local/etc/nagios/plugins.ini
+ /etc/opt/nagios/plugins.ini
+ /etc/nagios-plugins.ini
+ /usr/local/etc/nagios-plugins.ini
+ /etc/opt/nagios-plugins.ini)) {
+ if (-f $default) {
+ return $default;
+ }
+ }
+ return undef;
+}
+
+sub init {
+ my $self = shift;
+ if (! defined $self->{file}) {
+ $self->{errors} = sprintf 'no extra-opts file specified and no default file found';
+ } elsif (! -f $self->{file}) {
+ $self->{errors} = sprintf 'could not open %s', $self->{file};
+ } else {
+ my $data = do { local (@ARGV, $/) = $self->{file}; <> };
+ my $in_section = 'default_no_section';
+ foreach my $line (split(/\n/, $data)) {
+ if ($line =~ /\[(.*)\]/) {
+ $in_section = $1;
+ } elsif ($line =~ /(.*?)\s*=\s*(.*)/) {
+ $self->{config}->{$in_section}->{$1} = $2;
+ }
+ }
+ }
+}
+
+sub is_valid {
+ my $self = shift;
+ return ! exists $self->{errors};
+}
+
+sub overwrite {
+ my $self = shift;
+ my %commandline = ();
+ if (scalar(keys %{$self->{config}->{default_no_section}}) > 0) {
+ foreach (keys %{$self->{config}->{default_no_section}}) {
+ $commandline{$_} = $self->{config}->{default_no_section}->{$_};
+ }
+ }
+ if (exists $self->{config}->{$self->{section}}) {
+ foreach (keys %{$self->{config}->{$self->{section}}}) {
+ $commandline{$_} = $self->{config}->{$self->{section}}->{$_};
+ }
+ }
+ foreach (keys %commandline) {
+ if (! exists $self->{commandline}->{$_}) {
+ $self->{commandline}->{$_} = $commandline{$_};
+ }
+ }
+}
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/check_mysql_health.pl b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/check_mysql_health.pl
new file mode 100755
index 0000000..613dc19
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/check_mysql_health.pl
@@ -0,0 +1,613 @@
+
+package main;
+
+use strict;
+use Getopt::Long qw(:config no_ignore_case);
+use File::Basename;
+use lib dirname($0);
+use Nagios::DBD::MySQL::Server;
+use Nagios::DBD::MySQL::Cluster;
+
+
+my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );
+my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );
+
+use vars qw ($PROGNAME $REVISION $CONTACT $TIMEOUT $STATEFILESDIR $needs_restart %commandline);
+
+$PROGNAME = "check_mysql_health";
+$REVISION = '$Revision: #PACKAGE_VERSION# $';
+$CONTACT = 'gerhard.lausser@consol.de';
+$TIMEOUT = 60;
+$STATEFILESDIR = '#STATEFILES_DIR#';
+$needs_restart = 0;
+
+my @modes = (
+ ['server::connectiontime',
+ 'connection-time', undef,
+ 'Time to connect to the server' ],
+ ['server::uptime',
+ 'uptime', undef,
+ 'Time the server is running' ],
+ ['server::instance::connectedthreads',
+ 'threads-connected', undef,
+ 'Number of currently open connections' ],
+ ['server::instance::threadcachehitrate',
+ 'threadcache-hitrate', undef,
+ 'Hit rate of the thread-cache' ],
+ ['server::instance::createdthreads',
+ 'threads-created', undef,
+ 'Number of threads created per sec' ],
+ ['server::instance::runningthreads',
+ 'threads-running', undef,
+ 'Number of currently running threads' ],
+ ['server::instance::cachedthreads',
+ 'threads-cached', undef,
+ 'Number of currently cached threads' ],
+ ['server::instance::abortedconnects',
+ 'connects-aborted', undef,
+ 'Number of aborted connections per sec' ],
+ ['server::instance::abortedclients',
+ 'clients-aborted', undef,
+ 'Number of aborted connections (because the client died) per sec' ],
+ ['server::instance::replication::slavelag',
+ 'slave-lag', ['replication-slave-lag'],
+ 'Seconds behind master' ],
+ ['server::instance::replication::slaveiorunning',
+ 'slave-io-running', ['replication-slave-io-running'],
+ 'Slave io running: Yes' ],
+ ['server::instance::replication::slavesqlrunning',
+ 'slave-sql-running', ['replication-slave-sql-running'],
+ 'Slave sql running: Yes' ],
+ ['server::instance::querycachehitrate',
+ 'qcache-hitrate', ['querycache-hitrate'],
+ 'Query cache hitrate' ],
+ ['server::instance::querycachelowmemprunes',
+ 'qcache-lowmem-prunes', ['querycache-lowmem-prunes'],
+ 'Query cache entries pruned because of low memory' ],
+ ['server::instance::myisam::keycache::hitrate',
+ 'keycache-hitrate', ['myisam-keycache-hitrate'],
+ 'MyISAM key cache hitrate' ],
+ ['server::instance::innodb::bufferpool::hitrate',
+ 'bufferpool-hitrate', ['innodb-bufferpool-hitrate'],
+ 'InnoDB buffer pool hitrate' ],
+ ['server::instance::innodb::bufferpool::waitfree',
+ 'bufferpool-wait-free', ['innodb-bufferpool-wait-free'],
+ 'InnoDB buffer pool waits for clean page available' ],
+ ['server::instance::innodb::logwaits',
+ 'log-waits', ['innodb-log-waits'],
+ 'InnoDB log waits because of a too small log buffer' ],
+ ['server::instance::tablecachehitrate',
+ 'tablecache-hitrate', undef,
+ 'Table cache hitrate' ],
+ ['server::instance::tablelockcontention',
+ 'table-lock-contention', undef,
+ 'Table lock contention' ],
+ ['server::instance::tableindexusage',
+ 'index-usage', undef,
+ 'Usage of indices' ],
+ ['server::instance::tabletmpondisk',
+ 'tmp-disk-tables', undef,
+ 'Percent of temp tables created on disk' ],
+ ['server::instance::needoptimize',
+ 'table-fragmentation', undef,
+ 'Show tables which should be optimized' ],
+ ['server::instance::openfiles',
+ 'open-files', undef,
+ 'Percent of opened files' ],
+ ['server::instance::slowqueries',
+ 'slow-queries', undef,
+ 'Slow queries' ],
+ ['server::instance::longprocs',
+ 'long-running-procs', undef,
+ 'long running processes' ],
+ ['cluster::ndbdrunning',
+ 'cluster-ndbd-running', undef,
+ 'ndnd nodes are up and running' ],
+ ['server::sql',
+ 'sql', undef,
+ 'any sql command returning a single number' ],
+);
+
+# rrd data store names are limited to 19 characters
+my %labels = (
+ bufferpool_hitrate => {
+ groundwork => 'bp_hitrate',
+ },
+ bufferpool_hitrate_now => {
+ groundwork => 'bp_hitrate_now',
+ },
+ bufferpool_free_waits_rate => {
+ groundwork => 'bp_freewaits',
+ },
+ innodb_log_waits_rate => {
+ groundwork => 'inno_log_waits',
+ },
+ keycache_hitrate => {
+ groundwork => 'kc_hitrate',
+ },
+ keycache_hitrate_now => {
+ groundwork => 'kc_hitrate_now',
+ },
+ threads_created_per_sec => {
+ groundwork => 'thrds_creat_per_s',
+ },
+ connects_aborted_per_sec => {
+ groundwork => 'conn_abrt_per_s',
+ },
+ clients_aborted_per_sec => {
+ groundwork => 'clnt_abrt_per_s',
+ },
+ thread_cache_hitrate => {
+ groundwork => 'tc_hitrate',
+ },
+ thread_cache_hitrate_now => {
+ groundwork => 'tc_hitrate_now',
+ },
+ qcache_lowmem_prunes_rate => {
+ groundwork => 'qc_lowm_prnsrate',
+ },
+ slow_queries_rate => {
+ groundwork => 'slow_q_rate',
+ },
+ tablecache_hitrate => {
+ groundwork => 'tac_hitrate',
+ },
+ tablecache_fillrate => {
+ groundwork => 'tac_fillrate',
+ },
+ tablelock_contention => {
+ groundwork => 'tl_contention',
+ },
+ tablelock_contention_now => {
+ groundwork => 'tl_contention_now',
+ },
+ pct_tmp_table_on_disk => {
+ groundwork => 'tmptab_on_disk',
+ },
+ pct_tmp_table_on_disk_now => {
+ groundwork => 'tmptab_on_disk_now',
+ },
+);
+
+sub print_usage () {
+ print <<EOUS;
+ Usage:
+ $PROGNAME [-v] [-t <timeout>] [[--hostname <hostname>]
+ [--port <port> | --socket <socket>]
+ --username <username> --password <password>] --mode <mode>
+ [--method mysql]
+ $PROGNAME [-h | --help]
+ $PROGNAME [-V | --version]
+
+ Options:
+ --hostname
+ the database server's hostname
+ --port
+ the database's port. (default: 3306)
+ --socket
+ the database's unix socket.
+ --username
+ the mysql db user
+ --password
+ the mysql db user's password
+ --database
+ the database's name. (default: information_schema)
+ --replication-user
+ the database's replication user name (default: replication)
+ --warning
+ the warning range
+ --critical
+ the critical range
+ --mode
+ the mode of the plugin. select one of the following keywords:
+EOUS
+ my $longest = length ((reverse sort {length $a <=> length $b} map { $_->[1] } @modes)[0]);
+ my $format = " %-".
+ (length ((reverse sort {length $a <=> length $b} map { $_->[1] } @modes)[0])).
+ "s\t(%s)\n";
+ foreach (@modes) {
+ printf $format, $_->[1], $_->[3];
+ }
+ printf "\n";
+ print <<EOUS;
+ --name
+ the name of something that needs to be further specified,
+ currently only used for sql statements
+ --name2
+ if name is a sql statement, this statement would appear in
+ the output and the performance data. This can be ugly, so
+ name2 can be used to appear instead.
+ --regexp
+ if this parameter is used, name will be interpreted as a
+ regular expression.
+ --units
+ one of %, KB, MB, GB. This is used for a better output of mode=sql
+ and for specifying thresholds for mode=tablespace-free
+ --labelformat
+ one of pnp4nagios (which is the default) or groundwork.
+ It is used to shorten performance data labels to 19 characters.
+
+ In mode sql you can url-encode the statement so you will not have to mess
+ around with special characters in your Nagios service definitions.
+ Instead of
+ --name="select count(*) from v\$session where status = 'ACTIVE'"
+ you can say
+ --name=select%20count%28%2A%29%20from%20v%24session%20where%20status%20%3D%20%27ACTIVE%27
+ For your convenience you can call check_mysql_health with the --mode encode
+ option and it will encode the standard input.
+
+ You can find the full documentation at
+ https://labs.consol.de/nagios/check_mysql_health/
+
+EOUS
+
+}
+
+sub print_help () {
+ print "Copyright (c) 2009 Gerhard Lausser\n\n";
+ print "\n";
+ print " Check various parameters of MySQL databases \n";
+ print "\n";
+ print_usage();
+ support();
+}
+
+
+sub print_revision ($$) {
+ my $commandName = shift;
+ my $pluginRevision = shift;
+ $pluginRevision =~ s/^\$Revision: //;
+ $pluginRevision =~ s/ \$\s*$//;
+ print "$commandName ($pluginRevision)\n";
+ print "This nagios plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of this plugin under the terms of the GNU General Public License.\n";
+}
+
+sub support () {
+ my $support='Send email to gerhard.lausser@consol.de if you have questions\nregarding use of this software. \nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n';
+ $support =~ s/@/\@/g;
+ $support =~ s/\\n/\n/g;
+ print $support;
+}
+
+sub contact_author ($$) {
+ my $item = shift;
+ my $strangepattern = shift;
+ if ($commandline{verbose}) {
+ printf STDERR
+ "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n".
+ "You found a line which is not recognized by %s\n".
+ "This means, certain components of your system cannot be checked.\n".
+ "Please contact the author %s and\nsend him the following output:\n\n".
+ "%s /%s/\n\nThank you!\n".
+ "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n",
+ $PROGNAME, $CONTACT, $item, $strangepattern;
+ }
+}
+
+%commandline = ();
+my @params = (
+ "timeout|t=i",
+ "version|V",
+ "help|h",
+ "verbose|v",
+ "debug|d",
+ "hostname|H=s",
+ "database=s",
+ "port|P=s",
+ "socket|S=s",
+ "username|u=s",
+ "password|p=s",
+ "replication-user=s",
+ "mycnf=s",
+ "mycnfgroup=s",
+ "mode|m=s",
+ "name=s",
+ "name2=s",
+ "regexp",
+ "perfdata",
+ "warning=s",
+ "critical=s",
+ "dbthresholds:s",
+ "absolute|a",
+ "environment|e=s%",
+ "negate=s%",
+ "method=s",
+ "runas|r=s",
+ "scream",
+ "shell",
+ "eyecandy",
+ "encode",
+ "units=s",
+ "lookback=i",
+ "3",
+ "statefilesdir=s",
+ "with-mymodules-dyn-dir=s",
+ "report=s",
+ "labelformat=s",
+ "extra-opts:s");
+
+if (! GetOptions(\%commandline, @params)) {
+ print_help();
+ exit $ERRORS{UNKNOWN};
+}
+
+if (exists $commandline{'extra-opts'}) {
+ # read the extra file and overwrite other parameters
+ my $extras = Extraopts->new(file => $commandline{'extra-opts'}, commandline =>
+ \%commandline);
+ if (! $extras->is_valid()) {
+ printf "extra-opts are not valid: %s\n", $extras->{errors};
+ exit $ERRORS{UNKNOWN};
+ } else {
+ $extras->overwrite();
+ }
+}
+
+if (exists $commandline{version}) {
+ print_revision($PROGNAME, $REVISION);
+ exit $ERRORS{OK};
+}
+
+if (exists $commandline{help}) {
+ print_help();
+ exit $ERRORS{OK};
+} elsif (! exists $commandline{mode}) {
+ printf "Please select a mode\n";
+ print_help();
+ exit $ERRORS{OK};
+}
+
+if ($commandline{mode} eq "encode") {
+ my $input = <>;
+ chomp $input;
+ $input =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
+ printf "%s\n", $input;
+ exit $ERRORS{OK};
+}
+
+if (exists $commandline{3}) {
+ $ENV{NRPE_MULTILINESUPPORT} = 1;
+}
+
+if (exists $commandline{timeout}) {
+ $TIMEOUT = $commandline{timeout};
+}
+
+if (exists $commandline{verbose}) {
+ $DBD::MySQL::Server::verbose = exists $commandline{verbose};
+}
+
+if (exists $commandline{scream}) {
+# $DBD::MySQL::Server::hysterical = exists $commandline{scream};
+}
+
+if (exists $commandline{method}) {
+ # snmp or mysql cmdline
+} else {
+ $commandline{method} = "dbi";
+}
+
+if (exists $commandline{report}) {
+ # short, long, html
+} else {
+ $commandline{report} = "long";
+}
+
+if (exists $commandline{labelformat}) {
+ # groundwork
+} else {
+ $commandline{labelformat} = "pnp4nagios";
+}
+
+if (exists $commandline{'with-mymodules-dyn-dir'}) {
+ $DBD::MySQL::Server::my_modules_dyn_dir = $commandline{'with-mymodules-dyn-dir'};
+} else {
+ $DBD::MySQL::Server::my_modules_dyn_dir = '#MYMODULES_DYN_DIR#';
+}
+
+if (exists $commandline{environment}) {
+ # if the desired environment variable values are different from
+ # the environment of this running script, then a restart is necessary.
+ # because setting $ENV does _not_ change the environment of the running script.
+ foreach (keys %{$commandline{environment}}) {
+ if ((! $ENV{$_}) || ($ENV{$_} ne $commandline{environment}->{$_})) {
+ $needs_restart = 1;
+ $ENV{$_} = $commandline{environment}->{$_};
+ printf STDERR "new %s=%s forces restart\n", $_, $ENV{$_}
+ if $DBD::MySQL::Server::verbose;
+ }
+ }
+ # e.g. called with --runas dbnagio. shlib_path environment variable is stripped
+ # during the sudo.
+ # so the perl interpreter starts without a shlib_path. but --runas cares for
+ # a --environment shlib_path=...
+ # so setting the environment variable in the code above and restarting the
+ # perl interpreter will help it find shared libs
+}
+
+if (exists $commandline{runas}) {
+ # remove the runas parameter
+ # exec sudo $0 ... the remaining parameters
+ $needs_restart = 1;
+ # if the calling script has a path for shared libs and there is no --environment
+ # parameter then the called script surely needs the variable too.
+ foreach my $important_env (qw(LD_LIBRARY_PATH SHLIB_PATH
+ ORACLE_HOME TNS_ADMIN ORA_NLS ORA_NLS33 ORA_NLS10)) {
+ if ($ENV{$important_env} && ! scalar(grep { /^$important_env=/ }
+ keys %{$commandline{environment}})) {
+ $commandline{environment}->{$important_env} = $ENV{$important_env};
+ printf STDERR "add important --environment %s=%s\n",
+ $important_env, $ENV{$important_env} if $DBD::MySQL::Server::verbose;
+ }
+ }
+}
+
+if ($needs_restart) {
+ my @newargv = ();
+ my $runas = undef;
+ if (exists $commandline{runas}) {
+ $runas = $commandline{runas};
+ delete $commandline{runas};
+ }
+ foreach my $option (keys %commandline) {
+ if (grep { /^$option/ && /=/ } @params) {
+ if (ref ($commandline{$option}) eq "HASH") {
+ foreach (keys %{$commandline{$option}}) {
+ push(@newargv, sprintf "--%s", $option);
+ push(@newargv, sprintf "%s=%s", $_, $commandline{$option}->{$_});
+ }
+ } else {
+ push(@newargv, sprintf "--%s", $option);
+ push(@newargv, sprintf "%s", $commandline{$option});
+ }
+ } else {
+ push(@newargv, sprintf "--%s", $option);
+ }
+ }
+ if ($runas) {
+ exec "sudo", "-S", "-u", $runas, $0, @newargv;
+ } else {
+ exec $0, @newargv;
+ # this makes sure that even a SHLIB or LD_LIBRARY_PATH are set correctly
+ # when the perl interpreter starts. Setting them during runtime does not
+ # help loading e.g. libclntsh.so
+ }
+ exit;
+}
+
+if (exists $commandline{shell}) {
+ # forget what you see here.
+ system("/bin/sh");
+}
+
+if (! exists $commandline{statefilesdir}) {
+ if (exists $ENV{OMD_ROOT}) {
+ $commandline{statefilesdir} = $ENV{OMD_ROOT}."/var/tmp/check_mysql_health";
+ } else {
+ $commandline{statefilesdir} = $STATEFILESDIR;
+ }
+}
+
+if (exists $commandline{name}) {
+ if ($^O =~ /MSWin/ && $commandline{name} =~ /^'(.*)'$/) {
+ # putting arguments in single ticks under Windows CMD leaves the ' intact
+ # we remove them
+ $commandline{name} = $1;
+ }
+ # objects can be encoded like an url
+ # with s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
+ if (($commandline{mode} ne "sql") ||
+ (($commandline{mode} eq "sql") &&
+ ($commandline{name} =~ /select%20/i))) { # protect ... like '%cac%' ... from decoding
+ $commandline{name} =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg;
+ }
+ if ($commandline{name} =~ /^0$/) {
+ # without this, $params{selectname} would be treated like undef
+ $commandline{name} = "00";
+ }
+}
+
+$SIG{'ALRM'} = sub {
+ printf "UNKNOWN - %s timed out after %d seconds\n", $PROGNAME, $TIMEOUT;
+ exit $ERRORS{UNKNOWN};
+};
+alarm($TIMEOUT);
+
+my $nagios_level = $ERRORS{UNKNOWN};
+my $nagios_message = "";
+my $perfdata = "";
+if ($commandline{mode} =~ /^my-([^\-.]+)/) {
+ my $param = $commandline{mode};
+ $param =~ s/\-/::/g;
+ push(@modes, [$param, $commandline{mode}, undef, 'my extension']);
+} elsif ((! grep { $commandline{mode} eq $_ } map { $_->[1] } @modes) &&
+ (! grep { $commandline{mode} eq $_ } map { defined $_->[2] ? @{$_->[2]} : () } @modes)) {
+ printf "UNKNOWN - mode %s\n", $commandline{mode};
+ print_usage();
+ exit 3;
+}
+my %params = (
+ timeout => $TIMEOUT,
+ mode => (
+ map { $_->[0] }
+ grep {
+ ($commandline{mode} eq $_->[1]) ||
+ ( defined $_->[2] && grep { $commandline{mode} eq $_ } @{$_->[2]})
+ } @modes
+ )[0],
+ cmdlinemode => $commandline{mode},
+ method => $commandline{method} ||
+ $ENV{NAGIOS__SERVICEMYSQL_METH} ||
+ $ENV{NAGIOS__HOSTMYSQL_METH} || 'dbi',
+ hostname => $commandline{hostname} ||
+ $ENV{NAGIOS__SERVICEMYSQL_HOST} ||
+ $ENV{NAGIOS__HOSTMYSQL_HOST} || 'localhost',
+ database => $commandline{database} ||
+ $ENV{NAGIOS__SERVICEMYSQL_DATABASE} ||
+ $ENV{NAGIOS__HOSTMYSQL_DATABASE} || 'information_schema',
+ port => $commandline{port} || (($commandline{mode} =~ /^cluster/) ?
+ ($ENV{NAGIOS__SERVICENDBMGM_PORT} || $ENV{NAGIOS__HOSTNDBMGM_PORT} || 1186) :
+ ($ENV{NAGIOS__SERVICEMYSQL_PORT} || $ENV{NAGIOS__HOSTMYSQL_PORT} || 3306)),
+ socket => $commandline{socket} ||
+ $ENV{NAGIOS__SERVICEMYSQL_SOCKET} ||
+ $ENV{NAGIOS__HOSTMYSQL_SOCKET},
+ username => $commandline{username} ||
+ $ENV{NAGIOS__SERVICEMYSQL_USER} ||
+ $ENV{NAGIOS__HOSTMYSQL_USER},
+ password => $commandline{password} ||
+ $ENV{NAGIOS__SERVICEMYSQL_PASS} ||
+ $ENV{NAGIOS__HOSTMYSQL_PASS},
+ replication_user => $commandline{'replication-user'} || 'replication',
+ mycnf => $commandline{mycnf} ||
+ $ENV{NAGIOS__SERVICEMYSQL_MYCNF} ||
+ $ENV{NAGIOS__HOSTMYSQL_MYCNF},
+ mycnfgroup => $commandline{mycnfgroup} ||
+ $ENV{NAGIOS__SERVICEMYSQL_MYCNFGROUP} ||
+ $ENV{NAGIOS__HOSTMYSQL_MYCNFGROUP},
+ warningrange => $commandline{warning},
+ criticalrange => $commandline{critical},
+ dbthresholds => $commandline{dbthresholds},
+ absolute => $commandline{absolute},
+ lookback => $commandline{lookback},
+ selectname => $commandline{name} || $commandline{tablespace} || $commandline{datafile},
+ regexp => $commandline{regexp},
+ name => $commandline{name},
+ name2 => $commandline{name2} || $commandline{name},
+ units => $commandline{units},
+ lookback => $commandline{lookback} || 0,
+ eyecandy => $commandline{eyecandy},
+ statefilesdir => $commandline{statefilesdir},
+ verbose => $commandline{verbose},
+ report => $commandline{report},
+ labelformat => $commandline{labelformat},
+ negate => $commandline{negate},
+);
+
+my $server = undef;
+my $cluster = undef;
+
+if ($params{mode} =~ /^(server|my)/) {
+ $server = DBD::MySQL::Server->new(%params);
+ $server->nagios(%params);
+ $server->calculate_result(\%labels);
+ $nagios_message = $server->{nagios_message};
+ $nagios_level = $server->{nagios_level};
+ $perfdata = $server->{perfdata};
+} elsif ($params{mode} =~ /^cluster/) {
+ $cluster = DBD::MySQL::Cluster->new(%params);
+ $cluster->nagios(%params);
+ $cluster->calculate_result(\%labels);
+ $nagios_message = $cluster->{nagios_message};
+ $nagios_level = $cluster->{nagios_level};
+ $perfdata = $cluster->{perfdata};
+}
+
+printf "%s - %s", $ERRORCODES{$nagios_level}, $nagios_message;
+printf " | %s", $perfdata if $perfdata;
+printf "\n";
+exit $nagios_level;
+
+
+__END__
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/subst.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/subst.in
new file mode 100755
index 0000000..7edf296
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/plugins-scripts/subst.in
@@ -0,0 +1,61 @@
+#!/usr/bin/awk
+
+function which(c,path) {
+ cmd = "test -x " c;
+
+ if (system(cmd)==0) {
+ return c;
+ }
+
+ sub(/\/.*\//,"",c);
+ for (dir in path) {
+ cmd = "test -x " path[dir] "/" c;
+ if (system(cmd)==0) {
+ return path[dir] "/" c;
+ }
+ }
+
+
+ return c;
+}
+
+# used to replace "use lib utils.pm" with "use lib @libexecdir"
+#
+function led() {
+ led1 = "@libexecdir@";
+ led2 = "@exec_prefix@";
+ led3 = "@prefix@";
+ if ( match(led1, /^\$\{exec_prefix\}/ ) != 0 ) {
+ return "\"" led3 "/libexec\" " ;
+
+ }
+ return "\"" led1 "\"" ;
+}
+
+BEGIN {
+ split(ENVIRON["PATH"] ":/sbin:/usr/sbin",path,/:/);
+
+}
+
+# scripting language (first line)
+
+/^#! ?\/.*\/python/ {sub(/^#! ?\/.*\/python/,"#! @PYTHON@");}
+/^#! ?\/.*\/perl/ {sub(/^#! ?\/.*\/perl/,"#! @PERL@");}
+/^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! @AWK@");}
+/^#! ?\/.*\/sh/ {sub(/^#! ?\/.*\/sh/,"#! @SHELL@");}
+
+# add to libexecdir to INC for perl utils.pm
+/^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } }
+
+
+# Replace the placeholders with the values from configure
+/#PERL#/ {sub(/#PERL#/,"@PERL@");}
+/#GZIP#/ {sub(/#GZIP#/,"@GZIP@");}
+/#STATEFILES_DIR#/ {sub(/#STATEFILES_DIR#/,"@STATEFILES_DIR@");}
+/#PACKAGE_VERSION#/ {sub(/#PACKAGE_VERSION#/,"@PACKAGE_VERSION@");}
+/#MYMODULES_DYN_DIR#/ {sub(/#MYMODULES_DYN_DIR#/,"@MYMODULES_DYN_DIR@");}
+
+{
+ print;
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/t/Makefile.am b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/t/Makefile.am
new file mode 100755
index 0000000..07ee9c9
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/t/Makefile.am
@@ -0,0 +1,21 @@
+##
+## Process this file with automake to produce Makefile.in
+##
+
+AUTOMAKE_OPTIONS = 1.3 no-dependencies
+
+#all: tests
+
+TEST_VERBOSE=0
+TEST_TYPE=test_$(LINKTYPE)
+TEST_FILE = test.pl
+TEST_FILES = *.t
+TESTDB_SW = -d
+
+#EXTRA_DIST = *.t bin var etc
+EXTRA_DIST = *.t
+
+tests:
+ $(PERL) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE))" $(TEST_FILES)
+# PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/t/Makefile.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/t/Makefile.in
new file mode 100644
index 0000000..f8d6f4e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/t/Makefile.in
@@ -0,0 +1,412 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = t
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+depcomp =
+am__depfiles_maybe =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAT = @CAT@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+GREP = @GREP@
+GZIP = @GZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_OPTS = @INSTALL_OPTS@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MYMODULES_DIR = @MYMODULES_DIR@
+MYMODULES_DYN_DIR = @MYMODULES_DYN_DIR@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+RELEASE = @RELEASE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SH = @SH@
+SHELL = @SHELL@
+STATEFILES_DIR = @STATEFILES_DIR@
+STRIP = @STRIP@
+SUPPORT = @SUPPORT@
+VERSION = @VERSION@
+WARRANTY = @WARRANTY@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+with_nagios_group = @with_nagios_group@
+with_nagios_user = @with_nagios_user@
+AUTOMAKE_OPTIONS = 1.3 no-dependencies
+
+#all: tests
+TEST_VERBOSE = 0
+TEST_TYPE = test_$(LINKTYPE)
+TEST_FILE = test.pl
+TEST_FILES = *.t
+TESTDB_SW = -d
+
+#EXTRA_DIST = *.t bin var etc
+EXTRA_DIST = *.t
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu t/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu t/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
+ ctags-am distclean distclean-generic distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags-am uninstall uninstall-am
+
+
+tests:
+ $(PERL) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE))" $(TEST_FILES)
+# PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/t/check_mysql_health.t b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/t/check_mysql_health.t
new file mode 100755
index 0000000..0a5286f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/check_mysql_health-2.2.2/t/check_mysql_health.t
@@ -0,0 +1,159 @@
+#! /usr/bin/perl -w -I ..
+#
+# MySQL Database Server Tests via check_mysql_healthdb
+#
+#
+# These are the database permissions required for this test:
+# GRANT SELECT ON $db.* TO $user@$host INDENTIFIED BY '$password';
+# GRANT SUPER, REPLICATION CLIENT ON *.* TO $user@$host;
+# Check with:
+# mysql -u$user -p$password -h$host $db
+
+use strict;
+use Test::More;
+use NPTest;
+
+use vars qw($tests);
+
+plan skip_all => "check_mysql_health not compiled" unless (-x "./check_mysql_health");
+
+plan tests => 51;
+
+my $bad_login_output = '/Access denied for user /';
+my $mysqlserver = getTestParameter(
+ "NP_MYSQL_SERVER",
+ "A MySQL Server with no slaves setup"
+ );
+my $mysql_login_details = getTestParameter(
+ "MYSQL_LOGIN_DETAILS",
+ "Command line parameters to specify login access",
+ "-u user -ppw -d db",
+ );
+my $with_slave = getTestParameter(
+ "NP_MYSQL_WITH_SLAVE",
+ "MySQL server with slaves setup"
+ );
+my $with_slave_login = getTestParameter(
+ "NP_MYSQL_WITH_SLAVE_LOGIN",
+ "Login details for server with slave",
+ "-uroot -ppw"
+ );
+
+my $result;
+SKIP: {
+ $result = NPTest->testCmd("./check_mysql_health -V");
+ cmp_ok( $result->return_code, '==', 0, "expected result");
+ like( $result->output, "/check_mysql_health \\(\\d+\\.\\d+\\)/", "Expected message");
+
+ $result = NPTest->testCmd("./check_mysql_health --help");
+ cmp_ok( $result->return_code, '==', 0, "expected result");
+ like( $result->output, "/slave-lag/", "Expected message");
+ like( $result->output, "/slave-io-running/", "Expected message");
+ like( $result->output, "/slave-sql-running/", "Expected message");
+ like( $result->output, "/threads-connected/", "Expected message");
+ like( $result->output, "/threadcache-hitrate/", "Expected message");
+ like( $result->output, "/querycache-hitrate/", "Expected message");
+ like( $result->output, "/keycache-hitrate/", "Expected message");
+ like( $result->output, "/bufferpool-hitrate/", "Expected message");
+ like( $result->output, "/tablecache-hitrate/", "Expected message");
+ like( $result->output, "/table-lock-contention/", "Expected message");
+ like( $result->output, "/temp-disk-tables/", "Expected message");
+ like( $result->output, "/connection-time/", "Expected message");
+ like( $result->output, "/slow-queries/", "Expected message");
+ like( $result->output, "/qcache-lowmem-prunes/", "Expected message");
+ like( $result->output, "/bufferpool-wait-free/", "Expected message");
+ like( $result->output, "/log-waits/", "Expected message");
+
+}
+
+SKIP: {
+ $result = NPTest->testCmd("./check_mysql_health -H $mysqlserver -m connection-time -u dummy -pdummy");
+ cmp_ok( $result->return_code, '==', 2, "Login failure");
+ like( $result->output, "/CRITICAL - Cannot connect to database: Error: Access denied/", "Expected login failure message");
+
+ $result = NPTest->testCmd("./check_mysql_health");
+ cmp_ok( $result->return_code, "==", 3, "No mode defined" );
+ like( $result->output, "/Must specify a mode/", "Correct error message");
+
+ $result = NPTest->testCmd("./check_mysql_health -m connection-time -w 10 -c 30");
+ cmp_ok( $result->return_code, "==", 0, "Connected" );
+ like( $result->output, "/OK - Connection Time ([0-9\.]+) usecs|connection_time=([0-9\.]+);10;30/", "Correct error message");
+
+ $result = NPTest->testCmd("./check_mysql_health -m keycache-hitrate -w :10 -c 2");
+ cmp_ok( $result->return_code, "==", 2, "Connected" );
+ like( $result->output, "/CRITICAL - Key Cache Hitrate at ([0-9\.]+)%|keycache_hitrate=([0-9\.]+)%;:10;2/", "Correct error message");
+
+ $result = NPTest->testCmd("./check_mysql_health -m qcache-hitrate -w :10 -c 2");
+ cmp_ok( $result->return_code, "==", 2, "Connected" );
+ like( $result->output, "/CRITICAL - Query Cache Hitrate at ([0-9\.]+)%|qcache_hitrate=([0-9\.]+)%;:10;2/", "Correct error message");
+
+ $result = NPTest->testCmd("./check_mysql_health -m qcache-hitrate -w :10 -c 2 -v 2>&1");
+ cmp_ok( $result->return_code, "==", 2, "Connected" );
+ like( $result->output, "/NOTICE: we have results/", "Verbose output");
+ like( $result->output, "/CRITICAL - Query Cache Hitrate at ([0-9\.]+)%|qcache_hitrate=([0-9\.]+)%;:10;2/", "Correct error message");
+
+}
+
+SKIP: {
+ my $slow_queries_last = 0;
+ my $slow_queries = 0;
+ my $delta = 0;
+ $result = NPTest->testCmd("./check_mysql_health -m slow-queries -w :10 -c 2");
+ sleep 1;
+ $result = NPTest->testCmd("./check_mysql_health -m slow-queries -w :10 -c 2 -v 2>&1");
+ ok( $result->output =~ /Load variable Slow_queries \(([0-9]+)\) /);
+ $slow_queries_last = $1;
+ ok( $result->output =~ /Result column 1 returns value ([0-9]+) /);
+ $slow_queries = $1;
+ $delta = $slow_queries - $slow_queries_last;
+ ok( $result->output =~ /OK - ([0-9]+) slow queries/);
+ cmp_ok($1, "==", $delta);
+}
+
+SKIP: {
+ # performance data
+ $result = NPTest->testCmd("./check_mysql_health -m slow-queries -w :11 -c :22 -v 2>&1");
+ like( $result->output, "/slow_queries_rate=[0-9\.]+;:11;:22 slow_queries=[0-9]+;:11;:22/", "Correct error message");
+
+ $result = NPTest->testCmd("./check_mysql_health -m qcache-lowmem-prunes -w :11 -c :22 -v 2>&1");
+ like( $result->output, "/lowmem_prunes_rate=[0-9\.]+;:11;:22 lowmem_prunes=[0-9]+;:11;:22/", "Correct error message");
+
+ $result = NPTest->testCmd("./check_mysql_health -m bufferpool-wait-free -w :11 -c :22 -v 2>&1");
+ like( $result->output, "/bufferpool_free_waits_rate=[0-9\.]+;:11;:22 bufferpool_free_waits=[0-9]+;:11;:22/", "Correct error message");
+
+ $result = NPTest->testCmd("./check_mysql_health -m log-waits -w :11 -c :22 -v 2>&1");
+ like( $result->output, "/log_waits_rate=[0-9\.]+;:11;:22 log_waits=[0-9]+;:11;:22/", "Correct error message");
+}
+
+SKIP: {
+ skip "Has a slave server", 6 if $with_slave;
+
+ $result = NPTest->testCmd("./check_mysql_health -m slave-lag");
+ cmp_ok( $result->return_code, "==", 2, "No slave" );
+ like( $result->output, "/CRITICAL - Slave lag NULL|slave_lag=0;10;20/", "Correct error message");
+
+ $result = NPTest->testCmd("./check_mysql_health -m slave-io-running");
+ cmp_ok( $result->return_code, "==", 2, "No slave" );
+ like( $result->output, "/CRITICAL - Slave io not running|slave_io_running=0/", "Correct error message");
+
+ $result = NPTest->testCmd("./check_mysql_health -m slave-sql-running");
+ cmp_ok( $result->return_code, "==", 2, "No slave" );
+ like( $result->output, "/CRITICAL - Slave sql not running|slave_io_running=0/", "Correct error message");
+
+}
+
+SKIP: {
+ skip "No mysql server with slaves defined", 5 unless $with_slave;
+ $result = NPTest->testCmd("./check_mysql_health -H $with_slave $with_slave_login");
+ cmp_ok( $result->return_code, '==', 0, "Login okay");
+
+ $result = NPTest->testCmd("./check_mysql_health -S -H $with_slave $with_slave_login");
+ cmp_ok( $result->return_code, "==", 0, "Slaves okay" );
+
+ $result = NPTest->testCmd("./check_mysql_health -S -H $with_slave $with_slave_login -w 60");
+ cmp_ok( $result->return_code, '==', 0, 'Slaves are not > 60 seconds behind');
+
+ $result = NPTest->testCmd("./check_mysql_health -S -H $with_slave $with_slave_login -w 60:");
+ cmp_ok( $result->return_code, '==', 1, 'Alert warning if < 60 seconds behind');
+ like( $result->output, "/^SLOW_SLAVE WARNING:/", "Output okay");
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/control
new file mode 100644
index 0000000..99d411b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/control
@@ -0,0 +1,8 @@
+Homepage: http://labs.consol.de/lang/en/nagios/check_mysql_health/
+Watch: http://labs.consol.de/lang/en/nagios/check_mysql_health/ check_mysql_health-([0-9.]+)\.tar\.gz
+Uploaders: Jan Wagner <waja@cyconet.org>
+Recommends: libdbd-mysql-perl
+Description: plugin to check various parameters of a
+ MySQL database
+Build-Depends: autotools-dev
+Version: 2.2.2
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/copyright
new file mode 100644
index 0000000..f6a171b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/copyright
@@ -0,0 +1,19 @@
+AUTHOR: Gerhard Lausser <gerhard.lausser@consol.de>
+License: GPL v2
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/src b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/src
new file mode 120000
index 0000000..87954fb
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_mysql_health/src
@@ -0,0 +1 @@
+check_mysql_health-2.2.2 \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/Makefile
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/Makefile
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/check_nfsmounts b/nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/check_nfsmounts
new file mode 100644
index 0000000..fbfb1f8
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/check_nfsmounts
@@ -0,0 +1,150 @@
+#!/usr/bin/perl
+# vim: ts=2 sts=2 sw=2:et ai:
+#
+# Usage: check_nfsmounts [ -t nfs timeout ] [ -w ]
+# Description: determines whether there are stale NFS mounts on the host.
+# Author: Clint Byrum <clint@adicio.com>
+#
+# Copyright 2007 Adicio, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+use utils qw{$TIMEOUT %ERRORS};
+use Time::HiRes qw{time alarm};
+use Getopt::Long;
+use strict;
+
+my $version="1.0";
+
+my $nfs_timeout=$TIMEOUT;
+my $nfs_warn=-1;
+my $writemode=0;
+my $help=0;
+
+sub usage {
+ print STDERR "NFS UNKNOWN: version $version, check_nfs_client [ --nfs-critical|-c seconds ]\n";
+ print STDERR " [ --nfs-warning seconds ][ --writemode|-w ]\n";
+ exit $ERRORS{'UNKNOWN'};
+}
+
+if(!GetOptions('nfs-timeout|nfstimeout|critical|c|t=f' => \$nfs_timeout,
+ 'nfs-warning=f' => \$nfs_warn,
+ 'writemode|write|w' => \$writemode,
+ 'help' => \$help,
+ )) {
+ &usage;
+}
+
+if($help) {
+ &usage;
+}
+
+if($nfs_timeout <= 0) {
+ print STDERR "timeout must be greater than 0\n";
+ &usage;
+}
+
+our $dir; # Because its a signal handler, we have to
+sub alarm_handler {
+ print "NFS CRITICAL: Stale NFS mount point - $dir.\n";
+ exit $ERRORS{'CRITICAL'};
+}
+
+sub bad_mount {
+ my $mountpoint=shift();
+ my $emsg=shift();
+ print "NFS CRITICAL: cannot operate on mount point $mountpoint. [$emsg]\n";
+ exit $ERRORS{'CRITICAL'};
+}
+
+#my @dirs = `mount | grep " type nfs " | awk '{print \$3}'`;
+if(!open MTAB,"< /etc/mtab") {
+ print "NFS UNKNOWN: could not open mtab.\n";
+ exit $ERRORS{'UNKNOWN'};
+}
+
+my @dirs=();
+my %mountmodes=();
+while(my $line=<MTAB>) {
+ if($line =~ /^[^ ]+ [^ ]+ nfs /) {
+ my @fields=split(/\s+/,$line);
+ my $mountpoint=$fields[1];
+ push(@dirs,$mountpoint);
+ #my %modes=split(/,/,$fields[3]);
+ my $modes = {};
+ foreach my $mode (split(/,/,$fields[3])) {
+ $modes->{$mode}=1;
+ }
+ $mountmodes{$mountpoint}=$modes;
+ }
+}
+close MTAB;
+
+if(@dirs < 1) {
+ print "NFS OK: no NFS mounts found.\n";
+ exit $ERRORS{'OK'};
+}
+
+my @ages=();
+my @warnings=();
+foreach $dir (@dirs) {
+ chomp $dir;
+ $SIG{ALRM} = \&alarm_handler;
+ my $start=time;
+ my $pid=fork;
+ if($pid==0) {
+ chdir $dir or &bad_mount($dir,$!);
+ if($writemode and exists($mountmodes{$dir}->{"rw"})) {
+ open X,"> $dir/.nfscheck" or exit $?;
+ print X $ENV{HOSTNAME}."\n".localtime()."\n"; # XXX Full disk may fail..
+ close X or exit $?;
+ }
+ exit 0;
+ } else {
+ alarm $nfs_timeout;
+ waitpid $pid,0;
+ if($?) {
+ &bad_mount($dir,$?);
+ };
+ alarm 0;
+ }
+ my $age=time()-$start;
+ if($nfs_warn > 0 and $age > $nfs_warn) {
+ push(@warnings,sprintf("$dir took %7.5f to complete all operations ",$age));
+ }
+ push(@ages,$age);
+}
+
+my $x=0;
+my $agetot=0;
+my $maxage=0;
+foreach my $age (@ages) {
+ $agetot+=$age;
+ if($age > $maxage) {
+ $maxage=$age;
+ }
+ $x++;
+}
+my $avgage=$agetot/$x;
+
+my $perfdata=sprintf("maxtime=%9.7f;avgtime=%9.7f;mountpoints=$x",$maxage,$avgage);
+
+if(@warnings) {
+ print "NFS WARNING: @warnings|$perfdata\n";
+ exit $ERRORS{'WARNING'};
+}
+
+printf "NFS OK: $x mount points avg of %7.5f secs, max %7.5f secs.|$perfdata\n",$avgage,$maxage,$maxage,$avgage;
+exit $ERRORS{'OK'};
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/control
new file mode 100644
index 0000000..c79bdac
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/control
@@ -0,0 +1,4 @@
+Homepage: http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_nfsmounts/details
+Recommends: libmonitoring-plugin-perl | libnagios-plugin-perl
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: checks whether there are stale NFS mounts on the host
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/copyright
new file mode 100644
index 0000000..c4ad70f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_nfsmounts/copyright
@@ -0,0 +1,17 @@
+Author: Clint Byrum <clint@adicio.com>
+
+ Copyright 2007 Adicio, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/Makefile
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/Makefile
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/check_printer b/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/check_printer
new file mode 100644
index 0000000..6d801de
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/check_printer
@@ -0,0 +1,375 @@
+#!/usr/bin/perl
+#
+# Copyright (c) 2007,2011 Eric F Crist
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+#
+# Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# $Id: check_printer 363 2014-07-23 14:37:59Z ecrist $
+# $HeadURL: trunk/nagios/check_printer $
+
+use strict;
+use warnings;
+
+my $OS = `uname`;
+if ($OS =~ m/^\wBSD/){
+ use lib "/usr/local/libexec/nagios";
+} elsif ($OS =~ m/Linux/){
+ use lib "/usr/local/nagios/libexec";
+}
+
+use Data::Dumper;
+use Getopt::Long;
+use Pod::Usage;
+
+'$Revision: 363 $' =~ m/Revision: (\d+)/;
+my $revision = $1;
+'$HeadURL: trunk/nagios/check_printer $' =~ m/HeadURL: ([\w\:\/\-\.\_]+) /;
+my $src_url = $1;
+my $debug = 0;
+my ($host, $warning, $critical, @ignore);
+my $community = "public";
+
+our %getopts;
+Getopt::Long::Configure("bundling");
+GetOptions(
+ "h|host=s" => \$host,
+ "C|community=s" => \$community,
+ "w|warn=i" => \$warning,
+ "c|crit=i" => \$critical,
+ "i=i" => \@ignore,
+ 'V|version' => sub { print '$Id: check_printer 363 2014-07-23 14:37:59Z ecrist $' ."\n"; exit 0 },
+ "d|debug" => \$debug,
+ "man" => sub { pod2usage(-exitstatus => 0, -verbose => 2); exit 0 }
+) or pod2usage(2);
+
+
+pod2usage(2) unless (defined($host));
+
+my $base_oid = ".1.3.6.1.2.1.43.11.1.1";
+my $type_oid = "3.1";
+my $name_oid = "6.1";
+my $uom_oid = "7.1";
+my $max_oid = "8.1";
+my $curr_oid = "9.1";
+my $loop;
+
+
+
+my $comm = $ARGV[1];
+
+my @vars = ("snmpwalk -On -v 1 -c $community $host $base_oid.$name_oid",
+ "snmpwalk -On -v 1 -c $community $host $base_oid.$uom_oid",
+ "snmpwalk -On -v 1 -c $community $host $base_oid.$max_oid",
+ "snmpwalk -On -v 1 -c $community $host $base_oid.$curr_oid");
+
+my(@values, @names, @max, @min);
+
+our %uom = ( "4" => "µm",
+ "7" => "impressions",
+ "8" => "pages",
+ "11" => "hrs",
+ "12" => "oz/1000",
+ "13" => "gr/10",
+ "14" => "gr/100",
+ "15" => "mL",
+ "16" => "feet",
+ "17" => "meters",
+ "18" => "items",
+ "19" => "%");
+
+foreach(@vars){
+ @values = (@values, split /\n/, `$_`);
+ if ($? != 0){
+ print "Printer Supplies UNKNOWN";
+ exit 3;
+ }
+}
+
+if ($debug){
+ print Dumper(\@values);
+}
+my %finvalues;
+
+my $ignore = join('|', @ignore);
+
+foreach(@values){
+ # matching the following line
+ # $1 $2 $3
+ # .1.3.6.1.2.1.43.11.1.1.6.1.1 = STRING: "Black Cartridge"
+ $_ =~ m/^([\.\d]+) = ([\w-]+):[\s\"]+([\(\)\-\d\w\s,\/:]+)\"*$/ or next;
+ my $loid = $1;
+ my $ltype = $2;
+ my $string = $3;
+ if ($loid =~ m/\.(${ignore})$/){
+ next;
+ }
+ if ($ltype =~ m/HEX/i){
+ # hex string, convert to ascii
+ $string = join "", map {chr hex $_ } split m/ /, $string;
+ }
+ $finvalues{"$loid"} = $string;
+}
+
+my %status;
+# get OID field numbers for matching later
+while (my ($key, $value) = each(%finvalues)){
+ ## sort this array into an associative in the following format:
+ # $status['name'] : Supply Name
+ # $status['curr'] : Supply Status
+ # $status['max'] : Supply Level When New
+ my $search = quotemeta("$base_oid.$name_oid");
+ if ($key =~ /^$search\.([\d\.]+)$/){
+ ## we'll assume a name
+ $status{$value}{"sub"} = $1;
+ } else {
+ }
+}
+# get maximum values, matching on OID field number
+while (my ($key, $value) = each(%finvalues)){
+ my $search = quotemeta("$base_oid.$max_oid");
+ if ($key =~ /^$search\.([\d\.]+)$/){
+ ## assign it to the other variable
+ ## search the existing keys, find the one we want
+ foreach my $subvalue (values %status){
+ if ($subvalue->{"sub"} eq $1){
+ $subvalue->{"max"} = $value;
+ }
+ }
+ }
+}
+
+# get current value, matching on OID field number
+while (my ($key, $value) = each(%finvalues)){
+ my $search = quotemeta("$base_oid.$curr_oid");
+ if ($key =~ /^$search\.([\d\.]+)$/){
+ ## assign it to the other variable
+ ## search the existing keys, find the one we want
+ foreach my $subvalue (values %status){
+ if ($subvalue->{"sub"} eq $1){
+ $subvalue->{"curr"} = $value;
+ }
+ }
+ }
+}
+
+# get uom, add it to data
+while (my ($key, $value) = each(%finvalues)){
+ my $search = quotemeta("$base_oid.$uom_oid");
+ if ($key =~ /^$search\.([\d\.]+)$/){
+ ## assign it to the other variable
+ ## search the existing keys, find the one we want
+ foreach my $subvalue (values %status){
+ if ($subvalue->{"sub"} eq $1){
+ $subvalue->{"uom"} = $uom{$value};
+ }
+ }
+ }
+}
+
+## Assemble performance data and error string.
+my $perf_str = "";
+my $is_warn = 0;
+my $is_crit = 0;
+my $err_str = "";
+while (my($key, $value) = each(%status)){
+ my ($maximum, $current);
+ if (!exists($value->{"curr"}) || $value->{"curr"} == -3){
+ ## we can process as yes/no
+ $current = 100;
+ ## Override the critical/warning, since they're moot
+ $critical = 0;
+ $warning = 0;
+ } elsif (($value->{"max"} == -2) and ($value->{"uom"} ne '%')){
+ ## we don't know (-2 == unknown) the max and can't compute
+ next;
+ } else {
+ $maximum = $value->{"max"};
+ }
+
+ if (!exists($value->{"curr"}) || $value->{"curr"} < 0){
+ ## weird value, set to 0 for math reasons
+ $current = 0;
+ } else {
+ $current = round(($value->{"curr"} / $maximum) * 100);
+ }
+
+ my $lcurrent;
+ if (($key =~ m/waste/i) or ($key =~ m/Toneruppsamlare/i) or ($key =~ m/Restonner/i)){
+ # invert the $current as waste is calculated in reverse
+ if ($value->{"curr"} == -3){
+ $lcurrent = 0;
+ } else {
+ $lcurrent = $maximum - $current;
+ }
+ } else {
+ $lcurrent = $current;
+ }
+ if ($lcurrent < $critical){
+ $is_crit = $is_crit + 1;
+ if ($err_str eq ""){
+ $err_str = "$key";
+ } else {
+ $err_str = "$err_str, $key";
+ }
+ } elsif ($lcurrent < $warning){
+ $is_warn = $is_warn + 1;
+ if ($err_str eq ""){
+ $err_str = "$key";
+ } else {
+ $err_str = "$err_str, $key";
+ }
+ }
+ if ($debug){
+ print "Key: $key\nCur: $current\nWarn: $warning\nCrit: $critical\n";
+ }
+ $perf_str = "$perf_str '$key'=$current%;$warning;$critical;0;100 ";
+}
+
+if ($debug){
+ print Dumper(\%status);
+ print "\n\n############ ATTENTION ############\n";
+ print "You have debug enabled. If asked to enable debug by the developer,\n";
+ print "please send all of the output, including your command line to\n";
+ print "ecrist\@secure-computing.net with the subject line 'check_printer DEBUG' along\n";
+ print "with a description of the problem you're experiencing.\n###################################\n";
+ print '$Id: check_printer 363 2014-07-23 14:37:59Z ecrist $'."\n\n";
+}
+if ($is_crit){
+ print "$err_str CRITICAL. See http://$ARGV[0] | $perf_str\n";
+ exit 2;
+} elsif ($is_warn){
+ print "$err_str WARNING. See http://$ARGV[0] | $perf_str\n";
+ exit 1;
+} else {
+ print "Printer Supplies OK | $perf_str\n";
+ exit 0;
+}
+
+
+###
+### subroutines here
+###
+
+sub round {
+ my($number) = shift;
+ return int($number + .5 * ($number <=> 0));
+}
+
+__END__
+
+=head1 check_printer
+
+check_printer - Gather supply metrics from a printer via SNMP query
+
+=head1 SYNOPSIS
+
+check_printer [options]
+
+Options:
+
+ -h, --host Printer hostname or IP address.
+ -C, --community SNMP community string, defaults to "public"
+ -w, --warn Warning threshold
+ -c, --crit Critical threshold
+ -i, --ignore Supply ignore. See man page for more information (--man)
+ -V, --version Prints version string and exits
+ -d, --debug Prints debug output, useful when reporting a problem to the developer, or getting index numbers for --ignore
+ --man Prints man page
+
+=head1 DESCRIPTION
+
+B<check_printer> is a Perl script that retrieves supply metrics from printers using the snmpwalk command.
+
+=head1 OPTIONS
+
+=over
+
+=item -h, --host
+
+Defines the host or IP address passed to snmpwalk.
+
+=item -C, --community
+
+Identifies the SNMP community string. Requires read access only.
+
+=item -w, --warn
+
+Value at which a warning is generated. For example, if -w 10 is set, when
+supply levels fall to 10% or below, a warning will be sent as part of the
+performance data.
+
+=item -c, --crit
+
+Value at which a critical alert is generated. This number should be lower
+than --warn is set, but this is not enforced.
+
+=item -i, --ignore
+
+Supply index that should be ignore from the output. Multiple values are
+accepted, separately:
+
+=over
+
+check_printer -i 1 -i 2
+
+=back
+
+Will exclude supply indexes 1 and 2. To get the supply index list, run the
+check_printer utility with --debug defined and the top of the output will
+list available supply metrics as follows:
+
+=over
+
+$VAR1 = [
+ '.1.3.6.1.2.1.43.11.1.1.6.1.1 = STRING: "Black Toner"',
+ '.1.3.6.1.2.1.43.11.1.1.6.1.2 = STRING: "Drum Unit"',
+ '.1.3.6.1.2.1.43.11.1.1.7.1.1 = INTEGER: 13',
+ '.1.3.6.1.2.1.43.11.1.1.7.1.2 = INTEGER: 7',
+ '.1.3.6.1.2.1.43.11.1.1.8.1.1 = INTEGER: -2',
+ '.1.3.6.1.2.1.43.11.1.1.8.1.2 = INTEGER: -2',
+ '.1.3.6.1.2.1.43.11.1.1.9.1.1 = INTEGER: -3',
+ '.1.3.6.1.2.1.43.11.1.1.9.1.2 = INTEGER: 0'
+];
+
+=back
+
+In the above example, we are looking for the OID string starting with
+B<.1.3.6.1.2.1.43.11.1.1.6.1> and the index is the last number. To exclude the
+Drum Unit, pass I<-i 2> to check_printer
+
+=item -V, --version
+
+Print the check_printer version string and exits.
+
+=item -d, --debug
+
+Outputs debug information. If you are having problems with a printer or device,
+send the debug output to B<ecrist@secure-computing.net> and identify your printer
+model and manufacturer.
+
+=item --man
+
+Prints this man page. :)
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/control
new file mode 100644
index 0000000..baa0b25
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/control
@@ -0,0 +1,7 @@
+Homepage: https://www.secure-computing.net/trac/browser/SCN%20Open%20Source/trunk/nagios/
+Watch: https://www.secure-computing.net/trac/browser/SCN%20Open%20Source/trunk/nagios/check_printer?format=raw SHA1:d2b7d0f7ca09d2813aca9d0904f069337bb6fe53
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to check printer supply levels using SNMP
+ It outputs performance data for all supplies
+ found, for example toner and drum.
+Recommends: snmp, libmonitoring-plugin-perl | libnagios-plugin-perl
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/copyright
new file mode 100644
index 0000000..a80c5cb
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/copyright
@@ -0,0 +1,27 @@
+Copyright (c) 2007,2011 Eric F Crist
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the following
+conditions are met:
+
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in
+the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/printer.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/printer.cfg
new file mode 100644
index 0000000..3ded7b3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_printer/printer.cfg
@@ -0,0 +1,5 @@
+define command{
+ command_name check_printer
+ command_line /usr/lib/nagios/plugins/check_printer -h '$HOSTADDRESS$' '$ARG1$' '$ARG2$' '$ARG3$'
+ }
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/Makefile
new file mode 100644
index 0000000..52de70c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/Makefile
@@ -0,0 +1,4 @@
+#/usr/bin/make -f
+
+include ../common.mk
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/check_raid b/nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/check_raid
new file mode 100644
index 0000000..2d115b1
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/check_raid
@@ -0,0 +1,6664 @@
+#!/usr/bin/perl
+
+# This chunk of stuff was generated by App::FatPacker. To find the original
+# file's code, look for the end of this BEGIN block or the string 'FATPACK'
+BEGIN {
+my %fatpacked;
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID';
+ package App::Monitoring::Plugin::CheckRaid;
+
+ use Carp qw(croak);
+ use Module::Pluggable 5.1 instantiate => 'new', sub_name => '_plugins';
+ use strict;
+ use warnings;
+
+ # constructor
+ sub new {
+ my $class = shift;
+
+ croak 'Odd number of elements in argument hash' if @_ % 2;
+
+ my $self = {
+ @_,
+ };
+
+ my $obj = bless $self, $class;
+
+ # setup search path for Module::Pluggable
+ $self->search_path(add => __PACKAGE__ . '::Plugins');
+
+ # setup only certain plugins
+ if ($self->{enable_plugins}) {
+ my @plugins = map {
+ __PACKAGE__ . '::Plugins::' . $_
+ } @{$self->{enable_plugins}};
+ $self->only(\@plugins);
+ }
+
+ return $obj;
+ }
+
+ # create list of plugins
+ sub plugins {
+ my ($this) = @_;
+
+ # call this once
+ if (!defined $this->{plugins}) {
+ my @plugins = $this->_plugins(%$this);
+ $this->{plugins} = \@plugins;
+ }
+
+ wantarray ? @{$this->{plugins}} : $this->{plugins};
+ }
+
+ # get plugin by name
+ sub plugin {
+ my ($this, $name) = @_;
+
+ if (!defined $this->{plugin_names}) {
+ my %names;
+ foreach my $plugin ($this->plugins) {
+ my $name = $plugin->{name};
+ $names{$name} = $plugin;
+ }
+ $this->{plugin_names} = \%names;
+ }
+
+ croak "Plugin '$name' Can not be created" unless exists $this->{plugin_names}{$name};
+
+ $this->{plugin_names}{$name};
+ }
+
+ # Get active plugins.
+ # Returns the plugin objects
+ sub active_plugins {
+ my $this = shift;
+ # whether the query is for sudo rules
+ my $sudo = shift || 0;
+
+ my @plugins = ();
+
+ # go over all registered plugins
+ foreach my $plugin ($this->plugins) {
+ # skip if no check method (not standalone checker)
+ next unless $plugin->can('check');
+
+ # skip inactive plugins (disabled or no tools available)
+ next unless $plugin->active($sudo);
+
+ push(@plugins, $plugin);
+ }
+
+ return wantarray ? @plugins : \@plugins;
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugin.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGIN';
+ package App::Monitoring::Plugin::CheckRaid::Plugin;
+
+ use Carp qw(croak);
+ use App::Monitoring::Plugin::CheckRaid::Utils;
+ use strict;
+ use warnings;
+
+ # Nagios standard error codes
+ my (%ERRORS) = (OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3);
+
+ # default plugin options
+ our %options = (
+ # status to set when RAID is in resync state
+ resync_status => $ERRORS{WARNING},
+
+ # Status code to use when no raid volumes were detected
+ noraid_status => $ERRORS{UNKNOWN},
+
+ # status to set when RAID is in check state
+ check_status => $ERRORS{OK},
+
+ # status to set when PD is spare
+ spare_status => $ERRORS{OK},
+
+ # status to set when BBU is in learning cycle.
+ bbulearn_status => $ERRORS{WARNING},
+
+ # status to set when Write Cache has failed.
+ cache_fail_status => $ERRORS{WARNING},
+
+ # check status of BBU
+ bbu_monitoring => 0,
+ );
+
+ # return list of programs this plugin needs
+ # @internal
+ sub program_names {
+ }
+
+ # return hash of canonical commands that plugin can use
+ # @internal
+ sub commands {
+ {}
+ }
+
+ # return sudo rules if program needs it
+ # may be SCALAR or LIST of scalars
+ # @internal
+ sub sudo {
+ ();
+ }
+
+ # constructor for plugins
+ sub new {
+ my $class = shift;
+
+ croak 'Odd number of elements in argument hash' if @_ % 2;
+ croak 'Class is already a reference' if ref $class;
+
+ # convert to hash
+ my %args = @_;
+
+ # merge 'options' from param and class defaults
+ my %opts = %options;
+ %opts = (%options, %{$args{options}}) if $args{options};
+ delete $args{options};
+
+ # merge commands
+ my %commands = %{$class->commands};
+ %commands = (%commands, %{$args{commands}}) if $args{commands};
+ delete $args{commands};
+
+ my $self = {
+ commands => \%commands,
+ sudo => $class->sudo ? find_sudo() : '',
+ options => \%opts,
+ %args,
+
+ # name of the plugin, without package namespace
+ name => ($class =~ /.*::([^:]+)$/),
+
+ status => undef,
+ message => undef,
+ perfdata => undef,
+ longoutput => undef,
+ };
+
+ my $this = bless $self, $class;
+
+ # lookup program, if not defined by params
+ if (!$self->{program}) {
+ $self->{program} = which($this->program_names);
+ }
+
+ return $this;
+ }
+
+ # see if plugin is active (disabled or no tools available)
+ sub active {
+ my $this = shift;
+
+ # no tool found, return false
+ return 0 unless $this->{program};
+
+ # program file must exist, don't check for execute bit. #104
+ -f $this->{program};
+ }
+
+ # set status code for plugin result
+ # does not overwrite status with lower value
+ # returns the current status code
+ sub status {
+ my ($this, $status) = @_;
+
+ if (defined $status) {
+ $this->{status} = $status unless defined($this->{status}) and $status < $this->{status};
+ }
+ $this->{status};
+ }
+
+ sub set_critical_as_warning {
+ $ERRORS{CRITICAL} = $ERRORS{WARNING};
+ }
+
+ # helper to set status to WARNING
+ # returns $this to allow fluent api
+ sub warning {
+ my ($this) = @_;
+ $this->status($ERRORS{WARNING});
+ return $this;
+ }
+
+ # helper to set status to CRITICAL
+ # returns $this to allow fluent api
+ sub critical {
+ my ($this) = @_;
+ $this->status($ERRORS{CRITICAL});
+ return $this;
+ }
+
+ # helper to set status to UNKNOWN
+ # returns $this to allow fluent api
+ sub unknown {
+ my ($this) = @_;
+ $this->status($ERRORS{UNKNOWN});
+ return $this;
+ }
+
+ # helper to set status to OK
+ sub ok {
+ my ($this) = @_;
+ $this->status($ERRORS{OK});
+ return $this;
+ }
+
+ # helper to set status for resync
+ # returns $this to allow fluent api
+ sub resync {
+ my ($this) = @_;
+ $this->status($this->{options}{resync_status});
+ return $this;
+ }
+
+ # helper to set status for check
+ # returns $this to allow fluent api
+ sub check_status {
+ my ($this) = @_;
+ $this->status($this->{options}{check_status});
+ return $this;
+ }
+
+ # helper to set status for no raid condition
+ # returns $this to allow fluent api
+ sub noraid {
+ my ($this) = @_;
+ $this->status($this->{options}{noraid_status});
+ return $this;
+ }
+
+ # helper to set status for spare
+ # returns $this to allow fluent api
+ sub spare {
+ my ($this) = @_;
+ $this->status($this->{options}{spare_status});
+ return $this;
+ }
+
+ # helper to set status for BBU learning cycle
+ # returns $this to allow fluent api
+ sub bbulearn {
+ my ($this) = @_;
+ $this->status($this->{options}{bbulearn_status});
+ return $this;
+ }
+
+ # helper to set status when Write Cache fails
+ # returns $this to allow fluent api
+ sub cache_fail {
+ my ($this) = @_;
+ $this->status($this->{options}{cache_fail_status});
+ return $this;
+ }
+
+ # helper to get/set bbu monitoring
+ sub bbu_monitoring {
+ my ($this, $val) = @_;
+
+ if (defined $val) {
+ $this->{options}{bbu_monitoring} = $val;
+ }
+ $this->{options}{bbu_monitoring};
+ }
+
+ # setup status message text
+ sub message {
+ my ($this, $message) = @_;
+ if (defined $message) {
+ # TODO: append if already something there
+ $this->{message} = $message;
+ }
+ $this->{message};
+ }
+
+ # Set performance data output.
+ sub perfdata {
+ my ($this, $perfdata) = @_;
+ if (defined $perfdata) {
+ # TODO: append if already something there
+ $this->{perfdata} = $perfdata;
+ }
+ $this->{perfdata};
+ }
+
+ # Set plugin long output.
+ sub longoutput {
+ my ($this, $longoutput) = @_;
+ if (defined $longoutput) {
+ # TODO: append if already something there
+ $this->{longoutput} = $longoutput;
+ }
+ $this->{longoutput};
+ }
+
+ # a helper to join similar statuses for items
+ # instead of printing
+ # 0: OK, 1: OK, 2: OK, 3: NOK, 4: OK
+ # it would print
+ # 0-2,4: OK, 3: NOK
+ # takes as input list:
+ # { status => @items }
+ sub join_status {
+ my $this = shift;
+ my %status = %{$_[0]};
+
+ my @status;
+ for my $status (sort {$a cmp $b} keys %status) {
+ my $disks = $status{$status};
+ my @s;
+ foreach my $disk (@$disks) {
+ push(@s, $disk);
+ }
+ push(@status, join(',', @s).'='.$status);
+ }
+
+ return join ' ', @status;
+ }
+
+ # return true if parameter is not in ignore list
+ sub valid {
+ my $this = shift;
+ my ($v) = lc $_[0];
+
+ foreach (@utils::ignore) {
+ return 0 if lc $_ eq $v;
+ }
+ return 1;
+ }
+
+ use constant K => 1024;
+ use constant M => K * 1024;
+ use constant G => M * 1024;
+ use constant T => G * 1024;
+
+ sub parse_bytes {
+ my ($this, $size) = @_;
+
+ if ($size =~ s/\sT//) {
+ return int($size) * T;
+ }
+ if ($size =~ s/\sG//) {
+ return int($size) * G;
+ }
+ if ($size =~ s/\sM//) {
+ return int($size) * M;
+ }
+ if ($size =~ s/\sK//) {
+ return int($size) * K;
+ }
+
+ return int($size);
+ }
+
+ sub format_bytes {
+ my $this = shift;
+
+ my ($bytes) = @_;
+ if ($bytes > T) {
+ return sprintf("%.2f TiB", $bytes / T);
+ }
+ if ($bytes > G) {
+ return sprintf("%.2f GiB", $bytes / G);
+ }
+ if ($bytes > M) {
+ return sprintf("%.2f MiB", $bytes / M);
+ }
+ if ($bytes > K) {
+ return sprintf("%.2f KiB", $bytes / K);
+ }
+ return "$bytes B";
+ }
+
+ # disable sudo temporarily
+ sub nosudo_cmd {
+ my ($this, $command, $cb) = @_;
+
+ my ($res, @res);
+
+ my $sudo = $this->{sudo};
+ $this->{sudo} = 0;
+
+ if (wantarray) {
+ @res = $this->cmd($command, $cb);
+ } else {
+ $res = $this->cmd($command, $cb);
+ }
+
+ $this->{sudo} = $sudo;
+
+ return wantarray ? @res : $res;
+ }
+
+ # build up command for $command
+ # returns open filehandle to process output
+ # if command fails, program is exited (caller needs not to worry)
+ sub cmd {
+ my ($this, $command, $cb) = @_;
+
+ my $debug = $App::Monitoring::Plugin::CheckRaid::Utils::debug;
+
+ # build up command
+ my @CMD = $this->{program};
+
+ # add sudo if program needs
+ unshift(@CMD, @{$this->{sudo}}) if $> and $this->{sudo};
+
+ my $args = $this->{commands}{$command} or croak "command '$command' not defined";
+
+ # callback to replace args in command
+ my $cb_ = sub {
+ my $param = shift;
+ if ($cb) {
+ if (ref $cb eq 'HASH' and exists $cb->{$param}) {
+ return wantarray ? @{$cb->{$param}} : $cb->{$param};
+ }
+ return &$cb($param) if ref $cb eq 'CODE';
+ }
+
+ if ($param eq '@CMD') {
+ # command wanted, but not found
+ croak "Command for $this->{name} not found" unless defined $this->{program};
+ return @CMD;
+ }
+ return $param;
+ };
+
+ # add command arguments
+ my @cmd;
+ for my $arg (@$args) {
+ local $_ = $arg;
+ # can't do arrays with s///
+ # this limits that @arg must be single argument
+ if (/@/) {
+ push(@cmd, $cb_->($_));
+ } else {
+ s/([\$]\w+)/$cb_->($1)/ge;
+ push(@cmd, $_);
+ }
+ }
+
+ my $op = shift @cmd;
+ my $fh;
+ if ($op eq '=' and ref $cb eq 'SCALAR') {
+ # Special: use open2
+ use IPC::Open2;
+ warn "DEBUG EXEC: $op @cmd" if $debug;
+ my $pid = open2($fh, $$cb, @cmd) or croak "open2 failed: @cmd: $!";
+ } elsif ($op eq '>&2') {
+ # Special: same as '|-' but reads both STDERR and STDOUT
+ use IPC::Open3;
+ warn "DEBUG EXEC: $op @cmd" if $debug;
+ my $pid = open3(undef, $fh, $cb, @cmd);
+
+ } else {
+ warn "DEBUG EXEC: @cmd" if $debug;
+ open($fh, $op, @cmd) or croak "open failed: @cmd: $!";
+ }
+
+ # for dir handles, reopen as opendir
+ if (-d $fh) {
+ undef($fh);
+ warn "DEBUG OPENDIR: $cmd[0]" if $debug;
+ opendir($fh, $cmd[0]) or croak "opendir failed: @cmd: $!";
+ }
+
+ return $fh;
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGIN
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/aaccli.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_AACCLI';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::aaccli;
+
+ # Adaptec ServeRAID
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ shift->{name};
+ }
+
+ sub commands {
+ {
+ 'container list' => ['=', '@CMD'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd container list /full"
+ }
+
+ sub check {
+ my $this = shift;
+
+ # status messages pushed here
+ my @status;
+
+ my $write = "";
+ $write .= "open aac0\n";
+ $write .= "container list /full\n";
+ $write .= "exit\n";
+ my $read = $this->cmd('container list', \$write);
+
+ #File foo receiving all output.
+ #
+ #AAC0>
+ #COMMAND: container list /full=TRUE
+ #Executing: container list /full=TRUE
+ #Num Total Oth Stripe Scsi Partition Creation
+ #Label Type Size Ctr Size Usage C:ID:L Offset:Size State RO Lk Task Done% Ent Date Time
+ #----- ------ ------ --- ------ ------- ------ ------------- ------- -- -- ------- ------ --- ------ --------
+ # 0 Mirror 74.5GB Open 0:02:0 64.0KB:74.5GB Normal 0 051006 13:48:54
+ # /dev/sda Auth 0:03:0 64.0KB:74.5GB Normal 1 051006 13:48:54
+ #
+ #
+ #AAC0>
+ #COMMAND: logfile end
+ #Executing: logfile end
+ while (<$read>) {
+ if (my($dsk, $stat) = /(\d:\d\d?:\d+)\s+\S+:\S+\s+(\S+)/) {
+ next unless $this->valid($dsk);
+ $dsk =~ s#:#/#g;
+ next unless $this->valid($dsk);
+
+ push(@status, "$dsk:$stat");
+
+ $this->critical if ($stat eq "Broken");
+ $this->warning if ($stat eq "Rebuild");
+ $this->warning if ($stat eq "Bld/Vfy");
+ $this->critical if ($stat eq "Missing");
+ if ($stat eq "Verify") {
+ $this->resync;
+ }
+ $this->warning if ($stat eq "VfyRepl");
+ }
+ }
+ close $read;
+
+ return unless @status;
+
+ $this->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_AACCLI
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/afacli.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_AFACLI';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::afacli;
+
+ # Adaptec AACRAID
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ shift->{name};
+ }
+
+ sub commands {
+ {
+ 'container list' => ['=', '@CMD'],
+ }
+ }
+
+ sub check {
+ my $this = shift;
+
+ # status messages pushed here
+ my @status;
+
+ my $write = "";
+ $write .= "open afa0\n";
+ $write .= "container list /full\n";
+ $write .= "exit\n";
+
+ my $read = $this->cmd('container list', \$write);
+ while (<$read>) {
+ # 0 Mirror 465GB Valid 0:00:0 64.0KB: 465GB Normal 0 032511 17:55:06
+ # /dev/sda root 0:01:0 64.0KB: 465GB Normal 1 032511 17:55:06
+ if (my($dsk, $stat) = /(\d:\d\d?:\d+)\s+\S+:\s?\S+\s+(\S+)/) {
+ next unless $this->valid($dsk);
+ $dsk =~ s#:#/#g;
+ next unless $this->valid($dsk);
+ push(@status, "$dsk:$stat");
+
+ $this->critical if ($stat eq "Broken");
+ $this->warning if ($stat eq "Rebuild");
+ $this->warning if ($stat eq "Bld/Vfy");
+ $this->critical if ($stat eq "Missing");
+ if ($stat eq "Verify") {
+ $this->resync;
+ }
+ $this->warning if ($stat eq "VfyRepl");
+ }
+ }
+ close $read;
+
+ return unless @status;
+
+ $this->ok->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_AFACLI
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/arcconf.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_ARCCONF';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::arcconf;
+
+ # Adaptec AAC-RAID
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ shift->{name};
+ }
+
+ sub commands {
+ {
+ 'getstatus' => ['-|', '@CMD', 'GETSTATUS', '1'],
+ # 'nologs' does not exist in arcconf 6.50. #118
+ 'getconfig' => ['-|', '@CMD', 'GETCONFIG', '$ctrl', 'AL'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ (
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd GETSTATUS 1",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd GETCONFIG * AL",
+ );
+ }
+
+ sub parse_error {
+ my ($this, $message) = @_;
+ warn "arcconf: parse error: $message";
+ $this->unknown->message("Parse Error: $message");
+ }
+
+ # parse GETSTATUS command
+ # parses
+ # - number of controllers
+ # - logical device tasks (if any running)
+ sub parse_status {
+ my ($this) = @_;
+
+ my $count = 0;
+ my $ok = 0;
+ my $fh = $this->cmd('getstatus');
+ my %s;
+ # controller task
+ my %task;
+ while (<$fh>) {
+ chomp;
+ # empty line or comment
+ next if /^$/ or /^#/;
+
+ # termination
+ if (/^Command completed successfully/) {
+ $ok = 1;
+ last;
+ }
+
+ if (my($c) = /^Controllers [Ff]ound: (\d+)/) {
+ $count = int($c);
+ next;
+ }
+
+ if (/^(\S.+) Task:$/) {
+ $task{type} = $1;
+ next;
+ }
+
+ if (/^\s+Logical device\s+: (\d+)/) {
+ $task{device} = $1;
+ } elsif (/^\s+Task ID\s+: (\d+)/) {
+ $task{id} = $1;
+ } elsif (/^\s+Current operation\s+: (.+)/) {
+ $task{operation} = $1;
+ } elsif (/^\s+Status\s+: (.+)/) {
+ $task{status} = $1;
+ } elsif (/^\s+Priority\s+: (.+)/) {
+ $task{priority} = $1;
+ } elsif (/^\s+Percentage complete\s+: (\d+)/) {
+ $task{percent} = $1;
+ } elsif (/^Invalid controller number/) {
+ ;
+ } else {
+ warn "Unknown line: [$_]";
+ # FIXME: ->message() gets overwritten later on
+ $this->unknown->message("Unknown line: [$_]");
+ }
+ }
+ close($fh);
+
+ # Tasks seem to be Controller specific, but as we don't support over one controller, let it be global
+ $s{tasks} = { %task } if %task;
+
+ if ($count == 0) {
+ # if command completed, but no controllers,
+ # assume no hardware present
+ if (!$ok) {
+ $this->unknown->message("No controllers found!");
+ }
+ return undef;
+ }
+
+ $s{ctrl_count} = $count;
+
+ return \%s;
+ }
+
+ # parse GETCONFIG for all controllers
+ sub parse_config {
+ my ($this, $status) = @_;
+
+ my %c;
+ for (my $i = 1; $i <= $status->{ctrl_count}; $i++) {
+ $c{$i} = $this->parse_ctrl_config($i, $status->{ctrl_count});
+ }
+
+ return { controllers => \%c };
+ }
+
+ # parse GETCONFIG command for specific controller
+ sub parse_ctrl_config {
+ my ($this, $ctrl, $ctrl_count) = @_;
+
+ # Controller information, Logical/Physical device info
+ my ($ld, $ch, $pd);
+
+ my $res = { controller => {}, logical => [], physical => [] };
+
+ my $fh = $this->cmd('getconfig', { '$ctrl' => $ctrl });
+ my ($section, $subsection, $ok);
+ my %sectiondata = ();
+
+ # called when data for section needs to be processed
+ my $flush = sub {
+ my $method = 'process_' . lc($section);
+ $method =~ s/[.\s]+/_/g;
+ $this->$method($res, \%sectiondata);
+ %sectiondata = ();
+ };
+ my $subsection_reset = sub {
+ $ch = 0;
+ undef($ld);
+ undef($pd);
+ undef($subsection);
+ };
+ while (<$fh>) {
+ chomp;
+
+ # empty line or comment
+ if (/^$/ or /^#/) {
+ &$subsection_reset;
+ next;
+ }
+
+ if (/^Command completed successfully/) {
+ $ok = 1;
+ last;
+ }
+
+ if (my($c) = /^Controllers [Ff]ound: (\d+)/) {
+ if ($c != $ctrl_count) {
+ # internal error?!
+ $this->unknown->message("Controller count mismatch");
+ }
+ next;
+ }
+
+ # section start
+ if (/^---+/) {
+ if (my($s) = <$fh> =~ /^(\w.+)$/) {
+ # flush the lines
+ if (defined($section)) {
+ &$flush();
+ }
+
+ $section = $s;
+ unless (<$fh> =~ /^---+/) {
+ $this->parse_error($_);
+ }
+ &$subsection_reset;
+ next;
+ }
+ $this->parse_error($_);
+ }
+
+ # sub section start
+ # there are also sections in subsections, but currently section names
+ # are unique enough
+ if (/^\s+---+/) {
+ if (my($s) = <$fh> =~ /^\s+(\S.+?)\s*?$/) {
+ $subsection = $s;
+ unless (<$fh> =~ /^\s+---+/) {
+ $this->parse_error($_);
+ }
+ next;
+ }
+ $this->parse_error($_);
+ }
+
+ warn("SKIP without section: [$_]\n"),next unless defined $section;
+
+ # regex notes:
+ # - value portion may be missing
+ # - value may be empty
+ # - value may be truncated (t/data/arcconf/issue47/getconfig)
+ my ($key, $value) = /^\s*(.+?)(?:\s+:\s*(.*?))?$/;
+
+ if ($section =~ /Controller [Ii]nformation/) {
+ if (not defined $subsection) {
+ $sectiondata{$key} = $value;
+ } else {
+ $sectiondata{$subsection}{$key} = $value;
+ }
+
+ } elsif ($section =~ /Physical Device [Ii]nformation/) {
+ if (my($c) = /Channel #(\d+)/) {
+ $ch = int($c);
+ undef($pd);
+ next;
+
+ } elsif (my($n) = /^\s+Device #(\d+)/) {
+ $pd = int($n);
+ next;
+
+ } else {
+ if (not defined $pd) {
+ $sectiondata{$ch}{$key} = $value;
+ } elsif (not defined $subsection) {
+ $sectiondata{$ch}{'pd'}{$pd}{$key} = $value;
+ } else {
+ $sectiondata{$ch}{'pd'}{$pd}{$subsection}{$key} = $value;
+ }
+ }
+
+ } elsif ($section =~ /Logical ([Dd]evice|drive) [Ii]nformation/) {
+ if (my($n) = /Logical (?:[Dd]evice|drive) [Nn]umber (\d+)/) {
+ $ld = int($n);
+ } else {
+ # skip lone line: issue87/getconfig
+ if (/No logical devices configured/) {
+ next;
+ }
+ if (not defined $ld) {
+ warn "LD undefined:[$_]\n";
+ next;
+ }
+ if (not defined $subsection) {
+ $sectiondata{$ld}{$key} = $value;
+ } else {
+ $sectiondata{$ld}{$subsection}{$key} = $value;
+ }
+ }
+
+ } elsif ($section eq 'MaxCache 3.0 information') {
+ # not parsed yet
+ } elsif ($section eq 'Connector information') {
+ # not parsed yet
+ } else {
+ warn "NOT PARSED: [$section] [$_]";
+ }
+ }
+ close $fh;
+ &$flush() if $section;
+
+ $this->unknown->message("Command did not succeed") unless defined $ok;
+
+ return $res;
+ }
+
+ # Process Controller Information section
+ sub process_controller_information {
+ my ($this, $res, $data) = @_;
+ my $c = {};
+ my $s;
+
+ # current section
+ my $cs = $data;
+
+ $c->{status} = $cs->{'Controller Status'};
+
+ if (exists $cs->{$s = 'Defunct Disk Drive Count'} || exists $cs->{$s = 'Defunct disk drive count'}) {
+ $c->{defunct_count} = int($cs->{$s});
+ }
+
+ if ($s = $cs->{'Logical devices/Failed/Degraded'}) {
+ my($td, $fd, $dd) = $s =~ m{(\d+)/(\d+)/(\d+)};
+ $c->{logical_count} = int($td);
+ $c->{logical_failed} = int($fd);
+ $c->{logical_degraded} = int($dd);
+ }
+ # ARCCONF 9.30: Logical drives/Offline/Critical
+ if ($s = $cs->{'Logical drives/Offline/Critical'}) {
+ my($td2, $fd2, $dd2) = $s =~ m{(\d+)/(\d+)/(\d+)};
+ $c->{logical_count} = int($td2);
+ $c->{logical_offline} = int($fd2);
+ $c->{logical_critical} = int($dd2);
+ }
+
+ $cs = $data->{'Controller Battery Information'};
+ $c->{battery_status} = $cs->{Status} if exists $cs->{Status};
+ $c->{battery_overtemp} = $cs->{'Over temperature'} if exists $cs->{'Over temperature'};
+
+ if ($s = $cs->{'Capacity remaining'}) {
+ my ($bc) = $s =~ m{(\d+)\s*percent.*$};
+ $c->{battery_capacity} = int($bc);
+ }
+
+ if ($s = $cs->{'Time remaining (at current draw)'}) {
+ my($d, $h, $m) = $s =~ /(\d+) days, (\d+) hours, (\d+) minutes/;
+ $c->{battery_time} = int($d) * 1440 + int($h) * 60 + int($m);
+ $c->{battery_time_full} = "${d}d${h}h${m}m";
+ }
+
+
+ $cs = $data->{'Controller ZMM Information'};
+ $c->{zmm_status} = $cs->{Status} if exists $cs->{'Status'};
+
+ $res->{controller} = $c;
+ }
+
+ sub process_logical_device_information {
+ my ($this, $res, $data) = @_;
+ my $s;
+
+ my @ld;
+ while (my($ld, $cs) = each %$data) {
+
+ $ld[$ld]{id} = $ld;
+ if (exists $cs->{$s = 'RAID Level'} || exists $cs->{$s = 'RAID level'}) {
+ $ld[$ld]{raid} = $cs->{$s};
+ }
+ $ld[$ld]{size} = $cs->{'Size'};
+ $ld[$ld]{failed_stripes} = $cs->{'Failed stripes'} if exists $cs->{'Failed stripes'};
+ $ld[$ld]{defunct_segments} = $cs->{'Defunct segments'} if exists $cs->{'Defunct segments'};
+
+ if ($s = $cs->{'Status of Logical Device'} || $cs->{'Status of logical device'} || $cs->{'Status of logical drive'}) {
+ $ld[$ld]{status} = $s;
+ }
+ if ($s = $cs->{'Logical Device name'} || $cs->{'Logical device name'} || $cs->{'Logical drive name'}) {
+ $ld[$ld]{name} = $s;
+ }
+
+ # Write-cache mode : Not supported]
+ # Partitioned : Yes]
+ # Number of segments : 2]
+ # Drive(s) (Channel,Device) : 0,0 0,1]
+ # Defunct segments : No]
+ }
+
+ $res->{logical} = \@ld;
+ }
+
+ sub process_physical_device_information {
+ my ($this, $res, $data) = @_;
+
+ # Keys with no values:
+ # "Device #0"
+ # "Device is a Hard drive"
+ #
+ # ignored:
+ # /Transfer Speed\s+:\s+(.+)/
+ # /Initiator at SCSI ID/
+ # /No physical drives attached/
+
+ my (@pd, $cs, $s);
+ while (my($ch, $channel_data) = each %$data) {
+ while (my($pd, $cs) = each %{$channel_data->{pd}}) {
+ $pd[$ch][$pd]{device_id} = $pd;
+ $pd[$ch][$pd]{power_state} = $cs->{'Power State'} if exists $cs->{'Power State'};
+ $pd[$ch][$pd]{status} = $cs->{'State'} if exists $cs->{'State'};
+ $pd[$ch][$pd]{supported} = $cs->{'Supported'} if exists $cs->{'Supported'};
+ $pd[$ch][$pd]{spare} = $cs->{'Dedicated Spare for'} if exists $cs->{'Dedicated Spare for'};
+ $pd[$ch][$pd]{model} = $cs->{'Model'};
+ $pd[$ch][$pd]{serial} = $cs->{'Serial number'} if exists $cs->{'Serial number'};
+ $pd[$ch][$pd]{wwn} = $cs->{'World-wide name'} if exists $cs->{'World-wide name'};
+ $pd[$ch][$pd]{write_cache} = $cs->{'Write Cache'} if exists $cs->{'Write Cache'};
+ $pd[$ch][$pd]{ssd} = $cs->{'SSD'} if exists $cs->{'SSD'};
+ $pd[$ch][$pd]{fru} = $cs->{'FRU'} if exists $cs->{'FRU'};
+ $pd[$ch][$pd]{ncq} = $cs->{'NCQ status'} if exists $cs->{'NCQ status'};
+ $pd[$ch][$pd]{pfa} = $cs->{'PFA'} if exists $cs->{'PFA'};
+ $pd[$ch][$pd]{enclosure} = $cs->{'Enclosure ID'} if exists $cs->{'Enclosure ID'};
+ $pd[$ch][$pd]{type} = $cs->{'Type'} if exists $cs->{'Type'};
+ $pd[$ch][$pd]{smart} = $cs->{'S.M.A.R.T.'} if exists $cs->{'S.M.A.R.T.'};
+ $pd[$ch][$pd]{smart_warn} = $cs->{'S.M.A.R.T. warnings'} if exists $cs->{'S.M.A.R.T. warnings'};
+ $pd[$ch][$pd]{speed} = $cs->{'Transfer Speed'} if $cs->{'Transfer Speed'};
+ $pd[$ch][$pd]{power_states} = $cs->{'Supported Power States'} if exists $cs->{'Supported Power States'};
+ $pd[$ch][$pd]{fail_ldev_segs} = $cs->{'Failed logical device segments'} if exists $cs->{'Failed logical device segments'};
+
+ # allow edits, i.e removed 'Vendor'/'Firmware' value from test data
+ $pd[$ch][$pd]{vendor} = $cs->{'Vendor'} || '';
+ $pd[$ch][$pd]{firmware} = $cs->{'Firmware'} if exists $cs->{'Firmware'};
+
+ # previous parser was not exact line match
+ if ($s = $cs->{'Size'} || $cs->{'Total Size'}) {
+ $pd[$ch][$pd]{size} = $s;
+ }
+
+ $s = $cs->{'Reported ESD'} || $cs->{'Reported ESD(T:L)'};
+ $pd[$ch][$pd]{esd} = $s if $s;
+
+ if ($s = $cs->{'Reported Location'}) {
+ my($e, $s) = $s =~ /(?:Enclosure|Connector) (\d+), (?:Slot|Device) (\d+)/;
+ $pd[$ch][$pd]{location} = "$e:$s";
+ }
+
+ if ($s = $cs->{'Reported Channel,Device'} || $cs->{'Reported Channel,Device(T:L)'}) {
+ $pd[$ch][$pd]{cd} = $s;
+ }
+
+ if (exists $cs->{$s = 'Device is a Hard drive'}
+ || exists $cs->{$s = 'Device is an Enclosure'}
+ || exists $cs->{$s = 'Device is an Enclosure services device'}
+ || exists $cs->{$s = 'Device is an Enclosure Services Device'}
+ ) {
+ ($pd[$ch][$pd]{devtype}) = $s =~ /Device is an?\s+(.+)/;
+ }
+
+ # TODO: normalize and other formats:
+ # Current Temperature : 27 deg C
+ # Life-time Temperature Recorded
+ # Temperature : 51 C/ 123 F (Normal)
+ # Temperature : Normal
+ # Temperature : Not Supported
+ # Temperature Sensor Status 1 : 21 C/ 69 F (Normal)
+ # Temperature Sensor Status 1 : 23 C/ 73 F (Normal)
+ # Temperature Sensor Status 1 : 27 C/ 80 F (Normal)
+ # Temperature Sensor Status 1 : 46 C/ 114 F (Abnormal)
+ # Temperature status : Normal
+ # Threshold Temperature : 51 deg C
+ # FIXME: previous code used last line with /Temperature/ match
+ if ($s = $cs->{'Temperature'} || $cs->{'Temperature Sensor Status 1'} || $cs->{'Temperature status'}) {
+ $pd[$ch][$pd]{temperature} = $s;
+ }
+
+ # ignored:
+ # Status of Enclosure
+ # (Fan \d+|Speaker) status/
+ # /Expander ID\s+:/
+ # /Enclosure Logical Identifier\s+:/
+ # /Expander SAS Address\s+:/
+ # /[Mm]axCache (Capable|Assigned)\s+:\s+(.+)/
+ # /Power supply \d+ status/
+ }
+ }
+
+ $res->{physical} = \@pd;
+ }
+
+ sub process_logical_drive_information {
+ shift->process_logical_device_information(@_);
+ }
+
+ sub process_maxcache_3_0_information {
+ }
+
+ # TODO: issue152/arc2_getconfig.txt
+ sub process_connector_information {
+ }
+
+ # NB: side effect: ARCCONF changes current directory to /var/log
+ sub parse {
+ my ($this) = @_;
+
+ # we chdir to /var/log, as tool is creating 'UcliEvt.log'
+ # this can be disabled with 'nologs' parameter, but not sure do all versions support it
+ chdir('/var/log') || chdir('/');
+
+ my ($status, $config);
+ $status = $this->parse_status or return;
+ $config = $this->parse_config($status) or return;
+
+ return { %$status, %$config };
+ }
+
+ # check for controller status
+ sub check_controller {
+ my ($this, $c) = @_;
+
+ my @status;
+
+ $this->critical if $c->{status} !~ /Optimal|Okay|OK/;
+ push(@status, "Controller:$c->{status}");
+
+ if ($c->{defunct_count} > 0) {
+ $this->critical;
+ push(@status, "Defunct drives:$c->{defunct_count}");
+ }
+
+ if (defined $c->{logical_failed} && $c->{logical_failed} > 0) {
+ $this->critical;
+ push(@status, "Failed drives:$c->{logical_failed}");
+ }
+
+ if (defined $c->{logical_degraded} && $c->{logical_degraded} > 0) {
+ $this->critical;
+ push(@status, "Degraded drives:$c->{logical_degraded}");
+ }
+
+ if (defined $c->{logical_offline} && $c->{logical_offline} > 0) {
+ $this->critical;
+ push(@status, "Offline drives:$c->{logical_offline}");
+ }
+
+ if (defined $c->{logical_critical} && $c->{logical_critical} > 0) {
+ $this->critical;
+ push(@status, "Critical drives:$c->{logical_critical}");
+ }
+
+ # ZMM (Zero-Maintenance Module) status
+ if (defined($c->{zmm_status})) {
+ push(@status, "ZMM Status: $c->{zmm_status}");
+ }
+
+ # Battery status
+ if ($this->bbu_monitoring) {
+ my @s = $this->battery_status($c);
+ push(@status, @s) if @s;
+ }
+
+ return @status;
+ }
+
+ # check for physical devices
+ sub check_physical {
+ my ($this, $p) = @_;
+
+ my %pd;
+ $this->{pd_resync} = 0;
+ for my $ch (@$p) {
+ for my $pd (@{$ch}) {
+ # skip not disks
+ next if not defined $pd;
+ next if $pd->{devtype} =~ m/Enclosure/;
+
+ if ($pd->{status} eq 'Rebuilding') {
+ $this->resync;
+ $this->{pd_resync}++;
+
+ } elsif ($pd->{status} eq 'Dedicated Hot-Spare') {
+ $this->spare;
+ $pd->{status} = "$pd->{status} for $pd->{spare}";
+
+ } elsif ($pd->{status} !~ /^Online|Hot[- ]Spare|Ready/) {
+ $this->critical;
+ }
+
+ my $id = $pd->{serial} || $pd->{wwn} || $pd->{location} || $pd->{cd};
+ push(@{$pd{$pd->{status}}}, $id);
+ }
+ }
+
+ return \%pd;
+ }
+
+ # check for logical devices
+ sub check_logical {
+ my ($this, $l) = @_;
+
+ my @status;
+ for my $ld (@$l) {
+ next unless $ld; # FIXME: fix that script assumes controllers start from '0'
+
+ if ($ld->{status} eq 'Degraded' && $this->{pd_resync}) {
+ $this->warning;
+ } elsif ($ld->{status} !~ /Optimal|Okay/) {
+ $this->critical;
+ }
+
+ my $id = $ld->{id};
+ if ($ld->{name}) {
+ $id = "$id($ld->{name})";
+ }
+ push(@status, "Logical Device $id:$ld->{status}");
+
+ if (defined $ld->{failed_stripes} && $ld->{failed_stripes} ne 'No') {
+ push(@status, "Failed stripes: $ld->{failed_stripes}");
+ }
+ if (defined $ld->{defunct_segments} && $ld->{defunct_segments} ne 'No') {
+ push(@status, "Defunct segments: $ld->{defunct_segments}");
+ }
+ }
+
+ return @status;
+ }
+
+ sub check {
+ my $this = shift;
+
+ my $data = $this->parse;
+ $this->unknown,return unless $data;
+
+ my @status;
+
+ for my $i (sort {$a cmp $b} keys %{$data->{controllers}}) {
+ my $c = $data->{controllers}->{$i};
+
+ push(@status, $this->check_controller($c->{controller}));
+
+ # current (logical device) tasks
+ if ($data->{tasks}->{operation} ne 'None') {
+ # just print it. no status change
+ my $task = $data->{tasks};
+ push(@status, "$task->{type} #$task->{device}: $task->{operation}: $task->{status} $task->{percent}%");
+ }
+
+ # check physical first, as it setups pd_resync flag
+ my $pd = $this->check_physical($c->{physical});
+
+ push(@status, $this->check_logical($c->{logical}));
+
+ # but report after logical devices
+ push(@status, "Drives: ".$this->join_status($pd)) if $pd;
+ }
+
+ $this->ok->message(join(', ', @status));
+ }
+
+ # check battery status in $c
+ sub battery_status {
+ my ($this, $c) = @_;
+
+ my @status;
+
+ if (!defined($c->{battery_status}) || $c->{battery_status} eq 'Not Installed') {
+ return;
+ }
+
+ push(@status, "Battery Status: $c->{battery_status}");
+
+ # if battery status is 'Failed', none of the details below are available. #105
+ if ($c->{battery_status} eq 'Failed') {
+ $this->critical;
+ return @status;
+ }
+
+ # detailed battery checks
+ if ($c->{battery_overtemp} ne 'No') {
+ $this->critical;
+ push(@status, "Battery Overtemp: $c->{battery_overtemp}");
+ }
+
+ push(@status, "Battery Capacity Remaining: $c->{battery_capacity}%");
+ if ($c->{battery_capacity} < 50) {
+ $this->critical;
+ }
+ if ($c->{battery_capacity} < 25) {
+ $this->warning;
+ }
+
+ if ($c->{battery_time} < 1440) {
+ $this->warning;
+ }
+ if ($c->{battery_time} < 720) {
+ $this->critical;
+ }
+
+ if ($c->{battery_time} < 60) {
+ push(@status, "Battery Time: $c->{battery_time}m");
+ } else {
+ push(@status, "Battery Time: $c->{battery_time_full}");
+ }
+
+ return @status;
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_ARCCONF
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/areca.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_ARECA';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::areca;
+
+ ## Areca SATA RAID Support
+ ## requires cli64 or cli32 binaries
+ ## For links to manuals and binaries, see this issue:
+ ## https://github.com/glensc/nagios-plugin-check_raid/issues/10
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ qw(areca-cli areca_cli64 areca_cli32 cli64 cli32);
+ }
+
+ sub commands {
+ {
+ 'rsf info' => ['-|', '@CMD', 'rsf', 'info'],
+ 'disk info' => ['-|', '@CMD', 'disk', 'info'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ (
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd rsf info",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd disk info",
+ );
+ }
+
+ # plugin check
+ # can store its exit code in $this->status
+ # can output its message in $this->message
+ sub check {
+ my $this = shift;
+
+ ## Check Array Status
+ my (@status, %arrays);
+ my $fh = $this->cmd('rsf info');
+ while (<$fh>) {
+ =cut
+ # Name Disks TotalCap FreeCap MinDiskCap State
+ # Name Disks TotalCap FreeCap DiskChannels State
+ ===============================================================================
+ 1 Raid Set # 000 23 34500.0GB 0.0GB 1500.0GB Normal
+ 1 Raid Set # 00 15 15000.0GB 0.0GB 123G567C9AB48EF Normal
+ 1 data 15 11250.0GB 0.0GB 123456789ABCDEF Normal
+ 1 data 15 11250.0GB 0.0GB 123456789ABCDEF Initializing
+ ===============================================================================
+ =cut
+ next unless (my($id, $n, $s) = m{^
+ \s*(\d+) # Id
+ \s+(.+) # Name
+ \s+\d+ # Disks
+ \s+\S+ # TotalCap
+ \s+\S+ # FreeCap
+ \s+\S+ # MinDiskCap/DiskChannels
+ \s+(\S+)\s* # State
+ $}x);
+
+ # trim trailing spaces from name
+ $n =~ s/\s+$//;
+
+ if ($s =~ /[Rr]e[Bb]uild/) {
+ $this->warning;
+ } elsif ($s !~ /[Nn]ormal|[Rr]e[Bb]uild|Checking|Initializing/) {
+ $this->critical;
+ }
+
+ push(@status, "Array#$id($n): $s");
+
+ $arrays{$n} = [ $id, $s ];
+ }
+ close $fh;
+
+ ## Check Drive Status
+ $fh = $this->cmd('disk info');
+ my %drivestatus;
+ while (<$fh>) {
+ chomp;
+ =cut
+ # Enc# Slot# ModelName Capacity Usage
+ ===============================================================================
+ 1 01 Slot#1 N.A. 0.0GB N.A.
+ 8 01 Slot#8 N.A. 0.0GB N.A.
+ 9 02 SLOT 01 ST31500341AS 1500.3GB Raid Set # 000
+ 11 02 SLOT 03 ST31500341AS 1500.3GB Raid Set # 000
+
+ # Ch# ModelName Capacity Usage
+ ===============================================================================
+ 1 1 ST31000340NS 1000.2GB Raid Set # 00
+ 6 6 ST31000340NS 1000.2GB Raid Set # 00
+ 3 3 WDC WD7500AYYS-01RCA0 750.2GB data
+ 4 4 WDC WD7500AYYS-01RCA0 750.2GB data
+ 16 16 WDC WD7500AYYS-01RCA0 750.2GB HotSpare[Global]
+ =cut
+ next unless my($id, $model, $usage) = m{^
+ \s*(\d+) # Id
+ \s+\d+ # Channel/Enclosure (not reliable, tests 1,2,12 differ)
+ \s+(.+) # ModelName
+ \s+\d+.\d\S+ # Capacity
+ \s+(.+) # Usage (Raid Name)
+ }x;
+
+ # trim trailing spaces from name
+ $usage =~ s/\s+$//;
+
+ # Asssume model N.A. means the slot not in use
+ # we could also check for Capacity being zero, but this seems more
+ # reliable.
+ next if $usage eq 'N.A.';
+
+ # use array id in output: shorter
+ my $array_id = defined($arrays{$usage}) ? ($arrays{$usage})->[0] : undef;
+ my $array_name = defined $array_id ? "Array#$array_id" : $usage;
+
+ # assume critical if Usage is not one of:
+ # - existing Array name
+ # - HotSpare
+ # - Rebuild
+ if (defined($arrays{$usage})) {
+ # Disk in Array named $usage
+ push(@{$drivestatus{$array_name}}, $id);
+ } elsif ($usage =~ /[Rr]e[Bb]uild/) {
+ # rebuild marks warning
+ push(@{$drivestatus{$array_name}}, $id);
+ $this->warning;
+ } elsif ($usage =~ /HotSpare/) {
+ # hotspare is OK
+ push(@{$drivestatus{$array_name}}, $id);
+ } elsif ($usage =~ /Pass Through/) {
+ # Pass Through is OK
+ push(@{$drivestatus{$array_name}}, $id);
+ } else {
+ push(@{$drivestatus{$array_name}}, $id);
+ $this->critical;
+ }
+ }
+ close $fh;
+
+ push(@status, "Drive Assignment: ".$this->join_status(\%drivestatus)) if %drivestatus;
+
+ $this->ok->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_ARECA
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/cciss.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_CCISS';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::cciss;
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use App::Monitoring::Plugin::CheckRaid::Plugins::lsscsi;
+ use App::Monitoring::Plugin::CheckRaid::Plugins::smartctl;
+ use strict;
+ use warnings;
+
+ sub program_names {
+ 'cciss_vol_status';
+ }
+
+ sub commands {
+ {
+ 'controller status' => ['-|', '@CMD', '@devs'],
+ 'controller status verbose' => ['-|', '@CMD', '-V', '@devs'],
+ 'cciss_vol_status version' => ['>&2', '@CMD', '-v'],
+
+ 'detect hpsa' => ['<', '/sys/module/hpsa/refcnt'],
+ 'detect cciss' => ['<', '/proc/driver/cciss'],
+ 'cciss proc' => ['<', '/proc/driver/cciss/$controller'],
+
+ # for lsscsi, issue #109
+ 'lsscsi list' => ['-|', '@CMD', '-g'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+
+ my $v1_10 = $this->cciss_vol_status_version >= 1.10;
+
+ my @sudo;
+ my @cciss_devs = $this->detect;
+ if (@cciss_devs) {
+ my $c = join(' ', @cciss_devs);
+ if ($v1_10) {
+ push(@sudo, "CHECK_RAID ALL=(root) NOPASSWD: $cmd -V $c");
+ } else {
+ push(@sudo, "CHECK_RAID ALL=(root) NOPASSWD: $cmd $c");
+ }
+ }
+
+ my @cciss_disks = $this->detect_disks(@cciss_devs);
+ if (!$v1_10 && @cciss_disks) {
+ my $smartctl = App::Monitoring::Plugin::CheckRaid::Plugins::smartctl->new();
+
+ if ($smartctl->active) {
+ my $cmd = $smartctl->{program};
+ foreach my $ref (@cciss_disks) {
+ my ($dev, $diskopt, $disk) = @$ref;
+ # escape comma for sudo
+ $diskopt =~ s/,/\\$&/g;
+ push(@sudo, "CHECK_RAID ALL=(root) NOPASSWD: $cmd -H $dev $diskopt$disk");
+ }
+ }
+ }
+
+ return @sudo;
+ }
+
+ # detects if hpsa (formerly cciss) is present in system
+ sub detect {
+ my $this = shift;
+
+ my ($fh, @devs);
+
+ # try lsscsi first if enabled and allowed
+ my $lsscsi = App::Monitoring::Plugin::CheckRaid::Plugins::lsscsi->new('commands' => $this->{commands});
+ my $use_lsscsi = defined($this->{use_lsscsi}) ? $this->{use_lsscsi} : $lsscsi->active;
+ if ($use_lsscsi) {
+ # for cciss_vol_status < 1.10 we need /dev/sgX nodes, columns which are type storage
+ @devs = $lsscsi->list_sg;
+
+ # cciss_vol_status 1.10 can process disk nodes too even if sg is not present
+ my $v1_10 = $this->cciss_vol_status_version >= 1.10;
+ if (!@devs && $v1_10) {
+ @devs = $lsscsi->list_dd;
+ }
+
+ return wantarray ? @devs : \@devs if @devs;
+ }
+
+ # check hpsa devs
+ eval { $fh = $this->cmd('detect hpsa'); };
+ if ($fh) {
+ my $refcnt = <$fh>;
+ close $fh;
+
+ if ($refcnt) {
+ # TODO: how to figure which sgX is actually in use?
+ # for now we collect all, and expect cciss_vol_status to ignore unknowns
+ # refcnt seems to match number of sg devs: /sys/class/scsi_generic/sg*
+ for (my $i = 0; $i < $refcnt; $i++) {
+ my $dev = "/dev/sg$i";
+ # filter via valid() so could exclude devs
+ push(@devs, $dev) if $this->valid($dev);
+ }
+ }
+ }
+ undef($fh);
+
+ # check legacy cciss devs
+ eval { $fh = $this->cmd('detect cciss'); };
+ if ($fh) {
+ my @c = grep { !/^\./ } readdir($fh);
+ close($fh);
+
+ # find controllers
+ # cciss0: HP Smart Array P400i Controller
+ # Board ID: 0x3235103c
+ # Firmware Version: 4.06
+ # IRQ: 98
+ # Logical drives: 1
+ # Current Q depth: 0
+ # Current # commands on controller: 0
+ # Max Q depth since init: 249
+ # Max # commands on controller since init: 275
+ # Max SG entries since init: 31
+ # Sequential access devices: 0
+ #
+ # cciss/c0d0: 220.12GB RAID 1(1+0)
+ for my $c (@c) {
+ my $fh = $this->cmd('cciss proc', { '$controller' => $c });
+ while (<$fh>) {
+ # check "c*d0" - iterate over each controller
+ next unless (my($dev) = m{^(cciss/c\d+d0):});
+ $dev = "/dev/$dev";
+ # filter via valid() so could exclude devs
+ push(@devs, $dev) if $this->valid($dev);
+ }
+ close $fh;
+ }
+ }
+ undef($fh);
+
+ return wantarray ? @devs : \@devs;
+ }
+
+ # build list of cciss disks
+ # used by smartctl check
+ # just return all disks (0..15) for each cciss dev found
+ sub detect_disks {
+ my $this = shift;
+
+ my @devs;
+ # build devices list for smartctl
+ foreach my $scsi_dev (@_) {
+ foreach my $disk (0..15) {
+ push(@devs, [ $scsi_dev, '-dcciss,', $disk ]);
+ }
+ }
+ return wantarray ? @devs : \@devs;
+ }
+
+ # parse version out of "cciss_vol_status version 1.09"
+ # NOTE: it prints the output to stderr, but may print to stdout in the future
+ sub cciss_vol_status_version {
+ my $this = shift;
+
+ # cache inside single run
+ return $this->{cciss_vol_status_version} if defined $this->{cciss_vol_status_version};
+
+ my $version = sub {
+ my $fh = $this->nosudo_cmd('cciss_vol_status version');
+ my ($line) = <$fh>;
+ close $fh;
+ return 0 unless $line;
+
+ if (my($v) = $line =~ /^cciss_vol_status version ([\d.]+)$/) {
+ return 0 + $v;
+ }
+ return 0;
+ };
+
+ return $this->{cciss_vol_status_version} = &$version();
+ }
+
+ sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
+
+ # we process until we find end of sentence (dot at the end of the line)
+ sub consume_diagnostic {
+ my ($this, $fh) = @_;
+
+ my $diagnostic = '';
+ while (1) {
+ my $s = <$fh>;
+ last unless $s;
+ chomp;
+ $diagnostic .= ' '. trim($s);
+ last if $s =~ /\.$/;
+ }
+ return trim($diagnostic);
+ }
+
+ # process to skip lines with physical location:
+ # " connector 1I box 1 bay 4 ..."
+ sub consume_disk_map {
+ my ($this, $fh) = @_;
+
+ while (my $s = <$fh>) {
+ chomp $s;
+ # connector 1I box 1 bay 4
+ last unless $s =~ /^\s+connector\s/;
+ }
+ }
+
+ sub parse {
+ my $this = shift;
+ my @devs = @_;
+
+ my (%c, $cdev);
+
+ # cciss_vol_status 1.10 has -V option to print more info about controller and disks.
+ my $v1_10 = $this->cciss_vol_status_version >= 1.10;
+
+ # add all devs at once to commandline, cciss_vol_status can do that
+ my $fh = $this->cmd($v1_10 ? 'controller status verbose' : 'controller status', { '@devs' => \@devs });
+ while (<$fh>) {
+ chomp;
+
+ # skip empty lines and artificial comments (added by this project)
+ next if /^$/ or /^#/;
+
+ if (/Controller:/) {
+ # this is first item when new controller is found
+ # reset previous state
+ undef $cdev;
+ next;
+ }
+
+ # catch enclosures, print_bus_status()
+ # /dev/cciss/c1d0: (Smart Array P800) Enclosure MSA70 (S/N: SGA651004J) on Bus 2, Physical Port 1E status: OK.
+ # /dev/cciss/c0d0: (Smart Array 6i) Enclosure PROLIANT 6L2I (S/N: ) on Bus 0, Physical Port J1 status: OK.
+ if (my($file, $board_name, $name, $sn, $bus, $port1, $port2, $status) = m{
+ ^(/dev/[^:]+):\s # File
+ \(([^)]+)\)\s # Board Name
+ Enclosure\s(.*?)\s # Enclosure Name
+ \(S/N:\s(\S*)\)\s # Enclosure SN
+ on\sBus\s(\d+),\s # Bus Number
+ Physical\sPort\s(.) # physical_port1
+ (.)\s # physical_port2
+ status:\s(.*?)\. # status (without a dot)
+ }x) {
+ $c{$file}{enclosures}{$bus} = {
+ board_name => $board_name,
+ name => $name,
+ sn => $sn,
+ bus => int($bus),
+ phys1 => $port1,
+ phys2 => $port2,
+ status => $status,
+ };
+ next;
+ }
+
+ # volume status, print_volume_status()
+ # /dev/cciss/c0d0: (Smart Array P400i) RAID 1 Volume 0 status: OK
+ # /dev/sda: (Smart Array P410i) RAID 1 Volume 0 status: OK.
+ # /dev/sda: (Smart Array P410i) RAID 5 Volume 0 status: OK. At least one spare drive designated. At least one spare drive has failed.
+ if (my($file, $board_name, $raid_level, $volume_number, $certain, $status, $spare_drive_status) = m{
+ ^(/dev/[^:]+):\s # File
+ \(([^)]+)\)\s # Board Name
+ (RAID\s\d+|\([^)]+\))\s # RAID level
+ Volume\s(\d+) # Volume number
+ (\(\?\))?\s # certain?
+ status:\s(.*?)\. # status (without a dot)
+ (.*)? # spare drive status messages
+ }x) {
+ $cdev = $file;
+ $c{$file}{volumes}{$volume_number} = {
+ board_name => $board_name,
+ raid_level => $raid_level,
+ volume_number => $volume_number,
+ certain => int(not defined $certain),
+ status => $status,
+ spare_drive_status => trim($spare_drive_status),
+ };
+
+ $c{$file}{board_name} = $board_name;
+ next;
+ }
+
+ next unless $cdev;
+
+ if (my ($count) = /Physical drives: (\d+)/) {
+ $c{$cdev}{'pd count'} = $count;
+ next;
+ }
+
+ # check_physical_drives(file, fd);
+ # NOTE: check for physical drives is enabled with -V or -s option (-V enables -s)
+ # cciss_vol_status.c format_phys_drive_location()
+ if (my ($phys1, $phys2, $box, $bay, $model, $serial_no, $fw_rev, $status) = m{
+ \sconnector\s(.)(.)\s # Phys connector 1&2
+ box\s(\d+)\s # phys_box_on_bus
+ bay\s(\d+)\s # phys_bay_in_box
+ (.{40})\s # model
+ (.{40})\s # serial no
+ (.{8})\s # fw rev
+ (.+) # status
+ $}x) {
+ my $slot = "$phys1$phys2-$box-$bay";
+ $c{$cdev}{drives}{$slot} = {
+ 'slot' => $slot,
+ 'phys1' => $phys1,
+ 'phys2' => $phys2,
+ 'box' => int($box),
+ 'bay' => int($bay),
+
+ 'model' => trim($model),
+ 'serial' => trim($serial_no),
+ 'fw' => trim($fw_rev),
+ 'status' => $status,
+ };
+ next;
+ }
+
+ # TODO
+ # check_fan_power_temp(file, ctlrtype, fd, num_controllers);
+
+ # check_nonvolatile_cache_status(file, ctlrtype, fd, num_controllers);
+ # /dev/cciss/c0d0(Smart Array P400i:0): Non-Volatile Cache status:
+ if (my($file, $board_name, $instance) = m{^(/dev/[^(]+)\((.+):(\d+)\): Non-Volatile Cache status}) {
+ # $file and $dev may differ, so store it
+ $c{$cdev}{cache} = {
+ 'file' => $file,
+ 'board' => $board_name,
+ 'instance' => int($instance),
+ };
+ next;
+ }
+
+ if (defined($c{$cdev}{cache})) {
+ my $cache = $c{$cdev}{cache};
+ my %map = (
+ configured => qr/Cache configured: (.+)/,
+ read_cache_memory => qr/Read cache memory: (.+)/,
+ write_cache_memory => qr/Write cache memory: (.+)/,
+ write_cache_enabled => qr/Write cache enabled: (.+)/,
+ flash_cache => qr/Flash backed cache present/,
+ disabled_temporarily => qr/Write cache temporarily disabled/,
+ disabled_permanently => qr/Write Cache permanently disabled/,
+ );
+ my $got;
+ while (my($k, $r) = each %map) {
+ next unless (my($v) = $_ =~ $r);
+ $cache->{$k} = $v;
+ $got = 1;
+
+ # consume extended diagnostic
+ if ($k =~ /disabled_(temporari|permanentl)ly/) {
+ $cache->{"$k diagnostic"} = $this->consume_diagnostic($fh);
+ }
+ }
+
+ next if $got;
+ }
+
+ # show_disk_map(" Failed drives:", file, fd, id, controller_lun, ctlrtype,
+ # show_disk_map(" 'Replacement' drives:", file, fd, id, controller_lun, ctlrtype,
+ # show_disk_map(" Drives currently substituted for by spares:", file, fd, id, controller_lun, ctlrtype,
+ if (/^ Failed drives:/ ||
+ /^ 'Replacement' drives:/ ||
+ /^ Drives currently substituted for by spares:/
+ ) {
+ # could store this somewhere, ignore for now
+ $this->consume_disk_map($fh);
+ next;
+ }
+
+ if (my($total_failed) = /Total of (\d+) failed physical drives detected on this logical drive\./) {
+ $c{$cdev}{phys_failed} = $total_failed;
+ next;
+ }
+
+ warn "Unparsed[$_]";
+ }
+ close($fh);
+
+ return \%c;
+ }
+
+ sub check {
+ my $this = shift;
+ my @devs = $this->detect;
+
+ unless (@devs) {
+ $this->warning;
+ $this->message("No Smart Array Adapters were found on this machine");
+ return;
+ }
+
+ # status messages pushed here
+ my @status;
+
+ my $res = $this->parse(@devs);
+ for my $dev (sort {$a cmp $b} keys %$res) {
+ my $c = $res->{$dev};
+ my @bstatus;
+
+ # check volumes
+ my @vstatus;
+ for my $vn (sort {$a cmp $b} keys %{$c->{volumes}}) {
+ my $v = $c->{volumes}->{$vn};
+ if ($v->{status} !~ '^OK') {
+ $this->critical;
+ }
+ push(@vstatus, "Volume $v->{volume_number} ($v->{raid_level}): $v->{status}");
+ }
+
+ push(@bstatus, @vstatus) if @vstatus;
+
+ # check physical devices
+ if ($c->{'pd count'}) {
+ my %pd;
+ for my $ps (sort {$a cmp $b} keys %{$c->{drives}}) {
+ my $pd = $c->{drives}{$ps};
+ if ($pd->{status} !~ '^OK') {
+ $this->critical;
+ $ps .= "($pd->{serial})";
+ }
+ push(@{$pd{$pd->{status}}}, $ps);
+ }
+ push(@bstatus, "Drives($c->{'pd count'}): ". $this->join_status(\%pd));
+ }
+
+ # check enclosures
+ if ($c->{enclosures}) {
+ my @e;
+ for my $i (sort {$a cmp $b} keys %{$c->{enclosures}}) {
+ my $e = $c->{enclosures}{$i};
+
+ # enclosure name may be missing, identify by connection
+ my $s = $e->{name} || "$e->{bus}-$e->{phys1}$e->{phys2}";
+ # enclosure S/N may be missing
+ $s .= "($e->{sn})" if $e->{sn};
+ $s .= ": $e->{status}";
+ if ($e->{status} !~ '^OK') {
+ $this->critical;
+ }
+ push(@e, $s);
+ }
+ push(@bstatus, "Enclosures: ". join(', ', @e));
+ }
+
+ # check cache
+ if ($c->{cache} && $c->{cache}->{configured} eq 'Yes') {
+ my $cache = $c->{cache};
+ my @cstatus = 'Cache:';
+
+ if ($cache->{write_cache_enabled} eq 'Yes') {
+ push(@cstatus, "WriteCache");
+
+ } elsif ($cache->{disabled_temporarily} || $cache->{disabled_permanently}) {
+ # disabled diagnostic is available, but it's too long to print here
+ push(@cstatus, "WriteCache:DISABLED");
+ $this->cache_fail;
+ }
+
+ push(@cstatus, "FlashCache") if $cache->{flash_cache};
+ push(@cstatus, "ReadMem:$cache->{read_cache_memory}") if $cache->{read_cache_memory};
+ push(@cstatus, "WriteMem:$cache->{write_cache_memory}") if $cache->{write_cache_memory};
+
+ push(@bstatus, join(' ', @cstatus));
+ }
+
+ push(@status, "$dev($c->{board_name}): ". join(', ', @bstatus));
+ }
+
+ unless (@status) {
+ return;
+ }
+
+ # denote this plugin as ran ok
+ $this->ok;
+
+ $this->message(join(', ', @status));
+
+ # cciss_vol_status 1.10 with -V (or -s) checks individual disk health anyway
+ my $v1_10 = $this->cciss_vol_status_version >= 1.10;
+
+ # no_smartctl: allow skip from tests
+ if (!$v1_10 && !$this->{no_smartctl}) {
+ # check also individual disk health
+ my @disks = $this->detect_disks(@devs);
+ if (@disks) {
+ # inherit smartctl command from our commands (testing)
+ my %params = ();
+ $params{commands}{smartctl} = $this->{commands}{smartctl} if $this->{commands}{smartctl};
+
+ my $smartctl = App::Monitoring::Plugin::CheckRaid::Plugins::smartctl->new(%params);
+ # do not perform check if smartctl is missing
+ if ($smartctl->active) {
+ $smartctl->check_devices(@disks);
+
+ # XXX this is hack, as we have no proper subcommand check support
+ $this->message($this->message . " " .$smartctl->message);
+ if ($smartctl->status > 0) {
+ $this->critical;
+ }
+ }
+ }
+ }
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_CCISS
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/cmdtool2.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_CMDTOOL2';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::cmdtool2;
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ 'CmdTool2';
+ }
+
+ sub commands {
+ {
+ 'adapter list' => ['-|', '@CMD', , '-AdpAllInfo', '-aALL', '-nolog'],
+ 'adapter config' => ['-|', '@CMD', '-CfgDsply', '-a$adapter', '-nolog'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ (
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -AdpAllInfo -aALL -nolog",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -CfgDsply -a* -nolog",
+ );
+ }
+
+ sub check {
+ my $this = shift;
+
+ # status messages pushed here
+ my @status;
+
+ # get adapters
+ my $fh = $this->cmd('adapter list');
+ my @c;
+ while (<$fh>) {
+ if (my($c) = /^Adapter #(\d+)/) {
+ push(@c, $c);
+ }
+ }
+ close $fh;
+
+ unless (@c) {
+ $this->warning;
+ $this->message("No LSI adapters were found on this machine");
+ return;
+ }
+
+ foreach my $c (@c) {
+ my $fh = $this->cmd('adapter config', { '$adapter' => $c });
+ my ($d);
+ while (<$fh>) {
+ # DISK GROUPS: 0
+ if (my($s) = /^DISK GROUPS: (\d+)/) {
+ $d = int($s);
+ next;
+ }
+
+ # State: Optimal
+ if (my($s) = /^State: (\S+)$/) {
+ if ($s ne 'Optimal') {
+ $this->critical;
+ }
+ push(@status, "Logical Drive $c,$d: $s");
+ }
+ }
+ }
+
+ return unless @status;
+
+ # denote this plugin as ran ok
+ $this->ok;
+
+ $this->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_CMDTOOL2
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/dm.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_DM';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::dm;
+
+ # Package to check Linux Device Mapper
+
+ # Linux LVM Mirrors
+ # https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/mirror_create.html
+ #
+ # Linux LVM RAID
+ # https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/raid_volumes.html
+ #
+ # Low-level:
+ # https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/device_mapper.html#mirror-map
+ # https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/device_mapper.html#dmraid-map
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ qw(dmsetup);
+ }
+
+ sub active {
+ my ($this, $sudo) = @_;
+
+ # return if parent said NO
+ my $res = $this->SUPER::active(@_);
+ return $res unless $res;
+
+ # check if there really are any devices
+ my $c = $this->parse;
+ return !!@$c;
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ (
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd status --noflush",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd status",
+ );
+ }
+
+ sub commands {
+ {
+ 'dmsetup' => [ '-|', '@CMD', 'status' ],
+ 'dmsetup noflush' => [ '-|', '@CMD', 'status', '--noflush' ],
+ }
+ }
+
+ # https://www.kernel.org/doc/Documentation/device-mapper/dm-raid.txt
+ sub parse_raid {
+ local $_ = shift;
+
+ # https://github.com/torvalds/linux/blob/v3.18/drivers/md/dm-raid.c#L1377
+ # https://github.com/torvalds/linux/blob/v3.18/drivers/md/dm-raid.c#L1409-L1423
+ # https://github.com/torvalds/linux/blob/v3.18/drivers/md/dm-raid.c#L1425-L1435
+ # https://github.com/torvalds/linux/blob/v3.18/drivers/md/dm-raid.c#L1437-L1442
+ # https://github.com/torvalds/linux/blob/v3.18/drivers/md/dm-raid.c#L1444-L1452
+ my @cols = qw(
+ raid_type raid_disks
+ status_chars
+ sync_ratio
+ sync_action
+ mismatch_cnt
+ );
+
+ my %h;
+ @h{@cols} = split;
+
+ \%h;
+ }
+
+ # https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/device_mapper.html#mirror-map
+ sub parse_mirror {
+ local $_ = shift;
+
+ my %h;
+
+ # https://github.com/torvalds/linux/blob/v3.18/drivers/md/dm-raid1.c#L1355
+ my @parts = split;
+
+ # https://github.com/torvalds/linux/blob/v3.18/drivers/md/dm-raid1.c#L1365
+ $h{nr_mirrors} = shift @parts;
+
+ # https://github.com/torvalds/linux/blob/v3.18/drivers/md/dm-raid1.c#L1366-L1369
+ my @devs;
+ for (my $i = 0; $i < $h{nr_mirrors}; $i++) {
+ push(@devs, shift @parts);
+ }
+ $h{devices} = \@devs;
+
+ # https://github.com/torvalds/linux/blob/v3.18/drivers/md/dm-raid1.c#L1372-L1374
+ # some ratio?
+ $h{ratio} = shift @parts;
+ # param count? always '1'
+ shift @parts;
+ # the 'buffer' filled with status chars
+ $h{status_chars} = shift @parts;
+
+ # log device information
+ # https://github.com/torvalds/linux/blob/v3.18/drivers/md/dm-log.c#L807-L810
+ # log params, always '3'
+ shift @parts;
+ my %l;
+ $l{type} = shift @parts;
+ $l{device} = shift @parts;
+ # status: F->D->A
+ $l{status_char} = shift @parts;
+ $h{log} = { %l };
+
+ # for debugging. fill only if something remains not parsed
+ $h{_remaining} = join ' ', @parts if @parts;
+
+ \%h;
+ }
+
+ sub parse_target {
+ my ($target, $data) = @_;
+
+ return parse_raid($data) if $target eq 'raid';
+ return parse_mirror($data) if $target eq 'mirror';
+ undef;
+ }
+
+ sub get_fh {
+ my $this = shift;
+
+ # use dmsetup --noflush, requires LVM >= 2.02.97
+ # if that fails, fall back to just dmsetup
+ # https://github.com/glensc/nagios-plugin-check_raid/issues/130#issuecomment-194476070
+ my $fh = $this->cmd('dmsetup noflush');
+ $fh = $this->cmd('dmsetup') if eof $fh;
+
+ return $fh;
+ }
+
+ sub parse {
+ my $this = shift;
+
+ # cache for single run
+ if (!defined($this->{parsed})) {
+ $this->{parsed} = $this->_parse;
+ }
+
+ return $this->{parsed};
+ }
+
+ sub _parse {
+ my $this = shift;
+
+ my @devices;
+ my $fh = $this->get_fh();
+ while (<$fh>) {
+ # skip comments.
+ # not present in dmsetup output, but our test files may have.
+ next if /^#/;
+
+ last if /No devices found/;
+
+ if (my ($dmname, $s, $l, $target, $rest) = m{^
+ (\S+):\s+ # dmname
+ (\d+)\s+ # start
+ (\d+)\s+ # length
+ (\S+) # target
+ (?:\s+(.+))? # rest of the data
+ \s? # there may be trailing space
+ $}x) {
+ my $h = parse_target($target, $rest);
+
+ # skip target type not handled
+ next unless $h;
+
+ my %h = (
+ 'dmname' => $dmname,
+ 's' => $s,
+ 'l' => $l,
+ 'target' => $target,
+ %$h,
+ );
+ push @devices, \%h;
+ next;
+ }
+
+ warn "Unhandled:[$_]";
+ $this->unknown;
+ }
+ close $fh;
+ return \@devices;
+ }
+
+ sub check {
+ my $this = shift;
+
+ my $c = $this->parse;
+
+ if (!@$c) {
+ $this->noraid->message("No devices to check");
+ return;
+ }
+
+ my @status;
+ foreach my $dm (@$c)
+ {
+ # <status_chars> One char for each device, indicating:
+ # 'A' = alive and in-sync (mirror, raid1, raid)
+ # 'a' = alive but not in-sync (mirror, raid1)
+ # 'D' = dead/failed (mirror, raid1, raid)
+ # 'S' = Sync (mirror, raid1)
+ # 'mirror'/'raid1': https://github.com/torvalds/linux/blob/v3.18/drivers/md/dm-raid1.c#L1330-L1342
+ # 'raid': https://github.com/torvalds/linux/blob/v3.18/drivers/md/dm-raid.c#L1409-L1414
+ $this->critical if ($dm->{status_chars} =~ /D/);
+ $this->warning if ($dm->{status_chars} =~ /[aS]/);
+
+ my @s = "$dm->{dmname}:$dm->{status_chars}";
+
+ # <sync_action> One of the following possible states:
+ # idle - No synchronization action is being performed.
+ # frozen - The current action has been halted.
+ # resync - Array is undergoing its initial synchronization or...
+ # recover - A device in the array is being rebuilt or...
+ # check - A user-initiated full check of the array is...
+ # repair - The same as "check", but discrepancies are...
+ # reshape - The array is undergoing a reshape.
+ if ($dm->{sync_action}) {
+ push(@s, $dm->{sync_action});
+ if ($dm->{sync_action} =~ /^(check|repair|init)$/) {
+ $this->warning;
+ }
+ }
+ push(@status, join(' ', @s));
+ }
+
+ return unless @status;
+
+ $this->ok->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_DM
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/dmraid.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_DMRAID';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::dmraid;
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ shift->{name};
+ }
+
+ sub commands {
+ {
+ 'dmraid' => ['-|', '@CMD', '-r'],
+ }
+ }
+
+ sub active {
+ my ($this) = @_;
+
+ # allow --plugin-option=dmraid-enabled to force this plugin to be enabled
+ return 1 if exists $this->{options}{'dmraid-enabled'};
+
+ # return if parent said NO
+ my $res = $this->SUPER::active(@_);
+ return $res unless $res;
+
+ # check if dmraid is empty
+ return keys %{$this->parse} > 0;
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -r";
+ }
+
+ # parse arrays, return data indexed by array name
+ sub parse {
+ my $this = shift;
+
+ my (%arrays);
+ my $fh = $this->cmd('dmraid');
+ while (<$fh>) {
+ chomp;
+ next unless (my($device, $format, $name, $type, $status, $sectors) = m{^
+ # /dev/sda: jmicron, "jmicron_JRAID", mirror, ok, 781385728 sectors, data@ 0
+ # /dev/sdb: ddf1, ".ddf1_disks", GROUP, ok, 1953253376 sectors, data@ 0
+ (/dev/\S+):\s # device
+ (\S+),\s # format
+ "([^"]+)",\s # name
+ (mirror|stripe[d]?|GROUP),\s # type
+ (\w+),\s # status
+ (\d+)\ssectors,.* # sectors
+ $}x);
+ next unless $this->valid($device);
+
+ # trim trailing spaces from name
+ $name =~ s/\s+$//;
+
+ my $member = {
+ 'device' => $device,
+ 'format' => $format,
+ 'type' => $type,
+ 'status' => $status,
+ 'size' => $sectors,
+ };
+
+ push(@{$arrays{$name}}, $member);
+ }
+ close $fh;
+
+ return \%arrays;
+ }
+
+
+ # plugin check
+ # can store its exit code in $this->status
+ # can output its message in $this->message
+ sub check {
+ my $this = shift;
+ my (@status);
+
+ ## Check Array and Drive Status
+ my $arrays = $this->parse;
+ while (my($name, $array) = each(%$arrays)) {
+ my @s;
+ foreach my $dev (@$array) {
+ if ($dev->{status} =~ m/sync|rebuild/i) {
+ $this->warning;
+ } elsif ($dev->{status} !~ m/ok/i) {
+ $this->critical;
+ }
+ my $size = $this->format_bytes($dev->{size});
+ push(@s, "$dev->{device}($dev->{type}, $size): $dev->{status}");
+ }
+ push(@status, "$name: " . join(', ', @s));
+ }
+
+ return unless @status;
+
+ # denote that this plugin as ran ok, not died unexpectedly
+ $this->ok->message(join(' ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_DMRAID
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/dpt_i2o.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_DPT_I2O';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::dpt_i2o;
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub commands {
+ {
+ 'proc' => ['<', '/proc/scsi/dpt_i2o'],
+ 'proc entry' => ['<', '/proc/scsi/dpt_i2o/$controller'],
+ }
+ }
+
+ sub active {
+ my ($this) = @_;
+ return -d $this->{commands}{proc}[1];
+ }
+
+ sub check {
+ my $this = shift;
+ # status messages pushed here
+ my @status;
+
+ my $fh = $this->cmd('proc');
+ my @c = grep { !/^\./ } readdir($fh);
+ close($fh);
+
+ # TODO: check for failed disks!
+ for my $c (@c) {
+ my $fh = $this->cmd('proc entry', { '$controller' => $c });
+
+ while (<$fh>) {
+ if (my ($c, $t, $l, $s) = m/TID=\d+,\s+\(Channel=(\d+),\s+Target=(\d+),\s+Lun=(\d+)\)\s+\((\S+)\)/) {
+ if ($s ne "online") {
+ $this->critical;
+ }
+ push(@status, "$c,$t,$l:$s");
+ }
+ }
+ close($fh);
+ }
+
+ return unless @status;
+
+ # denote this plugin as ran ok
+ $this->ok;
+
+ $this->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_DPT_I2O
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/gdth.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_GDTH';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::gdth;
+
+ # Linux gdth RAID
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub commands {
+ {
+ 'proc' => ['<', '/proc/scsi/gdth'],
+ 'proc entry' => ['<', '/proc/scsi/gdth/$controller'],
+ }
+ }
+
+ sub active {
+ my ($this) = @_;
+ return -d $this->{commands}{proc}[1];
+ }
+
+ sub parse {
+ my $this = shift;
+
+ my $fh = $this->cmd('proc');
+ my @c = grep { !/^\./ } readdir($fh);
+ close($fh);
+
+ my %c;
+ for my $c (@c) {
+ my (%ld, %ad, %pd, %l, %a, %p, $section);
+
+ my $fh = $this->cmd('proc entry', { '$controller' => $c });
+ while (<$fh>) {
+ chomp;
+
+ # new section start
+ if (my($s) = /^(\w.+):$/) {
+ $section = $s;
+ %a = %l = %p = ();
+ next;
+ }
+
+ # skip unknown sections
+ next unless /^\s/ or /^$/;
+
+ # process each section
+ if ($section eq 'Driver Parameters') {
+ # nothing useful
+ } elsif ($section eq 'Disk Array Controller Information') {
+ # nothing useful
+ } elsif ($section eq 'Physical Devices') {
+ # Chn/ID/LUN: B/05/0 Name: FUJITSU MAX3147NC 0104
+ # Capacity [MB]: 140239 To Log. Drive: 5
+ # Retries: 1 Reassigns: 0
+ # Grown Defects: 1
+
+ if (my($id, $n, $rv) = m{^\s+Chn/ID/LUN:\s+(\S+)\s+Name:\s+(.+)(.{4})$}) {
+ $n =~ s/\s+$//;
+ $p{id} = $id;
+ $p{name} = $n;
+ $p{revision} = $rv;
+ } elsif (my($unit, $c, $d) = m/^\s+Capacity\s\[(.B)\]:\s+(\d+)\s+To Log\. Drive:\s+(\d+|--)/) {
+ $p{capacity} = int($c);
+ $p{capacity_unit} = $unit;
+ $p{drive} = $d;
+ } elsif (my($r, $ra) = m/^\s+Retries:\s+(\d+)\s+Reassigns:\s+(\d+)/) {
+ $p{retries} = int($r);
+ $p{reassigns} = int($ra);
+ } elsif (my($gd) = m/^\s+Grown Defects:\s+(\d+)/) {
+ $p{defects} = int($gd);
+ } elsif (/^$/) {
+ if ($p{capacity} == 0 and $p{name} =~ /SCA HSBP/) {
+ # HSBP is not a disk, so do not consider this an error
+ # http://support.gateway.com/s/Servers/COMPO/MOTHERBD/4000832/4000832si69.shtml
+ # Raid Hot Swap Backplane driver (recognized as "ESG-SHV SCA HSBP M16 SCSI Processor Device")
+ # Chn/ID/LUN: B/06/0 Name: ESG-SHV SCA HSBP M16 0.05
+ # Capacity [MB]: 0 To Log. Drive: --
+ next;
+ }
+
+ $pd{$p{id}} = { %p };
+ } else {
+ warn "[$section] [$_]";
+ $this->unknown;
+ }
+
+ } elsif ($section eq 'Logical Drives') {
+ # Number: 3 Status: ok
+ # Slave Number: 15 Status: ok (older kernels)
+ # Capacity [MB]: 69974 Type: Disk
+ if (my($num, $s) = m/^\s+(?:Slave )?Number:\s+(\d+)\s+Status:\s+(\S+)/) {
+ $l{number} = int($num);
+ $l{status} = $s;
+ } elsif (my($unit, $c, $t) = m/^\s+Capacity\s\[(.B)\]:\s+(\d+)\s+Type:\s+(\S+)/) {
+ $l{capacity} = "$c $unit";
+ $l{type} = $t;
+ } elsif (my($md, $id) = m/^\s+Missing Drv\.:\s+(\d+)\s+Invalid Drv\.:\s+(\d+|--)/) {
+ $l{missing} = int($md);
+ $l{invalid} = int($id);
+ } elsif (my($n) = m/^\s+To Array Drv\.:\s+(\d+|--)/) {
+ $l{array} = $n;
+ } elsif (/^$/) {
+ $ld{$l{number}} = { %l };
+ } else {
+ warn "[$section] [$_]";
+ $this->unknown;
+ }
+
+ } elsif ($section eq 'Array Drives') {
+ # Number: 0 Status: fail
+ # Capacity [MB]: 349872 Type: RAID-5
+ if (my($num, $s) = m/^\s+Number:\s+(\d+)\s+Status:\s+(\S+)/) {
+ $a{number} = int($num);
+ $a{status} = $s;
+ } elsif (my($unit, $c, $t) = m/^\s+Capacity\s\[(.B)\]:\s+(\d+)\s+Type:\s+(\S+)/) {
+ $a{capacity} = "$c $unit";
+ $a{type} = $t;
+ } elsif (/^(?: --)?$/) {
+ if (%a) {
+ $ad{$a{number}} = { %a };
+ }
+ } else {
+ warn "[$section] [$_]";
+ $this->unknown;
+ }
+
+ } elsif ($section eq 'Host Drives') {
+ # nothing useful
+ } elsif ($section eq 'Controller Events') {
+ # nothing useful
+ }
+ }
+ close($fh);
+
+ $c{$c} = { id => $c, array => { %ad }, logical => { %ld }, physical => { %pd } };
+ }
+
+ return \%c;
+ }
+
+ sub check {
+ my $this = shift;
+
+ # status messages pushed here
+ my @status;
+
+ my $controllers = $this->parse;
+
+ # process each controller separately
+ for my $c (values %$controllers) {
+ # array status
+ my @ad;
+ for my $n (sort {$a cmp $b} keys %{$c->{array}}) {
+ my $ad = $c->{array}->{$n};
+ if ($ad->{status} ne "ready") {
+ $this->critical;
+ }
+ push(@ad, "Array $ad->{number}($ad->{type}) $ad->{status}");
+ }
+
+ # older raids have no Array drives, Look into Logical Drives for type!=Disk
+ unless (@ad) {
+ for my $n (sort {$a cmp $b} keys %{$c->{logical}}) {
+ my $ld = $c->{logical}->{$n};
+ if ($ld->{type} eq "Disk") {
+ next;
+ }
+
+ # emulate Array Drive
+ my $s = "Array($ld->{type}) $ld->{status}";
+ # check for missing drives
+ if ($ld->{missing} > 0) {
+ $this->warning;
+ $s .= " ($ld->{missing} missing drives)";
+ }
+
+ push(@ad, $s);
+ }
+ }
+
+ # logical drive status
+ my %ld;
+ for my $n (sort {$a cmp $b} keys %{$c->{logical}}) {
+ my $ld = $c->{logical}->{$n};
+ if ($ld->{status} ne "ok") {
+ $this->critical;
+ }
+ push(@{$ld{$ld->{status}}}, $ld->{number});
+ }
+
+ # physical drive status
+ my @pd;
+ for my $n (sort {$a cmp $b} keys %{$c->{physical}}) {
+ my $pd = $c->{physical}->{$n};
+
+ my @ds;
+ # TODO: make tresholds configurable
+ if ($pd->{defects} > 300) {
+ $this->critical;
+ push(@ds, "grown defects critical: $pd->{defects}");
+ } elsif ($pd->{defects} > 30) {
+ $this->warning;
+ push(@ds, "grown defects warning: $pd->{defects}");
+ }
+
+ # report disk being not assigned
+ if ($pd->{drive} eq '--') {
+ push(@ds, "not assigned");
+ }
+
+ if (@ds) {
+ push(@pd, "Disk $pd->{id}($pd->{name}) ". join(', ', @ds));
+ }
+ }
+
+ my @cd;
+ push(@cd, @ad) if @ad;
+ push(@cd, "Logical Drives: ". $this->join_status(\%ld));
+ push(@cd, @pd) if @pd;
+ push(@status, "Controller $c->{id}: ". join('; ', @cd));
+ }
+
+ return unless @status;
+
+ # denote this plugin as ran ok
+ $this->ok;
+
+ $this->message(join('; ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_GDTH
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/hp_msa.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_HP_MSA';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::hp_msa;
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use App::Monitoring::Plugin::CheckRaid::SerialLine;
+ use strict;
+ use warnings;
+
+ sub active {
+ my $this = shift;
+ return $this->detect;
+ }
+
+ # check from /sys if there are any MSA VOLUME's present.
+ sub detect {
+ my $this = shift;
+
+ # allow --plugin-option=hp_msa-enabled to force this plugin to be enabled
+ return 1 if exists $this->{options}{'hp_msa-enabled'};
+
+ for my $file (</sys/block/*/device/model>) {
+ open my $fh, '<', $file or next;
+ my $model = <$fh>;
+ close($fh);
+ return 1 if ($model =~ /^MSA.+VOLUME/);
+ }
+ return 0;
+ }
+
+ sub check {
+ my $this = shift;
+
+ # allow --plugin-option=hp_msa-serial=/dev/ttyS2 to specify serial line
+ my $ctldevice = $this->{options}{'hp_msa-serial'} || '/dev/ttyS0';
+
+ # status messages pushed here
+ my @status;
+
+ my %opts = ();
+ $opts{lockdir} = $this->{lockdir} if $this->{lockdir};
+
+ my $modem = App::Monitoring::Plugin::CheckRaid::SerialLine->new($ctldevice, %opts);
+ my $fh = $modem->open();
+ unless ($fh) {
+ $this->warning;
+ $this->message("Can't open $ctldevice");
+ return;
+ }
+
+ # check first controller
+ print $fh "\r";
+ print $fh "show globals\r";
+ print $fh "show this_controller\r";
+ print $fh "show other_controller\r";
+ # this will issue termination match, ie. invalid command
+ print $fh "exit\r";
+
+ my ($c, %c, %t);
+ while (<$fh>) {
+ chomp;
+ s/[\n\r]$//;
+ last if /Invalid CLI command/;
+
+ # Temperature:
+ # EMU: 23 Celsius, 73 Fahrenheit
+ # PS1: 22 Celsius, 71 Fahrenheit
+ # PS2: 22 Celsius, 71 Fahrenheit
+ if (my($s, $c) = /(\S+): (\d+) Celsius,\s+\d+ Fahrenheit/) {
+ $t{$s} = int($c);
+ next;
+ }
+
+ # Controller 1 (right controller):
+ if (my($s) = /^(Controller \d+)/) {
+ $c = $s;
+ $c{$c} = [];
+ next;
+ }
+ # Surface Scan: Running, LUN 10 (68% Complete)
+ if (my($s, $m) = /Surface Scan:\s+(\S+)[,.]\s*(.*)/) {
+ if ($s eq 'Running') {
+ my ($l, $p) = $m =~ m{(LUN \d+) \((\d+)% Complete\)};
+ push(@{$c{$c}}, "Surface: $l ($p%)");
+ $this->warning;
+ } elsif ($s ne 'Complete') {
+ push(@{$c{$c}}, "Surface: $s, $m");
+ $this->warning;
+ }
+ next;
+ }
+ # Rebuild Status: Running, LUN 0 (67% Complete)
+ if (my($s, $m) = /Rebuild Status:\s+(\S+)[,.]\s*(.*)/) {
+ if ($s eq 'Running') {
+ my ($l, $p) = $m =~ m{(LUN \d+) \((\d+)% Complete\)};
+ push(@{$c{$c}}, "Rebuild: $l ($p%)");
+ $this->warning;
+ } elsif ($s ne 'Complete') {
+ push(@{$c{$c}}, "Rebuild: $s, $m");
+ $this->warning;
+ }
+ next;
+ }
+ # Expansion: Complete.
+ if (my($s, $m) = /Expansion:\s+(\S+)[.,]\s*(.*)/) {
+ if ($s eq 'Running') {
+ my ($l, $p) = $m =~ m{(LUN \d+) \((\d+)% Complete\)};
+ push(@{$c{$c}}, "Expansion: $l ($p%)");
+ $this->warning;
+ } elsif ($s ne 'Complete') {
+ push(@{$c{$c}}, "Expansion: $s, $m");
+ $this->warning;
+ }
+ next;
+ }
+ }
+ $modem->close();
+
+ foreach $c (sort { $a cmp $b } keys %c) {
+ my $s = $c{$c};
+ $s = join(', ', @$s);
+ $s = 'OK' unless $s;
+ push(@status, "$c: $s");
+ }
+
+ # check that no temp is over the treshold
+ my $warn = 28;
+ my $crit = 33;
+ while (my($t, $c) = each %t) {
+ if ($c > $crit) {
+ push(@status, "$t: ${c}C");
+ $this->critical;
+ } elsif ($c > $warn) {
+ push(@status, "$t: ${c}C");
+ $this->warning;
+ }
+ }
+
+ return unless @status;
+
+ $this->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_HP_MSA
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/hpacucli.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_HPACUCLI';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::hpacucli;
+
+ ## hpacucli/hpssacli/ssacli support
+ #
+ # driver developers recommend to use cciss_vol_status for monitoring,
+ # hpacucli/hpssacli shouldn't be used for monitoring due they obtaining global
+ # kernel lock while cciss_vol_status does not. cciss_vol_status is designed for
+ # monitoring
+ # https://github.com/glensc/nagios-plugin-check_raid/issues/114#issuecomment-138866801
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ use constant E_NO_LOGICAL_DEVS => 'The specified device does not have any logical drives';
+
+ sub program_names {
+ shift->{name};
+ }
+
+ sub commands {
+ {
+ 'controller status' => ['-|', '@CMD', 'controller', 'all', 'show', 'status'],
+ 'logicaldrive status' => ['-|', '@CMD', 'controller', '$target', 'logicaldrive', 'all', 'show'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ (
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd controller all show status",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd controller * logicaldrive all show",
+ );
+ }
+
+ # if --plugin-option=hpacucli-target=slot=0 is specified
+ # filter only allowed values
+ sub filter_targets {
+ my ($this, $targets) = @_;
+
+ my $cli_opts = $this->{options}{'hpacucli-target'};
+ if (!$cli_opts) {
+ return $targets;
+ }
+
+ my %res;
+ my @filters = split(/,/, $cli_opts);
+ for my $filter (@filters) {
+ if (exists $targets->{$filter}) {
+ $res{$filter} = $targets->{$filter};
+ } else {
+ $this->critical->message("Controller $filter not found");
+ }
+ }
+
+ return \%res;
+ }
+
+ # split:
+ # '(Embedded) (RAID Mode)'
+ # to:
+ # [ 'Embedded', 'RAID Mode' ]
+ sub split_controller_modes {
+ my ($modes) = @_;
+ my @parts;
+ push @parts, $1 while $modes =~ /\((.*?)\)/g;
+ return \@parts;
+ }
+
+ sub scan_targets {
+ my $this = shift;
+
+ # TODO: allow target customize:
+ # hpacucli <target> is of format:
+ # [controller all|slot=#|wwn=#|chassisname="AAA"|serialnumber=#|chassisserialnumber=#|ctrlpath=#:# ]
+ # [array all|<id>]
+ # [physicaldrive all|allunassigned|[#:]#:#|[#:]#:#-[#:]#:#]
+ # [logicaldrive all|#]
+ # [enclosure all|#:#|serialnumber=#|chassisname=#]
+ # [licensekey all|<key>]
+
+ # Scan controllers
+ my (%targets, $target);
+ my $fh = $this->cmd('controller status');
+ while (<$fh>) {
+ chomp;
+ # skip empty lines and artificial comments (added by this project)
+ next if /^$/ or /^#/;
+
+ # skip known noise
+ if (
+ /FIRMWARE UPGRADE REQUIRED: /
+ || /^\s{27}/
+ ) {
+ next;
+ }
+
+ # Numeric slot
+ if (my($controller, $slot, $modes) = /
+ ^(\S.+)\sin\sSlot
+ \s(\S+?) # slot number
+ (?: # optional mode
+ \s(\(.+\))
+ )?$
+ /x) {
+
+ $target = "slot=$slot";
+ $targets{$target} = {
+ target => $target,
+ controller => $controller,
+ slot => $slot,
+ modes => split_controller_modes($modes || ''),
+ };
+ $this->unknown if $slot !~ /^\d+/;
+ next;
+ }
+
+ # Named Entry
+ if (my($controller, $cn) = /^(\S.+) in (.+)/) {
+ $target = "chassisname=$cn";
+ $targets{$target} = {
+ target => $target,
+ controller => $controller,
+ chassisname => $cn,
+ };
+ next;
+ }
+
+ # Other statuses, try "key: value" pairs
+ if (my ($key, $value) = /^\s*(.+?):\s+(.+?)$/) {
+ $targets{$target}{$key} = $value;
+ next;
+ }
+
+ warn "Unparsed: [$_]\n";
+ }
+ close $fh;
+
+ return $this->filter_targets(\%targets);
+ }
+
+ # Scan logical drives
+ sub scan_luns {
+ my ($this, $targets) = @_;
+
+ my @luns;
+ # sort by target to ensure consistent results
+ for my $target (sort {$a->{target} cmp $b->{target}} values(%$targets)) {
+ # check each controller
+ my $fh = $this->cmd('logicaldrive status', { '$target' => $target->{target} });
+
+ my $index = -1;
+ my @array;
+ my %array;
+ while (<$fh>) {
+ chomp;
+ # skip empty lines and artificial comments (added by this project)
+ next if /^$/ or /^#/;
+
+ # Error: The controller identified by "slot=attr_value_slot_unknown" was not detected.
+ if (/^Error:\s/) {
+ # store it somewhere. should it be appended?
+ ($target->{'error'}) = /^Error:\s+(.+?)\.?\s*$/;
+ $this->unknown;
+ next;
+ }
+
+ # "array A"
+ # "array A (Failed)"
+ # "array B (Failed)"
+ if (my($a, $s) = /^\s+array (\S+)(?:\s*\((\S+)\))?$/i) {
+ $index++;
+ # Offset 0 is Array own status
+ # XXX: I don't like this one: undef could be false positive
+ $target->{'array'}[$index]{status} = $s || 'OK';
+ $target->{'array'}[$index]{name} = $a;
+ next;
+ }
+
+ # logicaldrive 1 (68.3 GB, RAID 1, OK)
+ # capture only status
+ if (my($drive, $size, $raid, $status) = /^\s+logicaldrive (\d+) \(([\d.]+ .B), ([^,]+), ([^\)]+)\)$/) {
+ warn "Index out of bounds" if $index < 0; # XXX should not happen
+
+ # Offset 1 is each logical drive status
+ my $ld = {
+ 'id' => $drive,
+ 'status' => $status,
+ 'size' => $size,
+ 'raid' => $raid,
+ };
+ push(@{$target->{'array'}[$index]{logicaldrives}}, $ld);
+ next;
+ }
+
+ # skip known noise
+ if (
+ /\s+Type "help" for more details/
+ # Controller name: exact match
+ || /^\Q$target->{controller}\E\s/
+ # loose match, some test data seems malformed
+ || / in Slot \d/
+ || /^FIRMWARE UPGRADE REQUIRED:/
+ || /^\s{27}/
+ ) {
+ next;
+ }
+
+ warn "Unhandled: [$_]\n";
+ }
+ $this->unknown unless close $fh;
+
+ push(@luns, $target);
+ }
+
+ return \@luns;
+ }
+
+ # parse hpacucli output into logical structure
+ sub parse {
+ my $this = shift;
+
+ my $targets = $this->scan_targets;
+ if (!$targets) {
+ return $targets;
+ }
+
+ return $this->scan_luns($targets);
+ }
+
+ # format lun (logicaldevice) status
+ # update check status if problems found
+ sub lstatus {
+ my ($this, $ld) = @_;
+
+ my $s = $ld->{status};
+
+ if ($s eq 'OK' or $s eq 'Disabled') {
+ } elsif ($s eq 'Failed' or $s eq 'Interim Recovery Mode') {
+ $this->critical;
+ } elsif ($s eq 'Rebuild' or $s eq 'Recover') {
+ $this->warning;
+ }
+
+ return "LUN$ld->{id}:$s";
+ }
+
+ # format array status
+ # update check status if problems found
+ sub astatus {
+ my ($this, $array) = @_;
+
+ if ($array->{status} ne 'OK') {
+ $this->critical;
+ }
+
+ return "Array $array->{name}($array->{status})";
+ }
+
+ # format controller status
+ # updates check status if problems found
+ sub cstatus {
+ my ($this, $c) = @_;
+ my (@s, $s);
+
+ # always include controller status
+ push(@s, $c->{'Controller Status'} || 'ERROR');
+ if ($c->{'Controller Status'} ne 'OK') {
+ $this->critical;
+ }
+
+ if ($c->{error}) {
+ if ($c->{error} eq E_NO_LOGICAL_DEVS) {
+ $this->noraid;
+ push(@s, 'Not configured');
+ } else {
+ $this->unknown;
+ push(@s, $c->{error});
+ }
+ }
+
+ # print those only if not ok and configured
+ if (($s = $c->{'Cache Status'}) && $s !~ /^(OK|Not Configured)/) {
+ push(@s, "Cache: $s");
+ $this->critical;
+ }
+ if (($s = $c->{'Battery/Capacitor Status'}) && $s !~ /^(OK|Not Configured)/) {
+ push(@s, "Battery: $s");
+ $this->critical;
+ }
+
+ # start with identifyier
+ my $name = $c->{chassisname} || $c->{controller};
+
+ return $name . '[' . join(', ', @s) . ']';
+ }
+
+ sub check {
+ my $this = shift;
+
+ my $ctrls = $this->parse;
+ unless ($ctrls) {
+ $this->warning->message("No Controllers were found on this machine");
+ return;
+ }
+
+ my @status;
+ foreach my $ctrl (@$ctrls) {
+ my @astatus;
+ foreach my $array (@{$ctrl->{array}}) {
+ my @lstatus;
+ foreach my $ld (@{$array->{logicaldrives}}) {
+ push(@lstatus, $this->lstatus($ld));
+ }
+ push(@astatus, $this->astatus($array). '['. join(',', @lstatus). ']');
+ }
+ my $cstatus = $this->cstatus($ctrl);
+ $cstatus .= ': '. join(', ', @astatus) if @astatus;
+ push(@status, $cstatus);
+ }
+
+ return unless @status;
+
+ $this->ok->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_HPACUCLI
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/hpssacli.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_HPSSACLI';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::hpssacli;
+
+ # This plugin extends hpacucli plugin,
+ # with the only difference that different program name will be used.
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugins::hpacucli';
+ use strict;
+ use warnings;
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_HPSSACLI
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/ips.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_IPS';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::ips;
+
+ # Serveraid IPS
+ # Tested on IBM xSeries 346 servers with Adaptec ServeRAID 7k controllers.
+ # The ipssend version was v7.12.14.
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ qw(ipssend);
+ }
+
+ sub commands {
+ {
+ 'list logical drive' => ['-|', '@CMD', 'GETCONFIG', '1', 'LD'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd getconfig 1 LD"
+ }
+
+ sub check {
+ my $this = shift;
+
+ # status messages pushed here
+ my @status;
+
+ my $n;
+ my $fh = $this->cmd('list logical drive');
+ while (<$fh>) {
+ if (/drive number (\d+)/i){
+ $n = $1;
+ next;
+ }
+
+ next unless $n;
+ next unless $this->valid($n);
+ next unless (my($s, $c) = /Status .*: (\S+)\s+(\S+)/);
+
+ if ($c =~ /SYN|RBL/i) { # resynching
+ $this->resync;
+ } elsif ($c !~ /OKY/i) { # not OK
+ $this->critical;
+ }
+
+ push(@status, "$n:$s");
+ }
+ close $fh;
+
+ return unless @status;
+
+ $this->ok->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_IPS
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/lsraid.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_LSRAID';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::lsraid;
+
+ # Linux, software RAID
+ # Broken: missing test data
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ shift->{name};
+ }
+
+ sub commands {
+ {
+ 'list' => ['-|', '@CMD', '-A', '-p'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -A -p"
+ }
+
+ sub check {
+ my $this = shift;
+
+ # status messages pushed here
+ my @status;
+
+ my $fh = $this->cmd('list');
+ while (<$fh>) {
+ next unless (my($n, $s) = m{/dev/(\S+) \S+ (\S+)});
+ next unless $this->valid($n);
+ if ($s =~ /good|online/) {
+ # no worries
+ } elsif ($s =~ /sync/) {
+ $this->warning;
+ } else {
+ $this->critical;
+ }
+ push(@status, "$n:$s");
+ }
+ close $fh;
+
+ return unless @status;
+
+ $this->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_LSRAID
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/lsscsi.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_LSSCSI';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::lsscsi;
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ shift->{name};
+ }
+
+ sub commands {
+ {
+ 'lsscsi list' => ['-|', '@CMD', '-g'],
+ }
+ }
+
+ # lists contoller devices (type=storage)
+ # this will fail (return empty list) if sg module is not present
+ # return /dev/sgX nodes
+ sub list_sg {
+ my $this = shift;
+
+ my @scan = $this->scan;
+
+ my @devs = map { $_->{sgnode} } grep { $_->{type} eq 'storage' && $_->{sgnode} ne '-' } @scan;
+ return wantarray ? @devs : \@devs;
+ }
+
+ # list disk nodes one for each controller
+ # return /dev/sdX nodes
+ sub list_dd {
+ my $this = shift;
+
+ my @scan = $this->scan;
+ my @devs = map { $_->{devnode} } grep { $_->{type} eq 'disk' && $_->{devnode} ne '-' && $_->{sgnode} } @scan;
+ return wantarray ? @devs : \@devs;
+ }
+
+ # scan lsscsi output
+ sub scan {
+ my $this = shift;
+
+ # cache inside single run
+ return wantarray ? @{$this->{sdevs}} : $this->{sdevs} if $this->{sdevs};
+
+ # Scan such output:
+ # [0:0:0:0] disk HP LOGICAL VOLUME 3.00 /dev/sda /dev/sg0
+ # [0:3:0:0] storage HP P410i 3.00 - /dev/sg1
+ # or without sg driver:
+ # [0:0:0:0] disk HP LOGICAL VOLUME 3.00 /dev/sda -
+ # [0:3:0:0] storage HP P410i 3.00 - -
+
+ my $fh = $this->cmd('lsscsi list');
+ my @sdevs;
+ while (<$fh>) {
+ chop;
+ if (my($hctl, $type, $vendor, $model, $rev, $devnode, $sgnode) = m{^
+ \[([\d:]+)\] # SCSI Controller, SCSI bus, SCSI target, and SCSI LUN
+ \s+(\S+) # type
+ \s+(\S+) # vendor
+ \s+(.*?) # model, match everything as it may contain spaces
+ \s+(\S+) # revision
+ \s+((?:/dev/\S+|-)) # /dev node
+ \s+((?:/dev/\S+|-)) # /dev/sg node
+ }x) {
+ push(@sdevs, {
+ 'hctl' => $hctl,
+ 'type' => $type,
+ 'vendor' => $vendor,
+ 'model' => $model,
+ 'rev' => $rev,
+ 'devnode' => $devnode,
+ 'sgnode' => $sgnode,
+ });
+ }
+ }
+ close $fh;
+
+ $this->{sdevs} = \@sdevs;
+ return wantarray ? @sdevs : \@sdevs;
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_LSSCSI
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/lsvg.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_LSVG';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::lsvg;
+
+ # AIX LVM
+ # Status: broken (no test data)
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ shift->{name};
+ }
+
+ sub commands {
+ {
+ 'lsvg' => ['-|', '@CMD'],
+ 'lsvg list' => ['-|', '@CMD', '-l', '$vg'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ (
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -l *",
+ )
+ }
+
+ sub check {
+ my $this = shift;
+
+ # status messages pushed here
+ my @status;
+
+ my @vg;
+ my $fh = $this->cmd('lsvg');
+ while (<$fh>) {
+ chomp;
+ push @vg, $_;
+ }
+ close $fh;
+
+ foreach my $vg (@vg) {
+ next unless $this->valid($vg); # skip entire VG
+
+ my $fh = $this->cmd('lsvg list', { '$vg' => $vg });
+
+ while (<$fh>) {
+ my @f = split /\s/;
+ my ($n, $s) = ($f[0], $f[5]);
+ next if (!$this->valid($n) or !$s);
+ next if ($f[3] eq $f[2]); # not a mirrored LV
+
+ if ($s =~ m#open/(\S+)#i) {
+ $s = $1;
+ if ($s ne 'syncd') {
+ $this->critical;
+ }
+ push(@status, "lvm:$n:$s");
+ }
+ }
+ close $fh;
+ }
+
+ return unless @status;
+
+ $this->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_LSVG
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/mdstat.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MDSTAT';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::mdstat;
+
+ # Linux Multi-Device (md)
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub commands {
+ {
+ 'mdstat' => ['<', '/proc/mdstat'],
+ }
+ }
+
+ sub active {
+ my ($this) = @_;
+ # easy way out. no /proc/mdstat
+ return 0 unless -e $this->{commands}{mdstat}[1];
+
+ # extra check if mdstat is empty
+ my @md = $this->parse;
+ return $#md >= 0;
+ }
+
+ sub parse {
+ my $this = shift;
+
+ my (@md, %md);
+ my $fh = $this->cmd('mdstat');
+ my $arr_checking = 0;
+ while (<$fh>) {
+ chomp;
+
+ # skip first line
+ next if (/^Personalities : /);
+
+ # kernel-3.0.101/drivers/md/md.c, md_seq_show
+ # md1 : active raid1 sdb2[0] sda2[1]
+ if (my($dev, $active, $ro, $rest) = m{^
+ (\S+)\s+:\s+ # mdname
+ (\S+)\s+ # active: "inactive", "active"
+ (\((?:auto-)?read-only\)\s+)? # readonly
+ (.+) # personality name + disks
+ }x) {
+ my @parts = split /\s/, $rest;
+ my $re = qr{^
+ (\S+) # devname
+ (?:\[(\d+)\]) # desc_nr
+ (?:\((.)\))? # flags: (W|F|S) - WriteMostly, Faulty, Spare
+ $}x;
+ my @disks = ();
+ my $personality;
+ while (my($disk) = pop @parts) {
+ last if !$disk;
+ if ($disk !~ $re) {
+ $personality = $disk;
+ last;
+ }
+ my($dev, $number, $flags) = $disk =~ $re;
+ push(@disks, {
+ 'dev' => $dev,
+ 'number' => int($number),
+ 'flags' => $flags || '',
+ });
+ }
+
+ die "Unexpected parse" if @parts;
+
+ # first line resets %md
+ %md = (dev => $dev, personality => $personality, readonly => $ro, active => $active, disks => [ @disks ]);
+
+ next;
+ }
+
+ # variations:
+ #" 8008320 blocks [2/2] [UU]"
+ #" 58291648 blocks 64k rounding" - linear
+ #" 5288 blocks super external:imsm"
+ #" 20969472 blocks super 1.2 512k chunks"
+ #
+ # Metadata version:
+ # This is one of
+ # - 'none' for arrays with no metadata (good luck...)
+ # - 'external' for arrays with externally managed metadata,
+ # - or N.M for internally known formats
+ #
+ if (my($b, $mdv, $status) = m{^
+ \s+(\d+)\sblocks\s+ # blocks
+ # metadata version
+ (super\s(?:
+ (?:\d+\.\d+) | # N.M
+ (?:external:\S+) |
+ (?:non-persistent)
+ ))?\s*
+ (.+) # mddev->pers->status (raid specific)
+ $}x) {
+ # linux-2.6.33/drivers/md/dm-raid1.c, device_status_char
+ # A => Alive - No failures
+ # D => Dead - A write failure occurred leaving mirror out-of-sync
+ # S => Sync - A sychronization failure occurred, mirror out-of-sync
+ # R => Read - A read failure occurred, mirror data unaffected
+ # U => for the rest
+ my ($s) = $status =~ /\s+\[([ADSRU_]+)\]/;
+
+ $md{status} = $s || '';
+ $md{blocks} = int($b);
+ $md{md_version} = $mdv;
+
+ # if external try to parse dev
+ if ($mdv) {
+ ($md{md_external}) = $mdv =~ m{external:(\S+)};
+ }
+ next;
+ }
+
+ # linux-2.6.33/drivers/md/md.c, md_seq_show
+ if (my($action) = m{(resync=(?:PENDING|DELAYED))}) {
+ $md{resync_status} = $action;
+ next;
+ }
+ # linux-2.6.33/drivers/md/md.c, status_resync
+ # [==>..................] resync = 13.0% (95900032/732515712) finish=175.4min speed=60459K/sec
+ # [=>...................] check = 8.8% (34390144/390443648) finish=194.2min speed=30550K/sec
+ if (my($action, $perc, $eta, $speed) = m{(resync|recovery|reshape)\s+=\s+([\d.]+%) \(\d+/\d+\) finish=([\d.]+min) speed=(\d+K/sec)}) {
+ $md{resync_status} = "$action:$perc $speed ETA: $eta";
+ next;
+ } elsif (($perc, $eta, $speed) = m{check\s+=\s+([\d.]+%) \(\d+/\d+\) finish=([\d.]+min) speed=(\d+K/sec)}) {
+ $md{check_status} = "check:$perc $speed ETA: $eta";
+ $arr_checking = 1;
+ next;
+ }
+
+ # we need empty line denoting end of one md
+ next unless /^\s*$/;
+
+ next unless $this->valid($md{dev});
+
+ push(@md, { %md } ) if %md;
+ }
+ close $fh;
+
+ # One of the arrays is in checking state, which could be because there is a scheduled sync of all MD arrays
+ # In such a case, all of the arrays are scheduled to by checked, but only one of them is actually running the check
+ # while the others are in "resync=DELAYED" state.
+ # We don't want to receive notifications in such case, so we check for this particular case here
+ if ($arr_checking && scalar(@md) >= 2) {
+ foreach my $dev (@md) {
+ if ($dev->{resync_status} && $dev->{resync_status} eq "resync=DELAYED") {
+ delete $dev->{resync_status};
+ $dev->{check_status} = "check=DELAYED";
+ }
+ }
+ }
+
+ return wantarray ? @md : \@md;
+ }
+
+ sub check {
+ my $this = shift;
+
+ my (@status);
+ my @md = $this->parse;
+
+ my @spare_options = ();
+
+ @spare_options = split(/\,/, $this->{options}{mdstat_spare_count})
+ if (exists $this->{options}{mdstat_spare_count});
+
+ foreach (@md) {
+ my %md = %$_;
+
+ # common status
+ my $size = $this->format_bytes($md{blocks} * 1024);
+ my $personality = $md{personality} ? " $md{personality}" : "";
+ my $s = "$md{dev}($size$personality):";
+
+ # failed disks
+ my @fd = map { $_->{dev} } grep { $_->{flags} =~ /F/ } @{$md{disks}};
+ # spare disks
+ my @sd = map { $_->{dev} } grep { $_->{flags} =~ /S/ } @{$md{disks}};
+
+ my $spare_count = 0;
+ OPTION_LOOP:
+ {
+ foreach my $i (0 .. $#spare_options)
+ {
+ my ($disk, $value) = split(/:/, $spare_options[$i]);
+ for(@md)
+ {
+ if ($md{dev} eq $disk)
+ {
+ $spare_count = $value;
+ splice(@spare_options, $i, 1);
+ last OPTION_LOOP;
+ }
+ }
+ }
+ }
+
+ # raid0 is just there or its not. raid0 can't degrade.
+ # same for linear, no $md_status available
+ if ($personality =~ /linear|raid0/) {
+ $s .= "OK";
+
+ } elsif ($md{resync_status}) {
+ $this->resync;
+ $s .= "$md{status} ($md{resync_status})";
+
+ } elsif ($md{check_status}) {
+ $this->check_status;
+ $s .= "$md{status} ($md{check_status})";
+
+ } elsif ($md{status} =~ /_/) {
+ $this->critical;
+ my $fd = join(',', @fd);
+ $s .= "F:$fd:$md{status}";
+
+ } elsif (@fd > 0) {
+ # FIXME: this is same as above?
+ $this->warning;
+ $s .= "hot-spare failure:". join(",", @fd) .":$md{status}";
+ } elsif (@sd < $spare_count)
+ {
+ $this->warning;
+ $s .= "Array ".$md{dev}." should have ".$spare_count." spares, but has only ".(0+@sd)." spares";
+ } else {
+ $s .= "$md{status}";
+ }
+ push(@status, $s);
+ }
+
+ if (scalar @spare_options > 0)
+ {
+ $this->critical;
+ foreach (@spare_options)
+ {
+ my ($disk, $value) = split(/:/, $_);
+ my $s = "$disk is defined in spare_count option but could not be found!";
+ push(@status, $s);
+ }
+ }
+
+ return unless @status;
+
+ # denote this plugin as ran ok
+ $this->ok;
+
+ $this->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MDSTAT
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/megacli.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MEGACLI';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::megacli;
+
+ # MegaRAID SAS 8xxx controllers
+ # based on info from here:
+ # http://www.bxtra.net/Articles/2008-09-16/Dell-Perc6i-RAID-Monitoring-Script-using-MegaCli-LSI-CentOS-52-64-bits
+ # TODO: http://www.techno-obscura.com/~delgado/code/check_megaraid_sas
+ # TODO: process several adapters
+ # TODO: process drive temperatures
+ # TODO: check error counts
+ # TODO: hostspare information
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ qw(MegaCli64 MegaCli megacli);
+ }
+
+ sub commands {
+ {
+ 'pdlist' => ['-|', '@CMD', '-PDList', '-aALL', '-NoLog'],
+ 'ldinfo' => ['-|', '@CMD', '-LdInfo', '-Lall', '-aALL', '-NoLog'],
+ 'battery' => ['-|', '@CMD', '-AdpBbuCmd', '-GetBbuStatus', '-aALL', '-NoLog'],
+ }
+ }
+
+ # TODO: process from COMMANDS
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+
+ (
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -PDList -aALL -NoLog",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -LdInfo -Lall -aALL -NoLog",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -AdpBbuCmd -GetBbuStatus -aALL -NoLog",
+ );
+ }
+
+ # parse physical devices
+ sub parse_pd {
+ my $this = shift;
+
+ my (@pd, %pd);
+ my $rc = -1;
+ my $fh = $this->cmd('pdlist');
+ while (<$fh>) {
+ if (my($s) = /Device Id: (\S+)/) {
+ push(@pd, { %pd }) if %pd;
+ %pd = ( dev => $s, state => undef, name => undef, predictive => undef );
+ next;
+ }
+
+ if (my($s) = /Firmware state: (.+)/) {
+ # strip the extra state:
+ # 'Hotspare, Spun Up'
+ # 'Hotspare, Spun down'
+ # 'Online, Spun Up'
+ # 'Online, Spun Up'
+ # 'Online, Spun down'
+ # 'Unconfigured(bad)'
+ # 'Unconfigured(good), Spun Up'
+ # 'Unconfigured(good), Spun down'
+ $s =~ s/,.+//;
+ $pd{state} = $s;
+
+ if (defined($pd{predictive})) {
+ $pd{state} = $pd{predictive};
+ }
+ next;
+ }
+
+ if (my($s) = /Predictive Failure Count: (\d+)/) {
+ if ($s > 0) {
+ $pd{predictive} = 'Predictive';
+ }
+ next;
+ }
+
+ if (my($s) = /Inquiry Data: (.+)/) {
+ # trim some spaces
+ $s =~ s/\s+/ /g; $s =~ s/^\s+|\s+$//g;
+ $pd{name} = $s;
+ next;
+ }
+
+ if (my($s) = /Exit Code: (\d+x\d+)/) {
+ $rc = hex($s);
+ }
+ else {
+ $rc = 0;
+ }
+ }
+ push(@pd, { %pd }) if %pd;
+
+ $this->critical unless close $fh;
+ $this->critical if $rc;
+
+ return \@pd;
+ }
+
+ sub parse_ld {
+ my $this = shift;
+
+ my (@ld, %ld);
+ my $rc = -1;
+ my $fh = $this->cmd('ldinfo');
+ while (<$fh>) {
+ if (my($drive_id, $target_id) = /Virtual (?:Disk|Drive)\s*:\s*(\d+)\s*\(Target Id:\s*(\d+)\)/i) {
+ push(@ld, { %ld }) if %ld;
+ # Default to DriveID:TargetID in case no Name is given ...
+ %ld = ( name => "DISK$drive_id.$target_id", state => undef );
+ next;
+ }
+
+ if (my($name) = /Name\s*:\s*(\S+)/) {
+ # Add a symbolic name, if given
+ $ld{name} = $name;
+ next;
+ }
+
+ if (my($s) = /Virtual Drive Type\s*:\s*(\S+)/) {
+ $ld{type} = $s;
+ next;
+ }
+
+ if (my($s) = /State\s*:\s*(\S+)/) {
+ $ld{state} = $s;
+ next;
+ }
+
+ if (my($s) = /Default Cache Policy\s*:\s*(.+)/) {
+ $ld{default_cache} = [split /,\s*/, $s];
+ next;
+ }
+
+ if (my($s) = /Current Cache Policy\s*:\s*(.+)/) {
+ $ld{current_cache} = [split /,\s*/, $s];
+ next;
+ }
+
+ if (my($s) = /Exit Code: (\d+x\d+)/) {
+ $rc = hex($s);
+ } else {
+ $rc = 0;
+ }
+ }
+ push(@ld, { %ld }) if %ld;
+
+ $this->critical unless close $fh;
+ $this->critical if $rc;
+
+ return \@ld;
+ }
+
+ # check battery
+ sub parse_bbu {
+ my $this = shift;
+
+ return undef unless $this->bbu_monitoring;
+
+ my %default_bbu = (
+ name => undef, state => '???', charging_status => '???', missing => undef,
+ learn_requested => undef, replacement_required => undef,
+ learn_cycle_requested => undef, learn_cycle_active => '???',
+ pack_will_fail => undef, temperature => undef, temperature_state => undef,
+ voltage => undef, voltage_state => undef
+ );
+
+ my (@bbu, %bbu);
+ my $fh = $this->cmd('battery');
+ while (<$fh>) {
+ # handle when bbu status get gives an error. see issue #32
+ if (my($s) = /Get BBU Status Failed/) {
+ last;
+ }
+
+ if (my($s) = /BBU status for Adapter: (.+)/) {
+ push(@bbu, { %bbu }) if %bbu;
+ %bbu = %default_bbu;
+ $bbu{name} = $s;
+ next;
+ }
+ #=cut
+ # according to current sample data, Battery State never has value
+ if (my($s) = /Battery State\s*: ?(.*)/i) {
+ if (!$s) { $s = 'Faulty'; };
+ $bbu{state} = $s;
+ next;
+ }
+ #=cut
+ if (my($s) = /Charging Status\s*: (\w*)/) {
+ $bbu{charging_status} = $s;
+ next;
+ }
+ if (my($s) = /Battery Pack Missing\s*: (\w*)/) {
+ $bbu{missing} = $s;
+ next;
+ }
+ if (my($s) = /Battery Replacement required\s*: (\w*)/) {
+ $bbu{replacement_required} = $s;
+ next;
+ }
+ if (my($s) = /Learn Cycle Requested\s*: (\w*)/) {
+ $bbu{learn_cycle_requested} = $s;
+ next;
+ }
+ if (my($s) = /Learn Cycle Active\s*: (\w*)/) {
+ $bbu{learn_cycle_active} = $s;
+ next;
+ }
+ if (my($s) = /Pack is about to fail & should be replaced\s*: (\w*)/) {
+ $bbu{pack_will_fail} = $s;
+ next;
+ }
+ # Temperature: 18 C
+ if (my($s) = /Temperature: (\d+) C/) {
+ $bbu{temperature} = $s;
+ next;
+ }
+ # Temperature : OK
+ if (my($s) = / Temperature\s*: (\w*)/) {
+ $bbu{temperature_state} = $s;
+ next;
+ }
+ # Voltage: 4074 mV
+ if (my($s) = /Voltage: (\d+) mV/) {
+ $bbu{voltage} = $s;
+ next;
+ }
+ # Voltage : OK
+ if (my($s) = /Voltage\s*: (\w*)/) {
+ $bbu{voltage_state} = $s;
+ next;
+ }
+
+ }
+ $this->critical unless close $fh;
+
+ push(@bbu, { %bbu }) if %bbu;
+
+ return \@bbu;
+ }
+
+ sub parse {
+ my $this = shift;
+
+ my $pd = $this->parse_pd;
+ my $ld = $this->parse_ld;
+ my $bbu = $this->parse_bbu;
+
+ my @devs = @$pd if $pd;
+ my @vols = @$ld if $ld;
+ my @bats = @$bbu if $bbu;
+
+ return {
+ logical => $ld,
+ physical => $pd,
+ battery => $bbu,
+ };
+ }
+
+ sub check {
+ my $this = shift;
+
+ my $c = $this->parse;
+
+ my @vstatus;
+ foreach my $vol (@{$c->{logical}}) {
+ # skip CacheCade for now. #91
+ if ($vol->{type} && $vol->{type} eq 'CacheCade') {
+ next;
+ }
+
+ push(@vstatus, sprintf "%s:%s", $vol->{name}, $vol->{state});
+ if ($vol->{state} ne 'Optimal') {
+ $this->critical;
+ }
+
+ # check cache policy, #65
+ my @wt = grep { /WriteThrough/ } @{$vol->{current_cache}};
+ if (@wt) {
+ my @default = grep { /WriteThrough/ } @{$vol->{default_cache}};
+ # alert if WriteThrough is configured in default
+ $this->cache_fail unless @default;
+ push(@vstatus, "WriteCache:DISABLED");
+ }
+ }
+
+ my %dstatus;
+ foreach my $dev (@{$c->{physical}}) {
+ if ($dev->{state} eq 'Online' || $dev->{state} eq 'Hotspare' || $dev->{state} eq 'Unconfigured(good)' || $dev->{state} eq 'JBOD') {
+ push(@{$dstatus{$dev->{state}}}, sprintf "%02d", $dev->{dev});
+
+ } elsif ($dev->{state} eq 'Predictive') {
+ $this->warning;
+ push(@{$dstatus{$dev->{state}}}, sprintf "%02d (%s)", $dev->{dev}, $dev->{name});
+ } else {
+ $this->critical;
+ # TODO: process other statuses
+ push(@{$dstatus{$dev->{state}}}, sprintf "%02d (%s)", $dev->{dev}, $dev->{name});
+ }
+ }
+
+ my (%bstatus, @bpdata, @blongout);
+ foreach my $bat (@{$c->{battery}}) {
+ if ($bat->{state} !~ /^(Operational|Optimal)$/) {
+ # BBU learn cycle in progress.
+ if ($bat->{charging_status} =~ /^(Charging|Discharging)$/ && $bat->{learn_cycle_active} eq 'Yes') {
+ $this->bbulearn;
+ } else {
+ $this->critical;
+ }
+ }
+ if ($bat->{missing} ne 'No') {
+ $this->critical;
+ }
+ if ($bat->{replacement_required} ne 'No') {
+ $this->critical;
+ }
+ if (defined($bat->{pack_will_fail}) && $bat->{pack_will_fail} ne 'No') {
+ $this->critical;
+ }
+ if ($bat->{temperature_state} ne 'OK') {
+ $this->critical;
+ }
+ if ($bat->{voltage_state} ne 'OK') {
+ $this->critical;
+ }
+
+ # Short output.
+ #
+ # CRITICAL: megacli:[Volumes(1): NoName:Optimal; Devices(2): 06,07=Online; Batteries(1): 0=Non Operational]
+ push(@{$bstatus{$bat->{state}}}, sprintf "%d", $bat->{name});
+ # Performance data.
+ # Return current battery temparature & voltage.
+ #
+ # Battery0=18;4074
+ push(@bpdata, sprintf "Battery%s_T=%s;;;; Battery%s_V=%s;;;;", $bat->{name}, $bat->{temperature}, $bat->{name}, $bat->{voltage});
+
+ # Long output.
+ # Detailed plugin output.
+ #
+ # Battery0:
+ # - State: Non Operational
+ # - Missing: No
+ # - Replacement required: Yes
+ # - About to fail: No
+ # - Temperature: OK (18 °C)
+ # - Voltage: OK (4015 mV)
+ push(@blongout, join("\n", grep {/./}
+ "Battery$bat->{name}:",
+ " - State: $bat->{state}",
+ " - Charging status: $bat->{charging_status}",
+ " - Learn cycle requested: $bat->{learn_cycle_requested}",
+ " - Learn cycle active: $bat->{learn_cycle_active}",
+ " - Missing: $bat->{missing}",
+ " - Replacement required: $bat->{replacement_required}",
+ defined($bat->{pack_will_fail}) ? " - About to fail: $bat->{pack_will_fail}" : "",
+ " - Temperature: $bat->{temperature_state} ($bat->{temperature} C)",
+ " - Voltage: $bat->{voltage_state} ($bat->{voltage} mV)",
+ ));
+ }
+
+ my @cstatus;
+ push(@cstatus, 'Volumes(' . ($#{$c->{logical}} + 1) . '): ' . join(',', @vstatus));
+ push(@cstatus, 'Devices(' . ($#{$c->{physical}} + 1) . '): ' . $this->join_status(\%dstatus));
+ push(@cstatus, 'Batteries(' . ($#{$c->{battery}} + 1) . '): ' . $this->join_status(\%bstatus)) if @{$c->{battery}};
+ my @status = join('; ', @cstatus);
+
+ my @pdata;
+ push(@pdata,
+ join('\n', @bpdata)
+ );
+ my @longout;
+ push(@longout,
+ join('\n', @blongout)
+ );
+ return unless @status;
+
+ # denote this plugin as ran ok
+ $this->ok;
+
+ $this->message(join(' ', @status));
+ $this->perfdata(join(' ', @pdata));
+ $this->longoutput(join(' ', @longout));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MEGACLI
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/megaide.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MEGAIDE';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::megaide;
+
+ # MegaIDE RAID controller
+ # Status: BROKEN: no test data
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub sudo {
+ my ($this) = @_;
+ my $cat = $this->which('cat');
+
+ "CHECK_RAID ALL=(root) NOPASSWD: $cat /proc/megaide/0/status";
+ }
+
+ sub check {
+ my $this = shift;
+ my $fh;
+
+ # status messages pushed here
+ my @status;
+
+ foreach my $f (</proc/megaide/*/status>) { # / silly comment to fix vim syntax hilighting
+ if (-r $f) {
+ open $fh, '<', $f or next;
+ =cut
+ } else {
+ my @CMD = ($cat, $f);
+ unshift(@CMD, $sudo) if $> and $sudo;
+ open($fh , '-|', @CMD) or next;
+ =cut
+ }
+ while (<$fh>) {
+ next unless (my($s, $n) = /Status\s*:\s*(\S+).*Logical Drive.*:\s*(\d+)/i);
+ next unless $this->valid($n);
+ if ($s ne 'ONLINE') {
+ $this->critical;
+ push(@status, "$n:$s");
+ } else {
+ push(@status, "$n:$s");
+ }
+ last;
+ }
+ close $fh;
+ }
+
+ return unless @status;
+
+ $this->message(join(' ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MEGAIDE
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/megaraid.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MEGARAID';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::megaraid;
+
+ # MegaRAID
+ # Status: BROKEN: no test data
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub sudo {
+ my ($this) = @_;
+ my $cat = $this->which('cat');
+
+ my @sudo;
+ foreach my $mr (</proc/mega*/*/raiddrives*>) {
+ push(@sudo, "CHECK_RAID ALL=(root) NOPASSWD: $cat $mr") if -d $mr;
+ }
+
+ @sudo;
+ }
+
+ sub check {
+ my $this = shift;
+ # status messages pushed here
+ my @status;
+
+ foreach my $f (</proc/megaraid/*/raiddrives*>) { # vim/
+ my $fh;
+ if (-r $f) {
+ open $fh, '<', $f or next;
+ =cut
+ } else {
+ my @CMD = ($cat, $f);
+ unshift(@CMD, $sudo) if $> and $sudo;
+ open($fh , '-|', @CMD) or next;
+ =cut
+ }
+ my ($n) = $f =~ m{/proc/megaraid/([^/]+)};
+ while (<$fh>) {
+ if (my($s) = /logical drive\s*:\s*\d+.*, state\s*:\s*(\S+)/i) {
+ if ($s ne 'optimal') {
+ $this->critical;
+ }
+ push(@status, "$n: $s");
+ last;
+ }
+ }
+ close $fh;
+ }
+
+ return unless @status;
+
+ $this->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MEGARAID
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/megarc.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MEGARC';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::megarc;
+
+ # LSI MegaRaid or Dell Perc arrays
+ # Check the status of all arrays on all Lsi MegaRaid controllers on the local
+ # machine. Uses the megarc program written by Lsi to get the status of all
+ # arrays on all local Lsi MegaRaid controllers.
+ #
+ # check designed from check_lsi_megaraid:
+ # http://www.monitoringexchange.org/cgi-bin/page.cgi?g=Detailed/2416.html;d=1
+ # Perl port (check_raid) by Elan Ruusamäe.
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ shift->{name};
+ }
+
+ sub commands {
+ {
+ 'controller list' => ['-|', '@CMD', '-AllAdpInfo', '-nolog'],
+ 'controller config' => ['-|', '@CMD', '-dispCfg', '-a$controller', '-nolog'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ (
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -AllAdpInfo -nolog",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -dispCfg -a* -nolog",
+ );
+ }
+
+ sub check {
+ my $this = shift;
+
+ # status messages pushed here
+ my @status;
+
+ # get controllers
+ my $fh = $this->cmd('controller list');
+ my @lines = <$fh>;
+ close $fh;
+
+ if ($lines[11] =~ /No Adapters Found/) {
+ $this->warning;
+ $this->message("No LSI adapters were found on this machine");
+ return;
+ }
+
+ my @c;
+ foreach (@lines[12..$#lines]) {
+ if (my ($id) = /^\s*(\d+)/) {
+ push(@c, int($id));
+ }
+ }
+ unless (@c) {
+ $this->warning;
+ $this->message("No LSI adapters were found on this machine");
+ return;
+ }
+
+ foreach my $c (@c) {
+ my $fh = $this->cmd('controller config', { '$controller' => $c });
+ my (%d, %s, $ld);
+ while (<$fh>) {
+ # Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL
+ if (my($d, $s) = /Logical Drive\s+:\s+(\d+).+Status:\s+(\S+)/) {
+ $ld = $d;
+ $s{$ld} = $s;
+ next;
+ }
+ # SpanDepth :01 RaidLevel: 5 RdAhead : Adaptive Cache: DirectIo
+ if (my($s) = /RaidLevel:\s+(\S+)/) {
+ $d{$ld} = $s if defined $ld;
+ next;
+ }
+ }
+ close $fh;
+
+ # now process the details
+ unless (keys %d) {
+ $this->message("No arrays found on controller $c");
+ $this->warning;
+ return;
+ }
+
+ while (my($d, $s) = each %s) {
+ if ($s ne 'OPTIMAL') {
+ # The Array number here is incremented by one because of the
+ # inconsistent way that the LSI tools count arrays.
+ # This brings it back in line with the view in the bios
+ # and from megamgr.bin where the array counting starts at
+ # 1 instead of 0
+ push(@status, "Array ".(int($d) + 1)." status is ".$s{$d}." (Raid-$s on adapter $c)");
+ $this->critical;
+ next;
+ }
+
+ push(@status, "Logical Drive $d: $s");
+ }
+ }
+
+ return unless @status;
+
+ $this->ok->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MEGARC
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/metastat.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_METASTAT';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::metastat;
+
+ # Solaris, software RAID
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ shift->{name};
+ }
+
+ sub commands {
+ {
+ 'metastat' => ['>&2', '@CMD'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd"
+ }
+
+ sub active {
+ my ($this) = @_;
+
+ # return if parent said NO
+ my $res = $this->SUPER::active(@_);
+ return $res unless $res;
+
+ my $output = $this->get_metastat;
+ return !!@$output;
+ }
+
+ sub get_metastat {
+ my $this = shift;
+
+ # cache inside single run
+ return $this->{output} if defined $this->{output};
+
+ my $fh = $this->cmd('metastat');
+ my @data;
+ while (<$fh>) {
+ chomp;
+ last if /there are no existing databases/;
+ push(@data, $_);
+ }
+
+ return $this->{output} = \@data;
+ }
+
+ sub check {
+ my $this = shift;
+
+ my ($d, $sd);
+
+ # status messages pushed here
+ my @status;
+ my $output = $this->get_metastat;
+
+ foreach (@$output) {
+ if (/^(\S+):/) { $d = $1; $sd = ''; next; }
+ if (/Submirror \d+:\s+(\S+)/) { $sd = $1; next; }
+ if (/Device:\s+(\S+)/) { $sd = $1; next; }
+ if (my($s) = /State: (\S.+\w)/) {
+ if ($sd and $this->valid($sd) and $this->valid($d)) {
+ if ($s =~ /Okay/i) {
+ # no worries...
+ } elsif ($s =~ /Resync/i) {
+ $this->resync;
+ } else {
+ $this->critical;
+ }
+ push(@status, "$d:$sd:$s");
+ }
+ }
+
+ if (defined $d && $d =~ /hsp/) {
+ if (/(c[0-9]+t[0-9]+d[0-9]+s[0-9]+)\s+(\w+)/) {
+ $sd = $1;
+ my $s = $2;
+ $this->warning if ($s !~ /Available/);
+ push(@status, "$d:$sd:$s");
+ }
+ }
+ }
+
+ return unless @status;
+
+ $this->ok->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_METASTAT
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/mpt.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MPT';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::mpt;
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ qw(mpt-status);
+ }
+
+ sub commands {
+ {
+ 'get_controller_no' => ['-|', '@CMD', '-p'],
+ 'status' => ['-|', '@CMD', '-i', '$id'],
+ 'sync status' => ['-|', '@CMD', '-n'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ (
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -i [0-9]",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -i [1-9][0-9]",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -n",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd -p",
+ );
+ }
+
+ sub active {
+ my ($this) = @_;
+
+ # return if parent said NO
+ my $res = $this->SUPER::active(@_);
+ return $res unless $res;
+
+ # there should be a controller. #95
+ my $id = $this->get_controller;
+ return defined($id);
+ }
+
+ sub get_controller {
+ my $this = shift;
+
+ # controller ID may be given on the command line
+ my $id = $this->{options}{'mpt-id'};
+ if (!$id) {
+
+ # get controller from mpt-status -p
+ my $fh = $this->cmd('get_controller_no');
+ while (<$fh>) {
+ chomp;
+ if (/^Found.*id=(\d{1,2}),.*/) {
+ $id = $1;
+ last;
+ }
+ }
+ close $fh;
+ }
+
+ return $id;
+ }
+
+ sub parse {
+ my ($this, $id) = @_;
+
+ my (%ld, %pd);
+
+ my $fh = $this->cmd('status', { '$id' => $id });
+
+ my %VolumeTypesHuman = (
+ IS => 'RAID-0',
+ IME => 'RAID-1E',
+ IM => 'RAID-1',
+ );
+
+ while (<$fh>) {
+ chomp;
+ # mpt-status.c __print_volume_classic
+ # ioc0 vol_id 0 type IM, 2 phy, 136 GB, state OPTIMAL, flags ENABLED
+ if (my($vioc, $vol_id, $type, $disks, $vol_size, $vol_state, $vol_flags) =
+ /^ioc(\d+)\s+ vol_id\s(\d+)\s type\s(\S+),\s (\d+)\sphy,\s (\d+)\sGB,\s state\s(\S+),\s flags\s(.+)/x) {
+ $ld{$vol_id} = {
+ ioc => int($vioc),
+ vol_id => int($vol_id),
+ # one of: IS, IME, IM
+ vol_type => $type,
+ raid_level => $VolumeTypesHuman{$type},
+ phy_disks => int($disks),
+ size => int($vol_size),
+ # one of: OPTIMAL, DEGRADED, FAILED, UNKNOWN
+ status => $vol_state,
+ # array of: ENABLED, QUIESCED, RESYNC_IN_PROGRESS, VOLUME_INACTIVE or NONE
+ flags => [ split ' ', $vol_flags ],
+ };
+ }
+
+ # ./include/lsi/mpi_cnfg.h
+ # typedef struct _RAID_PHYS_DISK_INQUIRY_DATA
+ # {
+ # U8 VendorID[8]; /* 00h */
+ # U8 ProductID[16]; /* 08h */
+ # U8 ProductRevLevel[4]; /* 18h */
+ # U8 Info[32]; /* 1Ch */
+ # }
+ # mpt-status.c __print_physdisk_classic
+ # ioc0 phy 0 scsi_id 0 IBM-ESXS PYH146C3-ETS10FN RXQN, 136 GB, state ONLINE, flags NONE
+ # ioc0 phy 0 scsi_id 1 ATA ST3808110AS J , 74 GB, state ONLINE, flags NONE
+ # ioc0 phy 0 scsi_id 1 ATA Hitachi HUA72101 AJ0A, 931 GB, state ONLINE, flags NONE
+ elsif (my($pioc, $num, $phy_id, $vendor, $prod_id, $rev, $size, $state, $flags) =
+ /^ioc(\d+)\s+ phy\s(\d+)\s scsi_id\s(\d+)\s (.{8})\s+(.{16})\s+(.{4})\s*,\s (\d+)\sGB,\s state\s(\S+),\s flags\s(.+)/x) {
+ $pd{$num} = {
+ ioc => int($pioc),
+ num => int($num),
+ phy_id => int($phy_id),
+ vendor => $vendor,
+ prod_id => $prod_id,
+ rev => $rev,
+ size => int($size),
+ # one of: ONLINE, MISSING, NOT_COMPATIBLE, FAILED, INITIALIZING, OFFLINE_REQUESTED, FAILED_REQUESTED, OTHER_OFFLINE, UNKNOWN
+ status => $state,
+ # array of: OUT_OF_SYNC, QUIESCED or NONE
+ flags => [ split ' ', $flags ],
+ };
+ } else {
+ warn "mpt unparsed: [$_]";
+ $this->unknown;
+ }
+ }
+ close $fh;
+
+ # extra parse, if mpt-status has -n flag, can process also resync state
+ # TODO: if -n becames default can do this all in one run
+ my $resyncing = grep {/RESYNC_IN_PROGRESS/} map { @{$_->{flags}} } values %ld;
+ if ($resyncing) {
+ my $fh = $this->cmd('sync status');
+ while (<$fh>) {
+ if (/^ioc:\d+/) {
+ # ignore
+ }
+ # mpt-status.c GetResyncPercentage
+ # scsi_id:0 70%
+ elsif (my($scsi_id, $percent) = /^scsi_id:(\d+) (\d+)%/) {
+ $pd{$scsi_id}{resync} = int($percent);
+ } else {
+ warn "mpt unparsed: [$_]";
+ $this->unknown;
+ }
+ }
+ close $fh;
+ }
+
+ return {
+ 'logical' => { %ld },
+ 'physical' => { %pd },
+ };
+ }
+
+ sub check {
+ my $this = shift;
+
+ # status messages pushed here
+ my @status;
+
+ my $id = $this->get_controller;
+ my $status = $this->parse($id);
+
+ # process logical units
+ while (my($d, $u) = each %{$status->{logical}}) {
+ next unless $this->valid($d);
+
+ my $s = $u->{status};
+ if ($s =~ /INITIAL|INACTIVE/) {
+ $this->warning;
+ } elsif ($s =~ /RESYNC/) {
+ $this->resync;
+ } elsif ($s =~ /DEGRADED|FAILED/) {
+ $this->critical;
+ } elsif ($s !~ /ONLINE|OPTIMAL/) {
+ $this->unknown;
+ }
+
+ # FIXME: this resync_in_progress is separate state of same as value in status?
+ if (grep { /RESYNC_IN_PROGRESS/ } @{$u->{flags}}) {
+ # find matching disks
+ my @disks = grep {$_->{ioc} eq $u->{ioc} } values %{$status->{physical}};
+ # collect percent for each disk
+ my @percent = map { $_->{resync}.'%'} @disks;
+ $s .= ' RESYNCING: '.join('/', @percent);
+ }
+ push(@status, "Volume $d ($u->{raid_level}, $u->{phy_disks} disks, $u->{size} GiB): $s");
+ }
+
+ # process physical units
+ while (my($d, $u) = each %{$status->{physical}}) {
+ my $s = $u->{status};
+ # remove uninteresting flags
+ my @flags = grep {!/NONE/} @{$u->{flags}};
+
+ # skip print if nothing in flags and disk is ONLINE
+ next unless @flags and $s eq 'ONLINE';
+
+ $s .= ' ' . join(' ', @flags);
+ push(@status, "Disk $d ($u->{size} GiB):$s");
+ $this->critical;
+ }
+
+ return unless @status;
+
+ $this->ok->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MPT
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/mvcli.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MVCLI';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::mvcli;
+
+ # Status: BROKEN: not finished
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ shift->{name};
+ }
+
+ sub commands {
+ {
+ 'mvcli blk' => ['-|', '@CMD', 'info', '-o', 'blk'],
+ 'mvcli vd' => ['-|', '@CMD', 'info', '-o', 'vd'],
+ 'mvcli smart' => ['-|', '@CMD', 'smart', '-p', '0'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd"
+ }
+
+ sub parse_blk {
+ my $this = shift;
+
+ my (@blk, %blk);
+
+ my $fh = $this->cmd('mvcli blk');
+ while (<$fh>) {
+ chomp;
+
+ if (my ($blk_id) = /Block id:\s+(\d+)/) {
+ # block id is first item, so push previous item to list
+ if (%blk) {
+ push(@blk, { %blk });
+ %blk = ();
+ }
+ $blk{blk_id} = int($blk_id);
+ } elsif (my($pd_id) = /PD id:\s+(\d+)/) {
+ $blk{pd_id} = int($pd_id);
+ } elsif (my($vd_id) = /VD id:\s+(\d+)/) {
+ $blk{vd_id} = int($vd_id);
+ } elsif (my($bstatus) = /Block status:\s+(.+)/) {
+ $blk{block_status} = $bstatus;
+ } elsif (my($size) = /Size:\s+(\d+) K/) {
+ $blk{size} = int($size);
+ } elsif (my($offset) = /Starting offset:\s+(\d+) K/) {
+ $blk{offset} = int($offset);
+ } else {
+ # warn "[$_]\n";
+ }
+ }
+ close $fh;
+
+ if (%blk) {
+ push(@blk, { %blk });
+ }
+
+ return wantarray ? @blk : \@blk;
+ }
+
+ sub parse_vd {
+ my $this = shift;
+
+ my (@vd, %vd);
+ my ($name, $value);
+
+ my $fh = $this->cmd('mvcli vd');
+ while (<$fh>) {
+ chomp;
+
+ if (/^$/
+ || /----+/
+ || /SG driver version/
+ || /Virtual Disk Information/
+ ) {
+ next;
+ }
+
+ unless (($name, $value) = /^(.+):\s+(.+)$/) {
+ warn "UNPARSED: [$_]";
+ next;
+ }
+
+ if ($name eq 'id') {
+ # id is first item, so push previous item to list
+ if (%vd) {
+ push(@vd, { %vd });
+ %vd = ();
+ }
+ }
+
+ $vd{$name} = $value;
+ }
+ close $fh;
+
+ if (%vd) {
+ push(@vd, { %vd });
+ }
+
+ return wantarray ? @vd : \@vd;
+ }
+
+ sub parse_smart {
+ my ($this, $blk) = @_;
+
+ # collect pd numbers
+ my @pd = map { $_->{pd_id} } @$blk;
+
+ my %smart;
+ foreach my $pd (@pd) {
+ my $fh = $this->cmd('mvcli smart', { '$pd' => $pd });
+ my %attrs = ();
+ while (<$fh>) {
+ chomp;
+
+ if (my($id, $name, $current, $worst, $treshold, $raw, $status) = /
+ ([\dA-F]{2})\s+ # id
+ (.*?)\s+ # name
+ (\d+)\s+ # current
+ (\d+)\s+ # worst
+ (\d+)\s+ # treshold
+ ([\dA-F]{12}) # raw
+ (?:\s+(\w+))? # status
+ /x) {
+ my %attr = ();
+ $attr{id} = $id;
+ $attr{name} = $name;
+ $attr{current} = int($current);
+ $attr{worst} = int($worst);
+ $attr{treshold} = int($treshold);
+ $attr{raw} = $raw;
+ $attr{status} = $status || undef;
+ $attrs{$id} = { %attr };
+ } else {
+ # warn "[$_]\n";
+ }
+ }
+
+ $smart{$pd} = { %attrs };
+ }
+
+ return \%smart;
+ }
+
+ sub parse {
+ my $this = shift;
+
+ my $blk = $this->parse_blk;
+ my $vd = $this->parse_vd;
+ my $smart = $this->parse_smart($blk);
+
+ return {
+ blk => $blk,
+ vd => $vd,
+ smart => $smart,
+ };
+ }
+
+ sub check {
+ my $this = shift;
+
+ my @status;
+ my $c = $this->parse;
+
+ foreach my $vd (@{$c->{vd}}) {
+ my $size = $this->format_bytes($this->parse_bytes($vd->{size}));
+ if ($vd->{status} ne 'functional') {
+ $this->critical;
+ }
+ push(@status, "VD($vd->{name} $vd->{'RAID mode'} $size): $vd->{status}");
+ }
+
+ return unless @status;
+
+ # denote this plugin as ran ok
+ $this->ok;
+
+ $this->message(join('; ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_MVCLI
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/sas2ircu.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_SAS2IRCU';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::sas2ircu;
+
+ # LSI SAS-2 controllers using the SAS-2 Integrated RAID Configuration Utility (SAS2IRCU)
+ # Based on the SAS-2 Integrated RAID Configuration Utility (SAS2IRCU) User Guide
+ # http://www.lsi.com/downloads/Public/Host%20Bus%20Adapters/Host%20Bus%20Adapters%20Common%20Files/SAS_SATA_6G_P12/SAS2IRCU_User_Guide.pdf
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ shift->{name};
+ }
+
+ sub commands {
+ {
+ 'controller list' => ['-|', '@CMD', 'LIST'],
+ 'controller status' => ['-|', '@CMD', '$controller', 'STATUS'],
+ 'device status' => ['-|', '@CMD', '$controller', 'DISPLAY'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ (
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd LIST",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd * STATUS",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd * DISPLAY",
+ );
+ }
+
+ # detect controllers for sas2ircu
+ sub detect {
+ my $this = shift;
+
+ my @ctrls;
+ my $fh = $this->cmd('controller list');
+
+ my $success = 0;
+ my $state="";
+ my $noctrlstate="No Controllers";
+ while (<$fh>) {
+ chomp;
+
+ # Adapter Vendor Device SubSys SubSys
+ # Index Type ID ID Pci Address Ven ID Dev ID
+ # ----- ------------ ------ ------ ----------------- ------ ------
+ # 0 SAS2008 1000h 72h 00h:03h:00h:00h 1028h 1f1eh
+ if (my($c) = /^\s*(\d+)\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s*$/) {
+ push(@ctrls, $c);
+ }
+ $success = 1 if /SAS2IRCU: Utility Completed Successfully/;
+
+ # handle the case where there's no hardware present.
+ # when there is no controller, we get
+ # root@i41:/tmp$ /usr/sbin/sas2ircudsr LIST
+ # LSI Corporation SAS2 IR Configuration Utility.
+ # Version 18.00.00.00 (2013.11.18)
+ # Copyright (c) 2009-2013 LSI Corporation. All rights reserved.
+
+ # SAS2IRCU: MPTLib2 Error 1
+ # root@i41:/tmp$ echo $?
+ # 1
+
+ if (/SAS2IRCU: MPTLib2 Error 1/) {
+ $state = $noctrlstate;
+ $success = 1 ;
+ }
+
+ }
+
+ unless (close $fh) {
+ #sas2ircu exits 1 (but close exits 256) when we close fh if we have no controller, so handle that, too
+ if ($? != 256 && $state eq $noctrlstate) {
+ $this->critical;
+ }
+ }
+ unless ($success) {
+ $this->critical;
+ }
+
+ return wantarray ? @ctrls : \@ctrls;
+ }
+
+ sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
+ sub ltrim { my $s = shift; $s =~ s/^\s+//; return $s };
+ sub rtrim { my $s = shift; $s =~ s/\s+$//; return $s };
+
+ sub check {
+ my $this = shift;
+
+ my @ctrls = $this->detect;
+
+ my @status;
+ my $numvols=0;
+ # determine the RAID states of each controller
+ foreach my $c (@ctrls) {
+ my $fh = $this->cmd('controller status', { '$controller' => $c });
+
+ my $novolsstate="No Volumes";
+ my $state;
+ my $success = 0;
+ while (<$fh>) {
+ chomp;
+
+ # match adapter lines
+ if (my($s) = /^\s*Volume state\s*:\s*(\w+)\s*$/) {
+ $state = $s;
+ $numvols++;
+ if ($state ne "Optimal") {
+ $this->critical;
+ }
+ }
+ $success = 1 if /SAS2IRCU: Utility Completed Successfully/;
+
+ ##handle the case where there are no volumes configured
+ #
+ # SAS2IRCU: there are no IR volumes on the controller!
+ # SAS2IRCU: Error executing command STATUS.
+
+ if (/SAS2IRCU: there are no IR volumes on the controller/
+ or /The STATUS command is not supported by the firmware currently loaded on controller/
+ ) {
+ # even though this isn't the last line, go ahead and set success.
+ $success = 1;
+ $state = $novolsstate;
+ }
+
+ }
+
+ unless (close $fh) {
+ #sas2ircu exits 256 when we close fh if we have no volumes, so handle that, too
+ if ($? != 256 && $state eq $novolsstate) {
+ $this->critical;
+ $state = $!;
+ }
+ }
+
+ unless ($success) {
+ $this->critical;
+ $state = "SAS2IRCU Unknown exit";
+ }
+
+ unless ($state) {
+ $state = "Unknown Error";
+ }
+
+ my $finalvolstate=$state;
+ #push(@status, "ctrl #$c: $numvols Vols: $state");
+
+
+ ##### now look at the devices.
+ # Device is a Hard disk
+ # Enclosure # : 2
+ # Slot # : 0
+ # SAS Address : 500065b-3-6789-abe0
+ # State : Ready (RDY)
+ # Size (in MB)/(in sectors) : 3815447/7814037167
+ # Manufacturer : ATA
+ # Model Number : ST4000DM000-1F21
+ # Firmware Revision : CC52
+ # Serial No : S30086G4
+ # GUID : 5000c5006d27b344
+ # Protocol : SATA
+ # Drive Type : SATA_HDD
+
+ $fh = $this->cmd('device status', { '$controller' => $c });
+ $state="";
+ $success = 0;
+ my $enc="";
+ my $slot="";
+ my @data;
+ my $device="";
+ my $numslots=0;
+ my $finalstate;
+ my $finalerrors="";
+
+ while (my $line = <$fh>) {
+ chomp $line;
+ # Device is a Hard disk
+ # Device is a Hard disk
+ # Device is a Enclosure services device
+ #
+ #lets make sure we're only checking disks. we dont support other devices right now
+ if ("$line" eq 'Device is a Hard disk') {
+ $device='disk';
+ } elsif ($line =~ /^Device/) {
+ $device='other';
+ }
+
+ if ("$device" eq 'disk') {
+ if ($line =~ /Enclosure #|Slot #|State /) {
+ #find our enclosure #
+ if ($line =~ /^ Enclosure # /) {
+ @data = split /:/, $line;
+ $enc=trim($data[1]);
+ #every time we hit a new enclosure line, reset our state and slot
+ undef $state;
+ undef $slot;
+ }
+ #find our slot #
+ if ($line =~ /^ Slot # /) {
+ @data = split /:/, $line;
+ $slot=trim($data[1]);
+ $numslots++
+ }
+ #find our state
+ if ($line =~ /^ State /) {
+ @data = split /:/, $line;
+ $state=ltrim($data[1]);
+
+ #for test
+ #if ($numslots == 10 ) { $state='FREDFISH';}
+
+ #when we get a state, test on it and report it..
+ if ($state =~ /Optimal|Ready/) {
+ #do nothing at the moment.
+ } else {
+ $this->critical;
+ $finalstate=$state;
+ $finalerrors="$finalerrors ERROR:Ctrl$c:Enc$enc:Slot$slot:$state";
+ }
+ }
+ }
+ }
+
+ if ($line =~ /SAS2IRCU: Utility Completed Successfully/) {
+ $success = 1;
+ }
+
+ } #end while
+
+
+ unless (close $fh) {
+ $this->critical;
+ $state = $!;
+ }
+
+ unless ($success) {
+ $this->critical;
+ $state = "SAS2IRCU Unknown exit";
+ }
+
+ unless ($state) {
+ $state = "Unknown Error";
+ }
+
+ unless($finalstate) {
+ $finalstate=$state;
+ }
+
+ #per controller overall report
+ #push(@status, ":$numslots Drives:$finalstate:$finalerrors");
+ push(@status, "ctrl #$c: $numvols Vols: $finalvolstate: $numslots Drives: $finalstate:$finalerrors:");
+
+ }
+
+ ##if we didn't get a status out of the controllers and an empty ctrls array, we must not have any.
+ unless (@status && @ctrls) {
+ push(@status, "No Controllers");
+ }
+
+ return unless @status;
+
+ $this->ok->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_SAS2IRCU
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/smartctl.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_SMARTCTL';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::smartctl;
+
+ # NOTE: not standalone plugin
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ use strict;
+ use warnings;
+
+ sub program_names {
+ shift->{name};
+ }
+
+ sub commands {
+ {
+ 'smartctl' => ['-|', '@CMD', '-H', '$dev', '$diskopt$disk'],
+ }
+ }
+
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ # nothing, as not standalone plugin yet
+ }
+
+ # check for -H parameter for physical disks
+ # this is currently called out from cciss plugin
+ # @param device list
+ # device list being an array of:
+ # - device to check (/dev/cciss/c0d0)
+ # - disk options (-dcciss)
+ # - disk number (0..15)
+ sub check_devices {
+ my $this = shift;
+ my @devs = @_;
+
+ unless (@devs) {
+ $this->warning;
+ $this->message("No devices to check");
+ return;
+ }
+
+ # status message for devs, latter just joined for shorter messages
+ my %status;
+
+ foreach my $ref (@devs) {
+ my ($dev, $diskopt, $disk) = @$ref;
+
+ my $fh = $this->cmd('smartctl', { '$dev' => $dev, '$diskopt' => $diskopt => '$disk' => $disk });
+ while (<$fh>) {
+ chomp;
+
+ # SMART Health Status: HARDWARE IMPENDING FAILURE GENERAL HARD DRIVE FAILURE [asc=5d, ascq=10]
+ if (my($s, $sc) = /SMART Health Status: (.*?)(\s*\[asc=\w+, ascq=\w+\])?$/) {
+ # use shorter output, message that hpacucli would use
+ if ($s eq 'HARDWARE IMPENDING FAILURE GENERAL HARD DRIVE FAILURE') {
+ $s = 'Predictive Failure';
+ }
+
+ if ($s eq 'Predictive Failure') {
+ $this->warning;
+ } elsif ($s !~ '^OK') {
+ $this->critical;
+ }
+ push(@{$status{$s}}, $dev.'#'.$disk);
+ }
+ }
+ close($fh);
+ }
+
+ return unless %status;
+
+ $this->ok->message($this->join_status(\%status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_SMARTCTL
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/ssacli.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_SSACLI';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::ssacli;
+
+ # This plugin extends hpacucli plugin,
+ # with the only difference that different program name will be used.
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugins::hpacucli';
+ use strict;
+ use warnings;
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_SSACLI
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Plugins/tw_cli.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_TW_CLI';
+ package App::Monitoring::Plugin::CheckRaid::Plugins::tw_cli;
+
+ # tw_cli(8) is a Command Line Interface Storage Management Software for
+ # AMCC/3ware ATA RAID Controller(s).
+ # Owned by LSI currently: https://en.wikipedia.org/wiki/3ware
+ #
+ # http://www.cyberciti.biz/files/tw_cli.8.html
+
+ use base 'App::Monitoring::Plugin::CheckRaid::Plugin';
+ # not yet, see:
+ # https://github.com/glensc/nagios-plugin-check_raid/pull/131#issuecomment-189957806
+ #use Date::Parse qw(strptime);
+ #use DateTime;
+ use strict;
+ use warnings;
+
+ sub program_names {
+ qw(tw_cli-9xxx tw_cli tw-cli);
+ }
+
+ sub commands {
+ {
+ 'show' => ['-|', '@CMD', 'show'], # This is 'info' output AND enclosure summary
+ 'unitstatus' => ['-|', '@CMD', 'info', '$controller', 'unitstatus'],
+ 'drivestatus' => ['-|', '@CMD', 'info', '$controller', 'drivestatus'],
+ 'bbustatus' => ['-|', '@CMD', 'info', '$controller', 'bbustatus'],
+ 'enc_show_all' => ['-|', '@CMD', '$encid', 'show all'],
+ }
+ }
+
+ sub sudo {
+ my ($this, $deep) = @_;
+ # quick check when running check
+ return 1 unless $deep;
+
+ my $cmd = $this->{program};
+ (
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd info",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd info *",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd show",
+ "CHECK_RAID ALL=(root) NOPASSWD: $cmd * show all",
+ );
+ }
+
+ sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
+
+ sub to_i {
+ my $i = shift;
+ return $i if $i !~ /^\d+$/;
+ return int($i);
+ }
+
+ sub parse {
+ my $this = shift;
+
+ my (%c);
+ # scan controllers
+ my ($sect_ctl, $sect_enc) = 0;
+ my $fh = $this->cmd('show');
+ while (<$fh>) {
+ # Section break
+ if(/^\s*$/) { ($sect_ctl,$sect_enc) = (0,0); next; };
+ # header line
+ if(/^-+$/) { next; };
+ # section headers: Controller
+ # Ctl Model Ports Drives Units NotOpt RRate VRate BBU
+ # Ctl Model (V)Ports Drives Units NotOpt RRate VRate BBU
+ if (/^Ctl.*Model.*Rate/) { $sect_ctl = 1; next; };
+ # section headers: Enclosure
+ # Encl Slots Drives Fans TSUnits Ctls
+ # Encl Slots Drives Fans TSUnits PSUnits
+ # Enclosure Slots Drives Fans TSUnits PSUnits Alarms
+ if (/^Encl.*Drive/) { $sect_enc = 1; next; };
+
+ # controller section
+ if ($sect_ctl and my($ctl, $model, $ports, $drives, $units, $notopt, $rrate, $vrate, $bbu) = m{^
+ (c\d+)\s+ # Controller
+ (\S+)\s+ # Model
+ (\d+)\s+ # (V)Ports
+ (\d+)\s+ # Drives
+ (\d+)\s+ # Units
+ (\d+)\s+ # NotOpt: Not Optional
+ # Not Optimal refers to any state except OK and VERIFYING.
+ # Other states include INITIALIZING, INIT-PAUSED,
+ # REBUILDING, REBUILD-PAUSED, DEGRADED, MIGRATING,
+ # MIGRATE-PAUSED, RECOVERY, INOPERABLE, and UNKNOWN.
+ (\d+)\s+ # RRate: Rebuild Rate
+ (\d+|-)\s+ # VRate: Verify Rate
+ (\S+|-)? # BBU
+ }x) {
+ $c{$ctl} = {
+ model => $model,
+ ports => int($ports),
+ drives => int($drives),
+ units => int($units),
+ optimal => int(!$notopt),
+ rrate => int($rrate),
+ vrate => to_i($vrate),
+ bbu => $bbu,
+ };
+ }
+ # enclosure section
+ if ($sect_enc and my($enc, $slots, $drives, $fans, $tsunits, $psunits, $alarms) = m{^
+ ((?:/c\d+)?/e\d+)\s+ # Controller, Enclosure
+ # 9650SE reports enclosures as /eX
+ # 9690SA+ report enclosures as /cX/eX
+ (\d+)\s+ # Slots
+ (\d+)\s+ # Drives
+ (\d+)\s+ # Fans
+ (\d+)\s+ # TSUnits - Temp Sensor
+ (\d+)?\s+ # PSUnits - Power Supply, not always present!
+ (\d+)?\s+ # Controller OR Alarms, not always present!
+ }x) {
+ # This will be filled in later by the enclosure pass
+ $c{$enc} = {};
+ }
+ }
+ close $fh;
+
+ # no controllers? skip early
+ return unless %c;
+
+ for my $c (grep /^\/?c\d+$/, keys %c) {
+ # get each unit on controllers
+ $fh = $this->cmd('unitstatus', { '$controller' => $c });
+ while (<$fh>) {
+ if (my($u, $type, $status, $p_rebuild, $p_vim, $strip, $size, $cache, $avrify) = m{^
+ (u\d+)\s+ # Unit
+ (\S+)\s+ # UnitType
+ (\S+)\s+ # Status
+ (\S+)\s+ # %RCmpl: The %RCompl reports the percent completion
+ # of the unit's Rebuild, if this task is in progress.
+ (\S+)\s+ # %V/I/M: The %V/I/M reports the percent completion
+ # of the unit's Verify, Initialize, or Migrate,
+ # if one of these are in progress.
+ (\S+)\s+ # Strip
+ (\S+)\s+ # Size(GB)
+ (\S+)\s+ # Cache
+ (\S+) # AVrify
+ }x) {
+ $c{$c}{unitstatus}{$u} = {
+ type => $type,
+ status => $status,
+ rebuild_percent => $p_rebuild,
+ vim_percent => $p_vim,
+ strip => $strip,
+ size => $size,
+ cache => $cache,
+ avrify => $avrify,
+ };
+ next;
+ }
+
+ if (m{^u\d+}) {
+ $this->unknown;
+ warn "unparsed: [$_]";
+ }
+ }
+ close $fh;
+
+ # get individual disk status
+ $fh = $this->cmd('drivestatus', { '$controller' => $c });
+ # common regexp
+ my $r = qr{^
+ (p\d+)\s+ # Port
+ (\S+)\s+ # Status
+ (\S+)\s+ # Unit
+ ([\d.]+\s[TG]B|-)\s+ # Size
+ }x;
+
+ while (<$fh>) {
+ # skip empty line
+ next if /^$/;
+
+ # Detect version
+ if (/^Port/) {
+ # <=9.5.1: Blocks Serial
+ $r .= qr{
+ (\S+)\s+ # Blocks
+ (.+) # Serial
+ }x;
+ next;
+ } elsif (/^VPort/) {
+ # >=9.5.2: Type Phy Encl-Slot Model
+ $r .= qr{
+ (\S+)\s+ # Type
+ (\S+)\s+ # Phy
+ (\S+)\s+ # Encl-Slot
+ (.+) # Model
+ }x;
+ next;
+ }
+
+ if (my($port, $status, $unit, $size, @rest) = ($_ =~ $r)) {
+ # do not report disks not present
+ # tw_cli 9.5.2 and above do not list these at all
+ next if $status eq 'NOT-PRESENT';
+ my %p;
+
+ if (@rest <= 2) {
+ my ($blocks, $serial) = @rest;
+ %p = (
+ blocks => to_i($blocks),
+ serial => trim($serial),
+ );
+ } else {
+ my ($type, $phy, $encl, $model) = @rest;
+ %p = (
+ type => $type,
+ phy => to_i($phy),
+ encl => $encl,
+ model => $model,
+ );
+ }
+
+ $c{$c}{drivestatus}{$port} = {
+ status => $status,
+ unit => $unit,
+ size => $size,
+ %p,
+ };
+
+ next;
+ }
+
+ if (m{^p\d+}) {
+ $this->unknown;
+ warn "unparsed: [$_]";
+ }
+ }
+ close $fh;
+
+ # get BBU status
+ $fh = $this->cmd('bbustatus', { '$controller' => $c });
+ while (<$fh>) {
+ next if /^$/;
+ next if /^-{10,}$/;
+ if (my($bbu, $onlinestate, $bbuready, $status, $volt, $temp, $hours, $lastcaptest) = m{^
+ (bbu\d*)\s+ # BBU, possibly numbered (RARE)
+ (\S+)\s+ # OnlineState
+ (\S+)\s+ # BBUReady
+ (\S+)\s+ # Status
+ (\S+)\s+ # Volt
+ (\S+)\s+ # Temp
+ (\d+)\s+ # Hours
+ (\S+)\s+ # LastCapTest
+ }x) {
+ $c{$c}{bbustatus}{$bbu} = {
+ OnlineState => $onlinestate,
+ BBUReady => $bbuready,
+ Status => $status,
+ Volt => $volt,
+ Temp => $temp,
+ Hours => $hours,
+ LastCapTest => $lastcaptest,
+ };
+ next;
+ }
+ if (m{^\S+\+}) {
+ $this->unknown;
+ warn "unparsed: [$_]";
+ }
+ }
+ close $fh;
+ }
+
+ # Do enclosures now, which might NOT be attached the controllers
+ # WARNING: This data section has not always been consistent over versions of tw_cli.
+ # You should try to use the newest version of the driver, as it deliberately uses the newer style of output
+ # rather than the output for the tw_cli versions released with 9550SX/9590SE/9650SE
+ for my $encid (grep /\/e\d+$/, keys %c) {
+ $fh = $this->cmd('enc_show_all', { '$encid' => $encid });
+ # Variable names chose to be 'sect_XXX' explicitly.
+ # This says what section we are in right now
+ my ($sect_enc, $sect_fan, $sect_tmp, $sect_psu, $sect_slt, $sect_alm) = (0,0,0,0,0,0);
+ # This says what section we have seen, it gets reset at the start of each enclosure block;
+ my ($seen_enc, $seen_fan, $seen_tmp, $seen_psu, $seen_slt, $seen_alm) = (0,0,0,0,0,0);
+ while (<$fh>) {
+ # Skip the header break lines
+ next if /^-+$/;
+ # and the partial indented header that is ABOVE the fan header
+ next if /^\s+-+Speed-+\s*$/;
+ # If the line is blank, reset our section headers
+ if(/^\s*$/){
+ ($sect_enc, $sect_fan, $sect_tmp, $sect_psu, $sect_slt, $sect_alm) = (0,0,0,0,0,0);
+ # If we have SEEN all of the sections, also reset the seen markers
+ # This is needed when the output contains multiple enclosures
+ if($sect_enc and $sect_fan and $sect_tmp and $sect_psu and $sect_slt and $sect_alm) {
+ ($seen_enc, $seen_fan, $seen_tmp, $seen_psu, $seen_slt, $seen_alm) = (0,0,0,0,0,0);
+ }
+ next;
+ }
+ if (/^Encl.*Status/) { $seen_enc = $sect_enc = 1; next; }
+ if (/^Fan.*Status/) { $seen_fan = $sect_fan = 1; next; }
+ if (/^TempSensor.*Status/) { $seen_tmp = $sect_tmp = 1; next; }
+ if (/^PowerSupply.*Status/) { $seen_psu = $sect_psu = 1; next; }
+ if (/^Slot.*Status/) { $seen_slt = $sect_slt = 1; next; }
+ if (/^Alarm.*Status/) { $seen_alm = $sect_alm = 1; next; }
+ # ------ Start of new enclosure
+ if ($sect_enc and my($encl, $encl_status) = m{^
+ ((?:/c\d+)?/e\d+)\s+ # Controller, Enclosure
+ (\S+)\s+ # Status
+ }x) {
+ # This is a special case for the test environment, as it is
+ # hard to feed MULTI command inputs into the mock.
+ if($ENV{'HARNESS_ACTIVE'} and $encl ne $encid) {
+ $encid = $encl;
+ }
+ $c{$encid} = {
+ encl => $encl, # Dupe of $encid to verify
+ status => $encl_status,
+ # This is the top-level enclosure object
+ fans => {},
+ tempsensor => {},
+ powersupply => {},
+ slot => {},
+ alarm => {},
+ };
+ }
+ # ------ Fans
+ elsif ($sect_fan and my($fan, $fan_status, $fan_state, $fan_step, $fan_rpm, $fan_identify) = m{^
+ (fan\S+)\s+ # Fan
+ (\S+)\s+ # Status
+ (\S+)\s+ # State
+ (\S+)\s+ # Step
+ (\d+|N/A)\s+ # RPM
+ (\S+)\s+ # Identify
+ }x) {
+ $c{$encid}{fans}{$fan} = {
+ status => $fan_status,
+ state => $fan_state,
+ step => $fan_step,
+ rpm => $fan_rpm,
+ identify => $fan_identify,
+ };
+ next;
+ }
+ # ------ TempSensor
+ elsif ($sect_tmp and my($tmp, $tmp_status, $tmp_temperature, $tmp_identify) = m{^
+ (temp\S+)\s+ # TempSensor
+ (\S+)\s+ # Status
+ (\S+)\s+ # Temperature
+ (\S+)\s+ # Identify
+ }x) {
+ $c{$encid}{tempsensor}{$tmp} = {
+ status => $tmp_status,
+ temperature => $tmp_temperature,
+ identify => $tmp_identify,
+ };
+ next;
+ }
+ # ------ PowerSupply
+ elsif ($sect_psu and my($psu, $psu_status, $psu_state, $psu_voltage, $psu_current, $psu_identify) = m{^
+ ((?:pw|psu)\S+)\s+ # PowerSupply
+ (\S+)\s+ # Status
+ (\S+)\s+ # State
+ (\S+)\s+ # Voltage
+ (\S+)\s+ # Current
+ (\S+)\s+ # Identify
+ }x) {
+ $c{$encid}{powersupply}{$psu} = {
+ status => $psu_status,
+ state => $psu_state,
+ voltage => $psu_voltage,
+ current => $psu_current,
+ identify => $psu_identify,
+ };
+ next;
+ }
+ # ------ Slot
+ elsif ($sect_slt and my($slt, $slt_status, $slt_vport, $slt_identify) = m{^
+ (slo?t\S+)\s+ # Slot
+ (\S+)\s+ # Status
+ (\S+)\s+ # (V)Port
+ (\S+)\s+ # Identify
+ }x) {
+ $c{$encid}{slot}{$slt} = {
+ status => $slt_status,
+ vport => $slt_vport,
+ identify => $slt_identify,
+ };
+ next;
+ }
+ # ------ Alarm
+ elsif ($sect_alm and my($alm, $alm_status, $alm_state, $alm_audibility) = m{^
+ (alm\S+)\s+ # Alarm
+ (\S+)\s+ # Status
+ (\S+)\s+ # State
+ (\S+)\s+ # Audibility
+ }x) {
+ $c{$encid}{alarm}{$alm} = {
+ status => $alm_status,
+ state => $alm_state,
+ audibility => $alm_audibility,
+ };
+ next;
+ }
+ # ---- End of known data
+ elsif (m{^\S+\+}) {
+ $this->unknown;
+ warn "unparsed: [$_]";
+ }
+
+ }
+ close $fh;
+ }
+
+ return \%c;
+ }
+
+ sub check {
+ my $this = shift;
+
+ # status messages pushed here
+ my @status;
+
+ my $c = $this->parse;
+ if (!$c) {
+ $this->unknown;
+ $this->message("No Adapters were found on this machine");
+ }
+
+ # process each controller
+ for my $cid (sort grep !/e\d+/, keys %$c) {
+ my $c = $c->{$cid};
+ my @cstatus;
+
+ for my $uid (sort keys %{$c->{unitstatus}}) {
+ my $u = $c->{unitstatus}->{$uid};
+ my $s = $u->{status};
+
+ if ($s =~ /INITIALIZING|MIGRATING/) {
+ $this->warning;
+ $s .= " $u->{vim_percent}";
+
+ } elsif ($s eq 'VERIFYING') {
+ $this->check_status;
+ $s .= " $u->{vim_percent}";
+
+ } elsif ($s eq 'REBUILDING') {
+ $this->resync;
+ $s .= " $u->{rebuild_percent}";
+
+ } elsif ($s eq 'DEGRADED') {
+ $this->critical;
+
+ } elsif ($s ne 'OK') {
+ $this->critical;
+
+ }
+
+ my @ustatus = $s;
+
+ # report cache, no checking
+ if ($u->{cache} && $u->{cache} ne '-') {
+ push(@ustatus, "Cache:$u->{cache}");
+ }
+
+ push(@status, "$cid($c->{model}): $uid($u->{type}): ".join(', ', @ustatus));
+ }
+
+ # check individual disk status
+ my %ds;
+ foreach my $p (sort { $a cmp $b } keys %{$c->{drivestatus}}) {
+ my $d = $c->{drivestatus}->{$p};
+ my $ds = $d->{status};
+ if ($ds eq 'VERIFYING') {
+ $this->check_status;
+ } elsif ($ds ne 'OK') {
+ $this->critical;
+ }
+
+ if ($d->{unit} eq '-') {
+ $ds = 'SPARE';
+ }
+
+ push(@{$ds{$ds}}, $p);
+ }
+ push(@status, "Drives($c->{drives}): ".$this->join_status(\%ds)) if %ds;
+
+ # check BBU, but be prepared that BBU status might not report anything
+ if ($this->{options}{bbu_monitoring} && $c->{bbu} && $c->{bbu} ne '-') {
+ # On old controllers, bbustatus did not exist; and the only BBU status
+ # you got was on the controller listing.
+ if(scalar(keys %{$c->{bbustatus}}) < 1) {
+ $this->critical if $c->{bbu} ne 'OK';
+ push(@status, "BBU: $c->{bbu}");
+ } else {
+ foreach my $bbuid (sort { $a cmp $b } keys %{$c->{bbustatus}}) {
+ my $bat = $c->{bbustatus}->{$bbuid};
+ my $bs = $bat->{Status}; # We might override this later
+ my @batmsg;
+ if($bs eq 'Testing' or $bs eq 'Charging') {
+ $this->bbulearn;
+ } elsif($bs eq 'WeakBat') {
+ # Time to replace your battery
+ $this->warning;
+ } elsif($bs ne 'OK') {
+ $this->critical;
+ }
+ # We do NOT check BBUReady, as it doesn't private granular
+ # info.
+ # Check OnlineState flag as well
+ # A battery can be GOOD, but disabled; this is only reflected in OnlineState.
+ if($bat->{OnlineState} ne 'On') {
+ push @batmsg, 'OnlineStatus='.$bat->{OnlineState};
+ $this->critical;
+ }
+ # Check voltage & temps
+ push @batmsg, 'Volt='.$bat->{Volt};
+ push @batmsg, 'Temp='.$bat->{Temp};
+ if ($bat->{Volt} =~ /^(LOW|HIGH)$/) {
+ $this->critical;
+ } elsif ($bat->{Volt} =~ /^(LOW|HIGH)$/) {
+ $this->warning;
+ }
+ if ($bat->{Temp} =~ /^(LOW|HIGH)$/) {
+ $this->critical;
+ } elsif ($bat->{Temp} =~ /^(LOW|HIGH)$/) {
+ $this->warning;
+ }
+ # Check runtime estimate
+ # Warn if too low
+ my $bbulearn = '';
+ if ($bat->{Hours} ne '-' and int($bat->{Hours}) <= 1) {
+ # TODO: make this configurable before going live
+ #$this->warning;
+ $this->bbulearn;
+ $bbulearn = '/LEARN';
+ }
+ push @batmsg, 'Hours='.$bat->{Hours};
+
+ # Check date of last capacity test
+ if ($bat->{LastCapTest} eq 'xx-xxx-xxxx') {
+ $this->bbulearn;
+ $bbulearn = '/LEARN';
+ } elsif ($bat->{LastCapTest} ne '-') {
+ # TODO: is the short name of month localized by tw_cli?
+ #my ($mday, $mon, $year) = (strptime($bat->{LastCapTest}, '%d-%b-%Y'))[3,4,5];
+ #my $lastcaptest_epoch = DateTime->new(year => $year, month => $mon, day => $mday, hour => 0, minute => 0, second => 0);
+ #my $present_time = time;
+ ## TODO: this value should be configurable before going live, also need to mock system date for testing
+ #if (($present_time-$lastcaptest_epoch) > 86400*365) {
+ # $this->bbulearn;
+ #}
+ }
+ push @batmsg, 'LastCapTest='.$bat->{LastCapTest};
+ my $msg = join(',', @batmsg);
+ my $bbustatus = $bs.$bbulearn;
+ $bbustatus = "$bbuid=$bs" if $bbuid ne 'bbu'; # If we have multiple BBU, specify which one
+ push(@status, "BBU: $bbustatus($msg)");
+ }
+ }
+ }
+ }
+ # process each enclosure
+ for my $eid (sort grep /\/e\d+/, keys %$c) {
+ my $e = $c->{$eid};
+ # If the enclosure command returned nothing, we have no status to
+ # report.
+ next unless defined($e->{status});
+
+ # Something is wrong, but we are not sure what yet.
+ $this->warning unless $e->{status} eq 'OK';
+ my @estatus;
+ for my $fan_id (sort keys %{$e->{fans}}) {
+ my $f = $e->{fans}->{$fan_id};
+ my $s = $f->{status};
+ next if $s eq 'NOT-REPORTABLE' or $s eq 'NOT-INSTALLED' or $s eq 'NO-DEVICE';
+ $this->warning if $s ne 'OK';
+ push(@estatus, "$fan_id=$s($f->{rpm})");
+ }
+ for my $tmp_id (sort keys %{$e->{tempsensor}}) {
+ my $t = $e->{tempsensor}->{$tmp_id};
+ my $s = $t->{status};
+ next if $s eq 'NOT-REPORTABLE' or $s eq 'NOT-INSTALLED' or $s eq 'NO-DEVICE';
+ $this->warning if $s ne 'OK';
+ $t->{temperature} =~ s/\(\d+F\)//; # get rid of extra units
+ push(@estatus, "$tmp_id=$s($t->{temperature})");
+ }
+ for my $psu_id (sort keys %{$e->{powersupply}}) {
+ my $t = $e->{powersupply}->{$psu_id};
+ my $s = $t->{status};
+ next if $s eq 'NOT-REPORTABLE' or $s eq 'NOT-INSTALLED' or $s eq 'NO-DEVICE';
+ $this->warning if $s ne 'OK';
+ push(@estatus, "$psu_id=$s(status=$t->{state},voltage=$t->{voltage},current=$t->{current})");
+ }
+ for my $slot_id (sort keys %{$e->{slot}}) {
+ my $t = $e->{slot}->{$slot_id};
+ my $s = $t->{status};
+ next if $s eq 'NOT-REPORTABLE' or $s eq 'NOT-INSTALLED' or $s eq 'NO-DEVICE';
+ $this->warning if $s ne 'OK';
+ push(@estatus, "$slot_id=$s");
+ }
+ for my $alarm_id (sort keys %{$e->{alarm}}) {
+ my $t = $e->{alarm}->{$alarm_id};
+ my $s = $t->{status};
+ next if $s eq 'NOT-REPORTABLE' or $s eq 'NOT-INSTALLED' or $s eq 'NO-DEVICE';
+ $this->warning if $s ne 'OK';
+ push(@estatus, "$alarm_id=$s(State=$t->{state},Audibility=$t->{audibility})");
+ }
+ #warn join("\n", @estatus);
+ push(@status, "Enclosure: $eid(".join(',', @estatus).")");
+ }
+
+ return unless @status;
+
+ $this->ok->message(join(', ', @status));
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_PLUGINS_TW_CLI
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/SerialLine.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_SERIALLINE';
+ package App::Monitoring::Plugin::CheckRaid::SerialLine;
+
+ # Package dealing with connecting to serial line and handling UUCP style locks.
+
+ use Carp;
+ use strict;
+ use warnings;
+
+ sub new {
+ my $self = shift;
+ my $class = ref($self) || $self;
+ my $device = shift;
+
+ my $this = {
+ lockdir => "/var/lock",
+
+ @_,
+
+ lockfile => undef,
+ device => $device,
+ fh => undef,
+ };
+
+ bless($this, $class);
+ }
+
+ sub lock {
+ my $self = shift;
+ # create lock in style: /var/lock/LCK..ttyS0
+ my $device = shift;
+ my ($lockfile) = $self->{device} =~ m#/dev/(.+)#;
+ $lockfile = "$self->{lockdir}/LCK..$lockfile";
+ if (-e $lockfile) {
+ return 0;
+ }
+ open(my $fh, '>', $lockfile) || croak "Can't create lock: $lockfile\n";
+ print $fh $$;
+ close($fh);
+
+ $self->{lockfile} = $lockfile;
+ }
+
+ sub open {
+ my $self = shift;
+
+ $self->lock or return;
+
+ # open the device
+ open(my $fh, '+>', $self->{device}) || croak "Couldn't open $self->{device}, $!\n";
+
+ $self->{fh} = $fh;
+ }
+
+ sub close {
+ my $self = shift;
+ if ($self->{fh}) {
+ close($self->{fh});
+ undef($self->{fh});
+ unlink $self->{lockfile} or carp $!;
+ }
+ }
+
+ sub DESTROY {
+ my $self = shift;
+ $self->close();
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_SERIALLINE
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Sudoers.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_SUDOERS';
+ package App::Monitoring::Plugin::CheckRaid::Sudoers;
+
+ use App::Monitoring::Plugin::CheckRaid::Utils;
+ use warnings;
+ use strict;
+
+ use Exporter 'import';
+
+ our @EXPORT = qw(sudoers);
+ our @EXPORT_OK = @EXPORT;
+
+ # update sudoers file
+ #
+ # if sudoers config has "#includedir" directive, add file to that dir
+ # otherwise update main sudoers file
+ # @returns true if file was updated
+ sub sudoers {
+ my $dry_run = shift;
+ my @plugins = @_;
+
+ # build values to be added
+ # go over all active plugins
+ my @sudo;
+ foreach my $plugin (@plugins) {
+ # collect sudo rules
+ my @rules = $plugin->sudo(1) or next;
+
+ push(@sudo, @rules);
+ }
+
+ unless (@sudo) {
+ warn "Your configuration does not need to use sudo, sudoers not updated\n";
+ return 0;
+ }
+
+ my @rules = join "\n", (
+ "",
+ # setup alias, so we could easily remove these later by matching lines with 'CHECK_RAID'
+ # also this avoids installing ourselves twice.
+ "# Lines matching CHECK_RAID added by $0 -S on ". scalar localtime,
+ "User_Alias CHECK_RAID=nagios, icinga, sensu",
+ "Defaults:CHECK_RAID !requiretty",
+
+ # actual rules from plugins
+ join("\n", @sudo),
+ "",
+ );
+
+ if ($dry_run) {
+ warn "Content to be inserted to sudo rules:\n";
+ warn "--- sudoers ---\n";
+ print @rules;
+ warn "--- sudoers ---\n";
+ return 0;
+ }
+
+ my $sudoers = find_file('/usr/local/etc/sudoers', '/etc/sudoers');
+ my $visudo = which('visudo');
+
+ die "Unable to find sudoers file.\n" unless -f $sudoers;
+ die "Unable to write to sudoers file '$sudoers'.\n" unless -w $sudoers;
+ die "visudo program not found\n" unless -x $visudo;
+
+ # parse sudoers file for "#includedir" directive
+ my $sudodir = parse_sudoers_includedir($sudoers);
+ if ($sudodir) {
+ # sudo will read each file in /etc/sudoers.d, skipping file names that
+ # end in ~ or contain a . character to avoid causing problems with
+ # package manager or editor temporary/backup files
+ $sudoers = "$sudodir/check_raid";
+ }
+
+ warn "Updating file $sudoers\n";
+
+ # NOTE: secure as visudo itself: /etc is root owned
+ my $new = $sudoers.".new.".$$;
+
+ # setup to have sane perm for new sudoers file
+ umask(0227);
+
+ open my $fh, '>', $new or die $!;
+
+ # insert old sudoers
+ if (!$sudodir) {
+ open my $old, '<', $sudoers or die $!;
+ while (<$old>) {
+ print $fh $_;
+ }
+ close $old or die $!;
+ }
+
+ # insert the rules
+ print $fh @rules;
+ close $fh;
+
+ # validate sudoers
+ system($visudo, '-c', '-f', $new) == 0 or unlink($new),exit $? >> 8;
+
+ # check if they differ
+ if (filediff($sudoers, $new)) {
+ # use the new file
+ rename($new, $sudoers) or die $!;
+ warn "$sudoers file updated.\n";
+ return 1;
+ }
+
+ warn "$sudoers file not changed.\n";
+ unlink($new);
+ return 0;
+ }
+
+ # return first "#includedir" directive from $sudoers file
+ sub parse_sudoers_includedir {
+ my ($sudoers) = @_;
+
+ open my $fh, '<', $sudoers or die "Can't open: $sudoers: $!";
+ while (<$fh>) {
+ if (my ($dir) = /^#includedir\s+(.+)$/) {
+ return $dir;
+ }
+ }
+ close $fh or die $!;
+
+ return undef;
+ }
+
+ # return FALSE if files are identical
+ # return TRUE if files are different
+ # return TRUE if any of the files is missing
+ sub filediff {
+ my ($file1, $file2) = @_;
+
+ # return TRUE if neither of them exist
+ return 1 unless -f $file1;
+ return 1 unless -f $file2;
+
+ my $f1 = cat($file1);
+ my $f2 = cat($file2);
+
+ # wipe comments
+ $f1 =~ s/^#.+$//m;
+ $f2 =~ s/^#.+$//m;
+
+ # return TRUE if they differ
+ return $f1 ne $f2;
+ }
+
+ # get contents of a file
+ sub cat {
+ my ($file) = @_;
+ open(my $fh, '<', $file) or die "Can't open $file: $!";
+ local $/ = undef;
+ local $_ = <$fh>;
+ close($fh) or die $!;
+
+ return $_;
+ }
+
+ # find first existing file from list of file paths
+ sub find_file {
+ for my $file (@_) {
+ return $file if -f $file;
+ }
+ return undef;
+ }
+APP_MONITORING_PLUGIN_CHECKRAID_SUDOERS
+
+$fatpacked{"App/Monitoring/Plugin/CheckRaid/Utils.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_MONITORING_PLUGIN_CHECKRAID_UTILS';
+ package App::Monitoring::Plugin::CheckRaid::Utils;
+
+ use warnings;
+ use strict;
+ use Exporter 'import';
+
+ our @EXPORT = qw(which find_sudo);
+ our @EXPORT_OK = @EXPORT;
+
+ # registered plugins
+ our @plugins;
+
+ # devices to ignore
+ our @ignore;
+
+ # debug level
+ our $debug = 0;
+
+ # paths for which()
+ our @paths = split /:/, $ENV{'PATH'};
+ unshift(@paths, qw(/usr/local/nrpe /usr/local/bin /sbin /usr/sbin /bin /usr/sbin /opt/bin /opt/MegaRAID/MegaCli /usr/StorMan));
+
+ # lookup program from list of possible filenames
+ # search is performed from $PATH plus additional hardcoded @paths
+ # NOTE: we do not check for execute bit as it may fail for non-root. #104
+ sub which {
+ for my $prog (@_) {
+ for my $path (@paths) {
+ return "$path/$prog" if -f "$path/$prog";
+ }
+ }
+ return undef;
+ }
+
+ our @sudo;
+ sub find_sudo {
+ # no sudo needed if already root
+ return [] unless $>;
+
+ # detect once
+ return \@sudo if @sudo;
+
+ my $sudo = which('sudo') or die "Can't find sudo";
+ push(@sudo, $sudo);
+
+ # detect if sudo supports -A, issue #88
+ use IPC::Open3;
+ my $fh;
+ my @cmd = ($sudo, '-h');
+ my $pid = open3(undef, $fh, undef, @cmd) or die "Can't run 'sudo -h': $!";
+ local $/ = undef;
+ local $_ = <$fh>;
+ close($fh) or die $!;
+ # prefer -n to skip password prompt
+ push(@sudo, '-n') if /-n/;
+ # ..if not supported, add -A as well
+ push(@sudo, '-A') if /-A/;
+
+ return \@sudo;
+ }
+
+ 1;
+APP_MONITORING_PLUGIN_CHECKRAID_UTILS
+
+$fatpacked{"Class/Accessor.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'CLASS_ACCESSOR';
+ package Class::Accessor;require 5.00502;use strict;$Class::Accessor::VERSION='0.51';sub new {return bless defined $_[1]? {%{$_[1]}}: {},ref $_[0]|| $_[0]}sub mk_accessors {my($self,@fields)=@_;$self->_mk_accessors('rw',@fields)}if (eval {require Sub::Name}){Sub::Name->import}{no strict 'refs';sub import {my ($class,@what)=@_;my$caller=caller;for (@what){if (/^(?:antlers|moose-?like)$/i){*{"${caller}::has"}=sub {my ($f,%args)=@_;$caller->_mk_accessors(($args{is}||"rw"),$f)};*{"${caller}::extends"}=sub {@{"${caller}::ISA"}=@_;unless (grep $_->can("_mk_accessors"),@_){push @{"${caller}::ISA"},$class}};&{"${caller}::extends"}(@{"${caller}::ISA"})}}}sub follow_best_practice {my($self)=@_;my$class=ref$self || $self;*{"${class}::accessor_name_for"}=\&best_practice_accessor_name_for;*{"${class}::mutator_name_for"}=\&best_practice_mutator_name_for}sub _mk_accessors {my($self,$access,@fields)=@_;my$class=ref$self || $self;my$ra=$access eq 'rw' || $access eq 'ro';my$wa=$access eq 'rw' || $access eq 'wo';for my$field (@fields){my$accessor_name=$self->accessor_name_for($field);my$mutator_name=$self->mutator_name_for($field);if($accessor_name eq 'DESTROY' or $mutator_name eq 'DESTROY'){$self->_carp("Having a data accessor named DESTROY in '$class' is unwise.")}if ($accessor_name eq $mutator_name){my$accessor;if ($ra && $wa){$accessor=$self->make_accessor($field)}elsif ($ra){$accessor=$self->make_ro_accessor($field)}else {$accessor=$self->make_wo_accessor($field)}my$fullname="${class}::$accessor_name";my$subnamed=0;unless (defined &{$fullname}){subname($fullname,$accessor)if defined&subname;$subnamed=1;*{$fullname}=$accessor}if ($accessor_name eq $field){my$alias="${class}::_${field}_accessor";subname($alias,$accessor)if defined&subname and not $subnamed;*{$alias}=$accessor unless defined &{$alias}}}else {my$fullaccname="${class}::$accessor_name";my$fullmutname="${class}::$mutator_name";if ($ra and not defined &{$fullaccname}){my$accessor=$self->make_ro_accessor($field);subname($fullaccname,$accessor)if defined&subname;*{$fullaccname}=$accessor}if ($wa and not defined &{$fullmutname}){my$mutator=$self->make_wo_accessor($field);subname($fullmutname,$mutator)if defined&subname;*{$fullmutname}=$mutator}}}}}sub mk_ro_accessors {my($self,@fields)=@_;$self->_mk_accessors('ro',@fields)}sub mk_wo_accessors {my($self,@fields)=@_;$self->_mk_accessors('wo',@fields)}sub best_practice_accessor_name_for {my ($class,$field)=@_;return "get_$field"}sub best_practice_mutator_name_for {my ($class,$field)=@_;return "set_$field"}sub accessor_name_for {my ($class,$field)=@_;return$field}sub mutator_name_for {my ($class,$field)=@_;return$field}sub set {my($self,$key)=splice(@_,0,2);if(@_==1){$self->{$key}=$_[0]}elsif(@_ > 1){$self->{$key}=[@_]}else {$self->_croak("Wrong number of arguments received")}}sub get {my$self=shift;if(@_==1){return$self->{$_[0]}}elsif(@_ > 1){return @{$self}{@_}}else {$self->_croak("Wrong number of arguments received")}}sub make_accessor {my ($class,$field)=@_;return sub {my$self=shift;if(@_){return$self->set($field,@_)}else {return$self->get($field)}}}sub make_ro_accessor {my($class,$field)=@_;return sub {my$self=shift;if (@_){my$caller=caller;$self->_croak("'$caller' cannot alter the value of '$field' on objects of class '$class'")}else {return$self->get($field)}}}sub make_wo_accessor {my($class,$field)=@_;return sub {my$self=shift;unless (@_){my$caller=caller;$self->_croak("'$caller' cannot access the value of '$field' on objects of class '$class'")}else {return$self->set($field,@_)}}}use Carp ();sub _carp {my ($self,$msg)=@_;Carp::carp($msg || $self);return}sub _croak {my ($self,$msg)=@_;Carp::croak($msg || $self);return}1;
+CLASS_ACCESSOR
+
+$fatpacked{"Class/Accessor/Fast.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'CLASS_ACCESSOR_FAST';
+ package Class::Accessor::Fast;use base 'Class::Accessor';use strict;use B 'perlstring';$Class::Accessor::Fast::VERSION='0.51';sub make_accessor {my ($class,$field)=@_;eval sprintf q{
+ sub {
+ return $_[0]{%s} if scalar(@_) == 1;
+ return $_[0]{%s} = scalar(@_) == 2 ? $_[1] : [@_[1..$#_]];
+ }
+ },map {perlstring($_)}$field,$field}sub make_ro_accessor {my($class,$field)=@_;eval sprintf q{
+ sub {
+ return $_[0]{%s} if @_ == 1;
+ my $caller = caller;
+ $_[0]->_croak(sprintf "'$caller' cannot alter the value of '%%s' on objects of class '%%s'", %s, %s);
+ }
+ },map {perlstring($_)}$field,$field,$class}sub make_wo_accessor {my($class,$field)=@_;eval sprintf q{
+ sub {
+ if (@_ == 1) {
+ my $caller = caller;
+ $_[0]->_croak(sprintf "'$caller' cannot access the value of '%%s' on objects of class '%%s'", %s, %s);
+ }
+ else {
+ return $_[0]{%s} = $_[1] if @_ == 2;
+ return (shift)->{%s} = \@_;
+ }
+ }
+ },map {perlstring($_)}$field,$class,$field,$field}1;
+CLASS_ACCESSOR_FAST
+
+$fatpacked{"Class/Accessor/Faster.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'CLASS_ACCESSOR_FASTER';
+ package Class::Accessor::Faster;use base 'Class::Accessor';use strict;use B 'perlstring';$Class::Accessor::Faster::VERSION='0.51';my%slot;sub _slot {my($class,$field)=@_;my$n=$slot{$class}->{$field};return$n if defined$n;$n=keys %{$slot{$class}};$slot{$class}->{$field}=$n;return$n}sub new {my($proto,$fields)=@_;my($class)=ref$proto || $proto;my$self=bless [],$class;$fields={}unless defined$fields;for my$k (keys %$fields){my$n=$class->_slot($k);$self->[$n]=$fields->{$k}}return$self}sub make_accessor {my($class,$field)=@_;my$n=$class->_slot($field);eval sprintf q{
+ sub {
+ return $_[0][%d] if scalar(@_) == 1;
+ return $_[0][%d] = scalar(@_) == 2 ? $_[1] : [@_[1..$#_]];
+ }
+ },$n,$n}sub make_ro_accessor {my($class,$field)=@_;my$n=$class->_slot($field);eval sprintf q{
+ sub {
+ return $_[0][%d] if @_ == 1;
+ my $caller = caller;
+ $_[0]->_croak(sprintf "'$caller' cannot alter the value of '%%s' on objects of class '%%s'", %s, %s);
+ }
+ },$n,map(perlstring($_),$field,$class)}sub make_wo_accessor {my($class,$field)=@_;my$n=$class->_slot($field);eval sprintf q{
+ sub {
+ if (@_ == 1) {
+ my $caller = caller;
+ $_[0]->_croak(sprintf "'$caller' cannot access the value of '%%s' on objects of class '%%s'", %s, %s);
+ }
+ else {
+ return $_[0][%d] = $_[1] if @_ == 2;
+ return (shift)->[%d] = \@_;
+ }
+ }
+ },map(perlstring($_),$field,$class),$n,$n}1;
+CLASS_ACCESSOR_FASTER
+
+$fatpacked{"Config/Tiny.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'CONFIG_TINY';
+ package Config::Tiny;use strict;our$VERSION='2.23';BEGIN {require 5.008001;$Config::Tiny::errstr=''}sub new {return bless {},shift}sub read {my($class)=ref $_[0]? ref shift : shift;my($file,$encoding)=@_;return$class -> _error('No file name provided')if (!defined$file || ($file eq ''));$encoding=$encoding ? "<:$encoding" : '<';local $/=undef;open(CFG,$encoding,$file)or return$class -> _error("Failed to open file '$file' for reading: $!");my$contents=<CFG>;close(CFG);return$class -> _error("Reading from '$file' returned undef")if (!defined$contents);return$class -> read_string($contents)}sub read_string {my($class)=ref $_[0]? ref shift : shift;my($self)=bless {},$class;return undef unless defined $_[0];my$ns='_';my$counter=0;for (split /(?:\015{1,2}\012|\015|\012)/,shift){$counter++;next if /^\s*(?:\#|\;|$)/;s/\s\;\s.+$//g;if (/^\s*\[\s*(.+?)\s*\]\s*$/){$self->{$ns=$1}||= {};next}if (/^\s*([^=]+?)\s*=\s*(.*?)\s*$/){$self->{$ns}->{$1}=$2;next}return$self -> _error("Syntax error at line $counter: '$_'")}return$self}sub write {my($self)=shift;my($file,$encoding)=@_;return$self -> _error('No file name provided')if (!defined$file or ($file eq ''));$encoding=$encoding ? ">:$encoding" : '>';my($string)=$self->write_string;return undef unless defined$string;open(CFG,$encoding,$file)or return$self->_error("Failed to open file '$file' for writing: $!");print CFG$string;close CFG;return 1}sub write_string {my($self)=shift;my($contents)='';for my$section (sort {(($b eq '_')<=> ($a eq '_'))|| ($a cmp $b)}keys %$self){return$self->_error("Illegal whitespace in section name '$section'")if$section =~ /(?:^\s|\n|\s$)/s;my$block=$self->{$section};$contents .= "\n" if length$contents;$contents .= "[$section]\n" unless$section eq '_';for my$property (sort keys %$block){return$self->_error("Illegal newlines in property '$section.$property'")if$block->{$property}=~ /(?:\012|\015)/s;$contents .= "$property=$block->{$property}\n"}}return$contents}sub errstr {$Config::Tiny::errstr}sub _error {$Config::Tiny::errstr=$_[1];undef}1;
+CONFIG_TINY
+
+$fatpacked{"Devel/InnerPackage.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'DEVEL_INNERPACKAGE';
+ package Devel::InnerPackage;use strict;use Exporter 5.57 'import';use vars qw($VERSION @EXPORT_OK);use if $] > 5.017,'deprecate';$VERSION='0.4';@EXPORT_OK=qw(list_packages);sub list_packages {my$pack=shift;$pack .= "::" unless$pack =~ m!::$!;no strict 'refs';my@packs;my@stuff=grep!/^(main|)::$/,keys %{$pack};for my$cand (grep /::$/,@stuff){$cand =~ s!::$!!;my@children=list_packages($pack.$cand);push@packs,"$pack$cand" unless$cand =~ /^::/ || !__PACKAGE__->_loaded($pack.$cand);push@packs,@children}return grep {$_ !~ /::(::ISA::CACHE|SUPER)/}@packs}sub _loaded {my ($class,$name)=@_;no strict 'refs';return 1 if defined ${"${name}::VERSION"};return 1 if @{"${name}::ISA"};for (keys %{"${name}::"}){next if substr($_,-2,2)eq '::';return 1 if defined &{"${name}::$_"}}my$filename=join('/',split /(?:'|::)/,$name).'.pm';return 1 if defined$INC{$filename};''}1;
+DEVEL_INNERPACKAGE
+
+$fatpacked{"Math/Calc/Units.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS';
+ package Math::Calc::Units;use Math::Calc::Units::Compute qw(compute);use Math::Calc::Units::Rank qw(render render_unit choose_juicy_ones);use Math::Calc::Units::Convert;use base 'Exporter';use vars qw($VERSION @EXPORT_OK);BEGIN {$VERSION='1.07';@EXPORT_OK=qw(calc readable convert equal exact)}use strict;sub calc ($;$) {my ($expr,$exact)=@_;my$v=compute($expr);return$exact ? ($v->[0],render_unit($v->[1])): render($v)}sub readable {my$expr=shift;my%options;if (@_==1){$options{verbose}=shift}else {%options=@_}my$v=compute($expr);return map {render($_,\%options)}choose_juicy_ones($v,\%options)}sub convert ($$;$) {my ($expr,$units,$exact)=@_;my$v=compute($expr);my$u=compute("# $units");my$c=Math::Calc::Units::Convert::convert($v,$u->[1]);return$exact ? ($c->[0],render_unit($c->[1])): render($c)}use constant EPSILON=>1e-12;sub equal {my ($u,$v)=@_;$u=compute($u);$v=compute($v);$v=Math::Calc::Units::Convert::convert($v,$u->[1]);$u=$u->[0];$v=$v->[0];return 1 if ($u==0)&& abs($v)< EPSILON;return abs(($u-$v)/$u)< EPSILON}if (!(caller)){my$verbose;my%options;if ($ARGV[0]eq '-v'){shift;$options{verbose}=1}if ($ARGV[0]eq '-a'){shift;$options{abbreviate}=1}print "$_\n" foreach readable($ARGV[0],%options)}1;
+MATH_CALC_UNITS
+
+$fatpacked{"Math/Calc/Units/Compute.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS_COMPUTE';
+ package Math::Calc::Units::Compute;use base 'Exporter';use vars qw(@EXPORT_OK);@EXPORT_OK=qw(compute plus minus mult divide power unit_mult unit_divide unit_power construct);use strict;use Math::Calc::Units::Convert qw(reduce);use Math::Calc::Units::Rank qw(render_unit);use Math::Calc::Units::Convert::Base;require Math::Calc::Units::Grammar;sub equivalent {my ($u,$v)=@_;return Math::Calc::Units::Convert::Base->same($u,$v)}sub is_unit {my ($x,$unit)=@_;return equivalent($x,{$unit=>1 })}sub plus {my ($u,$v)=@_;$u=reduce($u);$v=reduce($v);if (equivalent($u->[1],$v->[1])){return [$u->[0]+ $v->[0],$u->[1]]}elsif (is_unit($u->[1],'timestamp')&& is_unit($v->[1],'sec')){return [$u->[0]+ $v->[0],$u->[1]]}elsif (is_unit($u->[1],'sec')&& is_unit($v->[1],'timestamp')){return [$u->[0]+ $v->[0],$v->[1]]}die "Unable to add incompatible units `".render_unit($u->[1])."' and `".render_unit($v->[1])."'"}sub minus {my ($u,$v)=@_;$u=reduce($u);$v=reduce($v);if (is_unit($u->[1],'timestamp')&& is_unit($v->[1],'timestamp')){return [$u->[0]- $v->[0],{sec=>1 }]}elsif (equivalent($u->[1],$v->[1])){return [$u->[0]- $v->[0],$u->[1]]}elsif (is_unit($u->[1],'timestamp')&& is_unit($v->[1],'sec')){return [$u->[0]- $v->[0],$u->[1]]}die "Unable to subtract incompatible units `".render_unit($u->[1])."' and `".render_unit($v->[1])."'"}sub mult {my ($u,$v)=@_;return [$u->[0]* $v->[0],unit_mult($u->[1],$v->[1])]}sub divide {my ($u,$v)=@_;return [$u->[0]/ $v->[0],unit_divide($u->[1],$v->[1])]}sub power {my ($u,$v)=@_;die "Can only raise to unit-less powers" if keys %{$v->[1]};$u=reduce($u);if (keys %{$u->[1]}!=0){my$power=$v->[0];die "Can only raise a value with units to an integral power" if abs($power - int($power))> 1e-20;return [$u->[0]** $power,unit_power($u->[1],$power)]}return [$u->[0]** $v->[0],{}]}sub unit_mult {my ($u,$v,$mult)=@_;$mult ||= 1;while (my ($unit,$vp)=each %$v){$u->{$unit}+= $vp * $mult;delete$u->{$unit}if$u->{$unit}==0}return$u}sub unit_divide {my ($u,$v)=@_;return unit_mult($u,$v,-1)}sub unit_power {my ($u,$power)=@_;return {}if$power==0;$u->{$_}*= $power foreach (keys %$u);return$u}sub construct {my$s=shift;my ($constructor,$args)=$s =~ /^(\w+)\((.*)\)/;return Math::Calc::Units::Convert::construct($constructor,$args)}package Math::Calc::Units::Compute;sub tokenize {my$data=shift;my@tokens=$data =~ m{\s*
+ (
+ \w+\([^\(\)]*\) # constructed (eg date(2001...))
+ |[\d.]+ # Numbers
+ |\w+ # Words
+ |\*\* # Exponentiation (**)
+ |[-+*/()@] # Operators
+ )}xg;my@types=map {/\w\(/ ? 'CONSTRUCT' :(/\d/ ? 'NUMBER' :(/\w/ ? 'WORD' :($_)))}@tokens;return \@tokens,\@types}sub compute {my$expr=shift;my$canonicalize=$expr !~ /^\#/;my ($vals,$types)=tokenize($expr);my$lexer=sub {return shift(@$types),shift(@$vals)if (@$types);return ('',undef)};my$parser=new Math::Calc::Units::Grammar;my$v=$parser->YYParse(yylex=>$lexer,yyerror=>sub {my$parser=shift;die "Error: expected ".join(" ",$parser->YYExpect)." got `".$parser->YYCurtok."', rest=".join(" ",@$types)."\nfrom ".join(" ",@$vals)."\n"},yydebug=>0);return$canonicalize ? reduce($v): $v};1;
+MATH_CALC_UNITS_COMPUTE
+
+$fatpacked{"Math/Calc/Units/Convert.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS_CONVERT';
+ package Math::Calc::Units::Convert;use base 'Exporter';use strict;use vars qw(@EXPORT_OK);BEGIN {@EXPORT_OK=qw(convert reduce canonical find_top construct)};use Math::Calc::Units::Convert::Multi qw(to_canonical);sub convert {my ($from,$unit)=@_;my$to=[1,$unit ];my$canon_from=canonical($from);my$canon_to=canonical($to);die "conversion between incompatible units" if not same_units($canon_from->[1],$canon_to->[1]);return [$canon_from->[0]/ $canon_to->[0],$unit ]}sub same_units {my ($u1,$u2)=@_;return if keys %$u1!=keys %$u2;while (my ($bu1,$bp1)=each %$u1){return if!exists$u2->{$bu1};return if$bp1!=$u2->{$bu1}}return 1}sub canonical {my ($v)=@_;my$c=to_canonical($v->[1]);my$w=[$v->[0]* $c->[0],$c->[1]];return$w}sub reduce {my ($v)=@_;return canonical($v,'reduce, please')}sub construct {my ($constructor,$args)=@_;return Math::Calc::Units::Convert::Multi::construct($constructor,$args)}1;
+MATH_CALC_UNITS_CONVERT
+
+$fatpacked{"Math/Calc/Units/Convert/Base.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS_CONVERT_BASE';
+ package Math::Calc::Units::Convert::Base;use strict;sub major_pref {return 0}sub major_variants {my ($self,$unit)=@_;return$unit}sub singular {my$self=shift;local $_=shift;return $_ unless /s$/;return $1 if /^(.*[^e])s$/;return $1 if /^(.*(ch|sh))es$/;return $1 if /^(.*[aeiou][^aeiou]e)s$/;chop;return $_}sub unit_map {return {}}sub variants {my ($self,$base)=@_;my$map=$self->unit_map();return ($base,keys %$map)}sub same {my ($self,$u,$v)=@_;return 0 if keys %$u!=keys %$v;while (my ($name,$power)=each %$u){return 0 if!exists$v->{$name};return 0 if$v->{$name}!=$power}return 1}sub simple_convert {my ($self,$from,$to)=@_;return 1 if$from eq $to;my$map=$self->unit_map();my$w=$map->{$from}|| $map->{lc($from)};if (!$w){$from=$self->singular($from);$w=$map->{$from}|| $map->{lc($from)}}return if!$w;if ($w->[1]ne $to){my$submult=$self->simple_convert($w->[1],$to);return if!defined$submult;return$w->[0]* $submult}else {return$w->[0]}}sub to_canonical {my ($self,$unitName)=@_;my$canon=$self->canonical_unit();if ($canon){my$mult=$self->simple_convert($unitName,$canon);return if!defined$mult;return ($mult,$canon)}else {return (1,$self->singular($unitName))}}sub canonical_unit {return}sub abbreviated_canonical_unit {my ($self)=@_;return$self->canonical_unit}my$THRESHOLD=0.01;sub spread {my ($self,$mag,$base,$start,$units)=@_;die if$mag < 0;return [0,$base ]if$mag==0;my$orig=$mag;my@desc;my$started=0;for my$unit (@$units){$started=1 if$unit eq $start;next unless$started;last if ($mag / $orig)< $THRESHOLD;my$mult=$self->simple_convert($unit,$base);my$n=int($mag / $mult);next if$n==0;$mag -= $n * $mult;push@desc,[$n,$unit ]}return@desc}sub range_score {my ($self,$val,$unitName)=@_;my$ranges=$self->get_ranges();my$range=$ranges->{$unitName}|| $ranges->{default};if ($val >= $range->[0]){if (!defined$range->[1]|| ($val <= $range->[1])){return 1}}$val=_sillylog($val);my$r0=_sillylog($range->[0]);my$r1;if (defined$range->[1]){$r1=_sillylog($range->[1])}else {$r1=4}my$width=$r1 - $r0;my$mean=($r0 + $r1)/ 2;my$stddev=$width / 2;my$n=($val - $mean)/ $stddev;our$mulconst;$mulconst ||= 0.999 * exp(1/8);return 0.001 + $mulconst * exp(-$n**2/2)}sub _sillylog {my$x=shift;return log($x)if$x;return log(1e-50)}sub pref_score {my ($self,$unitName)=@_;my$prefs=$self->get_prefs();my$specific=$prefs->{$unitName};return defined($specific)? $specific : $prefs->{default}}sub get_prefs {return {default=>0.1 }}sub get_ranges {return {default=>[1,undef ]}}sub render_unit {my ($self,$name,$power,$options)=@_;if ($power==1){return$name}else {return "$name**$power"}}sub render {my ($self,$val,$name,$power,$options)=@_;return sprintf("%.5g ",$val).$self->render_unit($name,$power,$options)}sub construct {return}1;
+MATH_CALC_UNITS_CONVERT_BASE
+
+$fatpacked{"Math/Calc/Units/Convert/Base2Metric.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS_CONVERT_BASE2METRIC';
+ package Math::Calc::Units::Convert::Base2Metric;use base 'Math::Calc::Units::Convert::Metric';use strict;use vars qw(%metric_base2 %abbrev $metric_prefix_test %pref);%metric_base2=(kilo=>2**10,mega=>2**20,giga=>2**30,tera=>2**40,peta=>2**50,exa=>2**60,);%abbrev=(k=>'kilo',m=>'mega',g=>'giga',t=>'tera',p=>'peta',e=>'exa',);%pref=(unit=>1.0,kilo=>0.8,mega=>0.8,giga=>0.8,tera=>0.7,peta=>0.6,exa=>0.3,);sub get_metric {my ($self,$what)=@_;return$metric_base2{$what}}sub get_abbrev {my ($self,$what)=@_;return$abbrev{$what}|| $abbrev{lc($what)}}$metric_prefix_test=qr/^(${\join("|",keys %metric_base2)})/i;sub get_prefix {my ($self,$what)=@_;if ($what =~ $metric_prefix_test){return $1}else {return}}sub prefix_pref {my ($self,$prefix)=@_;return$pref{lc($prefix)}|| $pref{unit}}sub get_prefixes {return keys%metric_base2}sub expand {my ($self,$char)=@_;return$self->get_abbrev($char)}1;
+MATH_CALC_UNITS_CONVERT_BASE2METRIC
+
+$fatpacked{"Math/Calc/Units/Convert/Byte.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS_CONVERT_BYTE';
+ package Math::Calc::Units::Convert::Byte;use base 'Math::Calc::Units::Convert::Base2Metric';use strict;my%units=(bit=>[1/8,'byte' ]);my%pref=(bit=>0.1,default=>1);my%ranges=(default=>[1,999 ]);my%total_unit_map;sub major_pref {return 1}sub major_variants {my ($self)=@_;return$self->variants('byte')}sub get_ranges {return \%ranges}sub get_prefs {return \%pref}sub unit_map {my ($self)=@_;if (keys%total_unit_map==0){%total_unit_map=(%{$self->SUPER::unit_map()},%units)}return \%total_unit_map}sub canonical_unit {return 'byte'}sub abbreviated_canonical_unit {return 'B'}sub simple_convert {my ($self,$from,$to)=@_;return 1 if$from =~ /^b(yte(s?))?$/i;if (my$easy=$self->SUPER::simple_convert($from,$to)){return$easy}if ($from =~ /^(.)b(yte(s?))?$/i){if (my ($prefix)=$self->expand($1)){return$self->simple_convert($prefix ."byte",$to)}}return}1;
+MATH_CALC_UNITS_CONVERT_BYTE
+
+$fatpacked{"Math/Calc/Units/Convert/Combo.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS_CONVERT_COMBO';
+ package Math::Calc::Units::Convert::Combo;use base 'Math::Calc::Units::Convert::Base2Metric';use strict;use vars qw(%units %metric_units %prefixable_metric_units %total_unit_map);use vars qw(%ranges %pref);%units=();%metric_units=();%prefixable_metric_units=(bps=>[1,{bit=>1,sec=>-1 }]);%ranges=(default=>[1,999 ]);%pref=(default=>1);sub canonical_unit {return}sub unit_map {my ($self)=@_;if (keys%total_unit_map==0){%total_unit_map=(%{$self->SUPER::unit_map()},%units,%metric_units,%prefixable_metric_units)}return \%total_unit_map}sub singular {my ($self,$unit)=@_;return$self->SUPER::singular($unit)unless$unit =~ /bps$/;return$unit}sub demetric {my ($self,$string)=@_;if (my$prefix=$self->get_prefix($string)){my$tail=lc($self->singular(substr($string,length($prefix))));if ($metric_units{$tail}){return ($self->get_metric($prefix),$tail)}}elsif (my$abbrev=$self->get_abbrev_prefix($string)){my$tail=lc($self->singular(substr($string,length($abbrev))));if ($prefixable_metric_units{$tail}){my$prefix=$self->get_abbrev($abbrev);return ($self->get_metric($prefix),$tail)}}return (1,$string)}sub to_canonical {return}sub lookup_compound {my ($self,$unitName)=@_;for (keys%units,keys%metric_units,keys%prefixable_metric_units){if (my$mult=$self->simple_convert($unitName,$_)){my$u=$units{$_}|| $metric_units{$_}|| $prefixable_metric_units{$_};return [$mult * $u->[0],$u->[1]]}}return}sub get_ranges {return \%ranges}sub get_prefs {return \%pref}1;
+MATH_CALC_UNITS_CONVERT_COMBO
+
+$fatpacked{"Math/Calc/Units/Convert/Date.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS_CONVERT_DATE';
+ package Math::Calc::Units::Convert::Date;use base 'Math::Calc::Units::Convert::Base';use Time::Local qw(timegm);use strict;use vars qw(%units %pref %ranges %total_unit_map);my$min_nice_time=timegm(0,0,0,1,0,1975-1900);my$max_nice_time=timegm(0,0,0,1,0,2030-1900);%units=();%pref=(default=>1);%ranges=(timestamp=>[$min_nice_time,$max_nice_time ]);sub major_pref {return 2}sub canonical_unit {return 'timestamp'}sub unit_map {my ($self)=@_;if (keys%total_unit_map==0){%total_unit_map=(%{$self->SUPER::unit_map()},%units)}return \%total_unit_map}sub get_ranges {return \%ranges}sub get_prefs {return \%pref}use vars qw(@MonthNames);BEGIN {@MonthNames=qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)}sub construct {my ($self,$constructor,$args)=@_;if ($constructor eq 'timestamp'){$args=time if$args eq '';return [$args,{'timestamp'=>1 }]}return unless$constructor eq 'date';$args =~ s/\s+GMT\s+$//;my ($Mon,$d,$y,$h,$m,$s,$tz,$M);$tz='GMT';if ($args =~ /^((?:\w\w\w\s+)?)
+ (\w\w\w)\s*
+ (\d+)\s+
+ (\d+):(\d+)[:.](\d+)\s+
+ (\w+)?\s*
+ (\d\d\d\d)$/x){(undef,$Mon,$d,$h,$m,$s,$tz,$y)=($1,$2,$3,$4,$5,$6,$7,$8)}elsif ($args =~ /^(\w\w\w)[\s-]*
+ (\d+)[,\s-]+
+ (\d\d\d\d)$/x){($Mon,$d,$y)=($1,$2,$3)}elsif ($args =~ /^(\d\d\d\d)-(\d+)-(\d+)\s+
+ (\d+):(\d+)[:.](\d+)$/x){($y,$M,$d,$h,$m,$s)=($1,$2,$3,$4,$5,$6);$M--}elsif ($args =~ /^(\d\d\d\d)-(\d+)-(\d+)$/){($y,$M,$d)=($1,$2,$3);$M--}else {die "Unparseable date string '$args'"}$h ||= 0;$m ||= 0;$s ||= 0;if (defined$Mon){$M=0;for (@MonthNames){last if lc($_)eq lc($Mon);$M++}die "Unparseable month '$Mon'" if$M > 11}if (defined($tz)&& $tz ne 'GMT'){warn "Timezones not supported. Assuming GMT.\n"}my$timestamp=timegm($s,$m,$h,$d,$M,$y-1900);die "Date '$args' is out of range" if$timestamp==-1;return [$timestamp,{'timestamp'=>1 }]}sub render {my ($self,$mag,$name,$power)=@_;return "\@$mag" if$power!=1;return "\@$mag" if$mag < $min_nice_time;return "\@$mag" if$mag > $max_nice_time;return gmtime($mag)." (\@$mag)"}1;
+MATH_CALC_UNITS_CONVERT_DATE
+
+$fatpacked{"Math/Calc/Units/Convert/Distance.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS_CONVERT_DISTANCE';
+ package Math::Calc::Units::Convert::Distance;use base 'Math::Calc::Units::Convert::Metric';use strict;my%total_unit_map;my%ranges=(default=>[1,999 ]);my%distance_units=(inch=>[2.54,'centimeter' ],foot=>[12,'inch' ],yard=>[3,'foot' ],mile=>[5280,'foot' ],);my%distance_pref=(meter=>1.1,inch=>0.7,foot=>0.9,yard=>0,mile=>1.0,);my%aliases=('feet'=>'foot',);sub canonical_unit {return 'meter'}sub abbreviated_canonical_unit {return 'm'}sub major_pref {return 1}sub major_variants {my ($self)=@_;return$self->variants('meter')}sub get_ranges {return \%ranges}sub get_prefs {return \%distance_pref}sub singular {my ($self,$unit)=@_;$unit=$self->SUPER::singular($unit);return$aliases{$unit}|| $unit}sub unit_map {my ($self)=@_;if (keys%total_unit_map==0){%total_unit_map=(%{$self->SUPER::unit_map()},%distance_units)}return \%total_unit_map}sub simple_convert {my ($self,$from,$to)=@_;return 1 if$from =~ /^m(eter(s?))?$/i;if (my$easy=$self->SUPER::simple_convert($from,$to)){return$easy}if ($from =~ /^(.)m(eter(s?))?$/i){if (my ($prefix)=$self->expand($1)){return$self->simple_convert($prefix ."meter",$to)}}return}sub variants {my ($self,$base)=@_;my$canon=$self->canonical_unit();return ($base,keys %{$self->unit_map()},map {"$_$canon"}$self->get_prefixes())}1;
+MATH_CALC_UNITS_CONVERT_DISTANCE
+
+$fatpacked{"Math/Calc/Units/Convert/Metric.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS_CONVERT_METRIC';
+ package Math::Calc::Units::Convert::Metric;use base 'Math::Calc::Units::Convert::Base';use strict;use vars qw(%niceSmallMetric %metric %pref %abbrev %reverse_abbrev $metric_prefix_test);%niceSmallMetric=(milli=>1e-3,micro=>1e-6,nano=>1e-9,pico=>1e-12,femto=>1e-15,);%metric=(kilo=>1e3,mega=>1e6,giga=>1e9,tera=>1e12,peta=>1e15,exa=>1e18,centi=>1e-2,%niceSmallMetric,);%pref=(unit=>1.0,kilo=>0.8,mega=>0.8,giga=>0.8,tera=>0.7,peta=>0.6,exa=>0.3,centi=>0.1,milli=>0.8,micro=>0.8,nano=>0.6,pico=>0.4,femto=>0.3,);%abbrev=(k=>'kilo',M=>'mega',G=>'giga',T=>'tera',P=>'peta',E=>'exa',c=>'centi',m=>'milli',u=>'micro',n=>'nano',p=>'pico',f=>'femto',);%reverse_abbrev=reverse%abbrev;sub pref_score {my ($self,$unitName)=@_;my$prefix=$self->get_prefix($unitName);$unitName=substr($unitName,length($prefix || ""));my$prefix_pref=defined($prefix)? $self->prefix_pref($prefix): 1;return$prefix_pref * $self->SUPER::pref_score($unitName)}sub get_metric {my ($self,$what)=@_;return$metric{$what}}sub get_abbrev {my ($self,$what)=@_;return$abbrev{$what}}$metric_prefix_test=qr/^(${\join("|",keys %metric)})/i;sub get_prefix {my ($self,$what)=@_;if ($what =~ $metric_prefix_test){return $1}else {return}}sub get_prefixes {my ($self,$options)=@_;if ($options->{small}){return grep {$metric{$_}< 1}keys%metric}else {return keys%metric}}sub get_abbrev_prefix {my ($self,$what)=@_;my$prefix=substr($what,0,1);if ($abbrev{$prefix}|| $abbrev{lc($prefix)}){return$prefix}else {return}}sub variants {my ($self,$base)=@_;my@main=$self->SUPER::variants($base);my@variants;for my$u (@main){push@variants,$u,map {"$_$u"}$self->get_prefixes()}return@variants}sub prefix_pref {my ($self,$prefix)=@_;return$pref{lc($prefix)}|| $pref{unit}}sub demetric {my ($self,$string)=@_;if (my$prefix=$self->get_prefix($string)){my$base=substr($string,length($prefix));return ($self->get_metric($prefix),$base)}else {return (1,$string)}}sub expand {my ($self,$char)=@_;my@expansions;my ($exact,$lower);if ($exact=$self->get_abbrev($char)){push@expansions,$exact}elsif (($char ne lc($char))&& ($lower=$self->get_abbrev(lc($char)))){push@expansions,$lower}return@expansions}sub simple_convert {my ($self,$from,$to)=@_;my ($mult_from,$base_from)=$self->demetric($from)or return;my ($mult_to,$base_to)=$self->demetric($to)or return;my$submult=$self->SUPER::simple_convert($base_from,$base_to);return if!defined$submult;return$submult * ($mult_from / $mult_to)}sub metric_abbreviation {my ($self,$prefix)=@_;return$reverse_abbrev{$prefix}|| $prefix}sub render {my ($self,$val,$name,$power,$options)=@_;if ($options->{abbreviate}){my$stem=$self->canonical_unit;if ($name =~ /(\w+)\Q$stem\E$/){my$prefix=$reverse_abbrev{$1};if (defined($prefix)){$name=$prefix .$self->abbreviated_canonical_unit}}}return$self->SUPER::render($val,$name,$power,$options)}1;
+MATH_CALC_UNITS_CONVERT_METRIC
+
+$fatpacked{"Math/Calc/Units/Convert/Multi.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS_CONVERT_MULTI';
+ package Math::Calc::Units::Convert::Multi;use base 'Exporter';use vars qw(@EXPORT_OK);BEGIN {@EXPORT_OK=qw(to_canonical simple_convert singular variants major_variants major_pref range_score pref_score get_class construct)};require Math::Calc::Units::Convert::Time;require Math::Calc::Units::Convert::Byte;require Math::Calc::Units::Convert::Date;require Math::Calc::Units::Convert::Distance;require Math::Calc::Units::Convert::Combo;use strict;use vars qw(@UnitClasses);@UnitClasses=qw(Math::Calc::Units::Convert::Time Math::Calc::Units::Convert::Byte Math::Calc::Units::Convert::Date Math::Calc::Units::Convert::Distance Math::Calc::Units::Convert::Combo);sub to_canonical {my ($unit)=@_;my$val=1;my%newUnit;while (my ($unitName,$power)=each %$unit){my ($mult,$canon)=name_to_canonical($unitName);$val *= $mult ** $power;if (ref$canon){my$c=to_canonical($canon);$val *= $c->[0]** $power;while (my ($name,$subPower)=each %{$c->[1]}){if (($newUnit{$name}+= $subPower * $power)==0){delete$newUnit{$name}}}}else {if (($newUnit{$canon}+= $power)==0){delete$newUnit{$canon}}}}return [$val,\%newUnit ]}my%CANON_CACHE;sub name_to_canonical {my$unitName=shift;$CANON_CACHE{$unitName}||= [_name_to_canonical($unitName)];return @{$CANON_CACHE{$unitName}}}sub _name_to_canonical {my ($unitName)=@_;if (my$v=Math::Calc::Units::Convert::Combo->lookup_compound($unitName)){return @$v}for my$uclass (@UnitClasses){if (my ($val,$base)=$uclass->to_canonical($unitName)){return ($val,$base)}}return Math::Calc::Units::Convert::Base->to_canonical($unitName)}sub get_class {my ($unitName)=@_;my (undef,$canon)=name_to_canonical($unitName);for my$uclass (@UnitClasses){my$canon_unit=$uclass->canonical_unit();next if!defined$canon_unit;return$uclass if$canon_unit eq $canon}return 'Math::Calc::Units::Convert::Base'}sub simple_convert {my ($u,$v)=@_;for my$uclass (@UnitClasses){my$c;return$c if$c=$uclass->simple_convert($u,$v)}return}sub singular {my ($unitName)=@_;return get_class($unitName)->singular($unitName)}sub variants {my ($base)=@_;return get_class($base)->variants($base)}sub major_variants {my ($base)=@_;return get_class($base)->major_variants($base)}sub major_pref {my ($base)=@_;return get_class($base)->major_pref($base)}sub range_score {my ($val,$unitName)=@_;die if ref$unitName;return get_class($unitName)->range_score($val,$unitName)}sub pref_score {my ($unitName)=@_;die if ref$unitName;return get_class($unitName)->pref_score($unitName)}sub construct {my ($constructor,$args)=@_;for my$uclass (@UnitClasses){my$c;return$c if$c=$uclass->construct($constructor,$args)}return}1;
+MATH_CALC_UNITS_CONVERT_MULTI
+
+$fatpacked{"Math/Calc/Units/Convert/Time.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS_CONVERT_TIME';
+ package Math::Calc::Units::Convert::Time;use base 'Math::Calc::Units::Convert::Metric';use strict;use vars qw(%units %pref %ranges %total_unit_map);%units=(minute=>[60,'sec' ],hour=>[60,'minute' ],day=>[24,'hour' ],week=>[7,'day' ],year=>[365,'day' ],);%pref=(default=>1,hour=>0.8,day=>0.8,week=>0.4,minute=>0.9,year=>0.9,);%ranges=(default=>[1,300 ],millisec=>[1,999 ],sec=>[1,200 ],minute=>[2,100 ],hour=>[1,80 ],day=>[1,500 ],week=>[1,4 ],year=>[1,undef ],);sub major_pref {return 2}sub major_variants {my ($self)=@_;return grep {($_ ne 'default')&& ($_ ne 'week')}keys%ranges}sub variants {my ($self,$base)=@_;return 'sec',(keys%units),map {"${_}sec"}$self->get_prefixes({small=>1 })}sub unit_map {my ($self)=@_;if (keys%total_unit_map==0){%total_unit_map=(%{$self->SUPER::unit_map()},%units)}return \%total_unit_map}sub canonical_unit {return 'sec'}sub abbreviated_canonical_unit {return 's'}sub demetric {my ($self,$string)=@_;if (my$prefix=$self->get_prefix($string)){my$tail=substr($string,length($prefix));if ($tail =~ /^sec(ond)?s?$/){return ($self->get_metric($prefix),"sec")}return}else {return (1,$string)}}sub simple_convert {my ($self,$from,$to)=@_;$from="sec" if$from =~ /^sec(ond)?s?$/i;$from="minute" if$from =~ /^min(ute)?s?$/i;if (my$easy=$self->SUPER::simple_convert($from,$to)){return$easy}if ($from =~ /^(.)s$/){my ($expansion)=$self->expand($1);return$self->simple_convert($expansion ."sec",$to)}return}sub preference {my ($self,$v)=@_;my ($val,$unit)=@$v;my$base=lc(($self->demetric($unit))[1]);my$pref=$pref{$base}|| $pref{default};return$pref * $self->prefix_pref(substr($unit,0,-length($base)))}sub get_ranges {return \%ranges}sub get_prefs {return \%pref}my@BREAKDOWN=qw(year week day hour minute sec ms us ns ps);sub render {my ($self,$val,$name,$power,$options)=@_;my$full_name=$name;if ($options->{abbreviate}){if ($name =~ /(\w+)sec/){my$prefix=$1;my$mabbrev=$self->metric_abbreviation($prefix);$name=$mabbrev ."s" unless$mabbrev eq $prefix}}my$basic=$self->SUPER::render($val,$name,$power,$options);return$basic if$power!=1;$val *= $self->simple_convert($full_name,'sec');my@spread=$self->spread($val,'sec',$name,\@BREAKDOWN);my$spread=join(" ",map {"$_->[0] $_->[1]"}@spread);return "($basic = $spread)" if@spread > 1;return$basic}1;
+MATH_CALC_UNITS_CONVERT_TIME
+
+$fatpacked{"Math/Calc/Units/Grammar.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS_GRAMMAR';
+ package Math::Calc::Units::Grammar;use vars qw ( @ISA);use strict;@ISA=qw ( Parse::Yapp::Driver);{package Parse::Yapp::Driver;require 5.004;use strict;use vars qw ( $VERSION $COMPATIBLE $FILENAME);$VERSION='1.04';$COMPATIBLE='0.07';$FILENAME=__FILE__;use Carp;my(%params)=(YYLEX=>'CODE','YYERROR'=>'CODE',YYVERSION=>'',YYRULES=>'ARRAY',YYSTATES=>'ARRAY',YYDEBUG=>'');my(@params)=('LEX','RULES','STATES');sub new {my($class)=shift;my($errst,$nberr,$token,$value,$check,$dotpos);my($self)={ERROR=>\&_Error,ERRST=>\$errst,NBERR=>\$nberr,TOKEN=>\$token,VALUE=>\$value,DOTPOS=>\$dotpos,STACK=>[],DEBUG=>0,CHECK=>\$check };_CheckParams([],\%params,\@_,$self);exists($$self{VERSION})and $$self{VERSION}< $COMPATIBLE and croak "Yapp driver version $VERSION "."incompatible with version $$self{VERSION}:\n"."Please recompile parser module.";ref($class)and $class=ref($class);bless($self,$class)}sub YYParse {my($self)=shift;my($retval);_CheckParams(\@params,\%params,\@_,$self);if($$self{DEBUG}){_DBLoad();$retval=eval '$self->_DBParse()';$@ and die $@}else {$retval=$self->_Parse()}$retval}sub YYData {my($self)=shift;exists($$self{USER})or $$self{USER}={};$$self{USER}}sub YYErrok {my($self)=shift;${$$self{ERRST}}=0;undef}sub YYNberr {my($self)=shift;${$$self{NBERR}}}sub YYRecovering {my($self)=shift;${$$self{ERRST}}!=0}sub YYAbort {my($self)=shift;${$$self{CHECK}}='ABORT';undef}sub YYAccept {my($self)=shift;${$$self{CHECK}}='ACCEPT';undef}sub YYError {my($self)=shift;${$$self{CHECK}}='ERROR';undef}sub YYSemval {my($self)=shift;my($index)=$_[0]- ${$$self{DOTPOS}}- 1;$index < 0 and -$index <= @{$$self{STACK}}and return $$self{STACK}[$index][1];undef}sub YYCurtok {my($self)=shift;@_ and ${$$self{TOKEN}}=$_[0];${$$self{TOKEN}}}sub YYCurval {my($self)=shift;@_ and ${$$self{VALUE}}=$_[0];${$$self{VALUE}}}sub YYExpect {my($self)=shift;keys %{$self->{STATES}[$self->{STACK}[-1][0]]{ACTIONS}}}sub YYLexer {my($self)=shift;$$self{LEX}}sub _CheckParams {my($mandatory,$checklist,$inarray,$outhash)=@_;my($prm,$value);my($prmlst)={};while(($prm,$value)=splice(@$inarray,0,2)){$prm=uc($prm);exists($$checklist{$prm})or croak("Unknow parameter '$prm'");ref($value)eq $$checklist{$prm}or croak("Invalid value for parameter '$prm'");$prm=unpack('@2A*',$prm);$$outhash{$prm}=$value}for (@$mandatory){exists($$outhash{$_})or croak("Missing mandatory parameter '".lc($_)."'")}}sub _Error {print "Parse error.\n"}sub _DBLoad {{no strict 'refs';exists(${__PACKAGE__.'::'}{_DBParse})and return}my($fname)=__FILE__;my(@drv);open(DRV,"<$fname")or die "Report this as a BUG: Cannot open $fname";while(<DRV>){/^\s*sub\s+_Parse\s*{\s*$/ .. /^\s*}\s*#\s*_Parse\s*$/ and do {s/^#DBG>//;push(@drv,$_)}}close(DRV);$drv[0]=~s/_P/_DBP/;eval join('',@drv)}sub _Parse {my($self)=shift;my($rules,$states,$lex,$error)=@$self{'RULES','STATES','LEX','ERROR' };my($errstatus,$nberror,$token,$value,$stack,$check,$dotpos)=@$self{'ERRST','NBERR','TOKEN','VALUE','STACK','CHECK','DOTPOS' };$$errstatus=0;$$nberror=0;($$token,$$value)=(undef,undef);@$stack=([0,undef ]);$$check='';while(1){my($actions,$act,$stateno);$stateno=$$stack[-1][0];$actions=$$states[$stateno];if (exists($$actions{ACTIONS})){defined($$token)or do {($$token,$$value)=&$lex($self)};$act=exists($$actions{ACTIONS}{$$token})? $$actions{ACTIONS}{$$token}: exists($$actions{DEFAULT})? $$actions{DEFAULT}: undef}else {$act=$$actions{DEFAULT}}defined($act)and do {$act > 0 and do {$$errstatus and do {--$$errstatus};push(@$stack,[$act,$$value ]);$$token ne '' and $$token=$$value=undef;next};my($lhs,$len,$code,@sempar,$semval);($lhs,$len,$code)=@{$$rules[-$act]};$act or $self->YYAccept();$$dotpos=$len;unpack('A1',$lhs)eq '@' and do {$lhs =~ /^\@[0-9]+\-([0-9]+)$/ or die "In line rule name '$lhs' ill formed: "."report it as a BUG.\n";$$dotpos=$1};@sempar=$$dotpos ? map {$$_[1]}@$stack[-$$dotpos .. -1 ]: ();$semval=$code ? &$code($self,@sempar): @sempar ? $sempar[0]: undef;splice(@$stack,-$len,$len);$$check eq 'ACCEPT' and do {return($semval)};$$check eq 'ABORT' and do {return(undef)};$$check eq 'ERROR' or do {push(@$stack,[$$states[$$stack[-1][0]]{GOTOS}{$lhs},$semval ]);$$check='';next};$$check=''};$$errstatus or do {$$errstatus=1;&$error($self);$$errstatus or next;++$$nberror};$$errstatus==3 and do {$$token eq '' and do {return(undef)};$$token=$$value=undef};$$errstatus=3;while(@$stack and (not exists($$states[$$stack[-1][0]]{ACTIONS})or not exists($$states[$$stack[-1][0]]{ACTIONS}{error})or $$states[$$stack[-1][0]]{ACTIONS}{error}<= 0)){pop(@$stack)}@$stack or do {return(undef)};push(@$stack,[$$states[$$stack[-1][0]]{ACTIONS}{error},undef ])}croak("Error in driver logic. Please, report it as a BUG")}1}use Math::Calc::Units::Compute qw(plus minus mult divide power construct);sub new {my($class)=shift;ref($class)and $class=ref($class);my($self)=$class->SUPER::new(yyversion=>'1.04',yystates=>[{ACTIONS=>{'NUMBER'=>5,"#"=>2,"-"=>6,'WORD'=>7,'CONSTRUCT'=>3,"\@"=>9,"("=>4 },GOTOS=>{'unit'=>1,'value'=>8,'START'=>10,'expr'=>11 }},{DEFAULT=>-12 },{ACTIONS=>{'WORD'=>7 },GOTOS=>{'unit'=>12 }},{DEFAULT=>-16 },{ACTIONS=>{'NUMBER'=>5,"-"=>6,'WORD'=>7,'CONSTRUCT'=>3,"\@"=>9,"("=>4 },GOTOS=>{'unit'=>1,'value'=>8,'expr'=>13 }},{ACTIONS=>{'WORD'=>7 },DEFAULT=>-13,GOTOS=>{'unit'=>14 }},{ACTIONS=>{'NUMBER'=>15 }},{DEFAULT=>-17 },{DEFAULT=>-9 },{ACTIONS=>{'NUMBER'=>17 }},{ACTIONS=>{''=>18 }},{ACTIONS=>{"*"=>21,"+"=>22,"**"=>20,"-"=>23,'WORD'=>7,"/"=>24 },DEFAULT=>-1,GOTOS=>{'unit'=>19 }},{DEFAULT=>-2 },{ACTIONS=>{"*"=>21,"+"=>22,"**"=>20,"-"=>23,'WORD'=>7,"/"=>24,")"=>25 },GOTOS=>{'unit'=>19 }},{DEFAULT=>-11 },{DEFAULT=>-14 },{DEFAULT=>-18 },{DEFAULT=>-15 },{DEFAULT=>-0 },{DEFAULT=>-10 },{ACTIONS=>{'NUMBER'=>5,"-"=>6,'WORD'=>7,'CONSTRUCT'=>3,"\@"=>9,"("=>4 },GOTOS=>{'unit'=>1,'value'=>8,'expr'=>26 }},{ACTIONS=>{'NUMBER'=>5,"-"=>6,'WORD'=>7,'CONSTRUCT'=>3,"\@"=>9,"("=>4 },GOTOS=>{'unit'=>1,'value'=>8,'expr'=>27 }},{ACTIONS=>{'NUMBER'=>5,"-"=>6,'WORD'=>7,'CONSTRUCT'=>3,"\@"=>9,"("=>4 },GOTOS=>{'unit'=>1,'value'=>8,'expr'=>28 }},{ACTIONS=>{'NUMBER'=>5,"-"=>6,'WORD'=>7,'CONSTRUCT'=>3,"\@"=>9,"("=>4 },GOTOS=>{'unit'=>1,'value'=>8,'expr'=>29 }},{ACTIONS=>{'NUMBER'=>5,"-"=>6,'WORD'=>7,'CONSTRUCT'=>3,"\@"=>9,"("=>4 },GOTOS=>{'unit'=>1,'value'=>8,'expr'=>30 }},{DEFAULT=>-8 },{DEFAULT=>-7,GOTOS=>{'unit'=>19 }},{ACTIONS=>{"**"=>20,'WORD'=>7 },DEFAULT=>-5,GOTOS=>{'unit'=>19 }},{ACTIONS=>{"**"=>20,"*"=>21,'WORD'=>7,"/"=>24 },DEFAULT=>-3,GOTOS=>{'unit'=>19 }},{ACTIONS=>{"**"=>20,"*"=>21,'WORD'=>7,"/"=>24 },DEFAULT=>-4,GOTOS=>{'unit'=>19 }},{ACTIONS=>{"**"=>20,'WORD'=>7 },DEFAULT=>-6,GOTOS=>{'unit'=>19 }}],yyrules=>[['$start',2,undef ],['START',1,undef ],['START',2,undef ],['expr',3,sub {return plus($_[1],$_[3])}],['expr',3,sub {return minus($_[1],$_[3])}],['expr',3,sub {return mult($_[1],$_[3])}],['expr',3,sub {return divide($_[1],$_[3])}],['expr',3,sub {return power($_[1],$_[3])}],['expr',3,sub {return $_[2]}],['expr',1,sub {return $_[1]}],['expr',2,sub {return mult($_[1],[1,$_[2]])}],['value',2,sub {return [$_[1]=>$_[2]]}],['value',1,sub {return [1=>$_[1]]}],['value',1,sub {return [$_[1]=>{}]}],['value',2,sub {return [-$_[2]=>{}]}],['value',2,sub {return [$_[2]=>{'timestamp'=>1 }]}],['value',1,sub {return construct($_[1])}],['unit',1,sub {return {$_[1]=>1 }}],['unit',2,sub {my$u={};$u->{$_[1]}++;$u->{$_[2]}++;return$u}]],@_);bless($self,$class)}1;
+MATH_CALC_UNITS_GRAMMAR
+
+$fatpacked{"Math/Calc/Units/Rank.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MATH_CALC_UNITS_RANK';
+ package Math::Calc::Units::Rank;use base 'Exporter';use vars qw(@EXPORT_OK);BEGIN {@EXPORT_OK=qw(choose_juicy_ones render render_unit)}use Math::Calc::Units::Convert qw(convert canonical);use Math::Calc::Units::Convert::Multi qw(variants major_variants major_pref pref_score range_score get_class);use strict;sub choose_juicy_ones {my ($v,$options)=@_;my@variants=rank_variants($v,$options);my%variants;for my$variant (@variants){my$id=join(";;",values %{$variant->[0]});$variants{$id}=$variant}my@options;for my$variant (values%variants){my ($map,$score)=@$variant;my%copy;my ($magnitude,$units)=@$v;while (my ($unit,$count)=each %$units){$copy{$map->{$unit}}=$count}push@options,[$score,convert($v,\%copy)]}my@juicy;my$first;my$prev;for (sort {$b->[0]<=> $a->[0]}@options){my ($score,$val)=@$_;last if (defined$prev && ($prev / $score)> 8);last if (defined$first && ($first / $score)> 25);push@juicy,$val;$first=$score unless defined$first;$prev=$score;last if@juicy==5}return@juicy}sub rank_variants {my ($v,$options)=@_;$v=canonical($v);my ($mag,$count)=@$v;my@rangeable=grep {$count->{$_}> 0}keys %$count;if (@rangeable==0){@rangeable=keys %$count}return rank_power_variants($mag,\@rangeable,$count,$options)}sub choose_major {my (@possibilities)=@_;my@majors=map {[major_pref($_),$_ ]}@possibilities;return (sort {$a->[0]<=> $b->[0]}@majors)[-1]->[1]}sub rank_power_variants {my ($mag,$top,$power,$options)=@_;if (keys %$power > 1){my$major=choose_major(keys %$power);my$majorClass=get_class($major);my%powerless=%$power;delete$powerless{$major};my@ranked;for my$variant (major_variants($major,$options)){my$mult=$majorClass->simple_convert($variant,$major);my$cval=$mag / $mult ** $power->{$major};print "\n --- for $variant ---\n" if$options->{verbose};my@r=rank_power_variants($cval,$top,\%powerless,$options);next if@r==0;my$best=$r[0];$best->[0]->{$major}=$variant;$best->[1]=pref_score($variant);push@ranked,$best}return@ranked}if (keys %$power==0){return [{},1 ]}my$unit=(keys %$power)[0];$power=$power->{$unit};my$class=get_class($unit);my (undef,$canon)=$class->to_canonical($unit);my$mult=$class->simple_convert($unit,$canon);$mag *= $mult ** $power;my@choices;my@subtop=grep {$_ ne $canon}@$top;my$add_variant=(@subtop==@$top);for my$variant (variants($canon)){my$mult=$class->simple_convert($variant,$canon);my$minimag=$mag / $mult ** $power;my@vtop=@subtop;push@vtop,$variant if$add_variant;my$score=score($minimag,$variant,\@vtop);printf "($mag $unit) score %.6f:\t $minimag $variant\n",$score if$options->{verbose};push@choices,[$score,$variant ]}@choices=sort {$b->[0]<=> $a->[0]}@choices;return ()if@choices==0;return map {[{$unit=>$_->[1]},$_->[0]]}@choices}sub render_unit {my ($units,$options)=@_;my$str='';while (my ($name,$power)=each %$units){if ($power > 0){$str .= get_class($name)->render_unit($name,$power,$options);$str .= " "}}chop($str);my$botstr='';while (my ($name,$power)=each %$units){if ($power < 0){$botstr .= get_class($name)->render_unit($name,-$power,$options);$botstr .= " "}}chop($botstr);if ($botstr eq ''){return$str}elsif ($botstr =~ /\s/){return "$str / ($botstr)"}else {return "$str / $botstr"}}sub render {my ($v,$options)=@_;my ($mag,$units)=@$v;if (keys %$units==0){my$str=sprintf("%.4g",$mag);if (($mag < 1)&& ($mag >= 0.01)){if ($options->{abbreviate}){$str .= sprintf(" = %.4g percent",100 * $mag)}else {$str .= sprintf(" = %.4g%%",100 * $mag)}}return$str}my@top;my@bottom;while (my ($name,$power)=each %$units){if ($power > 0){push@top,$name}else {push@bottom,$name}}my$str;if (@top==1){my ($name)=@top;$str=get_class($name)->render($mag,$name,$units->{$name},$options);$str .= " "}else {$str=sprintf("%.4g ",$mag);for my$name (@top){$str .= get_class($name)->render_unit($name,$units->{$name},$options);$str .= " "}}if (@bottom > 0){my$botstr;for my$name (@bottom){$botstr .= get_class($name)->render_unit($name,-$units->{$name},$options);$botstr .= " "}chop($botstr);if (@bottom > 1){$str .= "/ ($botstr) "}else {$str .= "/ $botstr "}}chop($str);return$str}sub max_range_score {my ($mag,$units)=@_;my$score=0;for my$name (@$units){my$uscore=range_score($mag,$name);$score=$uscore if$score < $uscore}return$score}sub score {my ($mag,$unit,$top)=@_;my@rangeable=@$top ? @$top : ($unit);my$pref=pref_score($unit);my$range_score=max_range_score($mag,\@rangeable);return$pref * $range_score}1;
+MATH_CALC_UNITS_RANK
+
+$fatpacked{"Module/Implementation.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MODULE_IMPLEMENTATION';
+ package Module::Implementation;$Module::Implementation::VERSION='0.09';use strict;use warnings;use Module::Runtime 0.012 qw(require_module);use Try::Tiny;unless (exists$Module::Implementation::{VERSION}&& ${$Module::Implementation::{VERSION}}){$Module::Implementation::{VERSION}=\42}my%Implementation;sub build_loader_sub {my$caller=caller();return _build_loader($caller,@_)}sub _build_loader {my$package=shift;my%args=@_;my@implementations=@{$args{implementations}};my@symbols=@{$args{symbols}|| []};my$implementation;my$env_var=uc$package;$env_var =~ s/::/_/g;$env_var .= '_IMPLEMENTATION';return sub {my ($implementation,$loaded)=_load_implementation($package,$ENV{$env_var},\@implementations,);$Implementation{$package}=$implementation;_copy_symbols($loaded,$package,\@symbols);return$loaded}}sub implementation_for {my$package=shift;return$Implementation{$package}}sub _load_implementation {my$package=shift;my$env_value=shift;my$implementations=shift;if ($env_value){die "$env_value is not a valid implementation for $package" unless grep {$_ eq $env_value}@{$implementations};my$requested="${package}::$env_value";($requested)=$requested =~ /^(.+)$/;try {require_module($requested)}catch {require Carp;Carp::croak("Could not load $requested: $_")};return ($env_value,$requested)}else {my$err;for my$possible (@{$implementations}){my$try="${package}::$possible";my$ok;try {require_module($try);$ok=1}catch {$err .= $_ if defined $_};return ($possible,$try)if$ok}require Carp;if (defined$err && length$err){Carp::croak("Could not find a suitable $package implementation: $err")}else {Carp::croak('Module::Runtime failed to load a module but did not throw a real error. This should never happen. Something is very broken')}}}sub _copy_symbols {my$from_package=shift;my$to_package=shift;my$symbols=shift;for my$sym (@{$symbols}){my$type=$sym =~ s/^([\$\@\%\&\*])// ? $1 : '&';my$from="${from_package}::$sym";my$to="${to_package}::$sym";{no strict 'refs';no warnings 'once';*{$to}=$type eq '&' ? \&{$from}: $type eq '$' ? \${$from}: $type eq '@' ? \@{$from}: $type eq '%' ? \%{$from}: $type eq '*' ? *{$from}: die "Can't copy symbol from $from_package to $to_package: $type$sym"}}}1;
+MODULE_IMPLEMENTATION
+
+$fatpacked{"Module/Pluggable.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MODULE_PLUGGABLE';
+ package Module::Pluggable;use strict;use vars qw($VERSION $FORCE_SEARCH_ALL_PATHS);use Module::Pluggable::Object;use if $] > 5.017,'deprecate';$VERSION='5.2';$FORCE_SEARCH_ALL_PATHS=0;sub import {my$class=shift;my%opts=@_;my ($pkg,$file)=caller;my$sub=$opts{'sub_name'}|| 'plugins';my ($package)=$opts{'package'}|| $pkg;$opts{filename}=$file;$opts{package}=$package;$opts{force_search_all_paths}=$FORCE_SEARCH_ALL_PATHS unless exists$opts{force_search_all_paths};my$finder=Module::Pluggable::Object->new(%opts);my$subroutine=sub {my$self=shift;return$finder->plugins(@_)};my$searchsub=sub {my$self=shift;my ($action,@paths)=@_;$finder->{'search_path'}=["${package}::Plugin"]if ($action eq 'add' and not $finder->{'search_path'});push @{$finder->{'search_path'}},@paths if ($action eq 'add');$finder->{'search_path'}=\@paths if ($action eq 'new');return$finder->{'search_path'}};my$onlysub=sub {my ($self,$only)=@_;if (defined$only){$finder->{'only'}=$only};return$finder->{'only'}};my$exceptsub=sub {my ($self,$except)=@_;if (defined$except){$finder->{'except'}=$except};return$finder->{'except'}};no strict 'refs';no warnings qw(redefine prototype);*{"$package\::$sub"}=$subroutine;*{"$package\::search_path"}=$searchsub;*{"$package\::only"}=$onlysub;*{"$package\::except"}=$exceptsub}1;
+MODULE_PLUGGABLE
+
+$fatpacked{"Module/Pluggable/Object.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MODULE_PLUGGABLE_OBJECT';
+ package Module::Pluggable::Object;use strict;use File::Find ();use File::Basename;use File::Spec::Functions qw(splitdir catdir curdir catfile abs2rel);use Carp qw(croak carp confess);use Devel::InnerPackage;use vars qw($VERSION $MR);use if $] > 5.017,'deprecate';$VERSION='5.2';BEGIN {eval {require Module::Runtime};unless ($@){Module::Runtime->import('require_module')}else {*require_module=sub {my$module=shift;my$path=$module .".pm";$path =~ s{::}{/}g;require$path}}}sub new {my$class=shift;my%opts=@_;return bless \%opts,$class}sub plugins {my$self=shift;my@args=@_;$self->{'require'}=1 if$self->{'inner'};my$filename=$self->{'filename'};my$pkg=$self->{'package'};$self->_setup_exceptions;for (qw(search_path search_dirs)){$self->{$_}=[$self->{$_}]if exists$self->{$_}&&!ref($self->{$_})}$self->{'search_path'}||= ["${pkg}::Plugin"];$self->{'on_require_error'}||= sub {my ($plugin,$err)=@_;carp "Couldn't require $plugin : $err";return 0};$self->{'on_instantiate_error'}||= sub {my ($plugin,$err)=@_;carp "Couldn't instantiate $plugin: $err";return 0};$self->{'follow_symlinks'}=1 unless exists$self->{'follow_symlinks'};my@SEARCHDIR=exists$INC{"blib.pm"}&& defined$filename && $filename =~ m!(^|/)blib/! &&!$self->{'force_search_all_paths'}? grep {/blib/}@INC : @INC;unshift@SEARCHDIR,@{$self->{'search_dirs'}}if defined$self->{'search_dirs'};my@tmp=@INC;unshift@tmp,@{$self->{'search_dirs'}|| []};local@INC=@tmp if defined$self->{'search_dirs'};my@plugins=$self->search_directories(@SEARCHDIR);push(@plugins,$self->handle_inc_hooks($_,@SEARCHDIR))for @{$self->{'search_path'}};push(@plugins,$self->handle_innerpackages($_))for @{$self->{'search_path'}};return ()unless@plugins;my%plugins;for(@plugins){next unless$self->_is_legit($_);$plugins{$_}=1}if (defined$self->{'instantiate'}){my$method=$self->{'instantiate'};my@objs=();for my$package (sort keys%plugins){next unless$package->can($method);my$obj=eval {$package->$method(@_)};$self->{'on_instantiate_error'}->($package,$@)if $@;push@objs,$obj if$obj}return@objs}else {my@objs=sort keys%plugins;return@objs}}sub _setup_exceptions {my$self=shift;my%only;my%except;my$only;my$except;if (defined$self->{'only'}){if (ref($self->{'only'})eq 'ARRAY'){%only=map {$_=>1}@{$self->{'only'}}}elsif (ref($self->{'only'})eq 'Regexp'){$only=$self->{'only'}}elsif (ref($self->{'only'})eq ''){$only{$self->{'only'}}=1}}if (defined$self->{'except'}){if (ref($self->{'except'})eq 'ARRAY'){%except=map {$_=>1}@{$self->{'except'}}}elsif (ref($self->{'except'})eq 'Regexp'){$except=$self->{'except'}}elsif (ref($self->{'except'})eq ''){$except{$self->{'except'}}=1}}$self->{_exceptions}->{only_hash}=\%only;$self->{_exceptions}->{only}=$only;$self->{_exceptions}->{except_hash}=\%except;$self->{_exceptions}->{except}=$except}sub _is_legit {my$self=shift;my$plugin=shift;my%only=%{$self->{_exceptions}->{only_hash}||{}};my%except=%{$self->{_exceptions}->{except_hash}||{}};my$only=$self->{_exceptions}->{only};my$except=$self->{_exceptions}->{except};my$depth=()=split '::',$plugin,-1;return 0 if (keys%only &&!$only{$plugin});return 0 unless (!defined$only || $plugin =~ m!$only!);return 0 if (keys%except && $except{$plugin});return 0 if (defined$except && $plugin =~ m!$except!);return 0 if defined$self->{max_depth}&& $depth>$self->{max_depth};return 0 if defined$self->{min_depth}&& $depth<$self->{min_depth};return 1}sub search_directories {my$self=shift;my@SEARCHDIR=@_;my@plugins;for my$dir (@SEARCHDIR){push@plugins,$self->search_paths($dir)}return@plugins}sub search_paths {my$self=shift;my$dir=shift;my@plugins;my$file_regex=$self->{'file_regex'}|| qr/\.pm$/;for my$searchpath (@{$self->{'search_path'}}){my$sp=catdir($dir,(split /::/,$searchpath));next unless (-e $sp && -d _);my@files=$self->find_files($sp);for my$file (@files){next unless ($file)=($file =~ /(.*$file_regex)$/);my ($name,$directory,$suffix)=fileparse($file,$file_regex);next if (!$self->{include_editor_junk}&& $self->_is_editor_junk($name));$directory=abs2rel($directory,$sp);my@pkg_dirs=();if ($name eq lc($name)|| $name eq uc($name)){my$pkg_file=catfile($sp,$directory,"$name$suffix");open PKGFILE,"<$pkg_file" or die "search_paths: Can't open $pkg_file: $!";my$in_pod=0;while (my$line=<PKGFILE>){$in_pod=1 if$line =~ m/^=\w/;$in_pod=0 if$line =~ /^=cut/;next if ($in_pod || $line =~ /^=cut/);next if$line =~ /^\s*#/;if ($line =~ m/^\s*package\s+(.*::)?($name)\s*;/i){@pkg_dirs=split /::/,$1 if defined $1;;$name=$2;last}}close PKGFILE}$directory =~ s/^[a-z]://i if($^O =~ /MSWin32|dos/);my@dirs=();if ($directory){($directory)=($directory =~ /(.*)/);@dirs=grep(length($_),splitdir($directory))unless$directory eq curdir();for my$d (reverse@dirs){my$pkg_dir=pop@pkg_dirs;last unless defined$pkg_dir;$d =~ s/\Q$pkg_dir\E/$pkg_dir/i}}else {$directory=""}my$plugin=join '::',$searchpath,@dirs,$name;next unless$plugin =~ m!(?:[a-z\d]+)[a-z\d]*!i;$self->handle_finding_plugin($plugin,\@plugins)}push@plugins,$self->handle_innerpackages($searchpath)}return@plugins}sub _is_editor_junk {my$self=shift;my$name=shift;return 1 if$name =~ /~$/;return 1 if$name =~ /^\.#/;return 1 if$name =~ /\.sw[po]$/;return 0}sub handle_finding_plugin {my$self=shift;my$plugin=shift;my$plugins=shift;my$no_req=shift || 0;return unless$self->_is_legit($plugin);unless (defined$self->{'instantiate'}|| $self->{'require'}){push @$plugins,$plugin;return}$self->{before_require}->($plugin)|| return if defined$self->{before_require};unless ($no_req){my$tmp=$@;my$res=eval {require_module($plugin)};my$err=$@;$@=$tmp;if ($err){if (defined$self->{on_require_error}){$self->{on_require_error}->($plugin,$err)|| return}else {return}}}$self->{after_require}->($plugin)|| return if defined$self->{after_require};push @$plugins,$plugin}sub find_files {my$self=shift;my$search_path=shift;my$file_regex=$self->{'file_regex'}|| qr/\.pm$/;my@files=();{local $_;File::Find::find({no_chdir=>1,follow=>$self->{'follow_symlinks'},wanted=>sub {return unless$File::Find::name =~ /$file_regex/;(my$path=$File::Find::name)=~ s#^\\./##;push@files,$path}},$search_path)}return@files}sub handle_inc_hooks {my$self=shift;my$path=shift;my@SEARCHDIR=@_;my@plugins;for my$dir (@SEARCHDIR){next unless ref$dir && eval {$dir->can('files')};for my$plugin ($dir->files){$plugin =~ s/\.pm$//;$plugin =~ s{/}{::}g;next unless$plugin =~ m!^${path}::!;$self->handle_finding_plugin($plugin,\@plugins)}}return@plugins}sub handle_innerpackages {my$self=shift;return ()if (exists$self->{inner}&&!$self->{inner});my$path=shift;my@plugins;for my$plugin (Devel::InnerPackage::list_packages($path)){$self->handle_finding_plugin($plugin,\@plugins,1)}return@plugins}1;
+MODULE_PLUGGABLE_OBJECT
+
+$fatpacked{"Module/Runtime.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MODULE_RUNTIME';
+ package Module::Runtime;BEGIN {require 5.006}BEGIN {${^WARNING_BITS}=""}our$VERSION="0.016";our@EXPORT_OK=qw($module_name_rx is_module_name is_valid_module_name check_module_name module_notional_filename require_module use_module use_package_optimistically $top_module_spec_rx $sub_module_spec_rx is_module_spec is_valid_module_spec check_module_spec compose_module_name);my%export_ok=map {($_=>undef)}@EXPORT_OK;sub import {my$me=shift;my$callpkg=caller(0);my$errs="";for(@_){if(exists$export_ok{$_}){if(/\A\$(.*)\z/s){*{$callpkg."::".$1}=\$$1}else {*{$callpkg."::".$_}=\&$_}}else {$errs .= "\"$_\" is not exported by the $me module\n"}}if($errs ne ""){die "${errs}Can't continue after import errors "."at @{[(caller(0))[1]]} line @{[(caller(0))[2]]}.\n"}}sub _is_string($) {my($arg)=@_;return defined($arg)&& ref(\$arg)eq "SCALAR"}our$module_name_rx=qr/[A-Z_a-z][0-9A-Z_a-z]*(?:::[0-9A-Z_a-z]+)*/;my$qual_module_spec_rx=qr#(?:/|::)[A-Z_a-z][0-9A-Z_a-z]*(?:(?:/|::)[0-9A-Z_a-z]+)*#;my$unqual_top_module_spec_rx=qr#[A-Z_a-z][0-9A-Z_a-z]*(?:(?:/|::)[0-9A-Z_a-z]+)*#;our$top_module_spec_rx=qr/$qual_module_spec_rx|$unqual_top_module_spec_rx/o;my$unqual_sub_module_spec_rx=qr#[0-9A-Z_a-z]+(?:(?:/|::)[0-9A-Z_a-z]+)*#;our$sub_module_spec_rx=qr/$qual_module_spec_rx|$unqual_sub_module_spec_rx/o;sub is_module_name($) {_is_string($_[0])&& $_[0]=~ /\A$module_name_rx\z/o}*is_valid_module_name=\&is_module_name;sub check_module_name($) {unless(&is_module_name){die +(_is_string($_[0])? "`$_[0]'" : "argument")." is not a module name\n"}}sub module_notional_filename($) {&check_module_name;my($name)=@_;$name =~ s!::!/!g;return$name.".pm"}BEGIN {*_WORK_AROUND_HINT_LEAKAGE="$]" < 5.011 &&!("$]" >= 5.009004 && "$]" < 5.010001)? sub(){1}: sub(){0};*_WORK_AROUND_BROKEN_MODULE_STATE="$]" < 5.009 ? sub(){1}: sub(){0}}BEGIN {if(_WORK_AROUND_BROKEN_MODULE_STATE){eval q{
+ sub Module::Runtime::__GUARD__::DESTROY {
+ delete $INC{$_[0]->[0]} if @{$_[0]};
+ }
+ 1;
+ };die $@ if $@ ne ""}}sub require_module($) {local %^H if _WORK_AROUND_HINT_LEAKAGE;if(_WORK_AROUND_BROKEN_MODULE_STATE){my$notional_filename=&module_notional_filename;my$guard=bless([$notional_filename ],"Module::Runtime::__GUARD__");my$result=CORE::require($notional_filename);pop @$guard;return$result}else {return scalar(CORE::require(&module_notional_filename))}}sub use_module($;$) {my($name,$version)=@_;require_module($name);$name->VERSION($version)if @_ >= 2;return$name}sub use_package_optimistically($;$) {my($name,$version)=@_;my$fn=module_notional_filename($name);eval {local$SIG{__DIE__};require_module($name)};die $@ if $@ ne "" && ($@ !~ /\ACan't locate \Q$fn\E .+ at \Q@{[__FILE__]}\E line/s || $@ =~ /^Compilation\ failed\ in\ require
+ \ at\ \Q@{[__FILE__]}\E\ line/xm);$name->VERSION($version)if @_ >= 2;return$name}sub is_module_spec($$) {my($prefix,$spec)=@_;return _is_string($spec)&& $spec =~ ($prefix ? qr/\A$sub_module_spec_rx\z/o : qr/\A$top_module_spec_rx\z/o)}*is_valid_module_spec=\&is_module_spec;sub check_module_spec($$) {unless(&is_module_spec){die +(_is_string($_[1])? "`$_[1]'" : "argument")." is not a module specification\n"}}sub compose_module_name($$) {my($prefix,$spec)=@_;check_module_name($prefix)if defined$prefix;&check_module_spec;if($spec =~ s#\A(?:/|::)##){}else {$spec=$prefix."::".$spec if defined$prefix}$spec =~ s#/#::#g;return$spec}1;
+MODULE_RUNTIME
+
+$fatpacked{"Monitoring/Plugin.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MONITORING_PLUGIN';
+ package Monitoring::Plugin;use Monitoring::Plugin::Functions qw(:codes %ERRORS %STATUS_TEXT @STATUS_CODES);use Params::Validate qw(:all);use 5.006;use strict;use warnings;use Carp;use base qw(Class::Accessor::Fast);Monitoring::Plugin->mk_accessors(qw(shortname perfdata messages opts threshold));use Exporter;our@ISA=qw(Exporter);our@EXPORT=(@STATUS_CODES);our@EXPORT_OK=qw(%ERRORS %STATUS_TEXT);our$VERSION="0.40";sub new {my$class=shift;my%args=validate(@_,{shortname=>0,usage=>0,version=>0,url=>0,plugin=>0,blurb=>0,extra=>0,license=>0,timeout=>0 },);my$shortname=Monitoring::Plugin::Functions::get_shortname(\%args);delete$args{shortname}if (exists$args{shortname});my$self={shortname=>$shortname,perfdata=>[],messages=>{warning=>[],critical=>[],ok=>[]},opts=>undef,threshold=>undef,};bless$self,$class;if (exists$args{usage}){require Monitoring::Plugin::Getopt;$self->opts(new Monitoring::Plugin::Getopt(%args))}return$self}sub add_perfdata {my ($self,%args)=@_;require Monitoring::Plugin::Performance;my$perf=Monitoring::Plugin::Performance->new(%args);push @{$self->perfdata},$perf}sub all_perfoutput {my$self=shift;return join(" ",map {$_->perfoutput}(@{$self->perfdata}))}sub set_thresholds {my$self=shift;require Monitoring::Plugin::Threshold;return$self->threshold(Monitoring::Plugin::Threshold->set_thresholds(@_))}sub plugin_exit {my$self=shift;Monitoring::Plugin::Functions::plugin_exit(@_,{plugin=>$self })}sub plugin_die {my$self=shift;Monitoring::Plugin::Functions::plugin_die(@_,{plugin=>$self })}sub nagios_exit {my$self=shift;Monitoring::Plugin::Functions::plugin_exit(@_,{plugin=>$self })}sub nagios_die {my$self=shift;Monitoring::Plugin::Functions::plugin_die(@_,{plugin=>$self })}sub die {my$self=shift;Monitoring::Plugin::Functions::plugin_die(@_,{plugin=>$self })}sub max_state {Monitoring::Plugin::Functions::max_state(@_)}sub max_state_alt {Monitoring::Plugin::Functions::max_state_alt(@_)}sub check_threshold {my$self=shift;my%args;if ($#_==0 && (!ref $_[0]|| ref $_[0]eq "ARRAY")){%args=(check=>shift)}else {%args=validate (@_,{check=>1,warning=>0,critical=>0,})}if (exists$args{warning}|| exists$args{critical}){$self->set_thresholds(warning=>$args{warning},critical=>$args{critical},)}elsif (defined$self->threshold){}elsif (defined$self->opts){$self->set_thresholds(warning=>$self->opts->warning,critical=>$self->opts->critical,)}else {return UNKNOWN}return$self->threshold->get_status($args{check})}sub add_arg {my$self=shift;$self->opts->arg(@_)if$self->_check_for_opts}sub getopts {my$self=shift;$self->opts->getopts(@_)if$self->_check_for_opts}sub _check_for_opts {my$self=shift;croak "You have to supply a 'usage' param to Monitoring::Plugin::new() if you want to use Getopts from your Monitoring::Plugin object." unless ref$self->opts()eq 'Monitoring::Plugin::Getopt';return$self}sub add_message {my$self=shift;my ($code,@messages)=@_;croak "Invalid error code '$code'" unless defined($ERRORS{uc$code})|| defined($STATUS_TEXT{$code});$code=$STATUS_TEXT{$code}if$STATUS_TEXT{$code};$code=lc$code;croak "Error code '$code' not supported by add_message" if$code eq 'unknown' || $code eq 'dependent';$self->messages($code,[])unless$self->messages->{$code};push @{$self->messages->{$code}},@messages}sub check_messages {my$self=shift;my%args=@_;for my$code (qw(critical warning ok)){my$messages=$self->messages->{$code}|| [];if ($args{$code}){unless (ref$args{$code}eq 'ARRAY'){if ($code eq 'ok'){$args{$code}=[$args{$code}]}else {croak "Invalid argument '$code'"}}push @{$args{$code}},@$messages}else {$args{$code}=$messages}}Monitoring::Plugin::Functions::check_messages(%args)}1;
+MONITORING_PLUGIN
+
+$fatpacked{"Monitoring/Plugin/Config.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MONITORING_PLUGIN_CONFIG';
+ package Monitoring::Plugin::Config;use 5.006;use strict;use warnings;use Carp;use File::Spec;use base qw(Config::Tiny);my$FILENAME1='plugins.ini';my$FILENAME2='nagios-plugins.ini';my$FILENAME3='monitoring-plugins.ini';my$CURRENT_FILE=undef;my@MONITORING_CONFIG_PATH=qw(/etc/nagios /usr/local/nagios/etc /usr/local/etc/nagios /etc/opt/nagios);my@CONFIG_PATH=qw(/etc /usr/local/etc /etc/opt);sub read {my$class=shift;unless ($_[0]){SEARCH: {if ($ENV{MONITORING_CONFIG_PATH}|| $ENV{NAGIOS_CONFIG_PATH}){for (split /:/,($ENV{MONITORING_CONFIG_PATH}|| $ENV{NAGIOS_CONFIG_PATH})){my$file=File::Spec->catfile($_,$FILENAME1);unshift(@_,$file),last SEARCH if -f $file;$file=File::Spec->catfile($_,$FILENAME2);unshift(@_,$file),last SEARCH if -f $file;$file=File::Spec->catfile($_,$FILENAME3);unshift(@_,$file),last SEARCH if -f $file}}for (@MONITORING_CONFIG_PATH){my$file=File::Spec->catfile($_,$FILENAME1);unshift(@_,$file),last SEARCH if -f $file}for (@CONFIG_PATH){my$file=File::Spec->catfile($_,$FILENAME2);unshift(@_,$file),last SEARCH if -f $file;$file=File::Spec->catfile($_,$FILENAME3);unshift(@_,$file),last SEARCH if -f $file}}die "Cannot find '$FILENAME1', '$FILENAME2' or '$FILENAME3' in any standard location.\n" unless $_[0]}$CURRENT_FILE=$_[0];$class->SUPER::read(@_)}sub read_string {my$class=ref $_[0]? ref shift : shift;my$self=bless {},$class;return undef unless defined $_[0];my$ns='_';my$counter=0;for (split /(?:\015{1,2}\012|\015|\012)/,shift){$counter++;next if /^\s*(?:\#|\;|$)/;if (/^\s*\[\s*(.+?)\s*\]\s*$/){$self->{$ns=$1}||= {};next}if (/^\s*([^=]+?)\s*=\s*(.*?)\s*$/){push @{$self->{$ns}->{$1}},$2;next}return$self->_error("Syntax error at line $counter: '$_'")}$self}sub write {croak "Write access not permitted"}sub mp_getfile {return$CURRENT_FILE}1;
+MONITORING_PLUGIN_CONFIG
+
+$fatpacked{"Monitoring/Plugin/ExitResult.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MONITORING_PLUGIN_EXITRESULT';
+ package Monitoring::Plugin::ExitResult;use 5.006;use strict;use warnings;use overload '""'=>sub {shift->{message}};sub new {my$class=shift;return bless {return_code=>$_[0],message=>$_[1]},$class}sub message {shift->{message}}sub return_code {shift->{return_code}}sub code {shift->{return_code}}1;
+MONITORING_PLUGIN_EXITRESULT
+
+$fatpacked{"Monitoring/Plugin/Functions.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MONITORING_PLUGIN_FUNCTIONS';
+ package Monitoring::Plugin::Functions;use 5.006;use strict;use warnings;use File::Basename;use Params::Validate qw(:types validate);use Math::Calc::Units;our$VERSION="0.40";our@STATUS_CODES=qw(OK WARNING CRITICAL UNKNOWN DEPENDENT);require Exporter;our@ISA=qw(Exporter);our@EXPORT=(@STATUS_CODES,qw(plugin_exit plugin_die check_messages));our@EXPORT_OK=qw(%ERRORS %STATUS_TEXT @STATUS_CODES get_shortname max_state max_state_alt convert $value_re);our%EXPORT_TAGS=(all=>[@EXPORT,@EXPORT_OK ],codes=>[@STATUS_CODES ],functions=>[qw(plugin_exit plugin_die check_messages max_state max_state_alt convert) ],);use constant OK=>0;use constant WARNING=>1;use constant CRITICAL=>2;use constant UNKNOWN=>3;use constant DEPENDENT=>4;our%ERRORS=('OK'=>OK,'WARNING'=>WARNING,'CRITICAL'=>CRITICAL,'UNKNOWN'=>UNKNOWN,'DEPENDENT'=>DEPENDENT,);our%STATUS_TEXT=reverse%ERRORS;my$value=qr/[-+]?[\d\.]+/;our$value_re=qr/$value(?:e$value)?/;my$_fake_exit=0;sub _fake_exit {@_ ? $_fake_exit=shift : $_fake_exit};my$_use_die=0;sub _use_die {@_ ? $_use_die=shift : $_use_die};sub get_shortname {my$arg=shift;my$shortname=undef;return$arg->{shortname}if (defined($arg->{shortname}));$shortname=$arg->{plugin}if (defined($arg->{plugin}));$shortname=uc basename($shortname || $ENV{PLUGIN_NAME}|| $ENV{NAGIOS_PLUGIN}|| $0);$shortname =~ s/^CHECK_(?:BY_)?//;$shortname =~ s/\..*$//;return$shortname}sub max_state {return CRITICAL if grep {$_==CRITICAL}@_;return WARNING if grep {$_==WARNING}@_;return OK if grep {$_==OK}@_;return UNKNOWN if grep {$_==UNKNOWN}@_;return DEPENDENT if grep {$_==DEPENDENT}@_;return UNKNOWN}sub max_state_alt {return CRITICAL if grep {$_==CRITICAL}@_;return WARNING if grep {$_==WARNING}@_;return UNKNOWN if grep {$_==UNKNOWN}@_;return DEPENDENT if grep {$_==DEPENDENT}@_;return OK if grep {$_==OK}@_;return UNKNOWN}sub plugin_exit {my ($code,$message,$arg)=@_;if (defined$code && ($code eq 'return_code' || $code eq 'message')){if (int(@_ / 2)!=@_ / 2 && ref $_[$#_]){$arg=pop @_}else {undef$arg}my%arg=@_;$code=$arg{return_code};$message=$arg{message}}$arg ||= {};$code=$ERRORS{$code}if defined$code && exists$ERRORS{$code};$code=UNKNOWN unless defined$code && exists$STATUS_TEXT{$code};$message='' unless defined$message;if (ref$message && ref$message eq 'ARRAY'){$message=join(' ',map {chomp;$_}@$message)}else {chomp$message}my$output="$STATUS_TEXT{$code}";if (defined$message && $message ne ''){$output .= " - " unless$message =~ /^\s*\n/mxs;$output .= $message}my$shortname=($arg->{plugin}? $arg->{plugin}->shortname : undef);$shortname ||= get_shortname();$output="$shortname $output" if$shortname;if ($arg->{plugin}){my$plugin=$arg->{plugin};$output .= " | ".$plugin->all_perfoutput if$plugin->perfdata && $plugin->all_perfoutput}$output .= "\n";if ($_fake_exit){require Monitoring::Plugin::ExitResult;return Monitoring::Plugin::ExitResult->new($code,$output)}_plugin_exit($code,$output)}sub _plugin_exit {my ($code,$output)=@_;if ($_use_die){for (my$i=0;;$i++){@_=caller($i);last unless @_;if ($_[3]=~ m/die/){$!=$code;die($output)}}}print$output;exit$code}sub plugin_die {my ($arg1,$arg2,$rest)=@_;if (defined$arg1 && ($arg1 eq 'return_code' || $arg1 eq 'message')){return plugin_exit(@_)}elsif (defined$arg1 && (exists$ERRORS{$arg1}|| exists$STATUS_TEXT{$arg1})){return plugin_exit(@_)}elsif (defined$arg2 && (exists$ERRORS{$arg2}|| exists$STATUS_TEXT{$arg2})){return plugin_exit($arg2,$arg1,$rest)}else {return plugin_exit(UNKNOWN,$arg1,$arg2)}}sub die {plugin_die(@_)}sub convert {my ($value,$from,$to)=@_;my ($newval)=Math::Calc::Units::convert("$value $from",$to,'exact');return$newval}sub check_messages {my%arg=validate(@_,{critical=>{type=>ARRAYREF },warning=>{type=>ARRAYREF },ok=>{type=>ARRAYREF | SCALAR,optional=>1 },'join'=>{default=>' ' },join_all=>0,});$arg{join}=' ' unless defined$arg{join};my$code=OK;$code ||= CRITICAL if @{$arg{critical}};$code ||= WARNING if @{$arg{warning}};return$code unless wantarray;my$message='';if ($arg{join_all}){$message=join($arg{join_all},map {@$_ ? join($arg{'join'},@$_): ()}$arg{critical},$arg{warning},$arg{ok}? (ref$arg{ok}? $arg{ok}: [$arg{ok}]): [])}else {$message ||= join($arg{'join'},@{$arg{critical}})if$code==CRITICAL;$message ||= join($arg{'join'},@{$arg{warning}})if$code==WARNING;$message ||= ref$arg{ok}? join($arg{'join'},@{$arg{ok}}): $arg{ok}if$arg{ok}}return ($code,$message)}1;
+MONITORING_PLUGIN_FUNCTIONS
+
+$fatpacked{"Monitoring/Plugin/Getopt.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MONITORING_PLUGIN_GETOPT';
+ package Monitoring::Plugin::Getopt;use 5.006;use strict;use warnings;use File::Basename;use Getopt::Long qw(:config no_ignore_case bundling);use Carp;use Params::Validate qw(:all);use base qw(Class::Accessor);use Monitoring::Plugin::Functions;use Monitoring::Plugin::Config;use vars qw($VERSION);$VERSION=$Monitoring::Plugin::Functions::VERSION;my%DEFAULT=(timeout=>15,verbose=>0,license=>"This nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY.
+ It may be used, redistributed and/or modified under the terms of the GNU
+ General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).",);my@ARGS=({spec=>'usage|?',help=>"-?, --usage\n Print usage information",},{spec=>'help|h',help=>"-h, --help\n Print detailed help screen",},{spec=>'version|V',help=>"-V, --version\n Print version information",},{spec=>'extra-opts:s@',help=>"--extra-opts=[section][\@file]\n Read options from an ini file. See https://www.monitoring-plugins.org/doc/extra-opts.html\n for usage and examples.",},{spec=>'timeout|t=i',help=>"-t, --timeout=INTEGER\n Seconds before plugin times out (default: %s)",default=>$DEFAULT{timeout},},{spec=>'verbose|v+',help=>"-v, --verbose\n Show details for command-line debugging (can repeat up to 3 times)",default=>$DEFAULT{verbose},},);my%DEFER_ARGS=map {$_=>1}qw(timeout verbose);sub _die {my$self=shift;my ($msg)=@_;$msg .= "\n" unless substr($msg,-1)eq "\n";Monitoring::Plugin::Functions::_plugin_exit(3,$msg)}sub _attr {my$self=shift;my ($item,$extra)=@_;$extra='' unless defined$extra;return '' unless$self->{_attr}->{$item};$self->{_attr}->{$item}."\n" .$extra}sub _spec_to_help {my ($self,$spec,$label)=@_;my ($opts,$type)=split /=|:|!/,$spec,2;my$optional=($spec =~ m/:/);my$boolean=($spec =~ m/!/);my (@short,@long);for (split /\|/,$opts){if (length $_==1){push@short,"-$_"}else {push@long,$boolean ? "--[no-]$_" : "--$_"}}my$help=join(', ',@short,@long);if ($type){if (!$label){if ($type eq 'i' || $type eq '+' || $type =~ /\d+/){$label='INTEGER'}else {$label='STRING'}}if ($optional){$help .= '[=' .$label .']'}else {$help .= '=' .$label}}elsif ($label){carp "Label specified, but there's no type in spec '$spec'"}$help .= "\n ";return$help}sub _options {my$self=shift;my@args=();my@defer=();for (@{$self->{_args}}){if (exists$DEFER_ARGS{$_->{name}}){push@defer,$_}else {push@args,$_}}my@options=();for my$arg (@args,@defer){my$help_array=ref$arg->{help}&& ref$arg->{help}eq 'ARRAY' ? $arg->{help}: [$arg->{help}];my$label_array=$arg->{label}&& ref$arg->{label}&& ref$arg->{label}eq 'ARRAY' ? $arg->{label}: [$arg->{label}];my$help_string='';for (my$i=0;$i <= $#$help_array;$i++){my$help=$help_array->[$i];if ($help =~ m/^\s*-/){$help_string .= $help}else {$help_string .= $self->_spec_to_help($arg->{spec},$label_array->[$i]).$help;$help_string .= "\n " if$i < $#$help_array}}if ($help_string =~ m/%s/){my$default=defined$arg->{default}? $arg->{default}: '';my$replaced=$help_string;$replaced =~ s|%s|$default|gmx;push@options,$replaced}else {push@options,$help_string}}return ' ' .join("\n ",@options)}sub _usage {my$self=shift;my$usage=$self->_attr('usage');$usage =~ s|%s|$self->{_attr}->{plugin}|gmx;return($usage)}sub _revision {my$self=shift;my$revision=sprintf "%s %s",$self->{_attr}->{plugin},$self->{_attr}->{version};$revision .= sprintf " [%s]",$self->{_attr}->{url}if$self->{_attr}->{url};$revision .= "\n";$revision}sub _help {my$self=shift;my$help='';$help .= $self->_revision ."\n";$help .= $self->_attr('license',"\n");$help .= $self->_attr('blurb',"\n");$help .= $self->_usage ? $self->_usage ."\n" : '';$help .= $self->_options ? $self->_options ."\n" : '';$help .= $self->_attr('extra',"\n");return$help}sub _process_specs_getopt_long {my$self=shift;my@opts=();for my$arg (@{$self->{_args}}){push@opts,$arg->{spec};my$spec=$arg->{spec};$spec =~ s/[=:!].*$//;my$name=(split /\s*\|\s*/,$spec)[0];$arg->{name}=$name;if (defined$self->{$name}){$arg->{default}=$self->{$name}}else {$self->{$name}=$arg->{default}}}return@opts}sub _check_required_opts {my$self=shift;my@missing=();for my$arg (@{$self->{_args}}){if ($arg->{required}&&!defined$self->{$arg->{name}}){push@missing,$arg->{name}}}if (@missing){$self->_die($self->_usage ."\n" .join("\n",map {sprintf "Missing argument: %s",$_}@missing)."\n")}}sub _process_opts {my$self=shift;$self->_die($self->_usage)if$self->{usage};$self->_die($self->_revision)if$self->{version};$self->_die($self->_help)if$self->{help}}sub _load_config_section {my$self=shift;my ($section,$file,$flags)=@_;$section ||= $self->{_attr}->{plugin};my$Config;eval {$Config=Monitoring::Plugin::Config->read($file)};$self->_die($@)if ($@);defined$Config or $self->_die(Monitoring::Plugin::Config->errstr);$file ||= $Config->mp_getfile();$self->_die("Invalid section '$section' in config file '$file'")unless exists$Config->{$section};return$Config->{$section}}sub _setup_spec_index {my$self=shift;return if defined$self->{_spec};$self->{_spec}={map {$_->{name}=>$_->{spec}}@{$self->{_args}}}}sub _cmdline_value {my$self=shift;local $_=shift;if (m/\s/ && (m/^[^"']/ || m/[^"']$/)){return qq("$_")}elsif ($_ eq ''){return q("")}else {return $_}}sub _cmdline {my$self=shift;my ($hash)=@_;$hash ||= $self;$self->_setup_spec_index;my@args=();for my$key (sort keys %$hash){next if$key =~ m/^_/;next if exists$DEFAULT{$key}&& $hash->{$key}eq $DEFAULT{$key};next if grep {$key eq $_}qw(help usage version extra-opts);next unless defined$hash->{$key};my$spec=$self->{_spec}->{$key}|| '';if ($spec =~ m/[=:].+$/){for my$value (ref$hash->{$key}eq 'ARRAY' ? @{$hash->{$key}}: ($hash->{$key})){$value=$self->_cmdline_value($value);if (length($key)> 1){push@args,sprintf "--%s=%s",$key,$value}else {push@args,"-$key",$value}}}else {push@args,(length($key)> 1 ? '--' : '-').$key}}return wantarray ? @args : join(' ',@args)}sub _process_extra_opts {my$self=shift;my ($args)=@_;my$extopts_list=$args->{'extra-opts'};my@sargs=();for my$extopts (@$extopts_list){$extopts ||= $self->{_attr}->{plugin};my$section=$extopts;my$file='';if ($extopts =~ m/^([^@]*)@(.*?)\s*$/){$section=$1;$file=$2}my$shash=$self->_load_config_section($section,$file);push@sargs,$self->_cmdline($shash)}@ARGV=(@sargs,@{$self->{_attr}->{argv}});printf "[extra-opts] %s %s\n",$self->{_attr}->{plugin},join(' ',@ARGV)if$args->{verbose}&& $args->{verbose}>= 3}sub arg {my$self=shift;my%args;my%params=(spec=>1,help=>1,default=>0,required=>0,label=>0,);if (exists$params{$_[0]}&& @_ % 2==0){%args=validate(@_,\%params)}else {my@order=qw(spec help default required label);@args{@order}=validate_pos(@_,@params{@order})}push @{$self->{_args}},\%args}sub getopts {my$self=shift;my@opt_array=$self->_process_specs_getopt_long;$self->{_attr}->{argv}=[@ARGV ];my$args1={};my$ok=GetOptions($args1,@opt_array);$self->_die($self->_usage)unless$ok;$self->_process_extra_opts($args1);$ok=GetOptions($self,@opt_array);$self->_die($self->_usage)unless$ok;$self->_process_opts;$self->_check_required_opts;$self->mk_ro_accessors(grep!/^_/,keys %$self);$SIG{ALRM}=sub {my$plugin=uc$self->{_attr}->{plugin};$plugin =~ s/^CHECK[-_]//i;$self->_die(sprintf("%s UNKNOWN - plugin timed out (timeout %ss)",$plugin,$self->timeout))}}sub _init {my$self=shift;my$plugin=basename($ENV{PLUGIN_NAME}|| $ENV{NAGIOS_PLUGIN}|| $0);my%attr=validate(@_,{usage=>1,version=>0,url=>0,plugin=>{default=>$plugin },blurb=>0,extra=>0,'extra-opts'=>0,license=>{default=>$DEFAULT{license}},timeout=>{default=>$DEFAULT{timeout}},});$self->{timeout}=delete$attr{timeout};$self->{_attr}={%attr };chomp foreach values %{$self->{_attr}};$self->{_args}=[@ARGS ];$self}sub new {my$class=shift;my$self=bless {},$class;$self->_init(@_)}1;
+MONITORING_PLUGIN_GETOPT
+
+$fatpacked{"Monitoring/Plugin/Performance.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MONITORING_PLUGIN_PERFORMANCE';
+ package Monitoring::Plugin::Performance;use 5.006;use strict;use warnings;use Carp;use base qw(Class::Accessor::Fast);__PACKAGE__->mk_ro_accessors(qw(label value uom warning critical min max));use Monitoring::Plugin::Functions;use Monitoring::Plugin::Threshold;use Monitoring::Plugin::Range;our ($VERSION)=$Monitoring::Plugin::Functions::VERSION;sub import {my ($class,%attr)=@_;$_=$attr{use_die}|| 0;Monitoring::Plugin::Functions::_use_die($_)}my$value=qr/[-+]?[\d\.,]+/;my$value_re=qr/$value(?:e$value)?/;my$value_with_negative_infinity=qr/$value_re|~/;sub _parse {my$class=shift;my$string=shift;$string =~ /^'?([^'=]+)'?=($value_re)([\w%]*);?($value_with_negative_infinity\:?$value_re?)?;?($value_with_negative_infinity\:?$value_re?)?;?($value_re)?;?($value_re)?/o;return undef unless ((defined $1 && $1 ne "")&& (defined $2 && $2 ne ""));my@info=($1,$2,$3,$4,$5,$6,$7);map {defined$info[$_]&& $info[$_]=~ s/,/./go}(1,3,4,5,6);my$performance_value;{my$not_value;local$SIG{__WARN__}=sub {$not_value++};$performance_value=$info[1]+0;return undef if$not_value}my$p=$class->new(label=>$info[0],value=>$performance_value,uom=>$info[2],warning=>$info[3],critical=>$info[4],min=>$info[5],max=>$info[6]);return$p}sub _nvl {my ($self,$value)=@_;defined$value ? $value : ''}sub perfoutput {my$self=shift;my$label=$self->label;if ($label =~ / /){$label="'$label'"}my$value=$self->value;if ($value eq ''){$value='U'}my$out=sprintf "%s=%s%s;%s;%s;%s;%s",$label,$value,$self->_nvl($self->uom),$self->_nvl($self->warning),$self->_nvl($self->critical),$self->_nvl($self->min),$self->_nvl($self->max);$out =~ s/;;$//;return$out}sub parse_perfstring {my ($class,$perfstring)=@_;my@perfs=();my$obj;while ($perfstring){$perfstring =~ s/^\s*//;if (@{[$perfstring =~ /=/g]}> 1){$perfstring =~ s/^(.*?=.*?)\s//;if (defined $1){$obj=$class->_parse($1)}else {$perfstring="";$obj=$class->_parse($perfstring)}}else {$obj=$class->_parse($perfstring);$perfstring=""}push@perfs,$obj if$obj}return@perfs}sub rrdlabel {my$self=shift;my$name=$self->clean_label;return substr($name,0,19)}sub clean_label {my$self=shift;my$name=$self->label;if ($name eq "/"){$name="root"}elsif ($name =~ s/^\///){$name =~ s/\//_/g}$name =~ s/\W/_/g;return$name}sub threshold {my$self=shift;return Monitoring::Plugin::Threshold->set_thresholds(warning=>$self->warning,critical=>$self->critical)}sub new {my$class=shift;my%arg=@_;if (my$threshold=delete$arg{threshold}){$arg{warning}||= $threshold->warning ."";$arg{critical}||= $threshold->critical .""}$class->SUPER::new(\%arg)}1;
+MONITORING_PLUGIN_PERFORMANCE
+
+$fatpacked{"Monitoring/Plugin/Range.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MONITORING_PLUGIN_RANGE';
+ package Monitoring::Plugin::Range;use 5.006;use strict;use warnings;use Carp;use base qw(Class::Accessor::Fast);__PACKAGE__->mk_accessors(qw(start end start_infinity end_infinity alert_on));use Monitoring::Plugin::Functions qw(:DEFAULT $value_re);our ($VERSION)=$Monitoring::Plugin::Functions::VERSION;use overload 'eq'=>sub {shift->_stringify},'""'=>sub {shift->_stringify};use constant OUTSIDE=>0;use constant INSIDE=>1;sub _stringify {my$self=shift;return "" unless$self->is_set;return (($self->alert_on)? "@" : "").(($self->start_infinity==1)? "~:" : (($self->start==0)?"":$self->start.":")).(($self->end_infinity==1)? "" : $self->end)}sub is_set {my$self=shift;(!defined$self->alert_on)? 0 : 1}sub _set_range_start {my ($self,$value)=@_;$self->start($value+0);$self->start_infinity(0)}sub _set_range_end {my ($self,$value)=@_;$self->end($value+0);$self->end_infinity(0)}sub parse_range_string {my ($class,$string)=@_;my$valid=0;my$range=$class->new(start=>0,start_infinity=>0,end=>0,end_infinity=>1,alert_on=>OUTSIDE);$string =~ s/\s//g;unless ($string =~ /[\d~]/ && $string =~ m/^\@?($value_re|~)?(:($value_re)?)?$/){carp "invalid range definition '$string'";return undef}if ($string =~ s/^\@//){$range->alert_on(INSIDE)}if ($string =~ s/^~//){$range->start_infinity(1)}if ($string =~ m/^($value_re)?:/){my$start=$1;$range->_set_range_start($start)if defined$start;$range->end_infinity(1);$string =~ s/^($value_re)?://;$valid++}if ($string =~ /^($value_re)$/){$range->_set_range_end($string);$valid++}if ($valid && ($range->start_infinity==1 || $range->end_infinity==1 || $range->start <= $range->end)){return$range}return undef}sub check_range {my ($self,$value)=@_;my$false=0;my$true=1;if ($self->alert_on==INSIDE){$false=1;$true=0}if ($self->end_infinity==0 && $self->start_infinity==0){if ($self->start <= $value && $value <= $self->end){return$false}else {return$true}}elsif ($self->start_infinity==0 && $self->end_infinity==1){if ($value >= $self->start){return$false}else {return$true}}elsif ($self->start_infinity==1 && $self->end_infinity==0){if ($value <= $self->end){return$false}else {return$true}}else {return$false}}sub new {shift->SUPER::new({@_})}1;
+MONITORING_PLUGIN_RANGE
+
+$fatpacked{"Monitoring/Plugin/Threshold.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MONITORING_PLUGIN_THRESHOLD';
+ package Monitoring::Plugin::Threshold;use 5.006;use strict;use warnings;use base qw(Class::Accessor::Fast);__PACKAGE__->mk_accessors(qw(warning critical));use Monitoring::Plugin::Range;use Monitoring::Plugin::Functions qw(:codes plugin_die);our ($VERSION)=$Monitoring::Plugin::Functions::VERSION;sub get_status {my ($self,$value)=@_;$value=[$value ]if (ref$value eq "");for my$v (@$value){if ($self->critical->is_set){return CRITICAL if$self->critical->check_range($v)}}for my$v (@$value){if ($self->warning->is_set){return WARNING if$self->warning->check_range($v)}}return OK}sub _inflate {my ($self,$value,$key)=@_;return Monitoring::Plugin::Range->new if!defined$value;if (ref$value){plugin_die("Invalid $key object: type " .ref$value)unless$value->isa("Monitoring::Plugin::Range");return$value}return Monitoring::Plugin::Range->new if$value eq "";my$range=Monitoring::Plugin::Range->parse_range_string($value);plugin_die("Cannot parse $key range: '$value'")unless(defined($range));return$range}sub set_thresholds {my ($self,%arg)=@_;return$self->new(%arg)unless ref$self;$self->set($_,$arg{$_})foreach qw(warning critical)}sub set {my$self=shift;my ($key,$value)=@_;$self->SUPER::set($key,$self->_inflate($value,$key))}sub new {my ($self,%arg)=@_;$self->SUPER::new({map {$_=>$self->_inflate($arg{$_},$_)}qw(warning critical)})}1;
+MONITORING_PLUGIN_THRESHOLD
+
+$fatpacked{"Params/Validate.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'PARAMS_VALIDATE';
+ package Params::Validate;use 5.008001;use strict;use warnings;our$VERSION='1.29';use Exporter;use Module::Implementation;use Params::Validate::Constants;use vars qw($NO_VALIDATION %OPTIONS $options);our@ISA='Exporter';my@types=qw(SCALAR ARRAYREF HASHREF CODEREF GLOB GLOBREF SCALARREF HANDLE BOOLEAN UNDEF OBJECT);our%EXPORT_TAGS=('all'=>[qw(validate validate_pos validation_options validate_with),@types ],types=>\@types,);our@EXPORT_OK=(@{$EXPORT_TAGS{all}},'set_options');our@EXPORT=qw(validate validate_pos);$NO_VALIDATION=$ENV{PERL_NO_VALIDATION};{my$loader=Module::Implementation::build_loader_sub(implementations=>['XS','PP' ],symbols=>[qw(validate validate_pos validate_with validation_options set_options),],);$ENV{PARAMS_VALIDATE_IMPLEMENTATION}='PP' if$ENV{PV_TEST_PERL};$loader->()}1;
+PARAMS_VALIDATE
+
+$fatpacked{"Params/Validate/Constants.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'PARAMS_VALIDATE_CONSTANTS';
+ package Params::Validate::Constants;use strict;use warnings;our$VERSION='1.29';our@ISA='Exporter';our@EXPORT=qw(SCALAR ARRAYREF HASHREF CODEREF GLOB GLOBREF SCALARREF HANDLE BOOLEAN UNDEF OBJECT UNKNOWN);sub SCALAR () {1}sub ARRAYREF () {2}sub HASHREF () {4}sub CODEREF () {8}sub GLOB () {16}sub GLOBREF () {32}sub SCALARREF () {64}sub UNKNOWN () {128}sub UNDEF () {256}sub OBJECT () {512}sub HANDLE () {16 | 32}sub BOOLEAN () {1 | 256}1;
+PARAMS_VALIDATE_CONSTANTS
+
+$fatpacked{"Params/Validate/PP.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'PARAMS_VALIDATE_PP';
+ package Params::Validate::PP;use strict;use warnings;our$VERSION='1.29';use Params::Validate::Constants;use Scalar::Util 1.10 ();our$options;sub validate_pos (\@@) {return if$Params::Validate::NO_VALIDATION &&!defined wantarray;my$p=shift;my@specs=@_;my@p=@$p;if ($Params::Validate::NO_VALIDATION){for (my$x=$#p + 1;$x <= $#specs;$x++ ){$p[$x]=$specs[$x]->{default}if ref$specs[$x]&& exists$specs[$x]->{default}}return wantarray ? @p : \@p}local$options ||= _get_options((caller(0))[0])unless defined$options;my$min=0;while (1){last unless (ref$specs[$min]?!(exists$specs[$min]->{default}|| $specs[$min]->{optional}): $specs[$min]);$min++}my$max=scalar@specs;my$actual=scalar@p;unless ($actual >= $min && ($options->{allow_extra}|| $actual <= $max)){my$minmax=($options->{allow_extra}? "at least $min" : ($min!=$max ? "$min - $max" : $max));my$val=$options->{allow_extra}? $min : $max;$minmax .= $val!=1 ? ' were' : ' was';my$called=_get_called();$options->{on_fail}->("$actual parameter" .($actual!=1 ? 's' : '')." " .($actual!=1 ? 'were' : 'was')." passed to $called but $minmax expected\n")}my$bigger=$#p > $#specs ? $#p : $#specs;for (0 .. $bigger){my$spec=$specs[$_];next unless ref$spec;if ($_ <= $#p){_validate_one_param($p[$_],\@p,$spec,'Parameter #' .($_ + 1).' (%s)')}$p[$_]=$spec->{default}if $_ > $#p && exists$spec->{default}}_validate_pos_depends(\@p,\@specs);for (grep {defined$p[$_]&&!ref$p[$_]&& ref$specs[$_]&& $specs[$_]{untaint}}0 .. $bigger){($p[$_])=$p[$_]=~ /(.+)/}return wantarray ? @p : \@p}sub _validate_pos_depends {my ($p,$specs)=@_;for my$p_idx (0 .. $#$p){my$spec=$specs->[$p_idx];next unless$spec && UNIVERSAL::isa($spec,'HASH')&& exists$spec->{depends};my$depends=$spec->{depends};if (ref$depends){require Carp;local$Carp::CarpLevel=2;Carp::croak("Arguments to 'depends' for validate_pos() must be a scalar")}my$p_size=scalar @$p;if ($p_size < $depends - 1){my$error =("Parameter #" .($p_idx + 1)." depends on parameter #" .$depends .", which was not given");$options->{on_fail}->($error)}}return 1}sub _validate_named_depends {my ($p,$specs)=@_;for my$pname (keys %$p){my$spec=$specs->{$pname};next unless$spec && UNIVERSAL::isa($spec,'HASH')&& $spec->{depends};unless (UNIVERSAL::isa($spec->{depends},'ARRAY')||!ref$spec->{depends}){require Carp;local$Carp::CarpLevel=2;Carp::croak("Arguments to 'depends' must be a scalar or arrayref")}for my$depends_name (ref$spec->{depends}? @{$spec->{depends}}: $spec->{depends}){unless (exists$p->{$depends_name}){my$error =("Parameter '$pname' depends on parameter '" .$depends_name ."', which was not given");$options->{on_fail}->($error)}}}}sub validate (\@$) {return if$Params::Validate::NO_VALIDATION &&!defined wantarray;my$p=$_[0];my$specs=$_[1];local$options=_get_options((caller(0))[0])unless defined$options;if (ref$p eq 'ARRAY'){if (ref$p->[0]){$p={%{$p->[0]}}}elsif (@$p % 2){my$called=_get_called();$options->{on_fail}->("Odd number of parameters in call to $called " ."when named parameters were expected\n")}else {$p={@$p}}}if ($options->{normalize_keys}){$specs=_normalize_callback($specs,$options->{normalize_keys});$p=_normalize_callback($p,$options->{normalize_keys})}elsif ($options->{ignore_case}|| $options->{strip_leading}){$specs=_normalize_named($specs);$p=_normalize_named($p)}if ($Params::Validate::NO_VALIDATION){return (wantarray ? ((map {$_=>$specs->{$_}->{default}}grep {ref$specs->{$_}&& exists$specs->{$_}->{default}}keys %$specs),(ref$p eq 'ARRAY' ? (ref$p->[0]? %{$p->[0]}: @$p): %$p)): do {my$ref=(ref$p eq 'ARRAY' ? (ref$p->[0]? $p->[0]: {@$p}): $p);for (grep {ref$specs->{$_}&& exists$specs->{$_}->{default}}keys %$specs){$ref->{$_}=$specs->{$_}->{default}unless exists$ref->{$_}}return$ref})}_validate_named_depends($p,$specs);unless ($options->{allow_extra}){if (my@unmentioned=grep {!exists$specs->{$_}}keys %$p){my$called=_get_called();$options->{on_fail}->("The following parameter" .(@unmentioned > 1 ? 's were' : ' was')." passed in the call to $called but " .(@unmentioned > 1 ? 'were' : 'was')." not listed in the validation options: @unmentioned\n")}}my@missing;keys %$specs;OUTER: while (my ($key,$spec)=each %$specs){if (!exists$p->{$key}&& (ref$spec ?!(do {if (exists$spec->{default}){$p->{$key}=$spec->{default};next OUTER}}|| do {next OUTER if$spec->{optional}}): $spec)){push@missing,$key}elsif (ref$spec){my$value=defined$p->{$key}? qq|"$p->{$key}"| : 'undef';_validate_one_param($p->{$key},$p,$spec,qq{The '$key' parameter (%s)})}}if (@missing){my$called=_get_called();my$missing=join ', ',map {"'$_'"}sort@missing;$options->{on_fail}->("Mandatory parameter" .(@missing > 1 ? 's' : '')." $missing missing in call to $called\n")}for my$key (grep {defined$p->{$_}&&!ref$p->{$_}&& ref$specs->{$_}&& $specs->{$_}{untaint}}keys %$p){($p->{$key})=$p->{$key}=~ /(.+)/}return wantarray ? %$p : $p}sub validate_with {return if$Params::Validate::NO_VALIDATION &&!defined wantarray;my%p=@_;local$options=_get_options((caller(0))[0],%p);unless ($Params::Validate::NO_VALIDATION){unless (exists$options->{called}){$options->{called}=(caller($options->{stack_skip}))[3]}}if (UNIVERSAL::isa($p{spec},'ARRAY')){return validate_pos(@{$p{params}},@{$p{spec}})}else {return&validate($p{params},$p{spec})}}sub _normalize_callback {my ($p,$func)=@_;my%new;for my$key (keys %$p){my$new_key=$func->($key);unless (defined$new_key){die "The normalize_keys callback did not return a defined value when normalizing the key '$key'"}if (exists$new{$new_key}){die "The normalize_keys callback returned a key that already exists, '$new_key', when normalizing the key '$key'"}$new{$new_key}=$p->{$key}}return \%new}sub _normalize_named {my%h=(ref $_[0])=~ /ARRAY/ ? @{$_[0]}: %{$_[0]};if ($options->{ignore_case}){$h{lc $_ }=delete$h{$_}for keys%h}if ($options->{strip_leading}){for my$key (keys%h){my$new;($new=$key)=~ s/^\Q$options->{strip_leading}\E//;$h{$new}=delete$h{$key}}}return \%h}my%Valid=map {$_=>1}qw(callbacks can default depends isa optional regex type untaint);sub _validate_one_param {my ($value,$params,$spec,$id)=@_;if (exists$spec->{type}){unless (defined$spec->{type}&& Scalar::Util::looks_like_number($spec->{type})&& $spec->{type}> 0){my$msg ="$id has a type specification which is not a number. It is ";if (defined$spec->{type}){$msg .= "a string - $spec->{type}"}else {$msg .= "undef"}$msg .= ".\n Use the constants exported by Params::Validate to declare types.";$options->{on_fail}->(sprintf($msg,_stringify($value)))}unless (_get_type($value)& $spec->{type}){my$type=_get_type($value);my@is=_typemask_to_strings($type);my@allowed=_typemask_to_strings($spec->{type});my$article=$is[0]=~ /^[aeiou]/i ? 'an' : 'a';my$called=_get_called(1);$options->{on_fail}->(sprintf("$id to $called was $article '@is', which " ."is not one of the allowed types: @allowed\n",_stringify($value)))}}return unless ($spec->{isa}|| $spec->{can}|| $spec->{callbacks}|| $spec->{regex});if (exists$spec->{isa}){for (ref$spec->{isa}? @{$spec->{isa}}: $spec->{isa}){unless (do {local $@=q{};eval {$value->isa($_)}}){my$is=ref$value ? ref$value : 'plain scalar';my$article1=$_ =~ /^[aeiou]/i ? 'an' : 'a';my$article2=$is =~ /^[aeiou]/i ? 'an' : 'a';my$called=_get_called(1);$options->{on_fail}->(sprintf("$id to $called was not $article1 '$_' " ."(it is $article2 $is)\n",_stringify($value)))}}}if (exists$spec->{can}){for (ref$spec->{can}? @{$spec->{can}}: $spec->{can}){unless (do {local $@=q{};eval {$value->can($_)}}){my$called=_get_called(1);$options->{on_fail}->(sprintf("$id to $called does not have the method: '$_'\n",_stringify($value)))}}}if ($spec->{callbacks}){unless (UNIVERSAL::isa($spec->{callbacks},'HASH')){my$called=_get_called(1);$options->{on_fail}->("'callbacks' validation parameter for $called must be a hash reference\n")}for (keys %{$spec->{callbacks}}){unless (UNIVERSAL::isa($spec->{callbacks}{$_},'CODE')){my$called=_get_called(1);$options->{on_fail}->("callback '$_' for $called is not a subroutine reference\n")}my$ok;my$e=do {local $@=q{};local$SIG{__DIE__};$ok=eval {$spec->{callbacks}{$_}->($value,$params)};$@};if (!$ok){my$called=_get_called(1);if (ref$e){$options->{on_fail}->($e)}else {my$msg="$id to $called did not pass the '$_' callback";$msg .= ": $e" if length$e;$msg .= "\n";$options->{on_fail}->(sprintf($msg,_stringify($value)))}}}}if (exists$spec->{regex}){unless ((defined$value ? $value : '')=~ /$spec->{regex}/){my$called=_get_called(1);$options->{on_fail}->(sprintf("$id to $called did not pass regex check\n",_stringify($value)))}}}{my%isas=('ARRAY'=>ARRAYREF,'HASH'=>HASHREF,'CODE'=>CODEREF,'GLOB'=>GLOBREF,'SCALAR'=>SCALARREF,'REGEXP'=>SCALARREF,);my%simple_refs=map {$_=>1}keys%isas;sub _get_type {return UNDEF unless defined $_[0];my$ref=ref $_[0];unless ($ref){return GLOB if UNIVERSAL::isa(\$_[0],'GLOB');return SCALAR}return$isas{$ref}if$simple_refs{$ref};for (keys%isas){return$isas{$_}| OBJECT if UNIVERSAL::isa($_[0],$_)}return UNKNOWN}}{my%type_to_string=(SCALAR()=>'scalar',ARRAYREF()=>'arrayref',HASHREF()=>'hashref',CODEREF()=>'coderef',GLOB()=>'glob',GLOBREF()=>'globref',SCALARREF()=>'scalarref',UNDEF()=>'undef',OBJECT()=>'object',UNKNOWN()=>'unknown',);sub _typemask_to_strings {my$mask=shift;my@types;for (SCALAR,ARRAYREF,HASHREF,CODEREF,GLOB,GLOBREF,SCALARREF,UNDEF,OBJECT,UNKNOWN){push@types,$type_to_string{$_}if$mask & $_}return@types ? @types : ('unknown')}}{my%defaults=(ignore_case=>0,strip_leading=>0,allow_extra=>0,on_fail=>sub {require Carp;Carp::croak($_[0])},stack_skip=>1,normalize_keys=>undef,);*set_options=\&validation_options;sub validation_options {my%opts=@_;my$caller=caller;for (keys%defaults){$opts{$_}=$defaults{$_}unless exists$opts{$_}}$Params::Validate::OPTIONS{$caller}=\%opts}sub _get_options {my$caller=shift;if (@_){return ($Params::Validate::OPTIONS{$caller}? {%{$Params::Validate::OPTIONS{$caller}},@_ }: {%defaults,@_ })}else {return (exists$Params::Validate::OPTIONS{$caller}? $Params::Validate::OPTIONS{$caller}: \%defaults)}}}sub _get_called {my$extra_skip=$_[0]|| 0;$extra_skip++;my$called=(exists$options->{called}? $options->{called}: (caller($options->{stack_skip}+ $extra_skip))[3]);$called='(unknown)' unless defined$called;return$called}sub _stringify {return defined $_[0]? qq{"$_[0]"} : 'undef'}1;
+PARAMS_VALIDATE_PP
+
+$fatpacked{"Params/Validate/XS.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'PARAMS_VALIDATE_XS';
+ package Params::Validate::XS;use strict;use warnings;our$VERSION='1.29';use Carp;my$default_fail=sub {Carp::confess($_[0])};{my%defaults=(ignore_case=>0,strip_leading=>0,allow_extra=>0,on_fail=>$default_fail,stack_skip=>1,normalize_keys=>undef,);*set_options=\&validation_options;sub validation_options {my%opts=@_;my$caller=caller;for (keys%defaults){$opts{$_}=$defaults{$_}unless exists$opts{$_}}$Params::Validate::OPTIONS{$caller}=\%opts}use XSLoader;XSLoader::load(__PACKAGE__,exists$Params::Validate::XS::{VERSION}? ${$Params::Validate::XS::{VERSION}}: (),)}sub _check_regex_from_xs {return (defined $_[0]? $_[0]: '')=~ /$_[1]/ ? 1 : 0}1;
+PARAMS_VALIDATE_XS
+
+$fatpacked{"Params/ValidatePP.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'PARAMS_VALIDATEPP';
+ package Params::Validate;our$VERSION='1.29';BEGIN {$ENV{PARAMS_VALIDATE_IMPLEMENTATION}='PP'}use Params::Validate;1;
+PARAMS_VALIDATEPP
+
+$fatpacked{"Params/ValidateXS.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'PARAMS_VALIDATEXS';
+ package Params::Validate;our$VERSION='1.29';BEGIN {$ENV{PARAMS_VALIDATE_IMPLEMENTATION}='XS'}use Params::Validate;1;
+PARAMS_VALIDATEXS
+
+$fatpacked{"Try/Tiny.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'TRY_TINY';
+ package Try::Tiny;use 5.006;our$VERSION='0.30';use strict;use warnings;use Exporter 5.57 'import';our@EXPORT=our@EXPORT_OK=qw(try catch finally);use Carp;$Carp::Internal{+__PACKAGE__}++;BEGIN {my$su=$INC{'Sub/Util.pm'}&& defined&Sub::Util::set_subname;my$sn=$INC{'Sub/Name.pm'}&& eval {Sub::Name->VERSION(0.08)};unless ($su || $sn){$su=eval {require Sub::Util}&& defined&Sub::Util::set_subname;unless ($su){$sn=eval {require Sub::Name;Sub::Name->VERSION(0.08)}}}*_subname=$su ? \&Sub::Util::set_subname : $sn ? \&Sub::Name::subname : sub {$_[1]};*_HAS_SUBNAME=($su || $sn)? sub(){1}: sub(){0}}my%_finally_guards;sub try (&;@) {my ($try,@code_refs)=@_;my$wantarray=wantarray;my ($catch,@finally)=();for my$code_ref (@code_refs){if (ref($code_ref)eq 'Try::Tiny::Catch'){croak 'A try() may not be followed by multiple catch() blocks' if$catch;$catch=${$code_ref}}elsif (ref($code_ref)eq 'Try::Tiny::Finally'){push@finally,${$code_ref}}else {croak('try() encountered an unexpected argument (' .(defined$code_ref ? $code_ref : 'undef').') - perhaps a missing semi-colon before or')}}_subname(caller().'::try {...} '=>$try)if _HAS_SUBNAME;local$_finally_guards{guards}=[map {Try::Tiny::ScopeGuard->_new($_)}@finally ];my$prev_error=$@;my (@ret,$error);my$failed=not eval {$@=$prev_error;if ($wantarray){@ret=$try->()}elsif (defined$wantarray){$ret[0]=$try->()}else {$try->()};return 1};$error=$@;$@=$prev_error;if ($failed){push @$_,$error for @{$_finally_guards{guards}};if ($catch){for ($error){return$catch->($error)}}return}else {return$wantarray ? @ret : $ret[0]}}sub catch (&;@) {my ($block,@rest)=@_;croak 'Useless bare catch()' unless wantarray;_subname(caller().'::catch {...} '=>$block)if _HAS_SUBNAME;return (bless(\$block,'Try::Tiny::Catch'),@rest,)}sub finally (&;@) {my ($block,@rest)=@_;croak 'Useless bare finally()' unless wantarray;_subname(caller().'::finally {...} '=>$block)if _HAS_SUBNAME;return (bless(\$block,'Try::Tiny::Finally'),@rest,)}{package Try::Tiny::ScopeGuard;use constant UNSTABLE_DOLLARAT=>("$]" < '5.013002')? 1 : 0;sub _new {shift;bless [@_ ]}sub DESTROY {my ($code,@args)=@{$_[0]};local $@ if UNSTABLE_DOLLARAT;eval {$code->(@args);1}or do {warn "Execution of finally() block $code resulted in an exception, which " .'*CAN NOT BE PROPAGATED* due to fundamental limitations of Perl. ' .'Your program will continue as if this event never took place. ' ."Original exception text follows:\n\n" .(defined $@ ? $@ : '$@ left undefined...')."\n" }}}__PACKAGE__
+TRY_TINY
+
+s/^ //mg for values %fatpacked;
+
+my $class = 'FatPacked::'.(0+\%fatpacked);
+no strict 'refs';
+*{"${class}::files"} = sub { keys %{$_[0]} };
+
+if ($] < 5.008) {
+ *{"${class}::INC"} = sub {
+ if (my $fat = $_[0]{$_[1]}) {
+ my $pos = 0;
+ my $last = length $fat;
+ return (sub {
+ return 0 if $pos == $last;
+ my $next = (1 + index $fat, "\n", $pos) || $last;
+ $_ .= substr $fat, $pos, $next - $pos;
+ $pos = $next;
+ return 1;
+ });
+ }
+ };
+}
+
+else {
+ *{"${class}::INC"} = sub {
+ if (my $fat = $_[0]{$_[1]}) {
+ open my $fh, '<', \$fat
+ or die "FatPacker error loading $_[1] (could be a perl installation issue?)";
+ return $fh;
+ }
+ return;
+ };
+}
+
+unshift @INC, bless \%fatpacked, $class;
+ } # END OF FATPACK CODE
+
+#
+# This is development version of the check_raid.pl plugin
+# If you are running this file directly, you are doing it wrong
+#
+# See installation notes:
+# https://github.com/glensc/nagios-plugin-check_raid#installing
+#
+use Monitoring::Plugin 0.37;
+use App::Monitoring::Plugin::CheckRaid;
+use App::Monitoring::Plugin::CheckRaid::Sudoers;
+use App::Monitoring::Plugin::CheckRaid::Plugin;
+use App::Monitoring::Plugin::CheckRaid::Utils;
+use warnings;
+use strict;
+
+my $PROGNAME = 'check_raid';
+my $VERSION = q/4.0.9/;
+my $URL = 'https://github.com/glensc/nagios-plugin-check_raid';
+my $BUGS_URL = 'https://github.com/glensc/nagios-plugin-check_raid#reporting-bugs';
+
+my $mp = Monitoring::Plugin->new(
+ usage =>
+ "Usage: %s [-h] [-V] [-S] [list of devices to ignore]",
+
+ version => $VERSION,
+ blurb => join($/,
+ "This plugin checks all RAID volumes (hardware and software) that can be identified",
+ "",
+ "Homepage: $URL",
+ "Reporting Bugs: $BUGS_URL",
+ ),
+
+ plugin => $PROGNAME,
+ shortname => $PROGNAME,
+);
+
+$mp->add_arg(
+ spec => 'sudoers|S',
+ help => 'Setup sudo rules',
+);
+$mp->add_arg(
+ spec => 'warnonly|W',
+ help => 'Treat CRITICAL errors as WARNING',
+);
+$mp->add_arg(
+ spec => 'debug|d',
+ help => 'debug mode, or dry-run for sudoers',
+);
+$mp->add_arg(
+ spec => 'list_plugins|list-plugins|l',
+ help => 'Lists active plugins',
+);
+$mp->add_arg(
+ spec => 'plugin|p=s@',
+ help => 'Force the use of selected plugins, comma separated',
+);
+$mp->add_arg(
+ spec => 'plugin-option=s@',
+ help => "Specify extra option for specific plugin.\n" .
+'
+Plugin options (key=>value pairs) passed as "options" key to each plugin constructor.
+The options are global, not plugin specific, but it\'s recommended to prefix option with plugin name.
+The convention is to have PLUGIN_NAME-OPTION_NAME=OPTION_VALUE syntax to namespace each plugin option.
+
+For example "--plugin-option=hp_msa-serial=/dev/ttyS2"
+would define option "serial" for "hp_msa" plugin with value "/dev/ttyS2".
+'
+);
+$mp->add_arg(
+ spec => 'noraid=s',
+ help => 'Return STATE if no RAID volumes are found. Defaults to UNKNOWN',
+);
+$mp->add_arg(
+ spec => 'resync=s',
+ help => 'Return STATE if RAID is in resync state. Defaults to WARNING',
+);
+$mp->add_arg(
+ spec => 'check=s',
+ help => 'Return STATE if RAID is in check state. Defaults to OK',
+);
+$mp->add_arg(
+ spec => 'cache-fail=s',
+ help => 'Set status as STATE if Write Cache is present but disabled. Defaults to WARNING',
+);
+$mp->add_arg(
+ spec => 'bbulearn=s',
+ help => 'Return STATE if Backup Battery Unit (BBU) learning cycle is in progress. Defaults to WARNING',
+);
+$mp->add_arg(
+ spec => 'bbu-monitoring',
+ help => 'Enable experimental monitoring of the BBU status',
+);
+
+$mp->getopts;
+
+if (@ARGV) {
+ @App::Monitoring::Plugin::CheckRaid::Utils::ignore = @ARGV;
+}
+
+my (%ERRORS) = (OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3);
+
+my %plugin_options;
+
+if ($mp->opts->warnonly) {
+ App::Monitoring::Plugin::CheckRaid::Plugin->set_critical_as_warning;
+}
+if ($mp->opts->get('bbu-monitoring')) {
+ $plugin_options{options}{bbu_monitoring} = 1;
+}
+
+# setup state flags
+my %state_flags = (
+ 'resync' => 'resync_status',
+ 'check' => 'check_status',
+ 'noraid' => 'noraid_status',
+ 'bbulearn' => 'bbulearn_status',
+ 'cache-fail' => 'cache_fail_status',
+);
+while (my($opt, $key) = each %state_flags) {
+ if (my $value = $mp->opts->get($opt)) {
+ unless (exists $ERRORS{$value}) {
+ print "Invalid value: '$value' for --$opt\n";
+ exit $ERRORS{UNKNOWN};
+ }
+ $plugin_options{options}{$key} = $ERRORS{$value};
+ }
+}
+
+# enable only specified plugins
+if (my $plugins = $mp->opts->plugin) {
+ # split, as each value can contain commas
+ $plugin_options{enable_plugins} = [ map { split(/,/, $_) } @$plugins ];
+}
+
+if (my $opts = $mp->opts->get('plugin-option')) {
+ foreach my $o (@$opts) {
+ my($k, $v) = split(/=/, $o, 2);
+ $plugin_options{options}{$k} = $v;
+ }
+}
+
+my $mc = App::Monitoring::Plugin::CheckRaid->new(%plugin_options);
+
+$App::Monitoring::Plugin::CheckRaid::Utils::debug = $mp->opts->debug;
+
+if ($mp->opts->debug) {
+ print "$PROGNAME $VERSION\n";
+ print "Visit <$BUGS_URL> how to report bugs\n";
+ print "Please include output of **ALL** commands in bugreport\n\n";
+}
+
+if ($mp->opts->sudoers) {
+ my $res = sudoers($mp->opts->debug, $mc->active_plugins(1));
+ $mp->plugin_exit(OK, $res ? "sudoers updated" : "sudoers not updated");
+}
+
+my @plugins = $mc->active_plugins;
+if (!@plugins) {
+ $mp->plugin_exit($plugin_options{options}{noraid_status}, "No active plugins (No RAID found)");
+}
+
+# print active plugins
+if ($mp->opts->list_plugins) {
+ foreach my $p (@plugins) {
+ print $p->{name}, "\n";
+ }
+ my $count = @plugins;
+ warn "$count active plugins\n";
+ exit $ERRORS{OK};
+}
+
+my $message = '';
+my $status = $ERRORS{OK};
+
+# perform check of each active plugin
+foreach my $plugin (@plugins) {
+ # skip if no check method (not standalone checker)
+ next unless $plugin->can('check');
+
+ # perform the check
+ $plugin->check;
+ my $pn = $plugin->{name};
+
+ # collect results
+ unless (defined $plugin->status) {
+ $status = $ERRORS{UNKNOWN} if $ERRORS{UNKNOWN} > $status;
+ $message .= '; ' if $message;
+ $message .= "$pn:[Plugin error]";
+ next;
+ }
+ if ($plugin->message or $plugin->{options}{noraid_status} == $ERRORS{UNKNOWN}) {
+ $status = $plugin->status if $plugin->status > $status;
+ } else {
+ $status = $plugin->{options}{noraid_status} if $plugin->{options}{noraid_status} > $status;
+ }
+ $message .= '; ' if $message;
+ $message .= "$pn:[".$plugin->message."]";
+ $message .= ' | ' . $plugin->perfdata if $plugin->perfdata;
+ $message .= "\n" . $plugin->longoutput if $plugin->longoutput;
+}
+
+if ($message) {
+ if ($status == $ERRORS{OK}) {
+ print "OK: ";
+ } elsif ($status == $ERRORS{WARNING}) {
+ print "WARNING: ";
+ } elsif ($status == $ERRORS{CRITICAL}) {
+ print "CRITICAL: ";
+ } else {
+ print "UNKNOWN: ";
+ }
+ print "$message\n";
+} elsif ($plugin::options{noraid_status} != $ERRORS{UNKNOWN}) {
+ $status = $plugin::options{noraid_status};
+ print "No RAID configuration found\n";
+} else {
+ $status = $ERRORS{UNKNOWN};
+ print "No RAID configuration found (tried: ", join(', ', @plugins), ")\n";
+}
+exit $status;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/control
new file mode 100644
index 0000000..9ffb706
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/control
@@ -0,0 +1,30 @@
+Homepage: https://github.com/glensc/nagios-plugin-check_raid
+Watch: https://github.com/glensc/nagios-plugin-check_raid "/glensc/nagios-plugin-check_raid/tree/([0-9.]+)"
+Suggests: cciss-vol-status (>= 1.10), mpt-status
+Version: 4.0.9
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to check sw/hw RAID status
+ The plugin looks for any known types of RAID configurations,
+ and checks them all.
+ Supports:
+ - Adaptec AAC RAID via aaccli or afacli or arcconf
+ - AIX software RAID via lsvg
+ - HP/Compaq Smart Array via cciss_vol_status (hpsa supported too)
+ - HP Smart Array Controllers and MSA Controllers via hpacucli
+ - HP Smart Array (MSA1500) via serial line
+ - Linux 3ware SATA RAID via tw_cli
+ - Linux Device Mapper RAID via dmraid
+ - Linux DPT/I2O hardware RAID controllers via /proc/scsi/dpt_i2o
+ - Linux GDTH hardware RAID controllers via /proc/scsi/gdth
+ - Linux LSI MegaRaid hardware RAID via CmdTool2
+ - Linux LSI MegaRaid hardware RAID via megarc
+ - Linux LSI MegaRaid hardware RAID via /proc/megaraid
+ - Linux MegaIDE hardware RAID controllers via /proc/megaide
+ - Linux MPT hardware RAID via mpt-status
+ - Linux software RAID (md) via /proc/mdstat
+ - LSI Logic MegaRAID SAS series via MegaCli
+ - LSI MegaRaid via lsraid
+ - Serveraid IPS via ipssend
+ - Solaris software RAID via metastat
+ - Areca SATA RAID Support via cli64/cli32
+ - Detecting SCSI devices or hosts with lsscsi
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/copyright
new file mode 100644
index 0000000..ef9e592
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_raid/copyright
@@ -0,0 +1,9 @@
+2004-2006 Steve Shipway, university of auckland,
+2009-2013 Elan Ruusamäe <glen@pld-linux.org>
+
+License: GPL v2
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/Makefile
new file mode 100644
index 0000000..d6d58cd
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/Makefile
@@ -0,0 +1,16 @@
+#/usr/bin/make -f
+
+PLUGIN = src/check_rbl
+MANPAGES = check_rbl.7
+INIFILES = src/check_rbl.ini
+DOCFILES = src/README.md
+CLEANFILES = check_rbl.7
+
+
+include ../common.mk
+
+
+check_rbl.7: src/check_rbl.pod
+ pod2man -s 7 $< > $@
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/.travis.yml b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/.travis.yml
new file mode 100644
index 0000000..19dc739
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/.travis.yml
@@ -0,0 +1,11 @@
+language: perl
+perl:
+ - '5.26'
+ - '5.24'
+ - '5.22'
+ - '5.20'
+ - '5.18'
+ - '5.16'
+ - '5.14'
+ - '5.12'
+ - '5.10'
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/AUTHORS b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/AUTHORS
new file mode 100644
index 0000000..a16e455
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/AUTHORS
@@ -0,0 +1,12 @@
+Matteo Corti <matteo@corti.li>
+Elan Ruusamäe <glen@delfi.ee> (improved parallel support and several fixes)
+Victor V Kudlak <info@kentos.ru> (parallel support)
+Jan Kantert <jan.kantert@researchgate.net> for the whitelisting support
+Nick Nicholas <opoudjis@gmail.com> for IPv6 support
+Michael Orlitzky <michael@orlitzky.com> for the test.sh usage patch
+Celevra https://github.com/celevra for the Debian/Ubuntu documentation update
+Claudio Kuenzler https://github.com/Napsty for the append patch
+
+Please report any bugs or feature requests through the
+web interface at https://github.com/matteocorti/check_rbl/issues
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/COPYING b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/COPYRIGHT b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/COPYRIGHT
new file mode 100644
index 0000000..b7f8394
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/COPYRIGHT
@@ -0,0 +1,17 @@
+Copyright (c) 2009-2019 Matteo Corti
+Copyright (c) 2010 Elan Ruusamae
+Copyright (c) 2009 ETH Zurich
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/Changes b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/Changes
new file mode 100644
index 0000000..09e9241
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/Changes
@@ -0,0 +1,127 @@
+2019-02-28 Matteo Corti <matteo@corti.li>
+
+ * Version 1.4.4
+ * check_rbl: applied --append patch
+
+2018-05-30 Matteo Corti <matteo@corti.li>
+
+ * Version 1.4.3
+ * check_rbl.ini: Removed bl.spamcannibal.org
+
+2018-05-27 Matteo Corti <matteo@corti.li>
+
+ * Version 1.4.2
+ * check_rbl.ini: Removed dnsbl.cyberlogic.net
+
+2017-07-17 Matteo Corti <matteo@corti.li>
+
+ * Version 1.4.1
+ * check_rbl: Perl 5.26 support ('.' missing from @INC)
+
+2017-04-18 Matteo Corti <matteo@corti.li>
+
+ * Version 1.4.0
+ * check_rbl: IPv6 support
+
+2016-06-06 Matteo Corti <matteo@corti.li>
+
+ * Version 1.3.8
+ * Makefile.PL: Requiring Data::Validate::Domain 0.12 to support FQDN ending with a dot
+
+2015-12-30 Matteo Corti <matteo@corti.li>
+
+ * Makefile.PL: allowing Nagios::Plugin for older distributions
+
+2015-12-22 Matteo Corti <matteo@corti.li>
+
+ * check_rbl: added missing dependencies from INSTALL
+
+2015-02-01 Matteo Corti <matteo@corti.li>
+
+ * Version 1.3.7
+ * check_rbl: switching to Monitoring::Plugin
+ (as Nagios::Plugin is deprecated)
+
+2014-12-05 Matteo Corti <matteo@corti.li>
+
+ * Version 1.3.6
+ * example.pl: removed unnecessary dependency on Data::Dumper
+
+2014-09-20 Matteo Corti <matteo@corti.li>
+
+ * Version 1.3.5
+ * check_rbl: fixed the default critical and warning range
+
+2014-09-19 Matteo Corti <matteo@corti.li>
+
+ * Version 1.3.4
+ * check_rbl: removed wrong test on the DNS servers
+ * check_rbl: fixed the threshold range
+
+2014-08-09 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * Version 1.3.3
+ * More argument validation
+
+2014-01-30 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * Version 1.3.2
+ * Documentation and dependencies update
+
+2013-09-26 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * Version 1.3.1
+ * check_rbl: disabled embedded Perl
+
+2012-08-31 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_rbl: fixed a possible variable name conflict
+
+2012-01-25 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * Added a note on public DNS resolvers (as Google) by being banned
+ from Spamhaus
+
+2011-07-11 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * Version 1.3.0
+ * check_rbl: applied patch from Jan Kantert to support whitelists
+ * added support for unit tests
+
+2011-03-22 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * Version 1.2.2
+ * check_rbl: specified the dependency on Nagios::Plugin > 0.31
+ (earlier versions caused parameter parsing errors,
+ thanks to Elan Ruusamäe)
+
+2010-07-05 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * Version 1.2.1
+ * check_rbl: fixed a problem with operator precedence that made some
+ checks fail
+
+2010-04-07 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * Version 1.2.0
+ * check_rbl: applied patch to report the hostname being checked
+ and increase the verbosity (#66)
+ * check_rbl.ini: sample configuration file
+ * check_rbl: removed unnecessary dependencies
+ * check_rbl: applied the patch from #69 (improved parallelism)
+
+2009-10-27 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_rbl: applied patch to parallelize the checks
+
+2009-01-22 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_rbl: command line argument to set the numer of tries in DNS queries
+
+2009-01-06 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_rbl: execution time in the performace data
+
+2008-12-29 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_rbl: Initial release
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/INSTALL b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/INSTALL
new file mode 100644
index 0000000..e63587b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/INSTALL
@@ -0,0 +1,74 @@
+Build and install check_rbl
+
+Dependences
+===========
+
+check_rbl depends on several Perl modules:
+
+ * Data::Validate::Domain
+ * Data::Validate::IP
+ * IO::Select
+ * Monitoring::Plugin
+ * Monitoring::Plugin::Getopt
+ * Monitoring::Plugin::Threshold
+ * Net::DNS
+ * Net::IP
+ * Readonly
+
+Perl modules can be found on the "Comprehensive Perl Archive Network"
+(CPAN). The "How to install CPAN modules" guide summarizes how these
+can be installed
+
+ http://www.cpan.org/modules/INSTALL.html
+
+On many systems Perl modules are also available as installation
+packages (refer to your system documentation on how to install them).
+
+The 'perl Makefile.PL' command (see below) will list the missing
+packages the you will need to install.
+
+Install to /usr/lib/nagios/plugins/contrib
+==========================================
+
+In the source directory run:
+
+ perl Makefile.PL
+ make
+ make install
+
+Install to a custom directory (CUSTOM_DIR)
+=========================================
+
+In the source directory run:
+
+ perl Makefile.PL INSTALLSITESCRIPT=CUSTOM_DIR
+ make
+ make install
+
+You can override the INSTALLSCRIPT, INSTALLNBIN or INSTALLSITESCRIPT
+variable depending on your perl installation.
+
+The man page is installed to /usr/share/man/man1/check_rbl.1
+you can customize the path by setting INSTALLMAN1DIR as follows
+
+ perl Makefile.PL INSTALLSCRIPT=CUSTOM_DIR INSTALLMAN1DIR=CUSTOM_MAN_DIR
+ make
+ make install
+
+Manual installation
+===================
+
+Substitute #!perl at the beginning of the script with the location of
+your Perl interpreter and copy it to the desired location
+
+Generate the man page with pod2man
+
+ pod2man check_rbl.pod > CUSTOM_MAN_FILE
+
+Please report any bugs or feature requests through the
+web interface at https://github.com/matteocorti/check_rbl/issues
+
+Dependencies on Debian
+======================
+
+apt-get install libdata-validate-ip-perl libdata-validate-domain-perl libnet-dns-perl libreadonly-perl libnagios-plugin-perl
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MANIFEST b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MANIFEST
new file mode 100644
index 0000000..dd26ba6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MANIFEST
@@ -0,0 +1,32 @@
+.travis.yml
+AUTHORS
+Changes
+check_rbl
+check_rbl.ini
+check_rbl.pod
+check_rbl.spec
+COPYING
+COPYRIGHT
+inc/Module/AutoInstall.pm
+inc/Module/Install.pm
+inc/Module/Install/AutoInstall.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Include.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/MakeMaker.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/Scripts.pm
+INSTALL
+Makefile.PL
+MANIFEST This list of files
+MANIFEST.SKIP
+META.yml
+MYMETA.json
+MYMETA.yml
+NEWS
+README
+t/00_modules.t
+t/01_validation.t
+test.sh
+TODO
+VERSION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MANIFEST.SKIP b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MANIFEST.SKIP
new file mode 100644
index 0000000..34ea558
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MANIFEST.SKIP
@@ -0,0 +1,18 @@
+\.DS_Store$
+^_build
+^Build$
+^blib
+~$
+\.bak$
+\.sw.$
+\.svn
+\.git
+\.tdy$
+^cover_db
+^Makefile$
+^Makefile.old$
+^pm_to_blib$
+^.#
+^#
+^check_rbl-
+notes.txt
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/META.yml b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/META.yml
new file mode 100644
index 0000000..686ba2c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/META.yml
@@ -0,0 +1,29 @@
+---
+build_requires:
+ ExtUtils::MakeMaker: 6.36
+configure_requires:
+ ExtUtils::MakeMaker: 6.36
+distribution_type: module
+dynamic_config: 1
+generated_by: 'Module::Install version 1.19'
+license: unknown
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: check_rbl
+no_index:
+ directory:
+ - inc
+ - t
+requires:
+ Data::Validate::Domain: 0.12
+ Data::Validate::IP: 0
+ English: 0
+ IO::Select: 0
+ Monitoring::Plugin: 0
+ Monitoring::Plugin::Getopt: 0
+ Monitoring::Plugin::Threshold: 0
+ Net::DNS: 0
+ Net::IP: 0
+ Readonly: 0
+version: 1.4.3
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MYMETA.json b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MYMETA.json
new file mode 100644
index 0000000..c61195c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MYMETA.json
@@ -0,0 +1,51 @@
+{
+ "abstract" : "unknown",
+ "author" : [
+ "unknown"
+ ],
+ "dynamic_config" : 0,
+ "generated_by" : "Module::Install version 1.19, CPAN::Meta::Converter version 2.150010",
+ "license" : [
+ "unknown"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "check_rbl",
+ "no_index" : {
+ "directory" : [
+ "inc",
+ "t"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "6.36"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Data::Validate::Domain" : "0.12",
+ "Data::Validate::IP" : "0",
+ "English" : "0",
+ "IO::Select" : "0",
+ "Monitoring::Plugin" : "0",
+ "Monitoring::Plugin::Getopt" : "0",
+ "Monitoring::Plugin::Threshold" : "0",
+ "Net::DNS" : "0",
+ "Net::IP" : "0",
+ "Readonly" : "0"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "version" : "1.4.3",
+ "x_serialization_backend" : "JSON::PP version 2.27400_02"
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MYMETA.yml b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MYMETA.yml
new file mode 100644
index 0000000..e9d6c6b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/MYMETA.yml
@@ -0,0 +1,32 @@
+---
+abstract: unknown
+author:
+ - unknown
+build_requires:
+ ExtUtils::MakeMaker: '6.36'
+configure_requires:
+ ExtUtils::MakeMaker: '0'
+dynamic_config: 0
+generated_by: 'Module::Install version 1.19, CPAN::Meta::Converter version 2.150010'
+license: unknown
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: '1.4'
+name: check_rbl
+no_index:
+ directory:
+ - inc
+ - t
+requires:
+ Data::Validate::Domain: '0.12'
+ Data::Validate::IP: '0'
+ English: '0'
+ IO::Select: '0'
+ Monitoring::Plugin: '0'
+ Monitoring::Plugin::Getopt: '0'
+ Monitoring::Plugin::Threshold: '0'
+ Net::DNS: '0'
+ Net::IP: '0'
+ Readonly: '0'
+version: 1.4.3
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/Makefile.PL b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/Makefile.PL
new file mode 100644
index 0000000..ba77639
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/Makefile.PL
@@ -0,0 +1,65 @@
+# Load the Module::Install bundled in ./inc/
+use lib '.'; # added since from Perl 5.26 '.' is no more in @INC
+use inc::Module::Install;
+
+##############################################################################
+# Define metadata (we read it from the binary)
+
+name 'check_rbl';
+version_from 'check_rbl';
+
+##############################################################################
+# Specific dependencies
+
+my %prereqs = (
+ 'Data::Validate::Domain' => 0.12,
+ 'Data::Validate::IP' => 0,
+ 'English' => 0,
+ 'Net::DNS' => 0,
+ 'Net::IP' => 0,
+ 'Readonly' => 0,
+ 'IO::Select' => 0,
+);
+
+if( eval { require Monitoring::Plugin } ) {
+ $prereqs{'Monitoring::Plugin'} = 0;
+}
+else {
+ $prereqs{'Nagios::Plugin'} = 0;
+}
+
+if( eval { require Monitoring::Plugin::Threshold } ) {
+ $prereqs{'Monitoring::Plugin::Threshold'} = 0;
+}
+else {
+ $prereqs{'Nagios::Plugin::Threshold'} = 0;
+}
+
+if( eval { require Monitoring::Plugin::Getopt } ) {
+ $prereqs{'Monitoring::Plugin::Getopt'} = 0;
+}
+else {
+ $prereqs{'Nagios::Plugin::Getopt'} = 0;
+}
+
+# Net::DNS 1.03 is broken
+my $ver = eval { require Net::DNS; $Net::DNS::VERSION };
+if (!$ver || $ver eq '1.03') {
+ warn 'Net::DNS is broken please downgrade until fixed. See https://rt.cpan.org/Ticket/Display.html?id=108745';
+ $prereqs{'Net::DNS'} = '1.04';
+}
+
+install_script 'check_rbl';
+
+auto_install;
+
+tests 't/*.t';
+
+WriteMakefile(
+ PREREQ_PM => \%prereqs,
+ INSTALLSCRIPT => '/usr/lib/nagios/plugins/contrib',
+ INSTALLSITESCRIPT => '/usr/lib/nagios/plugins/contrib',
+ MAN1PODS => { 'check_rbl.pod' =>'blib/man1/check_rbl.1', },
+ MAN3PODS => { },
+);
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/NEWS b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/NEWS
new file mode 100644
index 0000000..2868a3a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/NEWS
@@ -0,0 +1,22 @@
+2019-02-28: 1.4.4 - added the --append option
+2018-05-30: 1.4.3 - removing spamcannibal.org from the documentation and default configuration
+2018-05-25: 1.4.2 - removing dnsbl.cyberlogic.net from the documentation and default configuration
+2017-07-17: 1.4.1 - Perl 5.26 support
+2017-04-18: 1.4.0 - IPv6 support
+2016-06-07: 1.3.8 - allowing Nagios::Plugins for older distributions
+2015-02-01: 1.3.7 - now depends on Monitoring::Plugins (Nagios::Plugins
+ is deprecated)
+2014-12-05: 1.3.6 - removed dependency on Data::Dumper
+2014-09-21: 1.3.5 - fixed the default critical and warning range
+2014-09-20: 1.3.4 - parameter validation fix
+2014-08-09: 1.3.3 - parameter validation
+2014-01-30: 1.3.2 - documentation and dependecies update
+2013-09-26: 1.3.1 - disabled embedded Perl
+2011-07-11: 1.3.0 - whitelistings support
+2011-03-22: 1.2.2 - bug fix release (dependencies fixed)
+2010-07-05: 1.2.1 - bug fix release (see Changes)
+2010-04-08: 1.2.0 - improved parallel checks and several fixes
+2009-10-27: 1.1.0 - parallel checks
+2009- : 1.0.2 - --retry command line argument to specify DNS retries
+2009-01-06: 1.0.1 - Execution time in the performance data
+2008-12-29: 1.0.0 - Initial release
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/README.md b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/README.md
new file mode 100644
index 0000000..fb8dd39
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/README.md
@@ -0,0 +1,31 @@
+
+ (c) Matteo Corti, ETH Zurich, 2007-2012
+
+ (c) Matteo Corti, 2007-2019
+
+ see AUTHORS for the complete list of contributors
+
+# check_rbl
+
+A Nagios plugin to check if an SMTP server is blacklisted
+
+## Note
+
+Some blacklister as Spamhaus ban DNS queries from public DNS
+resolvers as Google resulting in no host being listed. If you are
+experiencing problems with the plugin just try the DNS query with a
+tool as nslookup to check your DNS configuration.
+
+## Known bugs and problems
+
+Needs ```Data::Validate::Domain``` 0.12 to handle fully qualified host names with an ending dot (e.g., "example.org.")
+
+## Example
+
+```
+check_rbl -H example.org -t 60 -c 1 -w 1 -s cbl.abuseat.org -s bl.deadbeef.com -s spamtrap.drbl.drand.net -s spamsources.fabel.dk -s 0spam.fusionzero.com -s mail-abuse.blacklist.jippg.org -s korea.services.net -s spamguard.leadmon.net -s ix.dnsbl.manitu.net -s relays.nether.net -s psbl.surriel.com -s dyna.spamrats.com -s noptr.spamrats.com -s spam.spamrats.com -s dnsbl.sorbs.net -s spam.dnsbl.sorbs.net -s bl.spamcop.net -s pbl.spamhaus.org -s sbl.spamhaus.org -s xbl.spamhaus.org -s ubl.unsubscore.com -s dnsbl-1.uceprotect.net -s dnsbl-2.uceprotect.net -s dnsbl-3.uceprotect.net -s db.wpbl.info -s access.redhawk.org -s blacklist.sci.kun.nl -s dnsbl.kempt.net -s forbidden.icm.edu.pl -s hil.habeas.com -s rbl.schulte.org -s sbl-xbl.spamhaus.org -s bl.technovision.dk -s b.barracudacentral.org -s dnsbl.antispam.or.id -s dnsbl.inps.de -s drone.abuse.ch -s dsn.rfc-ignorant.org -s dul.dnsbl.sorbs.net -s http.dnsbl.sorbs.net -s l1.spews.dnsbl.sorbs.net -s l2.spews.dnsbl.sorbs.net -s misc.dnsbl.sorbs.net -s postmaster.rfc-ignorant.org -s rbl.spamlab.com -s rbl.suresupport.com -s relays.bl.kunden.de -s smtp.dnsbl.sorbs.net -s socks.dnsbl.sorbs.net -s spam.abuse.ch -s spamrbl.imp.ch -s tr.countries.nerd.dk -s unsure.nether.net -s virbl.bit.nl -s web.dnsbl.sorbs.net -s whois.rfc-ignorant.org -s wormrbl.imp.ch -s zen.spamhaus.org -s zombie.dnsbl.sorbs.net -s blackholes.five-ten-sg.com -s blacklist.woody.ch -s bl.emailbasura.org -s bogons.cymru.com -s combined.abuse.ch -s duinv.aupads.org -s dynip.rothen.com -s ohps.dnsbl.net.au -s omrs.dnsbl.net.au -s orvedb.aupads.org -s osps.dnsbl.net.au -s osrs.dnsbl.net.au -s owfs.dnsbl.net.au -s owps.dnsbl.net.au -s probes.dnsbl.net.au -s proxy.bl.gweep.ca -s proxy.block.transip.nl -s rbl.inter.net -s rbl.megarbl.net -s rdts.dnsbl.net.au -s relays.bl.gweep.ca -s residential.block.transip.nl -s ricn.dnsbl.net.au -s rmst.dnsbl.net.au -s spamlist.or.kr -s t3direct.dnsbl.net.au -s ubl.lashback.com -s all.s5h.net -s bl.spamcannibal.org -s dnsbl.anticaptcha.net -s dnsbl.dronebl.org -s dnsbl.spfbl.net -s ips.backscatterer.org -s singular.ttk.pte.hu -s spam.dnsbl.anonmails.de -s spambot.bls.digibase.ca -s z.mailspike.net
+```
+
+## Bugs
+Please report any bugs or feature requests through the
+web interface at https://github.com/matteocorti/check_rbl/issues
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/TODO b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/TODO
new file mode 100644
index 0000000..29def70
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/TODO
@@ -0,0 +1,2 @@
+* refactor mdns to reduce code complexity
+* unit tests
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/VERSION b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/VERSION
new file mode 100644
index 0000000..1c99cf0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/VERSION
@@ -0,0 +1 @@
+1.4.4
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl
new file mode 100644
index 0000000..730a937
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl
@@ -0,0 +1,642 @@
+#!perl
+
+# nagios: -epn
+
+package main;
+
+# check_rbl is a Nagios plugin to check if an SMTP server is black- or
+# white- listed
+#
+# See the INSTALL file for installation instructions
+#
+# Copyright (c) 2014, Matteo Corti <matteo@corti.li>
+# Copyright (c) 2007, ETH Zurich.
+# Copyright (c) 2010, Elan Ruusamae <glen@delfi.ee>.
+#
+# This module is free software; you can redistribute it and/or modify it
+# under the terms of GNU general public license (gpl) version 3.
+# See the LICENSE file for details.
+
+use strict;
+use warnings;
+
+our $VERSION = '1.4.4';
+
+use Data::Validate::Domain qw(is_hostname);
+use Data::Validate::IP qw(is_ipv4 is_ipv6);
+use IO::Select;
+use Net::DNS;
+use Net::IP qw(ip_expand_address);
+use Readonly;
+use English qw(-no_match_vars);
+
+my $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' );
+my $plugin_threshold_module =
+ load_module( 'Monitoring::Plugin::Threshold', 'Nagios::Plugin::Threshold' );
+my $plugin_getopt_module =
+ load_module( 'Monitoring::Plugin::Getopt', 'Nagios::Plugin::Getopt' );
+
+# Check which version of the monitoring plugins is available
+
+sub load_module {
+
+ my @names = @_;
+ my $loaded_module;
+
+ for my $name (@names) {
+
+ my $file = $name;
+
+ # requires need either a bare word or a file name
+ $file =~ s{::}{/}gsxm;
+ $file .= '.pm';
+
+ eval { ## no critic (ErrorHandling::RequireCheckingReturnValueOfEval)
+ require $file;
+ $name->import();
+ };
+ if ( !$EVAL_ERROR ) {
+ $loaded_module = $name;
+ last;
+ }
+ }
+
+ if ( !$loaded_module ) {
+ #<<<
+ print 'CHECK_RBL: plugin not found: ' . join( ', ', @names ) . "\n"; ## no critic (RequireCheckedSyscall)
+ #>>>
+
+ exit 2;
+ }
+
+ return $loaded_module;
+
+}
+
+Readonly our $DEFAULT_TIMEOUT => 15;
+Readonly our $DEFAULT_RETRIES => 4;
+Readonly our $DEFAULT_WORKERS => 20;
+Readonly our $DEFAULT_QUERY_TIMEOUT => 15;
+Readonly our $DEFAULT_APPEND_STRING => q{};
+
+# IMPORTANT: Nagios plugins could be executed using embedded perl in this case
+# the main routine would be executed as a subroutine and all the
+# declared subroutines would therefore be inner subroutines
+# This will cause all the global lexical variables not to stay shared
+# in the subroutines!
+#
+# All variables are therefore declared as package variables...
+#
+
+## no critic (ProhibitPackageVars)
+our ( @listed, @timeouts, $options, $plugin, $threshold, $timeouts_string, );
+
+##############################################################################
+# Usage : debug("some message string")
+# Purpose : write a message if the debugging option was specified
+# Returns : n/a
+# Arguments : message : message string
+# Throws : n/a
+# Comments : n/a
+# See also : n/a
+sub debug {
+
+ # arguments
+ my $message = shift;
+
+ if ( !defined $message ) {
+ $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ q{Internal error: not enough parameters for 'debug'} );
+ }
+
+ if ( $options && $options->debug() ) {
+ ## no critic (RequireCheckedSyscall)
+ print "[DBG] $message\n";
+ }
+
+ return;
+
+}
+
+##############################################################################
+# Usage : verbose("some message string", $optional_verbosity_level);
+# Purpose : write a message if the verbosity level is high enough
+# Returns : n/a
+# Arguments : message : message string
+# level : options verbosity level
+# Throws : n/a
+# Comments : n/a
+# See also : n/a
+sub verbose {
+
+ # arguments
+ my $message = shift;
+ my $level = shift;
+
+ if ( !defined $message ) {
+ $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ q{Internal error: not enough parameters for 'verbose'} );
+ }
+
+ if ( !defined $level ) {
+ $level = 0;
+ }
+
+ if ( $level < $options->verbose ) {
+ if ( !print $message ) {
+ $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ 'Error: cannot write to STDOUT' );
+ }
+ }
+
+ return;
+
+}
+
+# the script is declared as a package so that it can be unit tested
+# but it should not be used as a module
+if ( !caller ) {
+ run();
+}
+
+##############################################################################
+# Usage : my $res = init_dns_resolver( $retries )
+# Purpose : Initializes a new DNS resolver
+# Arguments : retries : number of retries
+# Returns : The newly created resolver
+# See also : Perl Net::DNS
+sub init_dns_resolver {
+
+ my $retries = shift;
+
+ my $res = Net::DNS::Resolver->new();
+ if ( $res->can('force_v4') ) {
+ $res->force_v4(1);
+ }
+
+ if ($retries) {
+ $res->retry($retries);
+ }
+
+ return $res;
+}
+
+##############################################################################
+# Usage : mdns(\@addresses, $callback)
+# Purpose : Perform multiple DNS lookups in parallel
+# Returns : n/a
+# See also : Perl Net::DNS module mresolv in examples
+#
+# Resolves all IPs in C<@addresses> in parallel.
+# If answer is found C<$callback> is called with arguments as: $name, $host.
+#
+# Author: Elan Ruusamae <glen@delfi.ee>, (c) 1999-2010
+sub mdns {
+
+ my ( $data, $callback ) = @_;
+
+ # number of requests to have outstanding at any time
+ my $workers = $options ? $options->workers() : 1;
+
+ # timeout per query (seconds)
+ my $timeout = $options ? $options->get('query-timeout') : $DEFAULT_TIMEOUT;
+ my $res = init_dns_resolver( $options ? $options->retry() : 0 );
+
+ my $sel = IO::Select->new();
+ my $eof = 0;
+
+ my @addrs = @{$data};
+
+ my %addrs;
+ while (1) {
+
+ #----------------------------------------------------------------------
+ # Read names until we've filled our quota of outstanding requests.
+ #----------------------------------------------------------------------
+
+ while ( !$eof && $sel->count() < $workers ) {
+
+ my $name = shift @addrs;
+
+ if ( !defined $name ) {
+ debug('reading...EOF.');
+ $eof = 1;
+ last;
+ }
+
+ debug("reading...$name");
+
+ my $sock = $res->bgsend($name);
+
+ if ( !defined $sock ) {
+ verbose 'DNS query error: ' . $res->errorstring;
+ verbose "Skipping $name";
+ }
+ else {
+
+ # we store in a hash the query we made, as parsing it back from
+ # response gives different ip for ips with multiple hosts
+ $addrs{$sock} = $name;
+ $sel->add($sock);
+ debug( "name = $name, outstanding = " . $sel->count() );
+
+ }
+
+ }
+
+ #----------------------------------------------------------------------
+ # Wait for any replies. Remove any replies from the outstanding pool.
+ #----------------------------------------------------------------------
+
+ my @ready;
+ my $timed_out = 1;
+
+ debug('waiting for replies');
+
+ @ready = $sel->can_read($timeout);
+
+ while (@ready) {
+
+ $timed_out = 0;
+
+ debug( 'replies received: ' . scalar @ready );
+
+ foreach my $sock (@ready) {
+
+ debug('handling a reply');
+
+ my $addr = $addrs{$sock};
+ delete $addrs{$sock};
+ $sel->remove($sock);
+
+ my $ans = $res->bgread($sock);
+
+ my $host;
+
+ if ($ans) {
+
+ foreach my $rr ( $ans->answer ) {
+
+ debug('Processing answer');
+
+ ## no critic(ProhibitDeepNests)
+ if ( !( $rr->type eq 'A' ) ) {
+ next;
+ }
+
+ $host = $rr->address;
+
+ debug("host = $host");
+
+ # take just the first answer
+ last;
+ }
+ }
+ else {
+
+ debug( 'no answer: ' . $res->errorstring() );
+
+ }
+
+ if ( defined $host ) {
+
+ debug("callback( $addr, $host )");
+
+ }
+ else {
+
+ debug("callback( $addr, <undefined> )");
+
+ }
+
+ &{$callback}( $addr, $host );
+ }
+
+ @ready = $sel->can_read(0);
+
+ }
+
+ #----------------------------------------------------------------------
+ # If we timed out waiting for replies, remove all entries from the
+ # outstanding pool.
+ #----------------------------------------------------------------------
+
+ if ($timed_out) {
+
+ debug('timeout: clearing the outstanding pool.');
+
+ foreach my $sock ( $sel->handles() ) {
+ my $addr = $addrs{$sock};
+ delete $addrs{$sock};
+ $sel->remove($sock);
+
+ # callback for hosts that timed out
+ &{$callback}( $addr, q{} );
+ }
+ }
+
+ debug( 'outstanding = ' . $sel->count() . ", eof = $eof" );
+
+ #----------------------------------------------------------------------
+ # We're done if there are no outstanding queries and we've read EOF.
+ #----------------------------------------------------------------------
+
+ last if ( $sel->count() == 0 ) && $eof;
+ }
+
+ return;
+
+}
+
+##############################################################################
+# Usage : validate( $hostname );
+# Purpose : check if an IP address or host name is valid
+# Returns : the IP address corresponding to $hostname
+# Arguments : n/a
+# Throws : an UNKNOWN error if the argument is not valid
+# Comments : n/a
+# See also : n/a
+sub validate {
+
+ my $hostname = shift;
+ my $ip = $hostname;
+
+ debug("validate($hostname, $ip)");
+
+ if ( !is_ipv4($hostname) && !is_ipv6($hostname) ) {
+
+ if ( is_hostname($hostname) ) {
+
+ mdns(
+ [$hostname],
+ sub {
+ my ( $addr, $host ) = @_;
+ $ip = $host;
+ }
+ );
+
+ if ( !$ip ) {
+ $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ 'Cannot resolve ' . $hostname );
+ }
+
+ }
+
+ if ( !$ip ) {
+ $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ 'Cannot resolve ' . $hostname );
+ }
+
+ }
+
+ if ( is_ipv6($ip) ) {
+ $ip = Net::IP::ip_expand_address( $ip, 6 );
+ }
+
+ return $ip;
+
+}
+
+##############################################################################
+# Usage : run();
+# Purpose : main method
+# Returns : n/a
+# Arguments : n/a
+# Throws : n/a
+# Comments : n/a
+# See also : n/a
+sub run {
+
+ ################################################################################
+ # Initialization
+
+ $plugin = $plugin_module->new( shortname => 'CHECK_RBL' );
+
+ my $time = time;
+
+ ########################
+ # Command line arguments
+
+ $options = $plugin_getopt_module->new(
+ usage => 'Usage: %s [OPTIONS]',
+ version => $VERSION,
+ url => 'http://matteocorti.github.io/check_rbl/',
+ blurb => 'Check SMTP black- or white- listing status',
+ );
+
+ $options->arg(
+ spec => 'critical|c=i',
+ help => 'Number of blacklisting servers for a critical warning',
+ required => 0,
+ default => 1,
+ );
+
+ $options->arg(
+ spec => 'warning|w=i',
+ help => 'Number of blacklisting servers for a warning',
+ required => 0,
+ default => 1,
+ );
+
+ $options->arg(
+ spec => 'debug|d',
+ help => 'Prints debugging information',
+ required => 0,
+ default => 0,
+ );
+
+ $options->arg(
+ spec => 'server|s=s@',
+ help => 'RBL server',
+ required => 1,
+ );
+
+ $options->arg(
+ spec => 'host|H=s',
+ help => 'SMTP server to check',
+ required => 1,
+ );
+
+ $options->arg(
+ spec => 'retry|r=i',
+ help => 'Number of times to try a DNS query (default is 4) ',
+ required => 0,
+ default => $DEFAULT_RETRIES,
+ );
+
+ $options->arg(
+ spec => 'workers=i',
+ help => 'Number of parallel checks',
+ required => 0,
+ default => $DEFAULT_WORKERS,
+ );
+
+ $options->arg(
+ spec => 'whitelistings|wl',
+ help => 'Check whitelistings instead of blacklistings',
+ required => 0,
+ default => 0,
+ );
+
+ $options->arg(
+ spec => 'query-timeout=i',
+ help => 'Timeout of the RBL queries',
+ required => 0,
+ default => $DEFAULT_QUERY_TIMEOUT,
+ );
+
+ $options->arg(
+ spec => 'append|a=s',
+ help => 'Append string at the end of the plugin output',
+ required => 0,
+ default => $DEFAULT_APPEND_STRING,
+ );
+
+ $options->getopts();
+
+ ###############
+ # Sanity checks
+
+ if ( $options->critical < $options->warning ) {
+ $plugin->nagios_exit( $plugin_module->UNKNOWN,
+ 'critical has to be greater or equal warning' );
+ }
+
+ my $ip = validate( $options->host );
+
+ my @servers = @{ $options->server };
+
+ verbose 'Using ' . $options->timeout . " as global script timeout\n";
+ alarm $options->timeout;
+
+ ################
+ # Set the limits
+
+ # see https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT
+ $threshold = $plugin_threshold_module->set_thresholds(
+ warning => $options->warning - 1,
+ critical => $options->critical - 1,
+ );
+
+ ################################################################################
+
+ my $nservers = scalar @servers;
+
+ verbose 'Checking ' . $options->host . " ($ip) on $nservers server(s)\n";
+
+ # build address lists
+ my @addrs;
+ foreach my $server (@servers) {
+ my $local_ip = $ip;
+ if ( is_ipv6($local_ip) ) {
+ $local_ip = reverse $local_ip;
+ $local_ip =~ s/://gmxs;
+ $local_ip =~ s/(.)/$1\./gmxs;
+ $local_ip = $local_ip . $server;
+ }
+ else {
+ $local_ip =~
+s/(\d{1,3}) [.] (\d{1,3}) [.] (\d{1,3}) [.] (\d{1,3})/$4.$3.$2.$1.$server/mxs;
+ }
+ push @addrs, $local_ip;
+ }
+
+ mdns(
+ \@addrs,
+ sub {
+ my ( $addr, $host ) = @_;
+
+ if ( defined $host ) {
+
+ debug("callback( $addr, $host )");
+
+ }
+ else {
+
+ debug("callback( $addr, <undefined> )");
+
+ }
+
+ # extract RBL we checked
+ $addr =~ s/^(?:[a-f\d][.]){32}//mxs;
+ $addr =~ s/^(?:\d+[.]){4}//mxs;
+ if ( defined $host ) {
+ if ( $host eq q{} ) {
+ push @timeouts, $addr;
+ }
+ else {
+ verbose "listed in $addr as $host\n";
+ if ( !$options->get('whitelistings') ) {
+ push @listed, $addr;
+ }
+ }
+ }
+ else {
+ verbose "not listed in $addr\n";
+ if ( $options->get('whitelistings') ) {
+ push @listed, $addr;
+ }
+ }
+ }
+ );
+
+ my $total = scalar @listed;
+
+ my $status;
+ my $appendstring = $options->append;
+ if ( $options->get('whitelistings') ) {
+
+ $status =
+ $options->host
+ . " NOT WHITELISTED on $total "
+ . ( ( $total == 1 ) ? 'server' : 'servers' )
+ . " of $nservers";
+ }
+ else {
+ $status =
+ $options->host
+ . " BLACKLISTED on $total "
+ . ( ( $total == 1 ) ? 'server' : 'servers' )
+ . " of $nservers";
+
+ }
+
+ # append timeout info, but do not account these in status
+ if (@timeouts) {
+ $timeouts_string = scalar @timeouts;
+ $status =
+ " ($timeouts_string server"
+ . ( ( $timeouts_string > 1 ) ? 's' : q{} )
+ . ' timed out: '
+ . join( ', ', @timeouts ) . ')';
+ }
+
+ if ( $total > 0 ) {
+ $status .= " (@listed)";
+ }
+
+ $plugin->add_perfdata(
+ label => 'servers',
+ value => $total,
+ uom => q{},
+ threshold => $threshold,
+ );
+
+ $plugin->add_perfdata(
+ label => 'time',
+ value => time - $time,
+ uom => q{s},
+ );
+
+ # append string defined in append argument to status output
+ if ( $appendstring ne q{} ) {
+ $status .= " $appendstring";
+ }
+
+ $plugin->nagios_exit( $threshold->get_status($total), $status );
+
+ return;
+
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl.ini b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl.ini
new file mode 100644
index 0000000..74b37f3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl.ini
@@ -0,0 +1,104 @@
+[rbl]
+server=cbl.abuseat.org
+server=bl.deadbeef.com
+server=spamtrap.drbl.drand.net
+server=spamsources.fabel.dk
+server=0spam.fusionzero.com
+server=mail-abuse.blacklist.jippg.org
+server=korea.services.net
+server=spamguard.leadmon.net
+server=ix.dnsbl.manitu.net
+server=relays.nether.net
+server=psbl.surriel.com
+server=dyna.spamrats.com
+server=noptr.spamrats.com
+server=spam.spamrats.com
+server=dnsbl.sorbs.net
+server=spam.dnsbl.sorbs.net
+server=bl.spamcop.net
+server=pbl.spamhaus.org
+server=sbl.spamhaus.org
+server=xbl.spamhaus.org
+server=ubl.unsubscore.com
+server=dnsbl-1.uceprotect.net
+server=dnsbl-2.uceprotect.net
+server=dnsbl-3.uceprotect.net
+server=db.wpbl.info
+server=access.redhawk.org
+server=blacklist.sci.kun.nl
+server=dnsbl.kempt.net
+server=forbidden.icm.edu.pl
+server=hil.habeas.com
+server=rbl.schulte.org
+server=sbl-xbl.spamhaus.org
+server=bl.technovision.dk
+server=b.barracudacentral.org
+server=dnsbl.antispam.or.id
+server=dnsbl.inps.de
+server=drone.abuse.ch
+server=dsn.rfc-ignorant.org
+server=dul.dnsbl.sorbs.net
+server=http.dnsbl.sorbs.net
+server=l1.spews.dnsbl.sorbs.net
+server=l2.spews.dnsbl.sorbs.net
+server=misc.dnsbl.sorbs.net
+server=postmaster.rfc-ignorant.org
+server=rbl.spamlab.com
+server=rbl.suresupport.com
+server=relays.bl.kunden.de
+server=smtp.dnsbl.sorbs.net
+server=socks.dnsbl.sorbs.net
+server=spam.abuse.ch
+server=spamrbl.imp.ch
+server=tr.countries.nerd.dk
+server=unsure.nether.net
+server=virbl.bit.nl
+server=web.dnsbl.sorbs.net
+server=whois.rfc-ignorant.org
+server=wormrbl.imp.ch
+server=zen.spamhaus.org
+server=zombie.dnsbl.sorbs.net
+server=blackholes.five-ten-sg.com
+server=blacklist.woody.ch
+server=bl.emailbasura.org
+server=bogons.cymru.com
+server=combined.abuse.ch
+server=duinv.aupads.org
+server=dynip.rothen.com
+server=ohps.dnsbl.net.au
+server=omrs.dnsbl.net.au
+server=orvedb.aupads.org
+server=osps.dnsbl.net.au
+server=osrs.dnsbl.net.au
+server=owfs.dnsbl.net.au
+server=owps.dnsbl.net.au
+server=probes.dnsbl.net.au
+server=proxy.bl.gweep.ca
+server=proxy.block.transip.nl
+server=rbl.inter.net
+server=rbl.megarbl.net
+server=rdts.dnsbl.net.au
+server=relays.bl.gweep.ca
+server=residential.block.transip.nl
+server=ricn.dnsbl.net.au
+server=rmst.dnsbl.net.au
+server=spamlist.or.kr
+server=t3direct.dnsbl.net.au
+server=ubl.lashback.com
+server=all.s5h.net
+server=bl.spamcannibal.org
+server=dnsbl.anticaptcha.net
+server=dnsbl.dronebl.org
+server=dnsbl.spfbl.net
+server=ips.backscatterer.org
+server=singular.ttk.pte.hu
+server=spam.dnsbl.anonmails.de
+server=spambot.bls.digibase.ca
+server=z.mailspike.net
+
+; these are rather slow
+;server=bl.csma.biz
+;server=sbl.csma.biz
+;server=cdl.anti-spam.org.cn
+;server=virus.rbl.jp
+;server=short.rbl.jp
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl.pod b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl.pod
new file mode 100644
index 0000000..9056a98
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl.pod
@@ -0,0 +1,144 @@
+=pod
+
+=head1 NAME
+
+C<check_rbl> - a Nagios plugin to check if an SMTP server is blacklisted
+
+=head1 DESCRIPTION
+
+check_rbl is a Nagios plugin to check if an SMTP server is blacklisted
+
+=head1 VERSION
+
+Version 1.4.2
+
+=head1 SYNOPSIS
+
+check_rbl [--help] [--verbose] [--version] [--timeout t]
+ -H hostname --server servername
+ [--critical n] [--warning n] [--workers n]
+
+=head1 REQUIRED ARGUMENTS
+
+ -s, --server=STRING RBL server (may be repeated)
+ -H, --host=STRING SMTP server to check
+
+=head1 OPTIONS
+
+ -?, --usage Print usage information
+ -h, --help Print detailed help screen
+ -V, --version Print version information
+ -a, --append=STRING Append string at the end of the plugin output
+ --extra-opts=[<section>[@<config_file>]] Section and/or config_file from which to load extra options (may repeat)
+ -c, --critical=INTEGER Number of blacklisting servers for a critical warning
+ -w, --warning=INTEGER Number of blacklisting servers for a warning
+ -d, --debug Prints debugging information
+ -r, --retry=INTEGER Number of times to try a DNS query (default is 4)
+ --workers=INTEGER Number of parallel checks
+ --whitelistings, --wl Check whitelistings instead of blacklistings
+ --query-timeout=INTEGER Timeout of the RBL queries
+ -t, --timeout=INTEGER Seconds before plugin times out (default: 15)
+ -v, --verbose Show details for command-line debugging (can repeat up to 3 times)
+
+=head1 EXAMPLE
+
+ check_rbl -t 30 -H matteocorti.ch -s zen.spamhaus.org -s bl.spamcop.net
+
+=head1 DIAGNOSTICS
+
+You can specify multiple --verbose options to increase the program
+verbosity. --debug can be used to display the process and internals of
+the querying mechanism.
+
+=head1 EXIT STATUS
+
+0 if OK, 1 in case of a warning, 2 in case of a critical status and 3
+in case of an unknown problem
+
+=head1 DEPENDENCIES
+
+check_updates depends on
+
+=over 4
+
+=item * Data::Validate::Domain
+
+=item * Data::Validate::IP
+
+=item * Getopt::Long
+
+=item * IO::Select
+
+=item * Monitoring::Plugin
+
+=item * Monitoring::Plugin::Threshold
+
+=item * Net::DNS
+
+=item * Readonly
+
+=back
+
+=head1 CONFIGURATION
+
+=head1 INCOMPATIBILITIES
+
+None reported.
+
+=head1 SEE ALSO
+
+Nagios documentation
+
+=head1 BUGS AND LIMITATIONS
+
+No bugs have been reported.
+
+Please report any bugs or feature requests through the
+web interface at https://github.com/matteocorti/check_rbl/issues
+
+=head1 AUTHOR
+
+Matteo Corti <matteo@corti.li>
+
+=head1 LICENSE AND COPYRIGHT
+
+Copyright (c) 2010, Elan Ruusamae <glen@delfi.ee>
+
+Copyright (c) 2008-2017, Matteo Corti <matteo.corti@id.ethz.ch>
+
+This module is free software; you can redistribute it and/or modify it
+under the terms of GNU general public license (gpl) version 3.
+See the LICENSE file for details.
+
+=head1 DISCLAIMER OF WARRANTY
+
+BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
+WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
+PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE
+TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+=head1 ACKNOWLEDGMENTS
+
+=encoding iso-8859-1
+
+Elan Ruusamäe for the improved parallel support and several fixes
+
+Victor V Kudlak for parallel support
+
+Jan Kantert for whitelistings support
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl.spec b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl.spec
new file mode 100644
index 0000000..281b79d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/check_rbl.spec
@@ -0,0 +1,116 @@
+%define version 1.4.4
+%define release 0
+%define sourcename check_rbl
+%define packagename nagios-plugins-check-rbl
+%define nagiospluginsdir %{_libdir}/nagios/plugins
+
+# No binaries in this package
+%define debug_package %{nil}
+
+Summary: check_rbl is a Nagios plugin to check if an SMTP server is blacklisted
+Name: %{packagename}
+Obsoletes: check_rbl
+Version: %{version}
+Release: %{release}%{?dist}
+License: GPLv3+
+Packager: Matteo Corti <matteo@corti.li>
+Group: Applications/System
+BuildRoot: %{_tmppath}/%{packagename}-%{version}-%{release}-root-%(%{__id_u} -n)
+URL: https://github.com/matteocorti/check_rbl
+Source: https://github.com/matteocorti/check_rbl/releases/download/v%{version}/check_rbl-%{version}.tar.gz
+
+# Fedora build requirement (not needed for EPEL{4,5})
+BuildRequires: perl(ExtUtils::MakeMaker)
+
+Requires: nagios-plugins
+
+%description
+check_rbl is a Nagios plugin to check if an SMTP server is blacklisted
+
+%prep
+%setup -q -n %{sourcename}-%{version}
+
+%build
+%{__perl} Makefile.PL INSTALLDIRS=vendor \
+ INSTALLSCRIPT=%{nagiospluginsdir} \
+ INSTALLVENDORSCRIPT=%{nagiospluginsdir}
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+make pure_install PERL_INSTALL_ROOT=%{buildroot}
+find %{buildroot} -type f -name .packlist -exec rm -f {} \;
+find %{buildroot} -type f -name "*.pod" -exec rm -f {} \;
+find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
+%{_fixperms} %{buildroot}/*
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS Changes NEWS README TODO COPYING COPYRIGHT
+%{nagiospluginsdir}/%{sourcename}
+%{_mandir}/man1/%{sourcename}.1*
+
+%changelog
+* Thu Feb 28 2019 Matteo Corti <matteo@corti.li> - 1.4.4-0
+- Update to 1.4.4
+
+* Tue May 30 2018 Matteo Corti <matteo@corti.li> - 1.4.3-0
+- Update to 1.4.3
+
+* Sun May 27 2018 Matteo Corti <matteo@corti.li> - 1.4.2-0
+- Update to 1.4.2
+
+* Mon Jul 17 2017 Matteo Corti <matteo@corti.li> - 1.4.1-0
+- Update to 1.4.1
+
+* Tue Apr 18 2017 Matteo Corti <matteo@corti.li> - 1.4.0-0
+- Update to 1.4.0
+
+* Wed Dec 30 2015 Matteo Corti <matteo@corti.li> - 1.3.8-0
+- Update to 1.3.8
+
+* Sun Feb 1 2015 Matteo Corti <matteo@corti.li> - 1.3.7-0
+- Update to 1.3.7 (using Monitoring::Plugins)
+
+* Fri Dec 5 2014 Matteo Corti <matteo@corti.li> - 1.3.6-0
+- Updated to 1.3.6 (removed dependency on Data::Dumper)
+
+* Sat Sep 20 2014 Matteo Corti <matteo@corti.li> - 1.3.5-0
+- Updated to 1.3.5
+
+* Fri Sep 19 2014 Matteo Corti <matteo@corti.li> - 1.3.4-0
+- Updated to 1.3.4
+
+* Sat Aug 9 2014 Matteo Corti <matteo.corti@id.ethz.ch> - 1.3.3-0
+- updated to 1.3.3
+
+* Thu Jan 30 2014 Matteo Corti <matteo.corti@id.ethz.ch> - 1.3.2-0
+- Dependencies and documentation update
+
+* Mon Jul 11 2011 Matteo Corti <matteo.corti@id.ethz.ch> - 1.3.0-0
+- Updated to 1.3.0 (whitelistings support)
+
+* Tue Mar 22 2011 Matteo Corti <matteo.corti@id.ethz.ch> - 1.2.2-0
+- Updated to 1.2.2 (bug fix) and renamed the package
+
+* Mon Jul 5 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.2.1-0
+- Updated to 1.2.1 (bug fix)
+
+* Thu Apr 8 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.2.0-0
+- Updated to 1.2.0 and imprved the SPEC file
+
+* Tue Oct 27 2009 Matteo Corti <matteo.corti@id.ethz.ch> - 1.1.0-0
+- Updated to 1.1.0 (parallel checks)
+
+* Thu Jan 22 2009 Matteo Corti <matteo.corti@id.ethz.ch> - 1.0.2-0
+- --retry command line argument
+
+* Tue Jan 6 2009 Matteo Corti <matteo.corti@id.ethz.ch> - 1.0.1-0
+- Execution time in the performance data
+
+* Mon Dec 29 2008 Matteo Corti <matteo.corti@id.ethz.ch> - 1.0.0-0
+- Initial release
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/AutoInstall.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/AutoInstall.pm
new file mode 100644
index 0000000..8852e0b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/AutoInstall.pm
@@ -0,0 +1,934 @@
+#line 1
+package Module::AutoInstall;
+
+use strict;
+use Cwd ();
+use File::Spec ();
+use ExtUtils::MakeMaker ();
+
+use vars qw{$VERSION};
+BEGIN {
+ $VERSION = '1.19';
+}
+
+# special map on pre-defined feature sets
+my %FeatureMap = (
+ '' => 'Core Features', # XXX: deprecated
+ '-core' => 'Core Features',
+);
+
+# various lexical flags
+my ( @Missing, @Existing, %DisabledTests, $UnderCPAN, $InstallDepsTarget, $HasCPANPLUS );
+my (
+ $Config, $CheckOnly, $SkipInstall, $AcceptDefault, $TestOnly, $AllDeps,
+ $UpgradeDeps
+);
+my ( $PostambleActions, $PostambleActionsNoTest, $PostambleActionsUpgradeDeps,
+ $PostambleActionsUpgradeDepsNoTest, $PostambleActionsListDeps,
+ $PostambleActionsListAllDeps, $PostambleUsed, $NoTest);
+
+# See if it's a testing or non-interactive session
+_accept_default( $ENV{AUTOMATED_TESTING} or ! -t STDIN );
+_init();
+
+sub _accept_default {
+ $AcceptDefault = shift;
+}
+
+sub _installdeps_target {
+ $InstallDepsTarget = shift;
+}
+
+sub missing_modules {
+ return @Missing;
+}
+
+sub do_install {
+ __PACKAGE__->install(
+ [
+ $Config
+ ? ( UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} )
+ : ()
+ ],
+ @Missing,
+ );
+}
+
+# initialize various flags, and/or perform install
+sub _init {
+ foreach my $arg (
+ @ARGV,
+ split(
+ /[\s\t]+/,
+ $ENV{PERL_AUTOINSTALL} || $ENV{PERL_EXTUTILS_AUTOINSTALL} || ''
+ )
+ )
+ {
+ if ( $arg =~ /^--config=(.*)$/ ) {
+ $Config = [ split( ',', $1 ) ];
+ }
+ elsif ( $arg =~ /^--installdeps=(.*)$/ ) {
+ __PACKAGE__->install( $Config, @Missing = split( /,/, $1 ) );
+ exit 0;
+ }
+ elsif ( $arg =~ /^--upgradedeps=(.*)$/ ) {
+ $UpgradeDeps = 1;
+ __PACKAGE__->install( $Config, @Missing = split( /,/, $1 ) );
+ exit 0;
+ }
+ elsif ( $arg =~ /^--default(?:deps)?$/ ) {
+ $AcceptDefault = 1;
+ }
+ elsif ( $arg =~ /^--check(?:deps)?$/ ) {
+ $CheckOnly = 1;
+ }
+ elsif ( $arg =~ /^--skip(?:deps)?$/ ) {
+ $SkipInstall = 1;
+ }
+ elsif ( $arg =~ /^--test(?:only)?$/ ) {
+ $TestOnly = 1;
+ }
+ elsif ( $arg =~ /^--all(?:deps)?$/ ) {
+ $AllDeps = 1;
+ }
+ }
+}
+
+# overrides MakeMaker's prompt() to automatically accept the default choice
+sub _prompt {
+ goto &ExtUtils::MakeMaker::prompt unless $AcceptDefault;
+
+ my ( $prompt, $default ) = @_;
+ my $y = ( $default =~ /^[Yy]/ );
+
+ print $prompt, ' [', ( $y ? 'Y' : 'y' ), '/', ( $y ? 'n' : 'N' ), '] ';
+ print "$default\n";
+ return $default;
+}
+
+# the workhorse
+sub import {
+ my $class = shift;
+ my @args = @_ or return;
+ my $core_all;
+
+ print "*** $class version " . $class->VERSION . "\n";
+ print "*** Checking for Perl dependencies...\n";
+
+ my $cwd = Cwd::getcwd();
+
+ $Config = [];
+
+ my $maxlen = length(
+ (
+ sort { length($b) <=> length($a) }
+ grep { /^[^\-]/ }
+ map {
+ ref($_)
+ ? ( ( ref($_) eq 'HASH' ) ? keys(%$_) : @{$_} )
+ : ''
+ }
+ map { +{@args}->{$_} }
+ grep { /^[^\-]/ or /^-core$/i } keys %{ +{@args} }
+ )[0]
+ );
+
+ # We want to know if we're under CPAN early to avoid prompting, but
+ # if we aren't going to try and install anything anyway then skip the
+ # check entirely since we don't want to have to load (and configure)
+ # an old CPAN just for a cosmetic message
+
+ $UnderCPAN = _check_lock(1) unless $SkipInstall || $InstallDepsTarget;
+
+ while ( my ( $feature, $modules ) = splice( @args, 0, 2 ) ) {
+ my ( @required, @tests, @skiptests );
+ my $default = 1;
+ my $conflict = 0;
+
+ if ( $feature =~ m/^-(\w+)$/ ) {
+ my $option = lc($1);
+
+ # check for a newer version of myself
+ _update_to( $modules, @_ ) and return if $option eq 'version';
+
+ # sets CPAN configuration options
+ $Config = $modules if $option eq 'config';
+
+ # promote every features to core status
+ $core_all = ( $modules =~ /^all$/i ) and next
+ if $option eq 'core';
+
+ next unless $option eq 'core';
+ }
+
+ print "[" . ( $FeatureMap{ lc($feature) } || $feature ) . "]\n";
+
+ $modules = [ %{$modules} ] if UNIVERSAL::isa( $modules, 'HASH' );
+
+ unshift @$modules, -default => &{ shift(@$modules) }
+ if ( ref( $modules->[0] ) eq 'CODE' ); # XXX: bugward compatibility
+
+ while ( my ( $mod, $arg ) = splice( @$modules, 0, 2 ) ) {
+ if ( $mod =~ m/^-(\w+)$/ ) {
+ my $option = lc($1);
+
+ $default = $arg if ( $option eq 'default' );
+ $conflict = $arg if ( $option eq 'conflict' );
+ @tests = @{$arg} if ( $option eq 'tests' );
+ @skiptests = @{$arg} if ( $option eq 'skiptests' );
+
+ next;
+ }
+
+ printf( "- %-${maxlen}s ...", $mod );
+
+ if ( $arg and $arg =~ /^\D/ ) {
+ unshift @$modules, $arg;
+ $arg = 0;
+ }
+
+ # XXX: check for conflicts and uninstalls(!) them.
+ my $cur = _version_of($mod);
+ if (_version_cmp ($cur, $arg) >= 0)
+ {
+ print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n";
+ push @Existing, $mod => $arg;
+ $DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
+ }
+ else {
+ if (not defined $cur) # indeed missing
+ {
+ print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
+ }
+ else
+ {
+ # no need to check $arg as _version_cmp ($cur, undef) would satisfy >= above
+ print "too old. ($cur < $arg)\n";
+ }
+
+ push @required, $mod => $arg;
+ }
+ }
+
+ next unless @required;
+
+ my $mandatory = ( $feature eq '-core' or $core_all );
+
+ if (
+ !$SkipInstall
+ and (
+ $CheckOnly
+ or ($mandatory and $UnderCPAN)
+ or $AllDeps
+ or $InstallDepsTarget
+ or _prompt(
+ qq{==> Auto-install the }
+ . ( @required / 2 )
+ . ( $mandatory ? ' mandatory' : ' optional' )
+ . qq{ module(s) from CPAN?},
+ $default ? 'y' : 'n',
+ ) =~ /^[Yy]/
+ )
+ )
+ {
+ push( @Missing, @required );
+ $DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
+ }
+
+ elsif ( !$SkipInstall
+ and $default
+ and $mandatory
+ and
+ _prompt( qq{==> The module(s) are mandatory! Really skip?}, 'n', )
+ =~ /^[Nn]/ )
+ {
+ push( @Missing, @required );
+ $DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
+ }
+
+ else {
+ $DisabledTests{$_} = 1 for map { glob($_) } @tests;
+ }
+ }
+
+ if ( @Missing and not( $CheckOnly or $UnderCPAN) ) {
+ require Config;
+ my $make = $Config::Config{make};
+ if ($InstallDepsTarget) {
+ print
+"*** To install dependencies type '$make installdeps' or '$make installdeps_notest'.\n";
+ }
+ else {
+ print
+"*** Dependencies will be installed the next time you type '$make'.\n";
+ }
+
+ # make an educated guess of whether we'll need root permission.
+ print " (You may need to do that as the 'root' user.)\n"
+ if eval '$>';
+ }
+ print "*** $class configuration finished.\n";
+
+ chdir $cwd;
+
+ # import to main::
+ no strict 'refs';
+ *{'main::WriteMakefile'} = \&Write if caller(0) eq 'main';
+
+ return (@Existing, @Missing);
+}
+
+sub _running_under {
+ my $thing = shift;
+ print <<"END_MESSAGE";
+*** Since we're running under ${thing}, I'll just let it take care
+ of the dependency's installation later.
+END_MESSAGE
+ return 1;
+}
+
+# Check to see if we are currently running under CPAN.pm and/or CPANPLUS;
+# if we are, then we simply let it taking care of our dependencies
+sub _check_lock {
+ return unless @Missing or @_;
+
+ if ($ENV{PERL5_CPANM_IS_RUNNING}) {
+ return _running_under('cpanminus');
+ }
+
+ my $cpan_env = $ENV{PERL5_CPAN_IS_RUNNING};
+
+ if ($ENV{PERL5_CPANPLUS_IS_RUNNING}) {
+ return _running_under($cpan_env ? 'CPAN' : 'CPANPLUS');
+ }
+
+ require CPAN;
+
+ if ($CPAN::VERSION > '1.89') {
+ if ($cpan_env) {
+ return _running_under('CPAN');
+ }
+ return; # CPAN.pm new enough, don't need to check further
+ }
+
+ # last ditch attempt, this -will- configure CPAN, very sorry
+
+ _load_cpan(1); # force initialize even though it's already loaded
+
+ # Find the CPAN lock-file
+ my $lock = MM->catfile( $CPAN::Config->{cpan_home}, ".lock" );
+ return unless -f $lock;
+
+ # Check the lock
+ local *LOCK;
+ return unless open(LOCK, $lock);
+
+ if (
+ ( $^O eq 'MSWin32' ? _under_cpan() : <LOCK> == getppid() )
+ and ( $CPAN::Config->{prerequisites_policy} || '' ) ne 'ignore'
+ ) {
+ print <<'END_MESSAGE';
+
+*** Since we're running under CPAN, I'll just let it take care
+ of the dependency's installation later.
+END_MESSAGE
+ return 1;
+ }
+
+ close LOCK;
+ return;
+}
+
+sub install {
+ my $class = shift;
+
+ my $i; # used below to strip leading '-' from config keys
+ my @config = ( map { s/^-// if ++$i; $_ } @{ +shift } );
+
+ my ( @modules, @installed, @modules_to_upgrade );
+ while (my ($pkg, $ver) = splice(@_, 0, 2)) {
+
+ # grep out those already installed
+ if (_version_cmp(_version_of($pkg), $ver) >= 0) {
+ push @installed, $pkg;
+ if ($UpgradeDeps) {
+ push @modules_to_upgrade, $pkg, $ver;
+ }
+ }
+ else {
+ push @modules, $pkg, $ver;
+ }
+ }
+
+ if ($UpgradeDeps) {
+ push @modules, @modules_to_upgrade;
+ @installed = ();
+ @modules_to_upgrade = ();
+ }
+
+ return @installed unless @modules; # nothing to do
+ return @installed if _check_lock(); # defer to the CPAN shell
+
+ print "*** Installing dependencies...\n";
+
+ return unless _connected_to('cpan.org');
+
+ my %args = @config;
+ my %failed;
+ local *FAILED;
+ if ( $args{do_once} and open( FAILED, '.#autoinstall.failed' ) ) {
+ while (<FAILED>) { chomp; $failed{$_}++ }
+ close FAILED;
+
+ my @newmod;
+ while ( my ( $k, $v ) = splice( @modules, 0, 2 ) ) {
+ push @newmod, ( $k => $v ) unless $failed{$k};
+ }
+ @modules = @newmod;
+ }
+
+ if ( _has_cpanplus() and not $ENV{PERL_AUTOINSTALL_PREFER_CPAN} ) {
+ _install_cpanplus( \@modules, \@config );
+ } else {
+ _install_cpan( \@modules, \@config );
+ }
+
+ print "*** $class installation finished.\n";
+
+ # see if we have successfully installed them
+ while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) {
+ if ( _version_cmp( _version_of($pkg), $ver ) >= 0 ) {
+ push @installed, $pkg;
+ }
+ elsif ( $args{do_once} and open( FAILED, '>> .#autoinstall.failed' ) ) {
+ print FAILED "$pkg\n";
+ }
+ }
+
+ close FAILED if $args{do_once};
+
+ return @installed;
+}
+
+sub _install_cpanplus {
+ my @modules = @{ +shift };
+ my @config = _cpanplus_config( @{ +shift } );
+ my $installed = 0;
+
+ require CPANPLUS::Backend;
+ my $cp = CPANPLUS::Backend->new;
+ my $conf = $cp->configure_object;
+
+ return unless $conf->can('conf') # 0.05x+ with "sudo" support
+ or _can_write($conf->_get_build('base')); # 0.04x
+
+ # if we're root, set UNINST=1 to avoid trouble unless user asked for it.
+ my $makeflags = $conf->get_conf('makeflags') || '';
+ if ( UNIVERSAL::isa( $makeflags, 'HASH' ) ) {
+ # 0.03+ uses a hashref here
+ $makeflags->{UNINST} = 1 unless exists $makeflags->{UNINST};
+
+ } else {
+ # 0.02 and below uses a scalar
+ $makeflags = join( ' ', split( ' ', $makeflags ), 'UNINST=1' )
+ if ( $makeflags !~ /\bUNINST\b/ and eval qq{ $> eq '0' } );
+
+ }
+ $conf->set_conf( makeflags => $makeflags );
+ $conf->set_conf( prereqs => 1 );
+
+
+
+ while ( my ( $key, $val ) = splice( @config, 0, 2 ) ) {
+ $conf->set_conf( $key, $val );
+ }
+
+ my $modtree = $cp->module_tree;
+ while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) {
+ print "*** Installing $pkg...\n";
+
+ MY::preinstall( $pkg, $ver ) or next if defined &MY::preinstall;
+
+ my $success;
+ my $obj = $modtree->{$pkg};
+
+ if ( $obj and _version_cmp( $obj->{version}, $ver ) >= 0 ) {
+ my $pathname = $pkg;
+ $pathname =~ s/::/\\W/;
+
+ foreach my $inc ( grep { m/$pathname.pm/i } keys(%INC) ) {
+ delete $INC{$inc};
+ }
+
+ my $rv = $cp->install( modules => [ $obj->{module} ] );
+
+ if ( $rv and ( $rv->{ $obj->{module} } or $rv->{ok} ) ) {
+ print "*** $pkg successfully installed.\n";
+ $success = 1;
+ } else {
+ print "*** $pkg installation cancelled.\n";
+ $success = 0;
+ }
+
+ $installed += $success;
+ } else {
+ print << ".";
+*** Could not find a version $ver or above for $pkg; skipping.
+.
+ }
+
+ MY::postinstall( $pkg, $ver, $success ) if defined &MY::postinstall;
+ }
+
+ return $installed;
+}
+
+sub _cpanplus_config {
+ my @config = ();
+ while ( @_ ) {
+ my ($key, $value) = (shift(), shift());
+ if ( $key eq 'prerequisites_policy' ) {
+ if ( $value eq 'follow' ) {
+ $value = CPANPLUS::Internals::Constants::PREREQ_INSTALL();
+ } elsif ( $value eq 'ask' ) {
+ $value = CPANPLUS::Internals::Constants::PREREQ_ASK();
+ } elsif ( $value eq 'ignore' ) {
+ $value = CPANPLUS::Internals::Constants::PREREQ_IGNORE();
+ } else {
+ die "*** Cannot convert option $key = '$value' to CPANPLUS version.\n";
+ }
+ push @config, 'prereqs', $value;
+ } elsif ( $key eq 'force' ) {
+ push @config, $key, $value;
+ } elsif ( $key eq 'notest' ) {
+ push @config, 'skiptest', $value;
+ } else {
+ die "*** Cannot convert option $key to CPANPLUS version.\n";
+ }
+ }
+ return @config;
+}
+
+sub _install_cpan {
+ my @modules = @{ +shift };
+ my @config = @{ +shift };
+ my $installed = 0;
+ my %args;
+
+ _load_cpan();
+ require Config;
+
+ if (CPAN->VERSION < 1.80) {
+ # no "sudo" support, probe for writableness
+ return unless _can_write( MM->catfile( $CPAN::Config->{cpan_home}, 'sources' ) )
+ and _can_write( $Config::Config{sitelib} );
+ }
+
+ # if we're root, set UNINST=1 to avoid trouble unless user asked for it.
+ my $makeflags = $CPAN::Config->{make_install_arg} || '';
+ $CPAN::Config->{make_install_arg} =
+ join( ' ', split( ' ', $makeflags ), 'UNINST=1' )
+ if ( $makeflags !~ /\bUNINST\b/ and eval qq{ $> eq '0' } );
+
+ # don't show start-up info
+ $CPAN::Config->{inhibit_startup_message} = 1;
+
+ # set additional options
+ while ( my ( $opt, $arg ) = splice( @config, 0, 2 ) ) {
+ ( $args{$opt} = $arg, next )
+ if $opt =~ /^(?:force|notest)$/; # pseudo-option
+ $CPAN::Config->{$opt} = $opt eq 'urllist' ? [$arg] : $arg;
+ }
+
+ if ($args{notest} && (not CPAN::Shell->can('notest'))) {
+ die "Your version of CPAN is too old to support the 'notest' pragma";
+ }
+
+ local $CPAN::Config->{prerequisites_policy} = 'follow';
+
+ while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) {
+ MY::preinstall( $pkg, $ver ) or next if defined &MY::preinstall;
+
+ print "*** Installing $pkg...\n";
+
+ my $obj = CPAN::Shell->expand( Module => $pkg );
+ my $success = 0;
+
+ if ( $obj and _version_cmp( $obj->cpan_version, $ver ) >= 0 ) {
+ my $pathname = $pkg;
+ $pathname =~ s/::/\\W/;
+
+ foreach my $inc ( grep { m/$pathname.pm/i } keys(%INC) ) {
+ delete $INC{$inc};
+ }
+
+ my $rv = do {
+ if ($args{force}) {
+ CPAN::Shell->force( install => $pkg )
+ } elsif ($args{notest}) {
+ CPAN::Shell->notest( install => $pkg )
+ } else {
+ CPAN::Shell->install($pkg)
+ }
+ };
+
+ $rv ||= eval {
+ $CPAN::META->instance( 'CPAN::Distribution', $obj->cpan_file, )
+ ->{install}
+ if $CPAN::META;
+ };
+
+ if ( $rv eq 'YES' ) {
+ print "*** $pkg successfully installed.\n";
+ $success = 1;
+ }
+ else {
+ print "*** $pkg installation failed.\n";
+ $success = 0;
+ }
+
+ $installed += $success;
+ }
+ else {
+ print << ".";
+*** Could not find a version $ver or above for $pkg; skipping.
+.
+ }
+
+ MY::postinstall( $pkg, $ver, $success ) if defined &MY::postinstall;
+ }
+
+ return $installed;
+}
+
+sub _has_cpanplus {
+ return (
+ $HasCPANPLUS = (
+ $INC{'CPANPLUS/Config.pm'}
+ or _load('CPANPLUS::Shell::Default')
+ )
+ );
+}
+
+# make guesses on whether we're under the CPAN installation directory
+sub _under_cpan {
+ require Cwd;
+ require File::Spec;
+
+ my $cwd = File::Spec->canonpath( Cwd::getcwd() );
+ my $cpan = File::Spec->canonpath( $CPAN::Config->{cpan_home} );
+
+ return ( index( $cwd, $cpan ) > -1 );
+}
+
+sub _update_to {
+ my $class = __PACKAGE__;
+ my $ver = shift;
+
+ return
+ if _version_cmp( _version_of($class), $ver ) >= 0; # no need to upgrade
+
+ if (
+ _prompt( "==> A newer version of $class ($ver) is required. Install?",
+ 'y' ) =~ /^[Nn]/
+ )
+ {
+ die "*** Please install $class $ver manually.\n";
+ }
+
+ print << ".";
+*** Trying to fetch it from CPAN...
+.
+
+ # install ourselves
+ _load($class) and return $class->import(@_)
+ if $class->install( [], $class, $ver );
+
+ print << '.'; exit 1;
+
+*** Cannot bootstrap myself. :-( Installation terminated.
+.
+}
+
+# check if we're connected to some host, using inet_aton
+sub _connected_to {
+ my $site = shift;
+
+ return (
+ ( _load('Socket') and Socket::inet_aton($site) ) or _prompt(
+ qq(
+*** Your host cannot resolve the domain name '$site', which
+ probably means the Internet connections are unavailable.
+==> Should we try to install the required module(s) anyway?), 'n'
+ ) =~ /^[Yy]/
+ );
+}
+
+# check if a directory is writable; may create it on demand
+sub _can_write {
+ my $path = shift;
+ mkdir( $path, 0755 ) unless -e $path;
+
+ return 1 if -w $path;
+
+ print << ".";
+*** You are not allowed to write to the directory '$path';
+ the installation may fail due to insufficient permissions.
+.
+
+ if (
+ eval '$>' and lc(`sudo -V`) =~ /version/ and _prompt(
+ qq(
+==> Should we try to re-execute the autoinstall process with 'sudo'?),
+ ((-t STDIN) ? 'y' : 'n')
+ ) =~ /^[Yy]/
+ )
+ {
+
+ # try to bootstrap ourselves from sudo
+ print << ".";
+*** Trying to re-execute the autoinstall process with 'sudo'...
+.
+ my $missing = join( ',', @Missing );
+ my $config = join( ',',
+ UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} )
+ if $Config;
+
+ return
+ unless system( 'sudo', $^X, $0, "--config=$config",
+ "--installdeps=$missing" );
+
+ print << ".";
+*** The 'sudo' command exited with error! Resuming...
+.
+ }
+
+ return _prompt(
+ qq(
+==> Should we try to install the required module(s) anyway?), 'n'
+ ) =~ /^[Yy]/;
+}
+
+# load a module and return the version it reports
+sub _load {
+ my $mod = pop; # method/function doesn't matter
+ my $file = $mod;
+ $file =~ s|::|/|g;
+ $file .= '.pm';
+ local $@;
+ return eval { require $file; $mod->VERSION } || ( $@ ? undef: 0 );
+}
+
+# report version without loading a module
+sub _version_of {
+ my $mod = pop; # method/function doesn't matter
+ my $file = $mod;
+ $file =~ s|::|/|g;
+ $file .= '.pm';
+ foreach my $dir ( @INC ) {
+ next if ref $dir;
+ my $path = File::Spec->catfile($dir, $file);
+ next unless -e $path;
+ require ExtUtils::MM_Unix;
+ return ExtUtils::MM_Unix->parse_version($path);
+ }
+ return undef;
+}
+
+# Load CPAN.pm and it's configuration
+sub _load_cpan {
+ return if $CPAN::VERSION and $CPAN::Config and not @_;
+ require CPAN;
+
+ # CPAN-1.82+ adds CPAN::Config::AUTOLOAD to redirect to
+ # CPAN::HandleConfig->load. CPAN reports that the redirection
+ # is deprecated in a warning printed at the user.
+
+ # CPAN-1.81 expects CPAN::HandleConfig->load, does not have
+ # $CPAN::HandleConfig::VERSION but cannot handle
+ # CPAN::Config->load
+
+ # Which "versions expect CPAN::Config->load?
+
+ if ( $CPAN::HandleConfig::VERSION
+ || CPAN::HandleConfig->can('load')
+ ) {
+ # Newer versions of CPAN have a HandleConfig module
+ CPAN::HandleConfig->load;
+ } else {
+ # Older versions had the load method in Config directly
+ CPAN::Config->load;
+ }
+}
+
+# compare two versions, either use Sort::Versions or plain comparison
+# return values same as <=>
+sub _version_cmp {
+ my ( $cur, $min ) = @_;
+ return -1 unless defined $cur; # if 0 keep comparing
+ return 1 unless $min;
+
+ $cur =~ s/\s+$//;
+
+ # check for version numbers that are not in decimal format
+ if ( ref($cur) or ref($min) or $cur =~ /v|\..*\./ or $min =~ /v|\..*\./ ) {
+ if ( ( $version::VERSION or defined( _load('version') )) and
+ version->can('new')
+ ) {
+
+ # use version.pm if it is installed.
+ return version->new($cur) <=> version->new($min);
+ }
+ elsif ( $Sort::Versions::VERSION or defined( _load('Sort::Versions') ) )
+ {
+
+ # use Sort::Versions as the sorting algorithm for a.b.c versions
+ return Sort::Versions::versioncmp( $cur, $min );
+ }
+
+ warn "Cannot reliably compare non-decimal formatted versions.\n"
+ . "Please install version.pm or Sort::Versions.\n";
+ }
+
+ # plain comparison
+ local $^W = 0; # shuts off 'not numeric' bugs
+ return $cur <=> $min;
+}
+
+# nothing; this usage is deprecated.
+sub main::PREREQ_PM { return {}; }
+
+sub _make_args {
+ my %args = @_;
+
+ $args{PREREQ_PM} = { %{ $args{PREREQ_PM} || {} }, @Existing, @Missing }
+ if $UnderCPAN or $TestOnly;
+
+ if ( $args{EXE_FILES} and -e 'MANIFEST' ) {
+ require ExtUtils::Manifest;
+ my $manifest = ExtUtils::Manifest::maniread('MANIFEST');
+
+ $args{EXE_FILES} =
+ [ grep { exists $manifest->{$_} } @{ $args{EXE_FILES} } ];
+ }
+
+ $args{test}{TESTS} ||= 't/*.t';
+ $args{test}{TESTS} = join( ' ',
+ grep { !exists( $DisabledTests{$_} ) }
+ map { glob($_) } split( /\s+/, $args{test}{TESTS} ) );
+
+ my $missing = join( ',', @Missing );
+ my $config =
+ join( ',', UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} )
+ if $Config;
+
+ $PostambleActions = (
+ ($missing and not $UnderCPAN)
+ ? "\$(PERL) $0 --config=$config --installdeps=$missing"
+ : "\$(NOECHO) \$(NOOP)"
+ );
+
+ my $deps_list = join( ',', @Missing, @Existing );
+
+ $PostambleActionsUpgradeDeps =
+ "\$(PERL) $0 --config=$config --upgradedeps=$deps_list";
+
+ my $config_notest =
+ join( ',', (UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config}),
+ 'notest', 1 )
+ if $Config;
+
+ $PostambleActionsNoTest = (
+ ($missing and not $UnderCPAN)
+ ? "\$(PERL) $0 --config=$config_notest --installdeps=$missing"
+ : "\$(NOECHO) \$(NOOP)"
+ );
+
+ $PostambleActionsUpgradeDepsNoTest =
+ "\$(PERL) $0 --config=$config_notest --upgradedeps=$deps_list";
+
+ $PostambleActionsListDeps =
+ '@$(PERL) -le "print for @ARGV" '
+ . join(' ', map $Missing[$_], grep $_ % 2 == 0, 0..$#Missing);
+
+ my @all = (@Missing, @Existing);
+
+ $PostambleActionsListAllDeps =
+ '@$(PERL) -le "print for @ARGV" '
+ . join(' ', map $all[$_], grep $_ % 2 == 0, 0..$#all);
+
+ return %args;
+}
+
+# a wrapper to ExtUtils::MakeMaker::WriteMakefile
+sub Write {
+ require Carp;
+ Carp::croak "WriteMakefile: Need even number of args" if @_ % 2;
+
+ if ($CheckOnly) {
+ print << ".";
+*** Makefile not written in check-only mode.
+.
+ return;
+ }
+
+ my %args = _make_args(@_);
+
+ no strict 'refs';
+
+ $PostambleUsed = 0;
+ local *MY::postamble = \&postamble unless defined &MY::postamble;
+ ExtUtils::MakeMaker::WriteMakefile(%args);
+
+ print << "." unless $PostambleUsed;
+*** WARNING: Makefile written with customized MY::postamble() without
+ including contents from Module::AutoInstall::postamble() --
+ auto installation features disabled. Please contact the author.
+.
+
+ return 1;
+}
+
+sub postamble {
+ $PostambleUsed = 1;
+ my $fragment;
+
+ $fragment .= <<"AUTO_INSTALL" if !$InstallDepsTarget;
+
+config :: installdeps
+\t\$(NOECHO) \$(NOOP)
+AUTO_INSTALL
+
+ $fragment .= <<"END_MAKE";
+
+checkdeps ::
+\t\$(PERL) $0 --checkdeps
+
+installdeps ::
+\t$PostambleActions
+
+installdeps_notest ::
+\t$PostambleActionsNoTest
+
+upgradedeps ::
+\t$PostambleActionsUpgradeDeps
+
+upgradedeps_notest ::
+\t$PostambleActionsUpgradeDepsNoTest
+
+listdeps ::
+\t$PostambleActionsListDeps
+
+listalldeps ::
+\t$PostambleActionsListAllDeps
+
+END_MAKE
+
+ return $fragment;
+}
+
+1;
+
+__END__
+
+#line 1197
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install.pm
new file mode 100644
index 0000000..7ba98c2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install.pm
@@ -0,0 +1,451 @@
+#line 1
+package Module::Install;
+
+# For any maintainers:
+# The load order for Module::Install is a bit magic.
+# It goes something like this...
+#
+# IF ( host has Module::Install installed, creating author mode ) {
+# 1. Makefile.PL calls "use inc::Module::Install"
+# 2. $INC{inc/Module/Install.pm} set to installed version of inc::Module::Install
+# 3. The installed version of inc::Module::Install loads
+# 4. inc::Module::Install calls "require Module::Install"
+# 5. The ./inc/ version of Module::Install loads
+# } ELSE {
+# 1. Makefile.PL calls "use inc::Module::Install"
+# 2. $INC{inc/Module/Install.pm} set to ./inc/ version of Module::Install
+# 3. The ./inc/ version of Module::Install loads
+# }
+
+use 5.006;
+use strict 'vars';
+use Cwd ();
+use File::Find ();
+use File::Path ();
+
+use vars qw{$VERSION $MAIN};
+BEGIN {
+ # All Module::Install core packages now require synchronised versions.
+ # This will be used to ensure we don't accidentally load old or
+ # different versions of modules.
+ # This is not enforced yet, but will be some time in the next few
+ # releases once we can make sure it won't clash with custom
+ # Module::Install extensions.
+ $VERSION = '1.19';
+
+ # Storage for the pseudo-singleton
+ $MAIN = undef;
+
+ *inc::Module::Install::VERSION = *VERSION;
+ @inc::Module::Install::ISA = __PACKAGE__;
+
+}
+
+sub import {
+ my $class = shift;
+ my $self = $class->new(@_);
+ my $who = $self->_caller;
+
+ #-------------------------------------------------------------
+ # all of the following checks should be included in import(),
+ # to allow "eval 'require Module::Install; 1' to test
+ # installation of Module::Install. (RT #51267)
+ #-------------------------------------------------------------
+
+ # Whether or not inc::Module::Install is actually loaded, the
+ # $INC{inc/Module/Install.pm} is what will still get set as long as
+ # the caller loaded module this in the documented manner.
+ # If not set, the caller may NOT have loaded the bundled version, and thus
+ # they may not have a MI version that works with the Makefile.PL. This would
+ # result in false errors or unexpected behaviour. And we don't want that.
+ my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
+ unless ( $INC{$file} ) { die <<"END_DIE" }
+
+Please invoke ${\__PACKAGE__} with:
+
+ use inc::${\__PACKAGE__};
+
+not:
+
+ use ${\__PACKAGE__};
+
+END_DIE
+
+ # This reportedly fixes a rare Win32 UTC file time issue, but
+ # as this is a non-cross-platform XS module not in the core,
+ # we shouldn't really depend on it. See RT #24194 for detail.
+ # (Also, this module only supports Perl 5.6 and above).
+ eval "use Win32::UTCFileTime" if $^O eq 'MSWin32' && $] >= 5.006;
+
+ # If the script that is loading Module::Install is from the future,
+ # then make will detect this and cause it to re-run over and over
+ # again. This is bad. Rather than taking action to touch it (which
+ # is unreliable on some platforms and requires write permissions)
+ # for now we should catch this and refuse to run.
+ if ( -f $0 ) {
+ my $s = (stat($0))[9];
+
+ # If the modification time is only slightly in the future,
+ # sleep briefly to remove the problem.
+ my $a = $s - time;
+ if ( $a > 0 and $a < 5 ) { sleep 5 }
+
+ # Too far in the future, throw an error.
+ my $t = time;
+ if ( $s > $t ) { die <<"END_DIE" }
+
+Your installer $0 has a modification time in the future ($s > $t).
+
+This is known to create infinite loops in make.
+
+Please correct this, then run $0 again.
+
+END_DIE
+ }
+
+
+ # Build.PL was formerly supported, but no longer is due to excessive
+ # difficulty in implementing every single feature twice.
+ if ( $0 =~ /Build.PL$/i ) { die <<"END_DIE" }
+
+Module::Install no longer supports Build.PL.
+
+It was impossible to maintain duel backends, and has been deprecated.
+
+Please remove all Build.PL files and only use the Makefile.PL installer.
+
+END_DIE
+
+ #-------------------------------------------------------------
+
+ # To save some more typing in Module::Install installers, every...
+ # use inc::Module::Install
+ # ...also acts as an implicit use strict.
+ $^H |= strict::bits(qw(refs subs vars));
+
+ #-------------------------------------------------------------
+
+ unless ( -f $self->{file} ) {
+ foreach my $key (keys %INC) {
+ delete $INC{$key} if $key =~ /Module\/Install/;
+ }
+
+ local $^W;
+ require "$self->{path}/$self->{dispatch}.pm";
+ File::Path::mkpath("$self->{prefix}/$self->{author}");
+ $self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self );
+ $self->{admin}->init;
+ @_ = ($class, _self => $self);
+ goto &{"$self->{name}::import"};
+ }
+
+ local $^W;
+ *{"${who}::AUTOLOAD"} = $self->autoload;
+ $self->preload;
+
+ # Unregister loader and worker packages so subdirs can use them again
+ delete $INC{'inc/Module/Install.pm'};
+ delete $INC{'Module/Install.pm'};
+
+ # Save to the singleton
+ $MAIN = $self;
+
+ return 1;
+}
+
+sub autoload {
+ my $self = shift;
+ my $who = $self->_caller;
+ my $cwd = Cwd::getcwd();
+ my $sym = "${who}::AUTOLOAD";
+ $sym->{$cwd} = sub {
+ my $pwd = Cwd::getcwd();
+ if ( my $code = $sym->{$pwd} ) {
+ # Delegate back to parent dirs
+ goto &$code unless $cwd eq $pwd;
+ }
+ unless ($$sym =~ s/([^:]+)$//) {
+ # XXX: it looks like we can't retrieve the missing function
+ # via $$sym (usually $main::AUTOLOAD) in this case.
+ # I'm still wondering if we should slurp Makefile.PL to
+ # get some context or not ...
+ my ($package, $file, $line) = caller;
+ die <<"EOT";
+Unknown function is found at $file line $line.
+Execution of $file aborted due to runtime errors.
+
+If you're a contributor to a project, you may need to install
+some Module::Install extensions from CPAN (or other repository).
+If you're a user of a module, please contact the author.
+EOT
+ }
+ my $method = $1;
+ if ( uc($method) eq $method ) {
+ # Do nothing
+ return;
+ } elsif ( $method =~ /^_/ and $self->can($method) ) {
+ # Dispatch to the root M:I class
+ return $self->$method(@_);
+ }
+
+ # Dispatch to the appropriate plugin
+ unshift @_, ( $self, $1 );
+ goto &{$self->can('call')};
+ };
+}
+
+sub preload {
+ my $self = shift;
+ unless ( $self->{extensions} ) {
+ $self->load_extensions(
+ "$self->{prefix}/$self->{path}", $self
+ );
+ }
+
+ my @exts = @{$self->{extensions}};
+ unless ( @exts ) {
+ @exts = $self->{admin}->load_all_extensions;
+ }
+
+ my %seen;
+ foreach my $obj ( @exts ) {
+ while (my ($method, $glob) = each %{ref($obj) . '::'}) {
+ next unless $obj->can($method);
+ next if $method =~ /^_/;
+ next if $method eq uc($method);
+ $seen{$method}++;
+ }
+ }
+
+ my $who = $self->_caller;
+ foreach my $name ( sort keys %seen ) {
+ local $^W;
+ *{"${who}::$name"} = sub {
+ ${"${who}::AUTOLOAD"} = "${who}::$name";
+ goto &{"${who}::AUTOLOAD"};
+ };
+ }
+}
+
+sub new {
+ my ($class, %args) = @_;
+
+ delete $INC{'FindBin.pm'};
+ {
+ # to suppress the redefine warning
+ local $SIG{__WARN__} = sub {};
+ require FindBin;
+ }
+
+ # ignore the prefix on extension modules built from top level.
+ my $base_path = Cwd::abs_path($FindBin::Bin);
+ unless ( Cwd::abs_path(Cwd::getcwd()) eq $base_path ) {
+ delete $args{prefix};
+ }
+ return $args{_self} if $args{_self};
+
+ $base_path = VMS::Filespec::unixify($base_path) if $^O eq 'VMS';
+
+ $args{dispatch} ||= 'Admin';
+ $args{prefix} ||= 'inc';
+ $args{author} ||= ($^O eq 'VMS' ? '_author' : '.author');
+ $args{bundle} ||= 'inc/BUNDLES';
+ $args{base} ||= $base_path;
+ $class =~ s/^\Q$args{prefix}\E:://;
+ $args{name} ||= $class;
+ $args{version} ||= $class->VERSION;
+ unless ( $args{path} ) {
+ $args{path} = $args{name};
+ $args{path} =~ s!::!/!g;
+ }
+ $args{file} ||= "$args{base}/$args{prefix}/$args{path}.pm";
+ $args{wrote} = 0;
+
+ bless( \%args, $class );
+}
+
+sub call {
+ my ($self, $method) = @_;
+ my $obj = $self->load($method) or return;
+ splice(@_, 0, 2, $obj);
+ goto &{$obj->can($method)};
+}
+
+sub load {
+ my ($self, $method) = @_;
+
+ $self->load_extensions(
+ "$self->{prefix}/$self->{path}", $self
+ ) unless $self->{extensions};
+
+ foreach my $obj (@{$self->{extensions}}) {
+ return $obj if $obj->can($method);
+ }
+
+ my $admin = $self->{admin} or die <<"END_DIE";
+The '$method' method does not exist in the '$self->{prefix}' path!
+Please remove the '$self->{prefix}' directory and run $0 again to load it.
+END_DIE
+
+ my $obj = $admin->load($method, 1);
+ push @{$self->{extensions}}, $obj;
+
+ $obj;
+}
+
+sub load_extensions {
+ my ($self, $path, $top) = @_;
+
+ my $should_reload = 0;
+ unless ( grep { ! ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
+ unshift @INC, $self->{prefix};
+ $should_reload = 1;
+ }
+
+ foreach my $rv ( $self->find_extensions($path) ) {
+ my ($file, $pkg) = @{$rv};
+ next if $self->{pathnames}{$pkg};
+
+ local $@;
+ my $new = eval { local $^W; require $file; $pkg->can('new') };
+ unless ( $new ) {
+ warn $@ if $@;
+ next;
+ }
+ $self->{pathnames}{$pkg} =
+ $should_reload ? delete $INC{$file} : $INC{$file};
+ push @{$self->{extensions}}, &{$new}($pkg, _top => $top );
+ }
+
+ $self->{extensions} ||= [];
+}
+
+sub find_extensions {
+ my ($self, $path) = @_;
+
+ my @found;
+ File::Find::find( {no_chdir => 1, wanted => sub {
+ my $file = $File::Find::name;
+ return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
+ my $subpath = $1;
+ return if lc($subpath) eq lc($self->{dispatch});
+
+ $file = "$self->{path}/$subpath.pm";
+ my $pkg = "$self->{name}::$subpath";
+ $pkg =~ s!/!::!g;
+
+ # If we have a mixed-case package name, assume case has been preserved
+ # correctly. Otherwise, root through the file to locate the case-preserved
+ # version of the package name.
+ if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
+ my $content = Module::Install::_read($File::Find::name);
+ my $in_pod = 0;
+ foreach ( split /\n/, $content ) {
+ $in_pod = 1 if /^=\w/;
+ $in_pod = 0 if /^=cut/;
+ next if ($in_pod || /^=cut/); # skip pod text
+ next if /^\s*#/; # and comments
+ if ( m/^\s*package\s+($pkg)\s*;/i ) {
+ $pkg = $1;
+ last;
+ }
+ }
+ }
+
+ push @found, [ $file, $pkg ];
+ }}, $path ) if -d $path;
+
+ @found;
+}
+
+
+
+
+
+#####################################################################
+# Common Utility Functions
+
+sub _caller {
+ my $depth = 0;
+ my $call = caller($depth);
+ while ( $call eq __PACKAGE__ ) {
+ $depth++;
+ $call = caller($depth);
+ }
+ return $call;
+}
+
+sub _read {
+ local *FH;
+ open( FH, '<', $_[0] ) or die "open($_[0]): $!";
+ binmode FH;
+ my $string = do { local $/; <FH> };
+ close FH or die "close($_[0]): $!";
+ return $string;
+}
+
+sub _readperl {
+ my $string = Module::Install::_read($_[0]);
+ $string =~ s/(?:\015{1,2}\012|\015|\012)/\n/sg;
+ $string =~ s/(\n)\n*__(?:DATA|END)__\b.*\z/$1/s;
+ $string =~ s/\n\n=\w+.+?\n\n=cut\b.+?\n+/\n\n/sg;
+ return $string;
+}
+
+sub _readpod {
+ my $string = Module::Install::_read($_[0]);
+ $string =~ s/(?:\015{1,2}\012|\015|\012)/\n/sg;
+ return $string if $_[0] =~ /\.pod\z/;
+ $string =~ s/(^|\n=cut\b.+?\n+)[^=\s].+?\n(\n=\w+|\z)/$1$2/sg;
+ $string =~ s/\n*=pod\b[^\n]*\n+/\n\n/sg;
+ $string =~ s/\n*=cut\b[^\n]*\n+/\n\n/sg;
+ $string =~ s/^\n+//s;
+ return $string;
+}
+
+sub _write {
+ local *FH;
+ open( FH, '>', $_[0] ) or die "open($_[0]): $!";
+ binmode FH;
+ foreach ( 1 .. $#_ ) {
+ print FH $_[$_] or die "print($_[0]): $!";
+ }
+ close FH or die "close($_[0]): $!";
+}
+
+# _version is for processing module versions (eg, 1.03_05) not
+# Perl versions (eg, 5.8.1).
+sub _version {
+ my $s = shift || 0;
+ my $d =()= $s =~ /(\.)/g;
+ if ( $d >= 2 ) {
+ # Normalise multipart versions
+ $s =~ s/(\.)(\d{1,3})/sprintf("$1%03d",$2)/eg;
+ }
+ $s =~ s/^(\d+)\.?//;
+ my $l = $1 || 0;
+ my @v = map {
+ $_ . '0' x (3 - length $_)
+ } $s =~ /(\d{1,3})\D?/g;
+ $l = $l . '.' . join '', @v if @v;
+ return $l + 0;
+}
+
+sub _cmp {
+ _version($_[1]) <=> _version($_[2]);
+}
+
+# Cloned from Params::Util::_CLASS
+sub _CLASS {
+ (
+ defined $_[0]
+ and
+ ! ref $_[0]
+ and
+ $_[0] =~ m/^[^\W\d]\w*(?:::\w+)*\z/s
+ ) ? $_[0] : undef;
+}
+
+1;
+
+# Copyright 2008 - 2012 Adam Kennedy.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/AutoInstall.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/AutoInstall.pm
new file mode 100644
index 0000000..0e3dada
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/AutoInstall.pm
@@ -0,0 +1,93 @@
+#line 1
+package Module::Install::AutoInstall;
+
+use strict;
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+ $VERSION = '1.19';
+ @ISA = 'Module::Install::Base';
+ $ISCORE = 1;
+}
+
+sub AutoInstall { $_[0] }
+
+sub run {
+ my $self = shift;
+ $self->auto_install_now(@_);
+}
+
+sub write {
+ my $self = shift;
+ $self->auto_install(@_);
+}
+
+sub auto_install {
+ my $self = shift;
+ return if $self->{done}++;
+
+ # Flatten array of arrays into a single array
+ my @core = map @$_, map @$_, grep ref,
+ $self->build_requires, $self->requires;
+
+ my @config = @_;
+
+ # We'll need Module::AutoInstall
+ $self->include('Module::AutoInstall');
+ require Module::AutoInstall;
+
+ my @features_require = Module::AutoInstall->import(
+ (@config ? (-config => \@config) : ()),
+ (@core ? (-core => \@core) : ()),
+ $self->features,
+ );
+
+ my %seen;
+ my @requires = map @$_, map @$_, grep ref, $self->requires;
+ while (my ($mod, $ver) = splice(@requires, 0, 2)) {
+ $seen{$mod}{$ver}++;
+ }
+ my @build_requires = map @$_, map @$_, grep ref, $self->build_requires;
+ while (my ($mod, $ver) = splice(@build_requires, 0, 2)) {
+ $seen{$mod}{$ver}++;
+ }
+ my @configure_requires = map @$_, map @$_, grep ref, $self->configure_requires;
+ while (my ($mod, $ver) = splice(@configure_requires, 0, 2)) {
+ $seen{$mod}{$ver}++;
+ }
+
+ my @deduped;
+ while (my ($mod, $ver) = splice(@features_require, 0, 2)) {
+ push @deduped, $mod => $ver unless $seen{$mod}{$ver}++;
+ }
+
+ $self->requires(@deduped);
+
+ $self->makemaker_args( Module::AutoInstall::_make_args() );
+
+ my $class = ref($self);
+ $self->postamble(
+ "# --- $class section:\n" .
+ Module::AutoInstall::postamble()
+ );
+}
+
+sub installdeps_target {
+ my ($self, @args) = @_;
+
+ $self->include('Module::AutoInstall');
+ require Module::AutoInstall;
+
+ Module::AutoInstall::_installdeps_target(1);
+
+ $self->auto_install(@args);
+}
+
+sub auto_install_now {
+ my $self = shift;
+ $self->auto_install(@_);
+ Module::AutoInstall::do_install();
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Base.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Base.pm
new file mode 100644
index 0000000..9fa42c2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Base.pm
@@ -0,0 +1,83 @@
+#line 1
+package Module::Install::Base;
+
+use strict 'vars';
+use vars qw{$VERSION};
+BEGIN {
+ $VERSION = '1.19';
+}
+
+# Suspend handler for "redefined" warnings
+BEGIN {
+ my $w = $SIG{__WARN__};
+ $SIG{__WARN__} = sub { $w };
+}
+
+#line 42
+
+sub new {
+ my $class = shift;
+ unless ( defined &{"${class}::call"} ) {
+ *{"${class}::call"} = sub { shift->_top->call(@_) };
+ }
+ unless ( defined &{"${class}::load"} ) {
+ *{"${class}::load"} = sub { shift->_top->load(@_) };
+ }
+ bless { @_ }, $class;
+}
+
+#line 61
+
+sub AUTOLOAD {
+ local $@;
+ my $func = eval { shift->_top->autoload } or return;
+ goto &$func;
+}
+
+#line 75
+
+sub _top {
+ $_[0]->{_top};
+}
+
+#line 90
+
+sub admin {
+ $_[0]->_top->{admin}
+ or
+ Module::Install::Base::FakeAdmin->new;
+}
+
+#line 106
+
+sub is_admin {
+ ! $_[0]->admin->isa('Module::Install::Base::FakeAdmin');
+}
+
+sub DESTROY {}
+
+package Module::Install::Base::FakeAdmin;
+
+use vars qw{$VERSION};
+BEGIN {
+ $VERSION = $Module::Install::Base::VERSION;
+}
+
+my $fake;
+
+sub new {
+ $fake ||= bless(\@_, $_[0]);
+}
+
+sub AUTOLOAD {}
+
+sub DESTROY {}
+
+# Restore warning handler
+BEGIN {
+ $SIG{__WARN__} = $SIG{__WARN__}->();
+}
+
+1;
+
+#line 159
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Include.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Include.pm
new file mode 100644
index 0000000..13fdcd0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Include.pm
@@ -0,0 +1,34 @@
+#line 1
+package Module::Install::Include;
+
+use strict;
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+ $VERSION = '1.19';
+ @ISA = 'Module::Install::Base';
+ $ISCORE = 1;
+}
+
+sub include {
+ shift()->admin->include(@_);
+}
+
+sub include_deps {
+ shift()->admin->include_deps(@_);
+}
+
+sub auto_include {
+ shift()->admin->auto_include(@_);
+}
+
+sub auto_include_deps {
+ shift()->admin->auto_include_deps(@_);
+}
+
+sub auto_include_dependent_dists {
+ shift()->admin->auto_include_dependent_dists(@_);
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/MakeMaker.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/MakeMaker.pm
new file mode 100644
index 0000000..0fd552b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/MakeMaker.pm
@@ -0,0 +1,56 @@
+#line 1
+package Module::Install::MakeMaker;
+
+use strict;
+use ExtUtils::MakeMaker ();
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+ $VERSION = '1.19';
+ @ISA = 'Module::Install::Base';
+ $ISCORE = 1;
+}
+
+my $makefile = undef;
+
+sub WriteMakefile {
+ my ($self, %args) = @_;
+ $makefile = $self->load('Makefile');
+
+ # mapping between MakeMaker and META.yml keys
+ $args{MODULE_NAME} = $args{NAME};
+ unless ( $args{NAME} = $args{DISTNAME} or ! $args{MODULE_NAME} ) {
+ $args{NAME} = $args{MODULE_NAME};
+ $args{NAME} =~ s/::/-/g;
+ }
+
+ foreach my $key ( qw{name module_name version version_from abstract author installdirs} ) {
+ my $value = delete($args{uc($key)}) or next;
+ $self->$key($value);
+ }
+
+ if (my $prereq = delete($args{PREREQ_PM})) {
+ while (my($k,$v) = each %$prereq) {
+ $self->requires($k,$v);
+ }
+ }
+
+ if (my $prereq = delete($args{BUILD_REQUIRES})) {
+ while (my($k,$v) = each %$prereq) {
+ $self->build_requires($k,$v);
+ }
+ }
+
+ # put the remaining args to makemaker_args
+ $self->makemaker_args(%args);
+}
+
+END {
+ if ( $makefile ) {
+ $makefile->write;
+ $makefile->Meta->write;
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Makefile.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Makefile.pm
new file mode 100644
index 0000000..13a4464
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Makefile.pm
@@ -0,0 +1,418 @@
+#line 1
+package Module::Install::Makefile;
+
+use strict 'vars';
+use ExtUtils::MakeMaker ();
+use Module::Install::Base ();
+use Fcntl qw/:flock :seek/;
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+ $VERSION = '1.19';
+ @ISA = 'Module::Install::Base';
+ $ISCORE = 1;
+}
+
+sub Makefile { $_[0] }
+
+my %seen = ();
+
+sub prompt {
+ shift;
+
+ # Infinite loop protection
+ my @c = caller();
+ if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
+ die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
+ }
+
+ # In automated testing or non-interactive session, always use defaults
+ if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
+ local $ENV{PERL_MM_USE_DEFAULT} = 1;
+ goto &ExtUtils::MakeMaker::prompt;
+ } else {
+ goto &ExtUtils::MakeMaker::prompt;
+ }
+}
+
+# Store a cleaned up version of the MakeMaker version,
+# since we need to behave differently in a variety of
+# ways based on the MM version.
+my $makemaker = eval $ExtUtils::MakeMaker::VERSION;
+
+# If we are passed a param, do a "newer than" comparison.
+# Otherwise, just return the MakeMaker version.
+sub makemaker {
+ ( @_ < 2 or $makemaker >= eval($_[1]) ) ? $makemaker : 0
+}
+
+# Ripped from ExtUtils::MakeMaker 6.56, and slightly modified
+# as we only need to know here whether the attribute is an array
+# or a hash or something else (which may or may not be appendable).
+my %makemaker_argtype = (
+ C => 'ARRAY',
+ CONFIG => 'ARRAY',
+# CONFIGURE => 'CODE', # ignore
+ DIR => 'ARRAY',
+ DL_FUNCS => 'HASH',
+ DL_VARS => 'ARRAY',
+ EXCLUDE_EXT => 'ARRAY',
+ EXE_FILES => 'ARRAY',
+ FUNCLIST => 'ARRAY',
+ H => 'ARRAY',
+ IMPORTS => 'HASH',
+ INCLUDE_EXT => 'ARRAY',
+ LIBS => 'ARRAY', # ignore ''
+ MAN1PODS => 'HASH',
+ MAN3PODS => 'HASH',
+ META_ADD => 'HASH',
+ META_MERGE => 'HASH',
+ PL_FILES => 'HASH',
+ PM => 'HASH',
+ PMLIBDIRS => 'ARRAY',
+ PMLIBPARENTDIRS => 'ARRAY',
+ PREREQ_PM => 'HASH',
+ CONFIGURE_REQUIRES => 'HASH',
+ SKIP => 'ARRAY',
+ TYPEMAPS => 'ARRAY',
+ XS => 'HASH',
+# VERSION => ['version',''], # ignore
+# _KEEP_AFTER_FLUSH => '',
+
+ clean => 'HASH',
+ depend => 'HASH',
+ dist => 'HASH',
+ dynamic_lib=> 'HASH',
+ linkext => 'HASH',
+ macro => 'HASH',
+ postamble => 'HASH',
+ realclean => 'HASH',
+ test => 'HASH',
+ tool_autosplit => 'HASH',
+
+ # special cases where you can use makemaker_append
+ CCFLAGS => 'APPENDABLE',
+ DEFINE => 'APPENDABLE',
+ INC => 'APPENDABLE',
+ LDDLFLAGS => 'APPENDABLE',
+ LDFROM => 'APPENDABLE',
+);
+
+sub makemaker_args {
+ my ($self, %new_args) = @_;
+ my $args = ( $self->{makemaker_args} ||= {} );
+ foreach my $key (keys %new_args) {
+ if ($makemaker_argtype{$key}) {
+ if ($makemaker_argtype{$key} eq 'ARRAY') {
+ $args->{$key} = [] unless defined $args->{$key};
+ unless (ref $args->{$key} eq 'ARRAY') {
+ $args->{$key} = [$args->{$key}]
+ }
+ push @{$args->{$key}},
+ ref $new_args{$key} eq 'ARRAY'
+ ? @{$new_args{$key}}
+ : $new_args{$key};
+ }
+ elsif ($makemaker_argtype{$key} eq 'HASH') {
+ $args->{$key} = {} unless defined $args->{$key};
+ foreach my $skey (keys %{ $new_args{$key} }) {
+ $args->{$key}{$skey} = $new_args{$key}{$skey};
+ }
+ }
+ elsif ($makemaker_argtype{$key} eq 'APPENDABLE') {
+ $self->makemaker_append($key => $new_args{$key});
+ }
+ }
+ else {
+ if (defined $args->{$key}) {
+ warn qq{MakeMaker attribute "$key" is overriden; use "makemaker_append" to append values\n};
+ }
+ $args->{$key} = $new_args{$key};
+ }
+ }
+ return $args;
+}
+
+# For mm args that take multiple space-separated args,
+# append an argument to the current list.
+sub makemaker_append {
+ my $self = shift;
+ my $name = shift;
+ my $args = $self->makemaker_args;
+ $args->{$name} = defined $args->{$name}
+ ? join( ' ', $args->{$name}, @_ )
+ : join( ' ', @_ );
+}
+
+sub build_subdirs {
+ my $self = shift;
+ my $subdirs = $self->makemaker_args->{DIR} ||= [];
+ for my $subdir (@_) {
+ push @$subdirs, $subdir;
+ }
+}
+
+sub clean_files {
+ my $self = shift;
+ my $clean = $self->makemaker_args->{clean} ||= {};
+ %$clean = (
+ %$clean,
+ FILES => join ' ', grep { length $_ } ($clean->{FILES} || (), @_),
+ );
+}
+
+sub realclean_files {
+ my $self = shift;
+ my $realclean = $self->makemaker_args->{realclean} ||= {};
+ %$realclean = (
+ %$realclean,
+ FILES => join ' ', grep { length $_ } ($realclean->{FILES} || (), @_),
+ );
+}
+
+sub libs {
+ my $self = shift;
+ my $libs = ref $_[0] ? shift : [ shift ];
+ $self->makemaker_args( LIBS => $libs );
+}
+
+sub inc {
+ my $self = shift;
+ $self->makemaker_args( INC => shift );
+}
+
+sub _wanted_t {
+}
+
+sub tests_recursive {
+ my $self = shift;
+ my $dir = shift || 't';
+ unless ( -d $dir ) {
+ die "tests_recursive dir '$dir' does not exist";
+ }
+ my %tests = map { $_ => 1 } split / /, ($self->tests || '');
+ require File::Find;
+ File::Find::find(
+ sub { /\.t$/ and -f $_ and $tests{"$File::Find::dir/*.t"} = 1 },
+ $dir
+ );
+ $self->tests( join ' ', sort keys %tests );
+}
+
+sub write {
+ my $self = shift;
+ die "&Makefile->write() takes no arguments\n" if @_;
+
+ # Check the current Perl version
+ my $perl_version = $self->perl_version;
+ if ( $perl_version ) {
+ eval "use $perl_version; 1"
+ or die "ERROR: perl: Version $] is installed, "
+ . "but we need version >= $perl_version";
+ }
+
+ # Make sure we have a new enough MakeMaker
+ require ExtUtils::MakeMaker;
+
+ if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) {
+ # This previous attempted to inherit the version of
+ # ExtUtils::MakeMaker in use by the module author, but this
+ # was found to be untenable as some authors build releases
+ # using future dev versions of EU:MM that nobody else has.
+ # Instead, #toolchain suggests we use 6.59 which is the most
+ # stable version on CPAN at time of writing and is, to quote
+ # ribasushi, "not terminally fucked, > and tested enough".
+ # TODO: We will now need to maintain this over time to push
+ # the version up as new versions are released.
+ $self->build_requires( 'ExtUtils::MakeMaker' => 6.59 );
+ $self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 );
+ } else {
+ # Allow legacy-compatibility with 5.005 by depending on the
+ # most recent EU:MM that supported 5.005.
+ $self->build_requires( 'ExtUtils::MakeMaker' => 6.36 );
+ $self->configure_requires( 'ExtUtils::MakeMaker' => 6.36 );
+ }
+
+ # Generate the MakeMaker params
+ my $args = $self->makemaker_args;
+ $args->{DISTNAME} = $self->name;
+ $args->{NAME} = $self->module_name || $self->name;
+ $args->{NAME} =~ s/-/::/g;
+ $args->{VERSION} = $self->version or die <<'EOT';
+ERROR: Can't determine distribution version. Please specify it
+explicitly via 'version' in Makefile.PL, or set a valid $VERSION
+in a module, and provide its file path via 'version_from' (or
+'all_from' if you prefer) in Makefile.PL.
+EOT
+
+ if ( $self->tests ) {
+ my @tests = split ' ', $self->tests;
+ my %seen;
+ $args->{test} = {
+ TESTS => (join ' ', grep {!$seen{$_}++} @tests),
+ };
+ } elsif ( $Module::Install::ExtraTests::use_extratests ) {
+ # Module::Install::ExtraTests doesn't set $self->tests and does its own tests via harness.
+ # So, just ignore our xt tests here.
+ } elsif ( -d 'xt' and ($Module::Install::AUTHOR or $ENV{RELEASE_TESTING}) ) {
+ $args->{test} = {
+ TESTS => join( ' ', map { "$_/*.t" } grep { -d $_ } qw{ t xt } ),
+ };
+ }
+ if ( $] >= 5.005 ) {
+ $args->{ABSTRACT} = $self->abstract;
+ $args->{AUTHOR} = join ', ', @{$self->author || []};
+ }
+ if ( $self->makemaker(6.10) ) {
+ $args->{NO_META} = 1;
+ #$args->{NO_MYMETA} = 1;
+ }
+ if ( $self->makemaker(6.17) and $self->sign ) {
+ $args->{SIGN} = 1;
+ }
+ unless ( $self->is_admin ) {
+ delete $args->{SIGN};
+ }
+ if ( $self->makemaker(6.31) and $self->license ) {
+ $args->{LICENSE} = $self->license;
+ }
+
+ my $prereq = ($args->{PREREQ_PM} ||= {});
+ %$prereq = ( %$prereq,
+ map { @$_ } # flatten [module => version]
+ map { @$_ }
+ grep $_,
+ ($self->requires)
+ );
+
+ # Remove any reference to perl, PREREQ_PM doesn't support it
+ delete $args->{PREREQ_PM}->{perl};
+
+ # Merge both kinds of requires into BUILD_REQUIRES
+ my $build_prereq = ($args->{BUILD_REQUIRES} ||= {});
+ %$build_prereq = ( %$build_prereq,
+ map { @$_ } # flatten [module => version]
+ map { @$_ }
+ grep $_,
+ ($self->configure_requires, $self->build_requires)
+ );
+
+ # Remove any reference to perl, BUILD_REQUIRES doesn't support it
+ delete $args->{BUILD_REQUIRES}->{perl};
+
+ # Delete bundled dists from prereq_pm, add it to Makefile DIR
+ my $subdirs = ($args->{DIR} || []);
+ if ($self->bundles) {
+ my %processed;
+ foreach my $bundle (@{ $self->bundles }) {
+ my ($mod_name, $dist_dir) = @$bundle;
+ delete $prereq->{$mod_name};
+ $dist_dir = File::Basename::basename($dist_dir); # dir for building this module
+ if (not exists $processed{$dist_dir}) {
+ if (-d $dist_dir) {
+ # List as sub-directory to be processed by make
+ push @$subdirs, $dist_dir;
+ }
+ # Else do nothing: the module is already present on the system
+ $processed{$dist_dir} = undef;
+ }
+ }
+ }
+
+ unless ( $self->makemaker('6.55_03') ) {
+ %$prereq = (%$prereq,%$build_prereq);
+ delete $args->{BUILD_REQUIRES};
+ }
+
+ if ( my $perl_version = $self->perl_version ) {
+ eval "use $perl_version; 1"
+ or die "ERROR: perl: Version $] is installed, "
+ . "but we need version >= $perl_version";
+
+ if ( $self->makemaker(6.48) ) {
+ $args->{MIN_PERL_VERSION} = $perl_version;
+ }
+ }
+
+ if ($self->installdirs) {
+ warn qq{old INSTALLDIRS (probably set by makemaker_args) is overriden by installdirs\n} if $args->{INSTALLDIRS};
+ $args->{INSTALLDIRS} = $self->installdirs;
+ }
+
+ my %args = map {
+ ( $_ => $args->{$_} ) } grep {defined($args->{$_} )
+ } keys %$args;
+
+ my $user_preop = delete $args{dist}->{PREOP};
+ if ( my $preop = $self->admin->preop($user_preop) ) {
+ foreach my $key ( keys %$preop ) {
+ $args{dist}->{$key} = $preop->{$key};
+ }
+ }
+
+ my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
+ $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
+}
+
+sub fix_up_makefile {
+ my $self = shift;
+ my $makefile_name = shift;
+ my $top_class = ref($self->_top) || '';
+ my $top_version = $self->_top->VERSION || '';
+
+ my $preamble = $self->preamble
+ ? "# Preamble by $top_class $top_version\n"
+ . $self->preamble
+ : '';
+ my $postamble = "# Postamble by $top_class $top_version\n"
+ . ($self->postamble || '');
+
+ local *MAKEFILE;
+ open MAKEFILE, "+< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+ eval { flock MAKEFILE, LOCK_EX };
+ my $makefile = do { local $/; <MAKEFILE> };
+
+ $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
+ $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
+ $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
+ $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
+ $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
+
+ # Module::Install will never be used to build the Core Perl
+ # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
+ # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
+ $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
+ #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
+
+ # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
+ $makefile =~ s/(\"?)-I\$\(PERL_LIB\)\1//g;
+
+ # XXX - This is currently unused; not sure if it breaks other MM-users
+ # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
+
+ seek MAKEFILE, 0, SEEK_SET;
+ truncate MAKEFILE, 0;
+ print MAKEFILE "$preamble$makefile$postamble" or die $!;
+ close MAKEFILE or die $!;
+
+ 1;
+}
+
+sub preamble {
+ my ($self, $text) = @_;
+ $self->{preamble} = $text . $self->{preamble} if defined $text;
+ $self->{preamble};
+}
+
+sub postamble {
+ my ($self, $text) = @_;
+ $self->{postamble} ||= $self->admin->postamble;
+ $self->{postamble} .= $text if defined $text;
+ $self->{postamble}
+}
+
+1;
+
+__END__
+
+#line 544
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Metadata.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Metadata.pm
new file mode 100644
index 0000000..11bf971
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Metadata.pm
@@ -0,0 +1,722 @@
+#line 1
+package Module::Install::Metadata;
+
+use strict 'vars';
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+ $VERSION = '1.19';
+ @ISA = 'Module::Install::Base';
+ $ISCORE = 1;
+}
+
+my @boolean_keys = qw{
+ sign
+};
+
+my @scalar_keys = qw{
+ name
+ module_name
+ abstract
+ version
+ distribution_type
+ tests
+ installdirs
+};
+
+my @tuple_keys = qw{
+ configure_requires
+ build_requires
+ requires
+ recommends
+ bundles
+ resources
+};
+
+my @resource_keys = qw{
+ homepage
+ bugtracker
+ repository
+};
+
+my @array_keys = qw{
+ keywords
+ author
+};
+
+*authors = \&author;
+
+sub Meta { shift }
+sub Meta_BooleanKeys { @boolean_keys }
+sub Meta_ScalarKeys { @scalar_keys }
+sub Meta_TupleKeys { @tuple_keys }
+sub Meta_ResourceKeys { @resource_keys }
+sub Meta_ArrayKeys { @array_keys }
+
+foreach my $key ( @boolean_keys ) {
+ *$key = sub {
+ my $self = shift;
+ if ( defined wantarray and not @_ ) {
+ return $self->{values}->{$key};
+ }
+ $self->{values}->{$key} = ( @_ ? $_[0] : 1 );
+ return $self;
+ };
+}
+
+foreach my $key ( @scalar_keys ) {
+ *$key = sub {
+ my $self = shift;
+ return $self->{values}->{$key} if defined wantarray and !@_;
+ $self->{values}->{$key} = shift;
+ return $self;
+ };
+}
+
+foreach my $key ( @array_keys ) {
+ *$key = sub {
+ my $self = shift;
+ return $self->{values}->{$key} if defined wantarray and !@_;
+ $self->{values}->{$key} ||= [];
+ push @{$self->{values}->{$key}}, @_;
+ return $self;
+ };
+}
+
+foreach my $key ( @resource_keys ) {
+ *$key = sub {
+ my $self = shift;
+ unless ( @_ ) {
+ return () unless $self->{values}->{resources};
+ return map { $_->[1] }
+ grep { $_->[0] eq $key }
+ @{ $self->{values}->{resources} };
+ }
+ return $self->{values}->{resources}->{$key} unless @_;
+ my $uri = shift or die(
+ "Did not provide a value to $key()"
+ );
+ $self->resources( $key => $uri );
+ return 1;
+ };
+}
+
+foreach my $key ( grep { $_ ne "resources" } @tuple_keys) {
+ *$key = sub {
+ my $self = shift;
+ return $self->{values}->{$key} unless @_;
+ my @added;
+ while ( @_ ) {
+ my $module = shift or last;
+ my $version = shift || 0;
+ push @added, [ $module, $version ];
+ }
+ push @{ $self->{values}->{$key} }, @added;
+ return map {@$_} @added;
+ };
+}
+
+# Resource handling
+my %lc_resource = map { $_ => 1 } qw{
+ homepage
+ license
+ bugtracker
+ repository
+};
+
+sub resources {
+ my $self = shift;
+ while ( @_ ) {
+ my $name = shift or last;
+ my $value = shift or next;
+ if ( $name eq lc $name and ! $lc_resource{$name} ) {
+ die("Unsupported reserved lowercase resource '$name'");
+ }
+ $self->{values}->{resources} ||= [];
+ push @{ $self->{values}->{resources} }, [ $name, $value ];
+ }
+ $self->{values}->{resources};
+}
+
+# Aliases for build_requires that will have alternative
+# meanings in some future version of META.yml.
+sub test_requires { shift->build_requires(@_) }
+sub install_requires { shift->build_requires(@_) }
+
+# Aliases for installdirs options
+sub install_as_core { $_[0]->installdirs('perl') }
+sub install_as_cpan { $_[0]->installdirs('site') }
+sub install_as_site { $_[0]->installdirs('site') }
+sub install_as_vendor { $_[0]->installdirs('vendor') }
+
+sub dynamic_config {
+ my $self = shift;
+ my $value = @_ ? shift : 1;
+ if ( $self->{values}->{dynamic_config} ) {
+ # Once dynamic we never change to static, for safety
+ return 0;
+ }
+ $self->{values}->{dynamic_config} = $value ? 1 : 0;
+ return 1;
+}
+
+# Convenience command
+sub static_config {
+ shift->dynamic_config(0);
+}
+
+sub perl_version {
+ my $self = shift;
+ return $self->{values}->{perl_version} unless @_;
+ my $version = shift or die(
+ "Did not provide a value to perl_version()"
+ );
+
+ # Normalize the version
+ $version = $self->_perl_version($version);
+
+ # We don't support the really old versions
+ unless ( $version >= 5.005 ) {
+ die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n";
+ }
+
+ $self->{values}->{perl_version} = $version;
+}
+
+sub all_from {
+ my ( $self, $file ) = @_;
+
+ unless ( defined($file) ) {
+ my $name = $self->name or die(
+ "all_from called with no args without setting name() first"
+ );
+ $file = join('/', 'lib', split(/-/, $name)) . '.pm';
+ $file =~ s{.*/}{} unless -e $file;
+ unless ( -e $file ) {
+ die("all_from cannot find $file from $name");
+ }
+ }
+ unless ( -f $file ) {
+ die("The path '$file' does not exist, or is not a file");
+ }
+
+ $self->{values}{all_from} = $file;
+
+ # Some methods pull from POD instead of code.
+ # If there is a matching .pod, use that instead
+ my $pod = $file;
+ $pod =~ s/\.pm$/.pod/i;
+ $pod = $file unless -e $pod;
+
+ # Pull the different values
+ $self->name_from($file) unless $self->name;
+ $self->version_from($file) unless $self->version;
+ $self->perl_version_from($file) unless $self->perl_version;
+ $self->author_from($pod) unless @{$self->author || []};
+ $self->license_from($pod) unless $self->license;
+ $self->abstract_from($pod) unless $self->abstract;
+
+ return 1;
+}
+
+sub provides {
+ my $self = shift;
+ my $provides = ( $self->{values}->{provides} ||= {} );
+ %$provides = (%$provides, @_) if @_;
+ return $provides;
+}
+
+sub auto_provides {
+ my $self = shift;
+ return $self unless $self->is_admin;
+ unless (-e 'MANIFEST') {
+ warn "Cannot deduce auto_provides without a MANIFEST, skipping\n";
+ return $self;
+ }
+ # Avoid spurious warnings as we are not checking manifest here.
+ local $SIG{__WARN__} = sub {1};
+ require ExtUtils::Manifest;
+ local *ExtUtils::Manifest::manicheck = sub { return };
+
+ require Module::Build;
+ my $build = Module::Build->new(
+ dist_name => $self->name,
+ dist_version => $self->version,
+ license => $self->license,
+ );
+ $self->provides( %{ $build->find_dist_packages || {} } );
+}
+
+sub feature {
+ my $self = shift;
+ my $name = shift;
+ my $features = ( $self->{values}->{features} ||= [] );
+ my $mods;
+
+ if ( @_ == 1 and ref( $_[0] ) ) {
+ # The user used ->feature like ->features by passing in the second
+ # argument as a reference. Accomodate for that.
+ $mods = $_[0];
+ } else {
+ $mods = \@_;
+ }
+
+ my $count = 0;
+ push @$features, (
+ $name => [
+ map {
+ ref($_) ? ( ref($_) eq 'HASH' ) ? %$_ : @$_ : $_
+ } @$mods
+ ]
+ );
+
+ return @$features;
+}
+
+sub features {
+ my $self = shift;
+ while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) {
+ $self->feature( $name, @$mods );
+ }
+ return $self->{values}->{features}
+ ? @{ $self->{values}->{features} }
+ : ();
+}
+
+sub no_index {
+ my $self = shift;
+ my $type = shift;
+ push @{ $self->{values}->{no_index}->{$type} }, @_ if $type;
+ return $self->{values}->{no_index};
+}
+
+sub read {
+ my $self = shift;
+ $self->include_deps( 'YAML::Tiny', 0 );
+
+ require YAML::Tiny;
+ my $data = YAML::Tiny::LoadFile('META.yml');
+
+ # Call methods explicitly in case user has already set some values.
+ while ( my ( $key, $value ) = each %$data ) {
+ next unless $self->can($key);
+ if ( ref $value eq 'HASH' ) {
+ while ( my ( $module, $version ) = each %$value ) {
+ $self->can($key)->($self, $module => $version );
+ }
+ } else {
+ $self->can($key)->($self, $value);
+ }
+ }
+ return $self;
+}
+
+sub write {
+ my $self = shift;
+ return $self unless $self->is_admin;
+ $self->admin->write_meta;
+ return $self;
+}
+
+sub version_from {
+ require ExtUtils::MM_Unix;
+ my ( $self, $file ) = @_;
+ $self->version( ExtUtils::MM_Unix->parse_version($file) );
+
+ # for version integrity check
+ $self->makemaker_args( VERSION_FROM => $file );
+}
+
+sub abstract_from {
+ require ExtUtils::MM_Unix;
+ my ( $self, $file ) = @_;
+ $self->abstract(
+ bless(
+ { DISTNAME => $self->name },
+ 'ExtUtils::MM_Unix'
+ )->parse_abstract($file)
+ );
+}
+
+# Add both distribution and module name
+sub name_from {
+ my ($self, $file) = @_;
+ if (
+ Module::Install::_read($file) =~ m/
+ ^ \s*
+ package \s*
+ ([\w:]+)
+ [\s|;]*
+ /ixms
+ ) {
+ my ($name, $module_name) = ($1, $1);
+ $name =~ s{::}{-}g;
+ $self->name($name);
+ unless ( $self->module_name ) {
+ $self->module_name($module_name);
+ }
+ } else {
+ die("Cannot determine name from $file\n");
+ }
+}
+
+sub _extract_perl_version {
+ if (
+ $_[0] =~ m/
+ ^\s*
+ (?:use|require) \s*
+ v?
+ ([\d_\.]+)
+ \s* ;
+ /ixms
+ ) {
+ my $perl_version = $1;
+ $perl_version =~ s{_}{}g;
+ return $perl_version;
+ } else {
+ return;
+ }
+}
+
+sub perl_version_from {
+ my $self = shift;
+ my $perl_version=_extract_perl_version(Module::Install::_read($_[0]));
+ if ($perl_version) {
+ $self->perl_version($perl_version);
+ } else {
+ warn "Cannot determine perl version info from $_[0]\n";
+ return;
+ }
+}
+
+sub author_from {
+ my $self = shift;
+ my $content = Module::Install::_read($_[0]);
+ if ($content =~ m/
+ =head \d \s+ (?:authors?)\b \s*
+ ([^\n]*)
+ |
+ =head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b \s*
+ .*? copyright .*? \d\d\d[\d.]+ \s* (?:\bby\b)? \s*
+ ([^\n]*)
+ /ixms) {
+ my $author = $1 || $2;
+
+ # XXX: ugly but should work anyway...
+ if (eval "require Pod::Escapes; 1") {
+ # Pod::Escapes has a mapping table.
+ # It's in core of perl >= 5.9.3, and should be installed
+ # as one of the Pod::Simple's prereqs, which is a prereq
+ # of Pod::Text 3.x (see also below).
+ $author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
+ {
+ defined $2
+ ? chr($2)
+ : defined $Pod::Escapes::Name2character_number{$1}
+ ? chr($Pod::Escapes::Name2character_number{$1})
+ : do {
+ warn "Unknown escape: E<$1>";
+ "E<$1>";
+ };
+ }gex;
+ }
+ elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
+ # Pod::Text < 3.0 has yet another mapping table,
+ # though the table name of 2.x and 1.x are different.
+ # (1.x is in core of Perl < 5.6, 2.x is in core of
+ # Perl < 5.9.3)
+ my $mapping = ($Pod::Text::VERSION < 2)
+ ? \%Pod::Text::HTML_Escapes
+ : \%Pod::Text::ESCAPES;
+ $author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
+ {
+ defined $2
+ ? chr($2)
+ : defined $mapping->{$1}
+ ? $mapping->{$1}
+ : do {
+ warn "Unknown escape: E<$1>";
+ "E<$1>";
+ };
+ }gex;
+ }
+ else {
+ $author =~ s{E<lt>}{<}g;
+ $author =~ s{E<gt>}{>}g;
+ }
+ $self->author($author);
+ } else {
+ warn "Cannot determine author info from $_[0]\n";
+ }
+}
+
+#Stolen from M::B
+my %license_urls = (
+ perl => 'http://dev.perl.org/licenses/',
+ apache => 'http://apache.org/licenses/LICENSE-2.0',
+ apache_1_1 => 'http://apache.org/licenses/LICENSE-1.1',
+ artistic => 'http://opensource.org/licenses/artistic-license.php',
+ artistic_2 => 'http://opensource.org/licenses/artistic-license-2.0.php',
+ lgpl => 'http://opensource.org/licenses/lgpl-license.php',
+ lgpl2 => 'http://opensource.org/licenses/lgpl-2.1.php',
+ lgpl3 => 'http://opensource.org/licenses/lgpl-3.0.html',
+ bsd => 'http://opensource.org/licenses/bsd-license.php',
+ gpl => 'http://opensource.org/licenses/gpl-license.php',
+ gpl2 => 'http://opensource.org/licenses/gpl-2.0.php',
+ gpl3 => 'http://opensource.org/licenses/gpl-3.0.html',
+ mit => 'http://opensource.org/licenses/mit-license.php',
+ mozilla => 'http://opensource.org/licenses/mozilla1.1.php',
+ open_source => undef,
+ unrestricted => undef,
+ restrictive => undef,
+ unknown => undef,
+);
+
+sub license {
+ my $self = shift;
+ return $self->{values}->{license} unless @_;
+ my $license = shift or die(
+ 'Did not provide a value to license()'
+ );
+ $license = __extract_license($license) || lc $license;
+ $self->{values}->{license} = $license;
+
+ # Automatically fill in license URLs
+ if ( $license_urls{$license} ) {
+ $self->resources( license => $license_urls{$license} );
+ }
+
+ return 1;
+}
+
+sub _extract_license {
+ my $pod = shift;
+ my $matched;
+ return __extract_license(
+ ($matched) = $pod =~ m/
+ (=head \d \s+ L(?i:ICEN[CS]E|ICENSING)\b.*?)
+ (=head \d.*|=cut.*|)\z
+ /xms
+ ) || __extract_license(
+ ($matched) = $pod =~ m/
+ (=head \d \s+ (?:C(?i:OPYRIGHTS?)|L(?i:EGAL))\b.*?)
+ (=head \d.*|=cut.*|)\z
+ /xms
+ );
+}
+
+sub __extract_license {
+ my $license_text = shift or return;
+ my @phrases = (
+ '(?:under )?the same (?:terms|license) as (?:perl|the perl (?:\d )?programming language)' => 'perl', 1,
+ '(?:under )?the terms of (?:perl|the perl programming language) itself' => 'perl', 1,
+ 'Artistic and GPL' => 'perl', 1,
+ 'GNU general public license' => 'gpl', 1,
+ 'GNU public license' => 'gpl', 1,
+ 'GNU lesser general public license' => 'lgpl', 1,
+ 'GNU lesser public license' => 'lgpl', 1,
+ 'GNU library general public license' => 'lgpl', 1,
+ 'GNU library public license' => 'lgpl', 1,
+ 'GNU Free Documentation license' => 'unrestricted', 1,
+ 'GNU Affero General Public License' => 'open_source', 1,
+ '(?:Free)?BSD license' => 'bsd', 1,
+ 'Artistic license 2\.0' => 'artistic_2', 1,
+ 'Artistic license' => 'artistic', 1,
+ 'Apache (?:Software )?license' => 'apache', 1,
+ 'GPL' => 'gpl', 1,
+ 'LGPL' => 'lgpl', 1,
+ 'BSD' => 'bsd', 1,
+ 'Artistic' => 'artistic', 1,
+ 'MIT' => 'mit', 1,
+ 'Mozilla Public License' => 'mozilla', 1,
+ 'Q Public License' => 'open_source', 1,
+ 'OpenSSL License' => 'unrestricted', 1,
+ 'SSLeay License' => 'unrestricted', 1,
+ 'zlib License' => 'open_source', 1,
+ 'proprietary' => 'proprietary', 0,
+ );
+ while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
+ $pattern =~ s#\s+#\\s+#gs;
+ if ( $license_text =~ /\b$pattern\b/i ) {
+ return $license;
+ }
+ }
+ return '';
+}
+
+sub license_from {
+ my $self = shift;
+ if (my $license=_extract_license(Module::Install::_read($_[0]))) {
+ $self->license($license);
+ } else {
+ warn "Cannot determine license info from $_[0]\n";
+ return 'unknown';
+ }
+}
+
+sub _extract_bugtracker {
+ my @links = $_[0] =~ m#L<(
+ https?\Q://rt.cpan.org/\E[^>]+|
+ https?\Q://github.com/\E[\w_]+/[\w_]+/issues|
+ https?\Q://code.google.com/p/\E[\w_\-]+/issues/list
+ )>#gx;
+ my %links;
+ @links{@links}=();
+ @links=keys %links;
+ return @links;
+}
+
+sub bugtracker_from {
+ my $self = shift;
+ my $content = Module::Install::_read($_[0]);
+ my @links = _extract_bugtracker($content);
+ unless ( @links ) {
+ warn "Cannot determine bugtracker info from $_[0]\n";
+ return 0;
+ }
+ if ( @links > 1 ) {
+ warn "Found more than one bugtracker link in $_[0]\n";
+ return 0;
+ }
+
+ # Set the bugtracker
+ bugtracker( $links[0] );
+ return 1;
+}
+
+sub requires_from {
+ my $self = shift;
+ my $content = Module::Install::_readperl($_[0]);
+ my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+(v?[\d\.]+)/mg;
+ while ( @requires ) {
+ my $module = shift @requires;
+ my $version = shift @requires;
+ $self->requires( $module => $version );
+ }
+}
+
+sub test_requires_from {
+ my $self = shift;
+ my $content = Module::Install::_readperl($_[0]);
+ my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg;
+ while ( @requires ) {
+ my $module = shift @requires;
+ my $version = shift @requires;
+ $self->test_requires( $module => $version );
+ }
+}
+
+# Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
+# numbers (eg, 5.006001 or 5.008009).
+# Also, convert double-part versions (eg, 5.8)
+sub _perl_version {
+ my $v = $_[-1];
+ $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;
+ $v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e;
+ $v =~ s/(\.\d\d\d)000$/$1/;
+ $v =~ s/_.+$//;
+ if ( ref($v) ) {
+ # Numify
+ $v = $v + 0;
+ }
+ return $v;
+}
+
+sub add_metadata {
+ my $self = shift;
+ my %hash = @_;
+ for my $key (keys %hash) {
+ warn "add_metadata: $key is not prefixed with 'x_'.\n" .
+ "Use appopriate function to add non-private metadata.\n" unless $key =~ /^x_/;
+ $self->{values}->{$key} = $hash{$key};
+ }
+}
+
+
+######################################################################
+# MYMETA Support
+
+sub WriteMyMeta {
+ die "WriteMyMeta has been deprecated";
+}
+
+sub write_mymeta_yaml {
+ my $self = shift;
+
+ # We need YAML::Tiny to write the MYMETA.yml file
+ unless ( eval { require YAML::Tiny; 1; } ) {
+ return 1;
+ }
+
+ # Generate the data
+ my $meta = $self->_write_mymeta_data or return 1;
+
+ # Save as the MYMETA.yml file
+ print "Writing MYMETA.yml\n";
+ YAML::Tiny::DumpFile('MYMETA.yml', $meta);
+}
+
+sub write_mymeta_json {
+ my $self = shift;
+
+ # We need JSON to write the MYMETA.json file
+ unless ( eval { require JSON; 1; } ) {
+ return 1;
+ }
+
+ # Generate the data
+ my $meta = $self->_write_mymeta_data or return 1;
+
+ # Save as the MYMETA.yml file
+ print "Writing MYMETA.json\n";
+ Module::Install::_write(
+ 'MYMETA.json',
+ JSON->new->pretty(1)->canonical->encode($meta),
+ );
+}
+
+sub _write_mymeta_data {
+ my $self = shift;
+
+ # If there's no existing META.yml there is nothing we can do
+ return undef unless -f 'META.yml';
+
+ # We need Parse::CPAN::Meta to load the file
+ unless ( eval { require Parse::CPAN::Meta; 1; } ) {
+ return undef;
+ }
+
+ # Merge the perl version into the dependencies
+ my $val = $self->Meta->{values};
+ my $perl = delete $val->{perl_version};
+ if ( $perl ) {
+ $val->{requires} ||= [];
+ my $requires = $val->{requires};
+
+ # Canonize to three-dot version after Perl 5.6
+ if ( $perl >= 5.006 ) {
+ $perl =~ s{^(\d+)\.(\d\d\d)(\d*)}{join('.', $1, int($2||0), int($3||0))}e
+ }
+ unshift @$requires, [ perl => $perl ];
+ }
+
+ # Load the advisory META.yml file
+ my @yaml = Parse::CPAN::Meta::LoadFile('META.yml');
+ my $meta = $yaml[0];
+
+ # Overwrite the non-configure dependency hashes
+ delete $meta->{requires};
+ delete $meta->{build_requires};
+ delete $meta->{recommends};
+ if ( exists $val->{requires} ) {
+ $meta->{requires} = { map { @$_ } @{ $val->{requires} } };
+ }
+ if ( exists $val->{build_requires} ) {
+ $meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } };
+ }
+
+ return $meta;
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Scripts.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Scripts.pm
new file mode 100644
index 0000000..8c80fcd
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/inc/Module/Install/Scripts.pm
@@ -0,0 +1,29 @@
+#line 1
+package Module::Install::Scripts;
+
+use strict 'vars';
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+ $VERSION = '1.19';
+ @ISA = 'Module::Install::Base';
+ $ISCORE = 1;
+}
+
+sub install_script {
+ my $self = shift;
+ my $args = $self->makemaker_args;
+ my $exe = $args->{EXE_FILES} ||= [];
+ foreach ( @_ ) {
+ if ( -f $_ ) {
+ push @$exe, $_;
+ } elsif ( -d 'script' and -f "script/$_" ) {
+ push @$exe, "script/$_";
+ } else {
+ die("Cannot find script '$_'");
+ }
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/00_modules.t b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/00_modules.t
new file mode 100644
index 0000000..ac1dbcb
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/00_modules.t
@@ -0,0 +1,61 @@
+#!perl
+
+use 5.00800;
+
+use strict;
+use warnings;
+
+use Test::More tests => 33;
+
+our $VERSION = '1.4.0';
+
+my $plugin_name;
+if ( eval { require Monitoring::Plugin } ) {
+ $plugin_name = 'Monitoring::Plugin';
+}
+else {
+ $plugin_name = 'Nagios::Plugin';
+}
+
+use_ok($plugin_name);
+can_ok( $plugin_name, 'new' );
+can_ok( $plugin_name, 'nagios_exit' );
+can_ok( $plugin_name, 'add_perfdata' );
+can_ok( $plugin_name, 'perfdata' );
+
+use_ok( $plugin_name . '::Getopt' );
+can_ok( $plugin_name . '::Getopt', 'new' );
+can_ok( $plugin_name . '::Getopt', 'arg' );
+can_ok( $plugin_name . '::Getopt', 'getopts' );
+can_ok( $plugin_name . '::Getopt', 'get' );
+
+use_ok( $plugin_name . '::Threshold' );
+can_ok( $plugin_name . '::Threshold', 'new' );
+can_ok( $plugin_name . '::Threshold', 'set_thresholds' );
+
+use_ok('IO::Select');
+can_ok( 'IO::Select', 'new' );
+can_ok( 'IO::Select', 'count' );
+can_ok( 'IO::Select', 'can_read' );
+can_ok( 'IO::Select', 'remove' );
+can_ok( 'IO::Select', 'handles' );
+
+use_ok('Net::DNS::Resolver');
+can_ok( 'Net::DNS::Resolver', 'new' );
+can_ok( 'Net::DNS::Resolver', 'can' );
+can_ok( 'Net::DNS::Resolver', 'bgsend' );
+can_ok( 'Net::DNS::Resolver', 'bgread' );
+
+use_ok('English');
+use_ok('Readonly');
+
+use_ok('Net::IP');
+can_ok( 'Net::IP', 'ip_expand_address' );
+
+use_ok('Data::Validate::Domain');
+can_ok( 'Data::Validate::Domain', 'is_hostname' );
+
+use_ok('Data::Validate::IP');
+can_ok( 'Data::Validate::IP', 'is_ipv4' );
+can_ok( 'Data::Validate::IP', 'is_ipv6' );
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/01_validation.t b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/01_validation.t
new file mode 100644
index 0000000..c76f3fb
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/01_validation.t
@@ -0,0 +1,20 @@
+#!perl
+
+use 5.00800;
+
+use strict;
+use warnings;
+
+use File::Spec;
+use Test::More tests => 1;
+
+our $VERSION = '1.4.0';
+
+my $check_rbl = File::Spec->catfile(qw(blib script check_rbl));
+
+require_ok($check_rbl);
+
+my $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' );
+our $plugin = $plugin_module->new( shortname => 'CHECK_RBL' );
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/test.sh b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/test.sh
new file mode 100755
index 0000000..514500a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/test.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# Our one non-success exit code.
+EXIT_BAD_ARGS=1
+
+if [ $# -lt 1 ]; then
+ echo "Usage: $0 <ip address>"
+ echo ''
+ echo ' <ip address> the IP to check against a bunch of blacklists.'
+ echo ''
+ exit $EXIT_BAD_ARGS
+else
+ IP_ADDR="${1}"
+fi
+
+
+
+perl ./check_rbl -H $IP_ADDR \
+ -t 60 \
+ -c 1 \
+ -w 1 \
+ -v \
+ -s cbl.abuseat.org -s bl.deadbeef.com -s spamtrap.drbl.drand.net -s spamsources.fabel.dk -s 0spam.fusionzero.com -s mail-abuse.blacklist.jippg.org -s korea.services.net -s spamguard.leadmon.net -s ix.dnsbl.manitu.net -s relays.nether.net -s psbl.surriel.com -s dyna.spamrats.com -s noptr.spamrats.com -s spam.spamrats.com -s dnsbl.sorbs.net -s spam.dnsbl.sorbs.net -s bl.spamcop.net -s pbl.spamhaus.org -s sbl.spamhaus.org -s xbl.spamhaus.org -s ubl.unsubscore.com -s dnsbl-1.uceprotect.net -s dnsbl-2.uceprotect.net -s dnsbl-3.uceprotect.net -s db.wpbl.info -s access.redhawk.org -s blacklist.sci.kun.nl -s dnsbl.kempt.net -s forbidden.icm.edu.pl -s hil.habeas.com -s rbl.schulte.org -s sbl-xbl.spamhaus.org -s bl.technovision.dk -s b.barracudacentral.org -s dnsbl.antispam.or.id -s dnsbl.inps.de -s drone.abuse.ch -s dsn.rfc-ignorant.org -s dul.dnsbl.sorbs.net -s http.dnsbl.sorbs.net -s l1.spews.dnsbl.sorbs.net -s l2.spews.dnsbl.sorbs.net -s misc.dnsbl.sorbs.net -s postmaster.rfc-ignorant.org -s rbl.spamlab.com -s rbl.suresupport.com -s relays.bl.kunden.de -s smtp.dnsbl.sorbs.net -s socks.dnsbl.sorbs.net -s spam.abuse.ch -s spamrbl.imp.ch -s tr.countries.nerd.dk -s unsure.nether.net -s virbl.bit.nl -s web.dnsbl.sorbs.net -s whois.rfc-ignorant.org -s wormrbl.imp.ch -s zen.spamhaus.org -s zombie.dnsbl.sorbs.net -s blackholes.five-ten-sg.com -s blacklist.woody.ch -s bl.emailbasura.org -s bogons.cymru.com -s combined.abuse.ch -s duinv.aupads.org -s dynip.rothen.com -s ohps.dnsbl.net.au -s omrs.dnsbl.net.au -s orvedb.aupads.org -s osps.dnsbl.net.au -s osrs.dnsbl.net.au -s owfs.dnsbl.net.au -s owps.dnsbl.net.au -s probes.dnsbl.net.au -s proxy.bl.gweep.ca -s proxy.block.transip.nl -s rbl.inter.net -s rbl.megarbl.net -s rdts.dnsbl.net.au -s relays.bl.gweep.ca -s residential.block.transip.nl -s ricn.dnsbl.net.au -s rmst.dnsbl.net.au -s spamlist.or.kr -s t3direct.dnsbl.net.au -s ubl.lashback.com -s all.s5h.net -s bl.spamcannibal.org -s dnsbl.anticaptcha.net -s dnsbl.dronebl.org -s dnsbl.spfbl.net -s ips.backscatterer.org -s singular.ttk.pte.hu -s spam.dnsbl.anonmails.de -s spambot.bls.digibase.ca -s z.mailspike.net
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/control
new file mode 100644
index 0000000..fdc4989
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/control
@@ -0,0 +1,6 @@
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Recommends: libmonitoring-plugin-perl | libnagios-plugin-perl (>= 0.31), libreadonly-perl, libnet-dns-perl, libdata-validate-domain-perl, libdata-validate-ip-perl
+Version: 1.4.4
+Homepage: https://github.com/matteocorti/check_rbl
+Watch: https://github.com/matteocorti/check_rbl/releases check_rbl-([0-9.]+)\.tar\.gz
+Description: plugin to check if a server is blacklisted
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/copyright
new file mode 100644
index 0000000..2247d33
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/copyright
@@ -0,0 +1,17 @@
+Copyright (c) 2009 ETH Zurich
+Copyright (c) 2010 Elan Ruusamae
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+MA 02110-1301 USA.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/rbl.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/rbl.cfg
new file mode 100644
index 0000000..2b759a0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/rbl.cfg
@@ -0,0 +1,5 @@
+# 'check_rbl' command definition
+define command{
+ command_name check_rbl
+ command_line /usr/lib/nagios/plugins/check_rbl -H '$HOSTADDRESS$' --extra-opts='rbl@/etc/nagios-plugins/check_rbl.ini' --timeout=60
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/src b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/src
new file mode 120000
index 0000000..3b375a9
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/src
@@ -0,0 +1 @@
+check_rbl-1.4.4 \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/Makefile
new file mode 100644
index 0000000..d3c4d23
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/Makefile
@@ -0,0 +1,9 @@
+PLUGIN := check_redis
+CLEANEXTRAFILES := $(PLUGIN)
+PNP4NAGIOSTEMPLATES := check_redis.php
+
+include ../common.mk
+
+check_redis: check_redis.pl
+ cp $< $@
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/check_redis.php b/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/check_redis.php
new file mode 100644
index 0000000..0c111f2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/check_redis.php
@@ -0,0 +1,300 @@
+<?php
+# ================================ SUMMARY ====================================
+#
+# File : check_redis.php
+# Version : 0.1
+# Date : June 01, 2012
+# Author : William Leibzon - william@leibzon.org
+# Summary : PNP4Nagios template for check_memcached.pl
+# Licence : GPL - summary below, full text at http://www.fsf.org/licenses/gpl.txt
+#
+# This is considered a supplemental file to check_redis.pl plugin and though
+# not distributed in unified package it is distributed under the same licencing
+# terms (GNU 2.0 license). Any redisribution of this file in modified form must
+# reproduce this summary (modified if appropriate) and must either include
+# entire GNU license in a package or list URL where it can be found if
+# distributed as a single file.
+#
+# ===================== INFORMATION ABOUT THIS TEMPLATE =======================
+#
+# This is a pnp4nagios template for redis database check done with check_redis.pl
+# that would graph some status variables returned by this plugin.
+#
+# Unlike most templates this does not care which order variables are returned in
+# and will automatically pick the right ones, so you can just use '-A' option
+# from the plugin to return all performance variables (though in that case
+# your rrd file will lager and contain extra datat that would not be graphed).
+#
+# Here is an example of nagios command config:
+#
+# define command {
+# command_name check_redis_new
+# command_line $USER1$/check_redis.pl -H $HOSTADDRESS$ -p $ARG1$ -T $ARG2$ -R -A -M $_HOSTSYSTEM_MEMORY$ -m $ARG3$ -a $ARG4$ -w $ARG5$ -c $ARG6$ -f -P "$SERVICEPERFDATA$"
+# }
+#
+# Arguments and thresholds are:
+# $ARG1 : Port
+# $ARG2 : response time thresholds
+# $ARG3 : memory utilization thresholds
+# $ARG4 : additional variables to be checked
+# $ARG5 : warning thresholds for those variables
+# $ARG6 : critical thresholds for those variables
+#
+# define service {
+# use prod-service
+# hostgroups redishosts
+# service_description Redis
+# check_command check_redis_new!6379!"1,2"!"80,90"!blocked_clients,connected_clients!50,~!100,~
+# }
+#
+# define host {
+# use prod-server
+# host_name redis.mynetwork
+# address redis.mynetwork
+# alias Redis Stat Server
+# hostgroups linux,redishosts
+# _SYSTEM_MEMORY '8G'
+# }
+#
+# ========================= VERSION HISTORY and TODO ==========================
+#
+# v0.1 - 05/31/2012 : Initial version of the template created. Includes the following:
+# 1. Response Times Graph
+# 2. Client Connections Graph
+# 3. Hits and Misses
+# 4. Keys Graph
+# 5. Memory Graph
+# 6. CPU Usage (this maybe wrong, showing too high)
+#
+# =============================== END OF HEADER ===============================
+
+$VAR = array( 'total_connections_received' => -1, # Connections Graph: connections/sec
+ 'used_memory_rss' => -1, # Memory Graph: Current memory RSS
+ 'used_cpu_sys' => -1, # CPU Load Graph: System, Main Thread
+ 'connected_clients' => -1, # Connections Graph: connections now
+ 'keyspace_hits' => -1, # Hits and Misses Graph: hits
+ 'used_cpu_user_children' => -1, # CPU Load Graph: User, Child Threads
+ 'keyspace_misses' => -1, # Hits and Misses graph: misses
+ 'used_cpu_user' => -1, # CPU Load Graph: User, Main Thread
+ 'total_commands_processed' => -1, # Commands Processed Graph ?
+ 'mem_fragmentation_ratio' => -1, # Memory Fragmentation Graph ?
+ 'used_memory' => -1, # Memory Graph: Used Memory
+ 'blocked_clients' => -1, # Connections Graph: blocked clients
+ 'expired_keys' => -1, # Keys Graph: expired keys
+ 'used_memory_peak' => -1, # Memory Graph: Memory Peak
+ 'used_cpu_sys_children' => -1, # CPU Load Graph: System, Child Threads
+ 'evicted_keys' => -1, # Keys Graphs: evicted keys
+ 'response_time' => -1, # Respose Time Graph
+ 'total_keys' => -1, # Keys Graph: total Keys
+ 'total_expires' => -1, # Keys Graph: total_expires
+ 'memory_utilization' => -1 # Memory Graph: %mem_use
+ );
+
+foreach ($this->DS as $KEY=>$VAL) {
+ if (isset($VAR[$VAL['LABEL']])) {
+ $VAR[$VAL['LABEL']] = $VAL['DS'];
+ }
+}
+
+$gindex=0;
+
+if ($VAR['response_time'] != -1) {
+ $vindex=$VAR['response_time'];
+ $unit=$UNIT[$vindex];
+ $ds_name[$gindex] = "Redis Response Time";
+ $opt[$gindex] = "--vertical-label \"$unit\" --title \"$servicedesc Response Time on $hostname \" --slope-mode --color=BACK#000000 --color=FONT#F7F7F7 --color=SHADEA#ffffff --color=SHADEB#ffffff --color=CANVAS#000000 --color=GRID#00991A --color=MGRID#00991A --color=ARROW#FF0000 ";
+ $def[$gindex] = rrd::def("var1", $RRDFILE[$vindex], $DS[$vindex], "AVERAGE");
+ $def[$gindex] .= "VDEF:slope=var1,LSLSLOPE " ;
+ $def[$gindex] .= "VDEF:int=var1,LSLINT " ;
+ $def[$gindex] .= "CDEF:proj=var1,POP,slope,COUNT,*,int,+ " ;
+ $def[$gindex] .= "LINE2:proj#ff00ff:\"Projection \" " ;
+ $def[$gindex] .= "GPRINT:var1:LAST:\"%6.2lf$unit last\" " ;
+ $def[$gindex] .= "GPRINT:var1:AVERAGE:\"%6.2lf$unit avg\" " ;
+ $def[$gindex] .= "GPRINT:var1:MAX:\"%6.2lf$unit max\\n\" ";
+ $def[$gindex] .= "CDEF:sp1=var1,100,/,10,* " ;
+ $def[$gindex] .= "CDEF:sp2=var1,100,/,20,* " ;
+ $def[$gindex] .= "CDEF:sp3=var1,100,/,30,* " ;
+ $def[$gindex] .= "CDEF:sp4=var1,100,/,40,* " ;
+ $def[$gindex] .= "CDEF:sp5=var1,100,/,50,* " ;
+ $def[$gindex] .= "CDEF:sp6=var1,100,/,60,* " ;
+ $def[$gindex] .= "CDEF:sp7=var1,100,/,70,* " ;
+ $def[$gindex] .= "CDEF:sp8=var1,100,/,80,* " ;
+ $def[$gindex] .= "CDEF:sp9=var1,100,/,90,* " ;
+ $def[$gindex] .= "AREA:var1#0000A0:\"Response Time \" " ;
+ $def[$gindex] .= "AREA:sp9#0000A0: " ;
+ $def[$gindex] .= "AREA:sp8#0000C0: " ;
+ $def[$gindex] .= "AREA:sp7#0010F0: " ;
+ $def[$gindex] .= "AREA:sp6#0040F0: " ;
+ $def[$gindex] .= "AREA:sp5#0070F0: " ;
+ $def[$gindex] .= "AREA:sp4#00A0F0: " ;
+ $def[$gindex] .= "AREA:sp3#00D0F0: " ;
+ $def[$gindex] .= "AREA:sp2#A0F0F0: " ;
+ $def[$gindex] .= "AREA:sp1#F0F0F0: " ;
+ $gindex++;
+}
+
+if ($VAR['total_connections_received'] != -1 ||
+ $VAR['connected_clients'] != -1 ||
+ $VAR['blocked_clients'] != -1) {
+ $vindex_totalconnections=$VAR['total_connections_received'];
+ $vindex_connectedclients=$VAR['connected_clients'];
+ $vindex_blockedclients=$VAR['blocked_clients'];
+ $ds_name[$gindex] = "Redis Client Connections";
+ $opt[$gindex] = "--lower-limit=0 --vertical-label \"connections\" --title \"$servicedesc Connections to $hostname\" ";
+ $def[$gindex] = "";
+ if ($vindex_connectedclients!=-1) {
+ $def[$gindex] .= rrd::def("curr_conn", $RRDFILE[$vindex_connectedclients], $DS[$vindex_connectedclients], "AVERAGE");
+ $def[$gindex] .= rrd::area("curr_conn", "#00FF00", "Current Number of Connections");
+ $def[$gindex] .= rrd::gprint("curr_conn", array("LAST", "MAX", "AVERAGE"), "%3.0lf ");
+ }
+ if ($vindex_totalconnections!=-1) {
+ $def[$gindex] .= rrd::def("conn_rate", $RRDFILE[$vindex_totalconnections], $DS[$vindex_totalconnections], "AVERAGE");
+ $def[$gindex] .= rrd::line1("conn_rate", "#0000FF", "New Connnections Per Second ");
+ $def[$gindex] .= rrd::gprint("conn_rate", array("LAST", "MAX", "AVERAGE"), "%3.0lf ");
+ }
+ if ($vindex_blockedclients!=-1) {
+ $def[$gindex] .= rrd::def("blocked_clients", $RRDFILE[$vindex_blockedclients], $DS[$vindex_blockedclients], "AVERAGE");
+ $def[$gindex] .= rrd::line1("blocked_clients", "#FF0000", "Blocked Client Connections ");
+ $def[$gindex] .= rrd::gprint("blocked_clients", array("LAST","MAX","AVERAGE"), "%3.0lf ");
+ }
+ $gindex++;
+}
+
+if ($VAR['keyspace_hits'] != -1 && $VAR['keyspace_misses'] != -1) {
+ $vindex_hits=$VAR['keyspace_hits'];
+ $vindex_misses=$VAR['keyspace_misses'];
+ $ds_name[$gindex] = "Redis Hits and Misses";
+ $opt[$gindex] = "--lower-limit=0 --vertical-label \"hits and misses\" --title \"$servicedesc Hits and Misses on $hostname\" ";
+ $def[$gindex] = rrd::def("get_hits", $RRDFILE[$vindex_hits], $DS[$vindex_hits], "AVERAGE");
+ $def[$gindex] .= rrd::def("get_misses", $RRDFILE[$vindex_misses], $DS[$vindex_misses], "AVERAGE");
+ $def[$gindex] .= rrd::area("get_hits", "#00FF00", "Hits ");
+ $def[$gindex] .= rrd::gprint("get_hits", array("LAST", "MAX", "AVERAGE"), "%3.0lf ");
+ $def[$gindex] .= rrd::area("get_misses", "#FF0000", "Misses ", "STACK");
+ $def[$gindex] .= rrd::gprint("get_misses", array("LAST", "MAX", "AVERAGE"), "%3.0lf ");
+ $def[$gindex] .= rrd::cdef("hitrate", "get_hits,get_hits,get_misses,+,/,100,*");
+ $def[$gindex] .= rrd::comment("- Hit Rate ");
+ $def[$gindex] .= rrd::gprint("hitrate", array("LAST", "MAX", "AVERAGE"), "%.2lf%% ");
+ $gindex++;
+}
+
+if ($VAR['total_keys'] != -1 && $VAR['total_expires'] != -1) {
+ $vindex_expiredkeys=$VAR['expired_keys'];
+ $vindex_evictedkeys=$VAR['evicted_keys'];
+ $vindex_totalkeys=$VAR['total_keys'];
+ $vindex_totalexpires=$VAR['total_expires'];
+ $ds_name[$gindex] = "Redis Keys Store";
+ $opt[$gindex] = "--lower-limit=0 --vertical-label \"keys\" --title \"$servicedesc Keys on $hostname\" ";
+ $def[$gindex] = rrd::def("total_keys", $RRDFILE[$vindex_totalkeys], $DS[$vindex_totalkeys], "AVERAGE");
+ $def[$gindex] .= rrd::def("total_expires", $RRDFILE[$vindex_totalexpires], $DS[$vindex_totalexpires], "AVERAGE");
+ $def[$gindex] .= rrd::area("total_keys", "#6495ED", "Total Keys ");
+ $def[$gindex] .= rrd::gprint("total_keys", array("LAST", "MAX", "AVERAGE"), "%3.0lf ");
+ $def[$gindex] .= rrd::area("total_expires", "#00FFFF", "Will Expire", "");
+ $def[$gindex] .= rrd::gprint("total_expires", array("LAST", "MAX", "AVERAGE"), "%3.0lf ");
+ if ($vindex_expiredkeys!=-1) {
+ $def[$gindex] .= rrd::def("expired_keys", $RRDFILE[$vindex_expiredkeys], $DS[$vindex_expiredkeys], "AVERAGE");
+ $def[$gindex] .= rrd::line1("expired_keys", "#00FF00", "Expired ", "");
+ $def[$gindex] .= rrd::gprint("expired_keys", array("LAST", "MAX", "AVERAGE"), "%3.0lf ");
+ }
+ if ($vindex_evictedkeys!=-1) {
+ $def[$gindex] .= rrd::def("evicted_keys", $RRDFILE[$vindex_evictedkeys], $DS[$vindex_evictedkeys], "AVERAGE");
+ $def[$gindex] .= rrd::line1("evicted_keys", "#FF0000", "Evicted ", "");
+ $def[$gindex] .= rrd::gprint("evicted_keys", array("LAST", "MAX", "AVERAGE"), "%3.0lf ");
+ }
+ $gindex++;
+}
+
+if ($VAR['used_memory'] != -1 && $VAR['used_memory_peak']) {
+ $vindex_usedmemory=$VAR['used_memory'];
+ $vindex_memorypeak=$VAR['used_memory_peak'];
+ $vindex_memoryrss=$VAR['used_memory_rss'];
+ $vindex_fragmentation=$VAR['mem_fragmentation_ratio'];
+ $vindex_utilization=$VAR['memory_utilization'];
+ $ds_name[$gindex] = "Redis Memory";
+ $opt[$gindex] = "--lower-limit=0 --vertical-label \"MB\" --title \"$servicedesc Memory Use on $hostname\" ";
+ $def[$gindex] = rrd::def("bytes", $RRDFILE[$vindex_usedmemory], $DS[$vindex_usedmemory], "AVERAGE");
+ $def[$gindex] .= rrd::def("maxbytes", $RRDFILE[$vindex_memorypeak], $DS[$vindex_memorypeak], "AVERAGE");
+ $def[$gindex] .= rrd::cdef("use_mb", "bytes,1024,/,1024,/");
+ $def[$gindex] .= rrd::cdef("maxuse_mb", "maxbytes,1024,/,1024,/");
+ $def[$gindex] .= rrd::cdef("mfree_mb", "maxbytes,bytes,-,1024,/,1024,/");
+ $def[$gindex] .= rrd::area("use_mb", "#00FFFF", "Used Memory ");
+ $def[$gindex] .= "GPRINT:use_mb:LAST:\"%6.1lfMB Last \" " ;
+ $def[$gindex] .= "GPRINT:use_mb:MAX:\"%6.1lfMB Max \" " ;
+ $def[$gindex] .= "GPRINT:use_mb:AVERAGE:\"%6.1lfMB Avg \\n\" " ;
+ $def[$gindex] .= rrd::line1("maxuse_mb", "#0000FF", "Max Used Memory ");
+ $def[$gindex] .= "GPRINT:maxuse_mb:LAST:\"%6.1lfMB Last \" " ;
+ $def[$gindex] .= "GPRINT:maxuse_mb:MAX:\"%6.1lfMB Max \" " ;
+ $def[$gindex] .= "GPRINT:maxuse_mb:AVERAGE:\"%6.1lfMB Avg \\n\" " ;
+ if ($vindex_memoryrss!=-1) {
+ $def[$gindex] .= rrd::def("memoryrss", $RRDFILE[$vindex_memoryrss], $DS[$vindex_memoryrss], "AVERAGE");
+ $def[$gindex] .= rrd::cdef("memrss_mb", "memoryrss,1024,/,1024,/");
+ $def[$gindex] .= rrd::cdef("fragmented_mb", "memrss_mb,use_mb,-");
+ $def[$gindex] .= rrd::area("fragmented_mb", "#FFD700", "Allocated Memory", "STACK");
+ if ($vindex_utilization!=-1) {
+ $def[$gindex] .= rrd::def("use_perc", $RRDFILE[$vindex_utilization], $DS[$vindex_utilization], "AVERAGE");
+ $def[$gindex] .= rrd::cdef("free_perc", "100,use_perc,-");
+ $def[$gindex] .= rrd::cdef("total_mb", "memrss_mb,use_perc,/,100,*");
+ $def[$gindex] .= rrd::cdef("free_mb", "total_mb,memrss_mb,-");
+ $def[$gindex] .= "GPRINT:memrss_mb:LAST:\"%6.1lfMB \g\" " ;
+ $def[$gindex] .= "GPRINT:use_perc:LAST:\" (%2.1lf%%) Last\" " ;
+ $def[$gindex] .= "GPRINT:memrss_mb:MAX:\"%6.1lfMB \g\" " ;
+ $def[$gindex] .= "GPRINT:use_perc:MAX:\" (%2.1lf%%) Max\" " ;
+ $def[$gindex] .= "GPRINT:memrss_mb:AVERAGE:\"%6.1lfMB \g\" " ;
+ $def[$gindex] .= "GPRINT:use_perc:AVERAGE:\" (%2.1lf%%) Avg\\n\" " ;
+ $def[$gindex] .= rrd::cdef("fragmentation_calc", "memrss_mb,use_mb,/");
+ $def[$gindex] .= rrd::comment("* Fragmentation Ratio (Allocated/Used) is \g");
+ if ($vindex_fragmentation!=-1) {
+ $def[$gindex] .= rrd::def("fragmentation_data", $RRDFILE[$vindex_fragmentation], $DS[$vindex_fragmentation], "AVERAGE");
+ $def[$gindex] .= "GPRINT:fragmentation_calc:LAST:\" %2.2lf \g\" ";
+ $def[$gindex] .= "GPRINT:fragmentation_data:LAST:\" (actual %2.2lf)\\n\" ";
+ }
+ else {
+ $def[$gindex] .= "GPRINT:fragmentation_calc:LAST:\"%2.2lf\\n\" ";
+ }
+ $def[$gindex] .= rrd::area("free_mb", "#00FF00", "Free Memory ", "STACK");
+ $def[$gindex] .= "GPRINT:free_mb:LAST:\"%6.1lfMB \g\" " ;
+ $def[$gindex] .= "GPRINT:free_perc:LAST:\" (%2.1lf%%) Last\" " ;
+ $def[$gindex] .= "GPRINT:free_mb:MAX:\"%6.1lfMB \g\" " ;
+ $def[$gindex] .= "GPRINT:free_perc:MAX:\" (%2.1lf%%) Max\" " ;
+ $def[$gindex] .= "GPRINT:free_mb:AVERAGE:\"%6.1lfMB \g\" " ;
+ $def[$gindex] .= "GPRINT:free_perc:AVERAGE:\" (%2.1lf%%) Avg\\n\" " ;
+ $def[$gindex] .= rrd::comment("= Total Memory");
+ $def[$gindex] .= "GPRINT:total_mb:LAST:\"%6.1lfMB\\n\" ";
+ }
+ else {
+ $def[$gindex] .= "GPRINT:memrss_mb:LAST:\"%6.1lfMB Last \" " ;
+ $def[$gindex] .= "GPRINT:memrss_mb:MAX:\"%6.1lfMB Max \" " ;
+ $def[$gindex] .= "GPRINT:memrss_mb:AVERAGE:\"%6.1lfMB Avg \\n\" " ;
+ }
+ }
+ $gindex++;
+}
+
+if ($VAR['used_cpu_sys'] != -1) {
+ $vindex_cpumain_sys=$VAR['used_cpu_sys'];
+ $vindex_cpumain_user=$VAR['used_cpu_user'];
+ $vindex_cpuchild_sys=$VAR['used_cpu_sys_children'];
+ $vindex_cpuchild_user=$VAR['used_cpu_user_children'];
+ $ds_name[$gindex] ="CPU Use";
+ $opt[$gindex] = "--vertical-label \"cpu time in msec\" --title \"$servicedesc CPU Use on $hostname\" ";
+ $def[$gindex] = rrd::def("cpu_main_sys", $RRDFILE[$vindex_cpumain_sys], $DS[$vindex_cpumain_sys], "AVERAGE");
+ $def[$gindex] .= rrd::area("cpu_main_sys", "#FF6103", "System CPU - Main Thread");
+ $def[$gindex] .= rrd::gprint("cpu_main_sys", array("LAST","MAX","AVERAGE"), "%6.2lf ");
+ if ($vindex_cpuchild_sys!=-1) {
+ $def[$gindex] .= rrd::def("cpu_child_sys", $RRDFILE[$vindex_cpuchild_sys], $DS[$vindex_cpuchild_sys], "AVERAGE");
+ $def[$gindex] .= rrd::area("cpu_child_sys", "#FFD700", "System CPU - Children ", "STACK");
+ $def[$gindex] .= rrd::gprint("cpu_child_sys", array("LAST","MAX","AVERAGE"), "%6.2lf ");
+ }
+ if ($vindex_cpumain_user!=-1) {
+ $def[$gindex] .= rrd::def("cpu_main_user", $RRDFILE[$vindex_cpumain_user], $DS[$vindex_cpumain_user], "AVERAGE");
+ $def[$gindex] .= rrd::area("cpu_main_user", "#008000", "User CPU - Main Thread", "STACK");
+ $def[$gindex] .= rrd::gprint("cpu_main_user", array("LAST","MAX","AVERAGE"), "%6.2lf ");
+ }
+ if ($vindex_cpuchild_user!=-1) {
+ $def[$gindex] .= rrd::def("cpu_child_user", $RRDFILE[$vindex_cpuchild_user], $DS[$vindex_cpuchild_user], "AVERAGE");
+ $def[$gindex] .= rrd::area("cpu_child_user", "#00FF00", "User CPU - Children ", "STACK");
+ $def[$gindex] .= rrd::gprint("cpu_child_user", array("LAST","MAX","AVERAGE"), "%6.2lf ");
+ }
+ $gindex++;
+}
+
+?>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/check_redis.pl b/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/check_redis.pl
new file mode 100644
index 0000000..1a500b4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/check_redis.pl
@@ -0,0 +1,2914 @@
+#!/usr/bin/perl -w
+#
+# ============================== SUMMARY =====================================
+#
+# Program : check_redis.pl
+# Version : 0.73
+# Date : Mar 23, 2013
+# Author : William Leibzon - william@leibzon.org
+# Licence : GPL - summary below, full text at http://www.fsf.org/licenses/gpl.txt
+#
+# =========================== PROGRAM LICENSE =================================
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ===================== INFORMATION ABOUT THIS PLUGIN =========================
+#
+# This is Redis Server Check plugin. It gets stats variables and allows to set
+# thresholds on their value or their rate of change. It can measure response time,
+# hitrate, memory utilization, check replication sync and more. It can also test
+# data in a specified key (if necessary doing average or sum on range).
+#
+# Plugin returns stats variables as performance data for further nagios 2.0
+# post-processing, you can find graph templates for PNP4Nagios at:
+# http://william.leibzon.org/nagios/
+#
+# This program is written and maintained by:
+# William Leibzon - william(at)leibzon.org
+#
+# ============================= SETUP NOTES ====================================
+#
+# Make sure to install Redis perl library from CPAN first.
+#
+# Next for help and to see what parameters this plugin accepts do:
+# ./check_redis.pl --help
+#
+# This plugin checks Redis NoSQL database status variables, measures its response
+# time and if specified allows to set thresholds on one or more key data. You can
+# set thresholds for data in stats variables and some of them are also conveniently
+# available as long options with special threshold syntax. Plugin also calculates
+# statistics such as Hitrate (calculated as rate of change of hits/misses) and
+# memory use and can check replication delay.
+#
+# All variables can be returned as performance data for graphing and pnp4nagios
+# template should be available with this plugin on the site you downloaded it from.
+
+# 1. Connection Parameters
+#
+# The connection parameters are "-H hostname", "-p port", "-D database" and
+# "-C password_file" or "-x password". Specifying hostname is required, if you
+# run locally specify it as -H 127.0.0.1. Everything else is optional and rarely
+# needed. Default port is 6337. Database name (usually a numeric id) is probably
+# only needed if you use --query option. Password can be passed on a command
+# line with -x but its safer to read read it from a file or change in the code
+# itself if you do use authentication.
+#
+# 2. Response Time, HitRate, Memory Utilization, Replication Delay
+#
+# To get response time you use "-T" or "--response_time=" option. By itself
+# it will cause output of response time at the status line. You can also use
+# it as "-T warn,crit" to specify warning and critical thresholds.
+#
+# To get hitrate the option is "-R" or "--hitrate=". If previous performance
+# data is not feed to plugin (-P option, see below) the plugin calculates
+# it as total hitrate over life of redis process. If -P is specified and
+# previous performance data is fed back, the data is based on real hitrate
+# (which can show spikes and downs) with lifelong info also given in paranthesis
+# The data is based on keyspace_hits and keyspace_misses stats variables.
+# As with -T you can specify -R by itself or with thresholds as -R warn,crit
+#
+# Memory utilization is percent of real memory used by Redis out of total
+# memory on the system. To be able to calculate it plugin needs to known
+# amount of memory your system has which you specify with "-M" or "--total_memory="
+# option. Memory utilization option itself is lower "-m" or "--memory_utilization="
+# and you can specify threshold for it as "-m warn,crit"
+#
+# Replication delay threshold option "-R" or "--replication_delay=" is used
+# to check replication with data from "master_last_io_seconds_ago" stats and
+# valid only on slave servers. Other variables maybe checked for this later
+# with more complex functionality, so it was chosen to do this as separate
+# option rather than directing people to check that variable.
+#
+# 3. Checks on Redis Status Variables
+#
+# All status variables from redis can be checked with the plugin. For some
+# status variables separate long option is provided to specify threshold.
+# i.e. --connected_clients=<thresholds>
+#
+# This is a new alternative to specifying all variables together with -a
+# (--variables) option. For example:
+# -a connected_clients,blocked_clients
+# When you do above results are included in status output line and you
+# are required to specify thresholds with -w or --warn and -c or --crit
+# with exactly number of thresholds as a number of variables specified
+# in -a. If you simply want variable values on status line without specifying
+# any threshold, use ~ in place of threshold value or skip value but specify
+# all appropriate commas. For example:
+# -a connected_clients,blocked_clients -w ~,~ -c ~,~
+# OR -a connected_clients,blocked_clients -w , -c ,
+#
+# If you use new syntax with a long option for specific stats variables, you
+# can specify list of one or more threshold specifiers which can be any of:
+# NAME:<string> - Overrides name for this variable for use in status and PERF output
+# PATTERN:<regex> - Regular Expression that allows to match multiple data results
+# WARN:threshold - warning alert threshold
+# CRIT:threshold - critical alert threshold
+# Threshold is a value (usually numeric) which may have the following prefix:
+# > - warn if data is above this value (default for numeric values)
+# < - warn if data is below this value (must be followed by number)
+# = - warn if data is equal to this value (default for non-numeric values)
+# ! - warn if data is not equal to this value
+# Threshold can also be specified as a range in two forms:
+# num1:num2 - warn if data is outside range i.e. if data<num1 or data>num2
+# \@num1:num2 - warn if data is in range i.e. data>=num1 && data<=num2
+# ABSENT:OK|WARNING|CRITICAL|UNKNOWN - Nagios alert (or lock of thereof) if data is absent
+# ZERO:OK|WARNING|CRITICAL|UNKNOWN - Nagios alert (or lock of thereof) if result is 0
+# DISPLAY:YES|NO - Specifies if data should be included in nagios status line output
+# PERF:YES|NO - Output in performance data or not (always YES if -F option is used)
+# UOM:<string> - Unit Of Measurement symbol to add to perf data - 'c','%','s','B'
+# This is used by programs that graph perf data such as PNP
+#
+# These can be specified in any order separated by ",". For example:
+# --connected_clients=CRIT:>100,WARN:>50,ABSENT:CRITICAL,ZERO:OK,DISPLAY:YES,PERF:YES
+#
+# Variables that are not known to plugin and don't have specific long option (or even if
+# they do) can be specified using general long option --check or --option or -o
+# (all are aliases for same option):
+# --check=NAME:connected_clients,CRIT:>100,WARN:>50,ABSENT:CRITICAL,DISPLAY:YES,PERF:YES
+#
+# Then NAME is used to specify what to match and multiple data vars maybe matched
+# with PATTERN regex option (and please only use PATTERN with --check and not confuse
+# plugin by using it in a named long option). Either NAME or PATTERN are required.
+#
+# 4. Calculating and using Rate of Change for Variables
+#
+# If you want to check rate of change rather than actual value you can do this
+# by specifying it as '&variable' such as "&total_connections_received" or
+# as "variable_rate" which is "total_connections_received_rate" and is similar
+# to 'connected_clients' variable. By default it would be reported in the output
+# as 'variable_rate' though '&variable' is a format used internally by plugin.
+#
+# As an alternative you can specify how to label these with --rate_label
+# option where you can specify prefix and/or suffix. For example '--rate_label=dt_'
+# would have the output being "dt_total_connections_received' where as
+# '--rate_label=,_rate' is plugin default giving 'total_connections_received_rate'.
+# You can use these names with -a and -A such as:
+# --rate_label=,_rate -a total_connections_received_rate -w 1000 -c ~
+# Note that --rate_label will not work with new variable-named options, the
+# only way to change default if you use that is to modify code and change
+# $o_rprefix and $o_rsuffix variables default values.
+#
+# Now in order to be able to calculate rate of change, the plugin needs to
+# know values of the variables from when it was run the last time. This
+# is done by feeding it previous performance data with a -P option.
+# In commands.cfg this would be specified as:
+# -P "$SERVICEPERFDATA$"
+# And don't forget the quotes, in this case they are not just for documentation.
+#
+# 5. Threshold Specification
+#
+# The plugin fully supports Nagios plug-in specification for specifying thresholds:
+# http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT
+#
+# And it supports an easier format with the following one-letter prefix modifiers:
+# >value : issue alert if data is above this value (default for numeric value)
+# <value : issue alert if data is below this value (must be followed by number)
+# =value : issue alert if data is equal to this value (default for non-numeric)
+# !value : issue alert if data is NOT equal to this value
+# (because > and < are interpreted by shell you may need to specify this in quotes)
+# There are also two specifications of range formats as with other nagios plugins:
+# number1:number2 issue alert if data is OUTSIDE of range [number1..number2]
+# i.e. alert if data<$number1 or data>$number2
+# @number1:number2 issue alert if data is WITHIN range [number1..number2]
+# i.e. alert if data>=$number and $data<=$number2
+#
+# The plugin will attempt to check that WARNING value is less than CRITICAL
+# (or greater for <). A special prefix modifier '^' can be used to disable these
+# checks. A quick example of such special use is '--warn=^<100 --crit=>200' which
+# means warning alert if value is < 100 and critical alert if its greater than 200.
+#
+# 6. Performance Data
+#
+# With '-f' option values of all variables you specified in -a as well as
+# response time from -T (response time),
+# hitrate from -R,
+# memory utilization from -m
+# and other data are reported back out as performance data for Nagios graphing programs.
+#
+# You may also directly specify which variables are to be return as performance data
+# with '-A' option. If you use '-A' by itself and not specify any variables or use
+# special value of '*' (as in '-A *') the plugin will output all variables which is useful
+# for finding what data you can check with this plugin.
+#
+# The plugin will output threshold values as part of performance data as specified at
+# http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201
+# And don't worry about using non-standard >,<,=,~ prefixes, all of that would get
+# converted into nagios threshold format for performance output
+#
+# The plugin is smart enough to add 'c' suffix for known COUNTER variables to
+# values in performance data. Known variables are specified in an array you can
+# find at the top of the code (further below) and plugin author does not claim
+# to have identified all variables correctly. Please email if you find an error
+# or want to add more variables.
+#
+# As noted above performance data is also used to calculate rate of change
+# by feeding it back with -P option. In that regard even if you did not specify
+# -f or -A but you have specified &variable, its actual data would be sent out
+# in performance output. Additionally last time plugin was run is also in
+# performance data as special _ptime variable.
+#
+# 7. Query Option and setting thresholds for data in Redis Database
+#
+# With -q (--query) option the plugin can retrieve data from Redis database
+# which become new variables you can then check thresholds on. Currently it
+# supports getting single key values with GET and getting range or values (or
+# everything in list) with LRANGE and finding their Average or Min or Max or Sum.
+# The option maybe repeated more than once. The format for this option is:
+#
+# -q, --query=query_type,key[:varname]<,list of threshold specifiers>
+#
+# query_type is one of:
+# GET - get one string value
+# LLEN - returns number of items in a list
+# LRANGE:AVG:start:end - retrieve list and average results
+# LRANGE:SUM:start:end - retrieve list and sum results
+# LRANGE:MIN:start:end - retrieve list and return minimum
+# LRANGE:MAX:start:end - retrieve list and return maximum
+# HLEN - returns number of items in a hash [TODO]
+# HGET:name - get specific hash key 'name' [TODO]
+# HEXISTS:name - returns 0 or 1 depending on if specified hash key 'name' exists [TODO]
+# SLEN - returns number of items in a set [TODO, SCARD redis opp]
+# SEXISTS:name - returns 0 or 1 depending on if set member 'name' exists [SISMEMBER, TODO]
+# ZLEN - returns number of items in a sorted set [TODO, ZCARD redis opp]
+# ZCOUNT:min:max - counts number of items in sorted set with scores within the given values
+# ZRANGE:AVG:min:max - retrieve sorted set members from min to max and average results
+# ZRANGE:SUM:min:max - retrieve sorted set members from min to max and sum results
+# ZRANGE:MIN:min:max - retrieve sorted set members from min to max list and return minimum
+# ZRANGE:MAX:min:max- retrieve sorted set members from min to max and return maximum
+# For LRANGE if you do not specify start and end, then start will be 0 and end
+# is last value in the list pointed to by this key (found by using llen).
+#
+# Key is the Redis key name to be retrieved and optionally you can add ":varname"
+# after it which specifies what to name plugin variable based on this data -
+# based on what you specify here is how it will be displayed in the status
+# line and performance data, default is same as Redis key name.
+#
+# After these key name you specify list of thresholds in the same format as
+# variable-based long options described in section 3. Again the list of the
+# possible specifiers are:
+# WARN:threshold
+# CRIT:threshold
+# ABSENT:OK|WARNING|CRITICAL|UNKNOWN - what to do if data is not available
+# ZERO:OK|WARNING|CRIICAL|UNKNOWN - what to do if data is 0 (rarely needed)
+# DISPLAY:YES|NO - display on status line or not (default YES)
+# PERF:YES|NO - output in perf data or not
+#
+# You can also optionally use -a, -w and -c to check data from the query instead
+# of specifying thresholds as part of query option itself And remember that you if
+# you need to check multiple keys you just repeat --query option more than once.
+#
+# 8. Example of Nagios Config Definitions
+#
+# Sample command and service definitions are below:
+#
+# define command {
+# command_name check_redis_new
+# command_line $USER1$/check_redis.pl -H $HOSTADDRESS$ -p $ARG1$ -T $ARG2$ -R -A -M $_HOSTSYSTEM_MEMORY$ -m $ARG3$ -a $ARG4$ -w $ARG5$ -c $ARG6$ -f -P "$SERVICEPERFDATA$"
+# }
+#
+# Arguments and thresholds are:
+# $ARG1 : Port
+# $ARG2 : response time thresholds
+# $ARG3 : memory utilization thresholds
+# $ARG4 : additional variables to be checked
+# $ARG5 : warning thresholds for those variables
+# $ARG6 : critical thresholds for those variables
+#
+# define service {
+# use prod-service
+# hostgroups redishosts
+# service_description Redis
+# check_command check_redis_new!6379!"1,2"!"80,90"!blocked_clients,connected_clients!50,~!100,~
+# }
+#
+# define host {
+# use prod-server
+# host_name redis.mynetwork
+# address redis.mynetwork
+# alias Redis Stat Server
+# hostgroups linux,redishosts
+# _SYSTEM_MEMORY '8G'
+# }
+#
+# Example of command-line use:
+# /usr/lib/nagios/plugins/check_redis.pl -H localhost -a 'connected_clients,blocked_clients' -w ~,~ -c ~,~ -m -M 4G -A -R -T -f -v
+#
+# In above the -v option means "verbose" and with it plugin will output some debugging information
+# about what it is doing. The option is not intended to be used when plugin is called from nagios itself.
+#
+# Example of using query and variable-based long options with debug enabled as well (-v):
+#
+# ./check_redis.pl -H localhost -p 6379 -D 1 --query LRANGE:AVG:0:,MyColumn1:Q1,ABSENT:WARNING,WARN:300,CRIT:500,DISPLAY:YES,PERF:NO
+# --query GET,MyKey:K1,ABSENT:CRITICAL "--connected_clients=WARN:<2,CRIT:>100,ZERO:OK,ABSENT:WARNING,DISPLAY:YES,PERF:YES"
+#
+# ======================= VERSION HISTORY and TODO ================================
+#
+# The plugins is written by reusing code my check_memcached.pl which itself is based
+# on check_mysqld.pl. check_mysqld.pl has history going back to 2004.
+#
+# [0.4 - Mar 2012] First version of the code based on check_mysqld.pl 0.93
+# and check_memcached.pl 0.6. Internal work, not released.
+# Version 0.4 because its based on a well developed code base
+# [0.41 - Apr 15, 2012] Added list of variables array and perf_ok regex.
+# Still testing internally and not released yet.
+# [0.42 - Apr 28, 2012] Added total_keys, total_expires, nice uptime_info
+# and memory utilization
+# [0.43 - May 31, 2012] Release candidate. More documentation added
+# replacing check_memcached examples. Bugs fixed.
+# Made "_rate" as default rate variables suffix in
+# place of &delta. Changed -D option to -r.
+#
+# [0.5 - Jun 01, 2012] First official release will start with version 0.5
+# Documentation changes, but no code updates.
+# [0.51 - Jun 16, 2012] Added support to specify filename to '-v' option
+# for debug output and '--debug' as alias to '--verbose'
+# [0.52 - Jul 10, 2012] Patch by Jon Schulz to support credentials with -C
+# (credentials file) and addition by me to support
+# password as command argument.
+# [0.53 - Jul 15, 2012] Adding special option to do query on one redis key and
+# and do threshold checking of results if its numeric
+#
+# [0.6 - Jul 17, 2012] Rewrote parts of thresholds checking code and moved code
+# that checks and parses thresholds from main into separate
+# functions that are to become part of plugin library.
+# Added support for variable thresholds specified as:
+# option=WARN:threshold,CRIT:threshold,ABSENT:OK|WARNING|CRITICAL,ZERO:..
+# which are to be used for stats-variable based long options such as
+# --connected_clients=WARN:threshold,CRIT:threshold
+# and added DISPLAY:YES|NO and PERF specifiers for above too.
+# Added -D option to specify database needed for --query
+# [0.61 - Aug 03, 2012] Added more types of key query for lists, sets, hashes
+# and options to find number of elements in a list/set/hash.
+# New options added are:
+# LLEN,HLEN,SLEN,ZLEN,HGET,HEXISTS,SEXISTS,ZRANGE
+#
+# [0.7 - Aug 28, 2012] A lot of internal rewrites in the library. Its now not just a
+# a set of functions, but a proper object library with internal
+# variables hidden from outside. Support has also been added for
+# regex matching with PATTERN specifier and for generalized
+# --check option that can be used where specific long option is
+# not available. For use with that option also added UOM specifier.
+# Also added checkin 'master_last_io_seconds_ago' (when link is down)
+# for when replication_delay info is requested.
+# [0.71 - Sep 03, 2012] Fixed bug in a new library related to when data is missing
+# [0.72 - Oct 05, 2012] Fixed bug reported by Matt McMillan in specified memory size
+# when KB are used. Fixed bugs in adding performance data that
+# results in keyspace_hits, keyspace_misses, memory_utilization
+# having double 'c' or '%' in perfdata. Added contributors section.
+# [0.73 - Mar 23, 2013] Fixed bug in parse_threshold function of embedded library
+#
+# TODO or consider for future:
+#
+# 1. Library Enhancements (will apply to multiple plugins that share common code)
+# (a) Add '--extra-opts' to allow to read options from a file as specified
+# at http://nagiosplugins.org/extra-opts. This is TODO for all my plugins
+# (b) [DONE]
+# In plans are to allow long options to specify thresholds for known variables.
+# These would mean you specify '--connected_clients' in similar way to '--hitrate'
+# Internally these would be converged into -A, -w, -c as appropriate and used
+# together with these options. So in practice it will now allow to get any data
+# just a different way to specify options for this plugin.
+# (c) Allow regex when selecting variable name(s) with -a, this will be enabled with
+# a special option and not be default
+# [DONE]
+#
+# 2. REDIS Specific
+# (a) Add option to check from master that slave is connected and working.
+# (b) Look into replication delay from master and how it can be done. Look
+# for into on replication_delay from slave as well
+# (c) How to better calculate memory utilization and get max memory available
+# without directly specifying it
+# (d) Maybe special options to measure cpu use and set thresholds
+#
+# Others are welcome recommend a new feature to be added here. If so please email to
+# william@leibzon.org.
+# And don't worry, I'm not a company with some hidden agenda to use your idea
+# but an actual person who you can easily get hold of by email, find on forums
+# and on Nagios conferences. More info on my nagios work is at:
+# http://william.leibzon.org/nagios/
+# Above site should also have PNP4Nagios template for this and other plugins.
+#
+# ============================ LIST OF CONTRIBUTORS ===============================
+#
+# The following individuals have contributed code, patches, bug fixes and ideas to
+# this plugin (listed in last-name alphabetical order):
+#
+# William Leibzon
+# Matthew Litwin
+# Matt McMillan
+# Jon Schulz
+# M Spiegle
+#
+# ============================ START OF PROGRAM CODE =============================
+
+use strict;
+use IO::Socket;
+use Time::HiRes;
+use Text::ParseWords;
+use Getopt::Long qw(:config no_ignore_case);
+use Redis;
+
+# default hostname, port, database, user and password, see NOTES above
+my $HOSTNAME= 'localhost';
+my $PORT= 6379;
+my $PASSWORD= undef;
+my $DATABASE= undef;
+
+# Add path to additional libraries if necessary
+use lib '/usr/lib/nagios/plugins';
+our $TIMEOUT;
+our %ERRORS;
+eval 'use utils qw(%ERRORS $TIMEOUT)';
+if ($@) {
+ $TIMEOUT = 20;
+ %ERRORS = ('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
+}
+
+my $Version='0.73';
+
+# This is a list of known stat and info variables including variables added by plugin,
+# used in order to designate COUNTER variables with 'c' in perfout for graphing programs
+# The format is:
+# VAR_NAME => [ TYPE, PerfSuffix, DESCRIPTION]
+# If option has description, the variable will also become available as a long option so for example
+# you can specify "--connected_clients=WARN,CRIT" instead of specifying "-a connected_clients -w WARN -c CRIT'
+my %KNOWN_STATUS_VARS = (
+ 'memory_utilization' => [ 'status', 'GAUGE', '%' ], # calculated by plugin
+ 'redis_version' => [ 'status', 'VERSION', '' ], # version string variable
+ 'response_time' => [ 'status','GAUGE', 's' ], # measured by plugin
+ 'hitrate' => [ 'status', 'GAUGE', '%' ], # calculated by plugin
+ 'total_keys' => [ 'status','GAUGE', '', 'Total Number of Keys on the Server' ],
+ 'total_expires' => [ 'status','GAUGE', '', 'Number of Expired Keys for All DBs' ],
+ 'last_save_time' => [ 'status', 'GAUGE', 's' ],
+ 'bgsave_in_progress' => [ 'status', 'BOOLEAN', '' ],
+ 'vm_enabled' => [ 'status', 'BOOLEAN', '' ],
+ 'uptime_in_seconds' => [ 'status', 'COUNTER', 'c' ],
+ 'total_connections_received' => [ 'status', 'COUNTER', 'c', 'Total Connections Received' ],
+ 'used_memory_rss' => [ 'status', 'GAUGE', 'B', 'Resident Set Size, Used Memory in Bytes' ], # RSS - Resident Set Size
+ 'used_cpu_sys' => [ 'status', 'GAUGE', '', 'Main Process Used System CPU' ],
+ 'redis_git_dirty' => [ 'status', 'BOOLEAN', '', 'Git Dirty Set Bit' ],
+ 'loading' => [ 'status', 'BOOLEAN', '' ],
+ 'latest_fork_usec' => [ 'status', 'GAUGE', '' ],
+ 'connected_clients' => [ 'status', 'GAUGE', '', 'Total Number of Connected Clients' ],
+ 'used_memory_peak_human' => [ 'status', 'GAUGE', '' ],
+ 'mem_allocator' => [ 'status', 'TEXTINFO', '' ],
+ 'uptime_in_days' => [ 'status', 'COUNTER', 'c', 'Total Uptime in Days' ],
+ 'keyspace_hits' => [ 'status', 'COUNTER', 'c', 'Total Keyspace Hits' ],
+ 'client_biggest_input_buf' => [ 'status', 'GAUGE', '' ],
+ 'gcc_version' => [ 'status', 'TEXTINFO', '' ],
+ 'changes_since_last_save' => [ 'status', 'COUNTER', 'c' ],
+ 'arch_bits' => [ 'status', 'TEXTINFO', '' ],
+ 'lru_clock' => [ 'status', 'GAUGE', '' ], # LRU is page replacement algorithm (least recently used), I'm unsure what this represents though
+ 'role' => [ 'status', 'SETTING', '' ],
+ 'multiplexing_api' => [ 'status', 'SETTING' , '' ],
+ 'slave' => [ 'status', 'TEXTDATA', '' ],
+ 'pubsub_channels' => [ 'status', 'GAUGE', '', 'Number of Pubsub Channels' ],
+ 'redis_git_sha1' => [ 'status', 'TEXTDATA', '' ],
+ 'used_cpu_user_children' => [ 'status', 'GAUGE', '', 'Child Processes Used User CPU' ],
+ 'process_id' => [ 'status', 'GAUGE', '' ],
+ 'used_memory_human' => [ 'status', 'GAUGE', '' ],
+ 'keyspace_misses' => [ 'status', 'COUNTER', 'c', 'Keyspace Misses' ],
+ 'used_cpu_user' => [ 'status', 'GAUGE', '', 'Main Process Used User CPU' ],
+ 'total_commands_processed' => [ 'status', 'COUNTER', 'c', 'Total Number of Commands Processed from Start' ],
+ 'mem_fragmentation_ratio' => [ 'status', 'GAUGE', '', 'Memory Fragmentation Ratio' ],
+ 'client_longest_output_list' => [ 'status', 'GAUGE', '' ],
+ 'blocked_clients' => [ 'status', 'GAUGE', '', 'Number of Currently Blocked Clients' ],
+ 'aof_enabled' => [ 'status', 'BOOLEAN', '' ],
+ 'evicted_keys' => [ 'status', 'COUNTER', 'c', 'Total Number of Evicted Keys' ],
+ 'bgrewriteaof_in_progress' => [ 'status','BOOLEAN', '' ],
+ 'expired_keys' => [ 'status', 'COUNTER', 'c', 'Total Number of Expired Keys' ],
+ 'used_memory_peak' => [ 'status', 'GAUGE', 'B' ],
+ 'connected_slaves' => [ 'status', 'GAUGE', '', 'Number of Connected Slaves' ],
+ 'used_cpu_sys_children' => [ 'status', 'GAUGE', '', 'Child Processed Used System CPU' ],
+ 'master_host' => [ 'status', 'TEXTINFO', '' ],
+ 'master_port' => [ 'status', 'TEXTINFO', '' ],
+ 'master_link_status' => [ 'status', 'TEXTINFO', '' ],
+ 'slave0' => [ 'status', 'TEXTINFO', '' ],
+ 'slave1' => [ 'status', 'TEXTINFO', '' ],
+ 'slave2' => [ 'status', 'TEXTINFO', '' ],
+ 'slave3' => [ 'status', 'TEXTINFO', '' ],
+ );
+
+# Here you can also specify which variables should go into perf data,
+# For right now it is 'GAUGE', 'COUNTER', 'DATA' (but not 'TEXTDATA'), and 'BOOLEAN'
+# you may want to remove BOOLEAN if you don't want too much data
+my $PERF_OK_STATUS_REGEX = 'GAUGE|COUNTER|^DATA$|BOOLEAN';
+
+# ============= MAIN PROGRAM CODE - DO NOT MODIFY BELOW THIS LINE ==============
+
+my $o_host= undef; # hostname
+my $o_port= undef; # port
+my $o_pwfile= undef; # password file
+my $o_password= undef; # password as parameter
+my $o_database= undef; # database name (usually a number)
+my $o_help= undef; # help option
+my $o_verb= undef; # verbose mode
+my $o_version= undef; # version info option
+my $o_variables=undef; # list of variables for warn and critical
+my $o_perfvars= undef; # list of variables to include in performance data
+my $o_warn= undef; # warning level option
+my $o_crit= undef; # Critical level option
+my $o_perf= undef; # Performance data option
+my @o_check= (); # General check option that maybe repeated more than once
+my $o_timeout= undef; # Timeout to use - note that normally timeout is from nagios
+my $o_timecheck=undef; # threshold spec for connection time
+my $o_memutilization=undef; # threshold spec for memory utilization%
+my $o_totalmemory=undef; # total memory on a system
+my $o_hitrate= undef; # threshold spec for hitrate%
+my $o_repdelay=undef; # replication delay time
+my @o_querykey=(); # query this key, this option maybe repeated so its an array
+my $o_prevperf= undef; # performance data given with $SERVICEPERFDATA$ macro
+my $o_prevtime= undef; # previous time plugin was run $LASTSERVICECHECK$ macro
+my $o_ratelabel=undef; # prefix and suffix for creating rate variables
+my $o_rsuffix='_rate'; # default suffix
+my $o_rprefix='';
+
+## Additional global variables
+my $redis= undef; # DB connection object
+my @query=(); # array of queries with each entry being keyed hash of processedoption data on howto query
+
+
+sub p_version { print "check_redis.pl version : $Version\n"; }
+
+sub print_usage_line {
+ print "Usage: $0 [-v [debugfilename]] -H <host> [-p <port>] [-x password | -C credentials_file] [-D <database>] [-a <statistics variables> -w <variables warning thresholds> -c <variables critical thresholds>] [-A <performance output variables>] [-T [conntime_warn,conntime_crit]] [-R [hitrate_warn,hitrate_crit]] [-m [mem_utilization_warn,mem_utilization_crit] [-M <maxmemory>[B|K|M|G]]] [-r replication_delay_time_warn,replication_delay_time_crit] [-f] [-T <timeout>] [-V] [-P <previous performance data in quoted string>] [-q (GET|LLEN|HLEN|SLEN|ZLEN|HGET:name|HEXISTS:name|SEXISTS:name|LRANGE:(AVG|SUM|MIN|MAX):start:end|ZRANGE:(AVG|SUM|MIN|MAX):start:end),query_type,query_key_name[:data_name][,ABSENT:WARNING|CRITICAL][,WARN:threshold,CRIT:threshold]] [-o <threshold specification with name or pattern>]\n";
+}
+
+sub print_usage {
+ print_usage_line();
+ print "For more details on options do: $0 --help\n";
+}
+
+sub help {
+ my $nlib = shift;
+
+ print "Redis Check for Nagios version ",$Version,"\n";
+ print " by William Leibzon - william(at)leibzon.org\n\n";
+ print "This is redis monitoring plugin to check its stats variables, replication, response time\n";
+ print "hitrate, memory utilization and other info. The plugin can also query and test key data\n";
+ print "against specified thresholds. All data is available as performance output for graphing.\n\n";
+ print_usage_line();
+ print "\n";
+ print <<EOT;
+General and Server Connection Options:
+ -v, --verbose[=FILENAME], --debug[=FILENAME]
+ Print extra debugging information.
+ If filename is specified instead of STDOUT the debug data is written to that file.
+ -h, --help
+ Print this detailed help screen
+ -H, --hostname=ADDRESS
+ Hostname or IP Address to check
+ -p, --port=INTEGER
+ port number (default: 6379)
+ -D, --database=NAME
+ optional database name (usually a number), needed for --query but otherwise not needed
+ -x, --password=STRING
+ Password for Redis authentication. Safer alternative is to put them in a file and use -C
+ -C, --credentials=FILENAME
+ Credentials file to read for Redis authentication
+ -t, --timeout=NUMBER
+ Allows to set timeout for execution of this plugin. This overrides nagios default.
+ -V, --version
+ Prints version number
+
+Variables and Thresholds Set as List:
+ -a, --variables=STRING[,STRING[,STRING...]]
+ List of variables from info data to do threshold checks on.
+ The default (if option is not used) is not to monitor any variable.
+ The variable name should be prefixed with '&' to chec its rate of
+ change over time rather than actual value.
+ -w, --warn=STR[,STR[,STR[..]]]
+ This option can only be used if '--variables' (or '-a') option above
+ is used and number of values listed here must exactly match number
+ of variables specified with '-a'. The values specify warning threshold
+ for when Nagios should send WARNING alert. These values are usually
+ numbers and can have the following prefix modifiers:
+ > - warn if data is above this value (default for numeric values)
+ < - warn if data is below this value (must be followed by number)
+ = - warn if data is equal to this value (default for non-numeric values)
+ ! - warn if data is not equal to this value
+ ~ - do not check this data (must not be followed by number or ':')
+ ^ - for numeric values this disables check that warning < critical
+ Threshold values can also be specified as range in two forms:
+ num1:num2 - warn if data is outside range i.e. if data<num1 or data>num2
+ \@num1:num2 - warn if data is in range i.e. data>=num1 && data<=num2
+ -c, --crit=STR[,STR[,STR[..]]]
+ This option can only be used if '--variables' (or '-a') option above
+ is used and number of values listed here must exactly match number of
+ variables specified with '-a'. The values specify critical threshold
+ for when Nagios should send CRITICAL alert. The format is exactly same
+ as with -w option except no '^' prefix.
+
+Performance Data Processing Options:
+ -f, --perfparse
+ This should only be used with '-a' and causes variable data not only as part of
+ main status line but also as perfparse compatible output (for graphing, etc).
+ -A, --perfvars=[STRING[,STRING[,STRING...]]]
+ This allows to list variables which values will go only into perfparse
+ output (and not for threshold checking). The option by itself (emply value)
+ is same as a special value '*' and specify to output all variables.
+ -P, --prev_perfdata
+ Previous performance data (normally put '-P \$SERVICEPERFDATA\$' in nagios
+ command definition). This is used to calculate rate of change for counter
+ statistics variables and for proper calculation of hitrate.
+ --rate_label=[PREFIX_STRING[,SUFFIX_STRING]]
+ Prefix or Suffix label used to create a new variable which has rate of change
+ of another base variable. You can specify PREFIX or SUFFIX or both. Default
+ if not specified is suffix '_rate' i.e. --rate_label=,_rate
+
+Key Data Query Option (maybe repeated more than once):
+ -q, --query=query_type,key[:varname][,ABSENT:OK|WARNING|CRITICAL,WARN:threshold,CRIT:threshold]
+ query_type is one of:
+ GET - get one data value
+ LLEN - number of items in a list
+ LRANGE:AVG:start:end - retrieve list and average results
+ LRANGE:SUM:start:end - retrieve list and sum results
+ LRANGE:MIN:start:end - retrieve list and return minimum
+ LRANGE:MAX:start:end - retrieve list and return maximum
+ HLEN - returns number of items in a hash
+ HGET:name - get specific hash key 'name'
+ HEXISTS:name - returns 0 or 1 depending on if specified hash key 'name' exists
+ SLEN - returns number of items in a set
+ SEXISTS:name - returns 0 or 1 depending on if set member 'name' exists
+ ZLEN - returns number of items in a sorted set
+ ZCOUNT:min:max - counts items in sorted set with scores within the given values
+ ZRANGE:AVG:min:max - retrieve sorted set members from min to max and average results
+ ZRANGE:SUM:min:max - retrieve sorted set members from min to max and sum results
+ ZRANGE:MIN:min:max - retrieve sorted set members from min to max list and return minimum
+ ZRANGE:MAX:min:max - retrieve sorted set memers from min to max and return maximum
+
+ Option specifies key to query and optional variable name to assign the results to after :
+ (if not specified it would be same as key). If key is not available the plugin can issue
+ either warning or critical alert depending on what you specified after ABSENT.
+ Numeric results are calculated for ranges and can be checked with specified thresholds
+ or you can do it together with standard with redis stats variables and -a option.
+
+General Check Option (all 3 forms equivalent, can be repated more than once):
+ -o <list of specifiers>, --option=<list of specifiers>, --check=<list of specifiers>
+ where specifiers are separated by , and must include NAME or PATTERN:
+ NAME:<string> - Default name for this variable as you'd have specified with -v
+ PATTERN:<regex> - Regular Expression that allows to match multiple data results
+ WARN:threshold - warning alert threshold
+ CRIT:threshold - critical alert threshold
+ Threshold is a value (usually numeric) which may have the following prefix:
+ > - warn if data is above this value (default for numeric values)
+ < - warn if data is below this value (must be followed by number)
+ = - warn if data is equal to this value (default for non-numeric values)
+ ! - warn if data is not equal to this value
+ Threshold can also be specified as a range in two forms:
+ num1:num2 - warn if data is outside range i.e. if data<num1 or data>num2
+ \@num1:num2 - warn if data is in range i.e. data>=num1 && data<=num2
+ ABSENT:OK|WARNING|CRITICAL|UNKNOWN - Nagios alert (or lock of thereof) if data is absent
+ ZERO:OK|WARNING|CRITICAL|UNKNOWN - Nagios alert (or lock of thereof) if result is 0
+ DISPLAY:YES|NO - Specifies if data should be included in nagios status line output
+ PERF:YES|NO - Output results as performance data or not (always YES if asked for rate)
+ UOM:<string> - Unit Of Measurement symbol to add to perf data - 'c','%','s','B'
+
+Measured/Calculated Data:
+ -T, --response_time=[WARN,CRIT]
+ If this is used as just -T the plugin will measure and output connection
+ response time in seconds. With -f this would also be provided on perf variables.
+ You can also specify values for this parameter, these are interprted as
+ WARNING and CRITICAL thresholds (separated by ',').
+ -R, --hitrate=[WARN,CRIT]
+ Calculates Hitrate %: cache_miss/(cache_hits+cache_miss). If this is used
+ as just -R then this info just goes to output line. With '-R -f' these
+ go as performance data. You can also specify values for this parameter,
+ these are interprted as WARNING and CRITICAL thresholds (separated by ',').
+ The format for WARN and CRIT is same as what you would use in -w and -c.
+ -m, --memory_utilization=[WARN,CRIT]
+ This calculates percent of total memory on system used by redis, which is
+ utilization=redis_memory_rss/total_memory*100.
+ Total_memory on server must be specified with -M since Redis does not report
+ it and can use maximum memory unless you enabled virtual memory and set a limit
+ (I plan to test this case and see if it gets reported then).
+ If you specify -m by itself, the plugin will just output this info,
+ with '-f' it will also include this in performance data. You can also specify
+ parameter values which are interpreted as WARNING and CRITICAL thresholds.
+ -M, --total_memory=NUM[B|K|M|G]
+ Amount of memory on a system for memory utilization calculations above.
+ If it does not end with K,M,G then its assumed to be B (bytes)
+ -r, --replication_delay=WARN,CRIT
+ Allows to set threshold on replication delay info. Only valid if this is a slave!
+ The threshold value is in seconds and fractions are acceptable.
+
+EOT
+
+ if (defined($nlib) && $nlib->{'enable_long_options'} == 1) {
+ my $long_opt_help = $nlib->additional_options_help();
+ if ($long_opt_help) {
+ print "Stats Variable Options (this is alternative to specifying them as list with -a):\n";
+ print $long_opt_help;
+ print "\n";
+ }
+ }
+}
+
+############################ START OF THE LIBRARY FUNCTIONS #####################################
+#
+# THIS IS WORK IN PROGRESS, THE LIBRARY HAS NOT BEEN RELEASED YET AND INTERFACES MAY CHANGE
+#
+# ====================================== SUMMARY ================================================
+#
+# Name : Naglio Perl Library For Developing Nagios Plugins
+# Version : 0.2
+# Date : Aug 28, 2012
+# Author : William Leibzon - william@leibzon.org
+# Licence : LGPL - full text at http://www.fsf.org/licenses/lgpl.txt
+#
+# ============================= LIBRARY HISTORY AND VERSIONS ====================================
+#
+# Note: you may safely skip this section if you're looking at documentation about this library or plugin
+#
+# [2006-2008] The history of this library goes back to plugins such as check_snmp_temperature.pl,
+# check_mysqld,pl and others released as early as 2006 with common functions to
+# support prefixes "<,>,=,!" for specifying thresholds and checking data against
+# these thresholds. Several of my plugins had common architecture supporting multiple
+# variables or attributes to be checked using -a/--attributes/--variables option and
+# --warn and --crit options with list of thresholds for these attributes and --perfvars
+# specifying variables whose data would only go as PERFOUT for graphing.
+#
+# [2008-2011] Threshold parsing and check code had been rewritten and support added for specifying
+# range per plugin guidelines: http://nagiosplug.sourceforge.net/developer-guidelines.html
+# Internal structures had been changing and becoming more complex to various cases.
+# In 2010-2012 plugins started to get support for ;warn;crit output of thresholds in perf,
+# as specified in the guidelines.
+#
+# [Early 2012] Code from check_memcached had been used as a base for check_memcached and then
+# check_redis plugins with some of the latest threshold code from check_netstat
+# with more updates. Starting with check_redis the code from check_options() and
+# from main part of plugin that was very similar across my plugins were separated
+# into their own functions. KNOWN_STATS_VARS array was introduced as well to be
+# able to properly add UOM symbol ('c', '%', 's', 'ms', 'B', 'KB') to perfout.
+# check_memcached and check_redis also included support for calculating rate of
+# variables in a similar way to how its been done in check_snmp_netint
+#
+# [0.1 - July 17, 2012] In 0.6 release of check_redis.pl support had been added for long options
+# with special threshold line syntax:
+# --option=WARN:threshold,CRIT:threshold,ABSENT:OK|WARNING|CRITICAL|UNKNOWN,DISPLAY:YES|NO,PERF:YES|NO
+# This was extension from just doing --option=WARN,CRIT to have a more universal
+# and extendable way to specify and alike parameters for checking. check_redis 0.6
+# also introduced support automatically adding long options with above syntax based
+# on description in KNOWN_STATS_VARS. The functions for the library were all separated
+# into their own section of the code. When inported to check_memcached global variables
+# were added to that section and accessor functions written for some of them.
+# This is considered 0.1 version of the library
+#
+# [0.2 - Aug 28, 2012] In August the library code in check_memcached had been re-written from
+# just functions to object-oriented perl interface. All variables were hidden from
+# direct access with accessor functions written. Documentation header had been added
+# to each library function and the header for the library itself. This was major work
+# taking over a week to do although functions and mainly sllllame as in 0.1. They are
+# not stabilized and so library is only to be included within plugins. Support was
+# also added for regex matching with PATTERN option spec. Also added NAME spec.
+# License changed to LGPL from GPL for this code.
+# [0.21 - Sep 3, 2012] Fix bug in handling absent data
+# [0.22 - Mar 23, 2013] Fix bug in parse_threshold functon
+#
+# ================================== LIBRARY TODO =================================================
+#
+# (a) Add library function to support '--extra-opts' to read plugin options from a file
+# This is being to be compatible with http://nagiosplugins.org/extra-opts
+# (b) Support regex matching and allowing multiple data for same threshold definition.
+# [DONE]
+# (c) Support for expressions in places of numeric values for thresholds. The idea is to allow
+# to refer to another variable or to special macro. I know at least one person has extended
+# my check_mysqld to support using mysql variables (not same as status data) for thresholds.
+# I also previouslyhad planned such support with experimental check_snmp_attributes plugin
+# library/base. The idea was also floated around on nagios-devel list.
+# (d) Support specifying variables as expressions. This is straight out of check_snmp_atributes
+# and maybe part of it can be reused for this
+# (e) Add common SNMP functions into library as so many of my plugins use it#
+# (f) Add more functions to make this library easier to use and stabilize its interfaces.
+# Port my plugins to this library.
+# (f) Add support for functions in Nagios-Plugins perl library. While its interfaces are
+# different, I believe, it'd be possible to add "shim" code to support them too.
+# (h) Write proper Perl-style documentation as well as web documentation (much of above maybe
+# moved to web documentation) and move library to separate GITHUB project. Release it.
+# (i) Port this library to Python and write one or two example plugins
+#
+# ================================================================================================
+{
+package Naglio;
+use fields qw();
+use Text::ParseWords;
+
+my %ERRORS = ('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
+my $DEFAULT_PERF_OK_STATUS_REGEX = 'GAUGE|COUNTER|^DATA$|BOOLEAN';
+
+# @DESCRIPTION : Library object constructor
+# @LAST CHANGED : 08-27-12 by WL
+# @INPUT : Hash array of named config settings. All parameters are optiona. Currently supported are:
+# plugin_name => string - short name of the plugin
+# plugin_description => string - plugin longer description
+# plugin_authors => string - list of plugin authors
+# knownStatsVars => reference to hash - hash array defining known variables, what type they are, their description
+# usage_function => &ref - function that would display helpful text in case of error with options for this plugin
+# verbose => 1 or "" or "filename" - set to 1 or "" if verbose/debug or to filename to send data to (may not be called "0" or "1")
+# output_comparison_symbols => 0 or 1 - 1 means library output in case threshold is met can use "<", ">", "="
+# 0 means output is something like "less than or equal", "more than", etc.
+# all_variables_perf => 0 or 1 - 1 means data for all variables would go to PERF. This is what '-A *' or just -A do
+# enable_long_options => 0 or 1 - 1 enables long options generated based on knownStatsVars. This is automatically enabled (from 0
+# to 1) when plugin references additional_options_list() unless this is set to -1 at library init
+# enable_rate_of_change => 0 or 1 - enables support for calculating rate of change based on previously saved data, default is 1
+# enable_regex_match => 0 or 1 - when set to 1 each threshold-specified var name is treated as regex and can match
+# to multiple collected data. this can also be enabled per-variable with PATTERN spec
+# @RETURNS : Reference representing object instance of this library
+# @PRIVACY & USE : PUBLIC, To be used when initializing the library
+sub lib_init {
+ my $invocant = shift;
+ my $class = ref($invocant) || $invocant;
+ my %other_args = @_;
+
+ # These used to be global variables, now these are object local variables in self with accessor
+ my @allVars = (); # all variables after options processing
+ my @perfVars = (); # performance variables list [renamed from @o_perfVarsL in earlier code]
+ my %thresholds=(); # hash array of thresholds for above variables, [this replaced @o_warnL and @o_critL in earlier code]
+ my %dataresults= (); # This is where data is loaded. It is a hash with variable names as keys and array array for value:
+ # $dataresults{$var}[0] - undef of value of this variable
+ # $dataresults{$var}[1] - 0 if variable not printed out to status line yet, 1 or more otherwise
+ # $dataresults{$var}[2] - 0 if variable data not yet put into PERF output, -1 if PERF output is preset, 1 after output
+ # $dataresults{$var}[3] - string, '' to start with, holds ready performance data output for this variable
+ # $dataresults{$var}[4] - only for regex matches. name of match var (which should be key in thresholds), otherwise undef
+ my %dataVars = (); # keys are variables from allVars and perfVars, values is array of data that matched i.e. keys in dataresults
+ my @ar_warnLv = (); # used during options processing
+ my @ar_critLv = (); # used during options processing
+ my @ar_varsL= (); # used during options processing
+ my @prev_time= (); # timestamps if more then one set of previois performance data
+
+ my $self = { # library and nagios versions
+ _NaglioLibraryVersion => 0.2, # this library's version
+ _NagiosVersion => 3, # assume nagios core 3.x unless known otherwise
+ # library internal data structures
+ _allVars => \@allVars,
+ _perfVars => \@perfVars,
+ _thresholds => \%thresholds,
+ _dataresults => \%dataresults,
+ _datavars => \%dataVars,
+ _ar_warnLv => \@ar_warnLv,
+ _ar_critLv => \@ar_critLv,
+ _ar_varsL => \@ar_varsL,
+ _prevTime => \@prev_time,
+ _prevPerf => {}, # array that is populated with previous performance data
+ _checkTime => undef, # time when data was last checked
+ _statuscode => "OK", # final status code
+ _statusinfo => "", # if there is an error, this has human info about what it is
+ _statusdata => "", # if there is no error but we want some data in status line, this var gets it
+ _perfdata => "", # this variable collects performance data line
+ _saveddata => "", # collects saved data (for next plugin re-run, not implimented yet)
+ _init_args => \%other_args,
+ # copy of data from plugin option variables
+ o_variables => undef, # List of variables for warn and critical checks
+ o_crit => undef, # Comma-separated list of critical thresholds for each checked variable
+ o_warn => undef, # Comma-separated list of warning thresholds for each checked variable
+ o_perf => undef, # defined or undef. perf option means all data from variables also goes as PERFDATA
+ o_perfvars => undef, # List of variables only for PERFDATA
+ o_prevperf => undef, # previously saved performance data coming from $SERVICEPERFDATA$ macro
+ # library special input variables (similar to options)
+ o_rprefix => '', # prefix used to distinguish rate variables
+ o_rsuffix => '_rate', # suffix used to distinguish rate variables
+ knownStatusVars => {}, # Special HASH ARRAY with names and description of known variables
+ perfOKStatusRegex => $DEFAULT_PERF_OK_STATUS_REGEX,
+ verbose => 0, # verbose, same as debug, same as o_verb
+ plugin_name => '', # next 3 parameters are variables are currently not used
+ plugin_description => '', # but its still better if these are provided
+ plugin_authors => '', # in the future these maybe used for help & usage functions
+ # library setting variables
+ debug_file => "", # instead of setting file name in verbose, can also set it here
+ output_comparison_symbols => 1, # should plugin output >,<.=,! for threshold match
+ # if 0, it will say it in human form, i.e. "less"
+ all_variables_perf => 0, # should we all variables go to PERF (even those not listed in o_variables and o_perfvars)
+ # this is the option set to 1 when --perfvars '*' is used
+ enable_long_options => 0, # enable support for long options generated based on knownStatusVars description
+ enable_rate_of_change => 1, # enables support for calculatin rate of chane and for rate of change long options
+ enable_regex_match => 0, # 0 is not enabled, 1 means variables in o_variables and o_perfvars are considered regex to match actual data
+ # a value of 2 means its enabled, but for options with PATTERN specifier (this is not configurale value)
+ };
+
+ # bless to create an object
+ bless $self, $class;
+
+ # deal with arguments that maybe passed to library when initalizing
+ if (exists($other_args{'KNOWN_STATUS_VARS'})) {
+ $self->{'knownStatusVars'} = $other_args{'KNOWN_STATUS_VARS'};
+ }
+ $self->{'plugin_name'} = $other_args{'plugin_name'} if exists($other_args{'plugin_name'});
+ $self->{'plugin_description'} = $other_args{'plugin_description'} if exists($other_args{'plugin_description'});
+ $self->{'plugin_authors'} = $other_args{'plugin_authors'} if exists($other_args{'plugin_authors'});
+ $self->{'usage_function'} = $other_args{'usage_gunction'} if exists($other_args{'usage_function'});
+ $self->configure(%other_args);
+
+ # return self object
+ return $self;
+}
+
+# This is just an alias for object constructor lib_init function
+sub new {
+ return lib_init(@_);
+}
+
+# @DESCRIPTION : Allows to confiure some settings after initialization (all these can also be done as part of lib_init)
+# @LAST CHANGED : 08-27-12 by WL
+# @INPUT : Hash array of named config settings. All parameters are optiona. Currently supported are:
+# verbose => 1 or "" or "filename" - set to 1 or "" if verbose/debug or to filename to send data to (may not be called "0" or "1")
+# output_comparison_symbols => 0 or 1 - 1 means library output in case threshold is met can use "<", ">", "="
+# 0 means output is something like "less than or equal", "more than", etc.
+# all_variables_perf => 0 or 1 - 1 means data for all variables would go to PERF. This is what '-A *' or just -A do
+# enable_long_options => 0 or 1 - 1 enables long options generated based on knownStatsVars. This is automatically enabled (from 0
+# to 1) when plugin references additional_options_list() unless this is set to -1 at library init
+# enable_rate_of_change => 0 or 1 - enables support for calculating rate of change based on previously saved data, default is 1
+# enable_regex_match => 0 or 1 - when set to 1 each threshold-specified var name is treated as regex and can match
+# to multiple collected data. this can also be enabled per-variable with PATTERN spec
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PUBLIC, Must be used as an object instance function.
+sub configure {
+ my $self = shift;
+ my %args = @_;
+
+ if (exists($args{'verbose'}) || exists($args{'debug'})) {
+ $self->{'verbose'} = 1;
+ if (exists($args{'verbose'}) && $args{'verbose'}) {
+ $self->{'debug_file'} = $args{'verbose'};
+ }
+ if (exists($args{'debug_log_filename'})) {
+ $self->{'debug_file'} = $args{'debug_log_filename'};
+ }
+ }
+ $self->{'all_variables_perf'} = $args{'all_variables_perf'} if exists($args{'all_variables_perf'});
+ $self->{'enable_long_options'} = $args{'enable_long_options'} if exists($args{'enable_long_options'});
+ $self->{'enable_rate_of_change'} = $args{'enable_rate_of_change'} if exists($args{'enable_rate_of_change'});
+ $self->{'enable_regex_match'} = 1 if exists($args{'enable_regex_match'}) && $args{'enable_regex_match'}!=0;
+ $self->{'output_comparison_symbols'} = $args{'output_comparison_symbols'} if exists($args{'output_comparison_symbols'});
+}
+
+# @DESCRIPTION : Allows functions to take be used both directly and as object referenced functions
+# In the 2nd case they get $self as 1st argument, in 1st they don't. this just adds
+# $self if its if its not there so their argument list is known.
+# Functions that allow both should still check if $self is defined
+# @LAST CHANGED : 08-20-12 by WL
+# @INPUT : arbitrary list of arguments
+# @RETURNS : arbitrary list of arguments with 1st being object hash or undef
+# @PRIVACY & USE : PRIVATE
+sub _self_args {
+ return @_ if ref($_[0]) && exists($_[0]->{'_NaglioLibraryVersion'});
+ unshift @_,undef;
+ return @_;
+}
+
+# @DESCRIPTION : Sets function to be called to display help text on using plugin in case of error
+# @LAST CHANGED : 08-22-12 by WL
+# @INPUT : reference to usage function
+# @RETURNS : nothing
+# @PRIVACY & USE : PUBLIC, Must be used as an object instance function :
+sub set_usage_function {
+ my ($self, $usage_function) = @_;
+ $self->{'usage_function'} = $usage_function;
+}
+
+# @DESCRIPTION : Usage function. For right now it just calls usage function given as a parameter
+# In the future if it is not available, it'll print something standard.
+# @LAST CHANGED : 08-22-12 by WL
+# @INPUT : none
+# @RETURNS : nothing
+# @PRIVACY & USE : PUBLIC, But primary for internal use. Must be used as an object instance function.
+sub usage {
+ my $self = shift;
+ if (defined($self) && defined($self->{'usage_function'})) { &{$self->{'usage_function'}}(); }
+}
+
+# @DESCRIPTION : This function converts uptime in seconds to nice & short output format
+# @LAST_CHANGED : 08-20-12 by WL
+# @INPUT : ARG1 - uptime in seconds
+# @RETURNS : string of uptime for human consumption
+# @PRIVACY & USE : PUBLIC, Maybe used directly or as object instance function :
+sub uptime_info {
+ my ($self,$uptime_seconds) = _self_args(@_);
+ my $upinfo = "";
+ my ($secs,$mins,$hrs,$days) = (undef,undef,undef,undef);
+
+ sub div_mod { return int( $_[0]/$_[1]) , ($_[0] % $_[1]); }
+
+ ($mins,$secs) = div_mod($uptime_seconds,60);
+ ($hrs,$mins) = div_mod($mins,60);
+ ($days,$hrs) = div_mod($hrs,24);
+ $upinfo .= "$days days" if $days>0;
+ $upinfo .= (($upinfo ne '')?' ':'').$hrs." hours" if $hrs>0;
+ $upinfo .= (($upinfo ne '')?' ':'').$mins." minutes" if $mins>0 && ($days==0 || $hrs==0);
+ $upinfo .= (($upinfo ne '')?' ':'').$secs." seconds" if $secs>0 && $days==0 && $hrs==0;
+ return $upinfo;
+}
+
+# @DESCRIPTION : If debug / verbose option is set, function prints its input out or to debug file
+# @LAST_CHANGED : 08-20-12 by WL
+# @INPUT : ARG1 - string of debug text
+# @RETURNS : nothing
+# @PRIVACY & USE : PUBLIC, Maybe used directly or as object instance function
+sub verb {
+ my ($self,$in) = _self_args(@_);
+ my $debug_file_name = "";
+
+ if (defined($o_verb) || (defined($self) && defined($self->{'verbose'}) && $self->{'verbose'} ne 0)) {
+ $debug_file_name = $self->{'debug_file'} if defined($self) && $self->{'debug_file'} ne "";
+ $debug_file_name = $self->{'verbose'} if $debug_file_name ne "" && defined($self) &&
+ ($self->{'verbose'} ne 0 && $self->{'verbose'} ne 1 && $self->{'verbose'} ne '');
+ $debug_file_name = $o_verb if $debug_file_name ne "" && defined($o_verb) && $o_verb ne "";
+ if ($debug_file_name ne "") {
+ if (!open (DEBUGFILE, ">>$debug_file_name")) {
+ print $in, "\n";
+ }
+ else {
+ print DEBUGFILE $in,"\n";
+ close DEBUGFILE;
+ }
+ }
+ else {
+ print $in, "\n";
+ }
+ }
+}
+
+# @DESCRIPTION : Check of string is a a number supporting integers, negative, decimal floats
+# @LAST CHANGED : 08-20-12 by WL
+# @INPUT : ARG1 - string of text to be checked
+# @RETURNS : 1 if its a number, 0 if its not a number
+# @PRIVACY & USE : PUBLIC, To be used statically and not as an object instance reference
+sub isnum {
+ my $num = shift;
+ if (defined($num) && $num =~ /^[-|+]?((\d+\.?\d*)|(^\.\d+))$/ ) { return 1 ;}
+ return 0;
+}
+
+# @DESCRIPTION : Check of string is a a number supporting integers, negative, decimal floats
+# @LAST CHANGED : 08-20-12 by WL
+# @INPUT : ARG1 - string of text to be checked
+# @RETURNS : 1 if its a number, 0 if its not a number
+# @PRIVACY & USE : PUBLIC, To be used statically and not as an object instance function
+sub trim {
+ my $string = shift;
+ $string =~ s/^\s+//;
+ $string =~ s/\s+$//;
+ return $string;
+}
+
+# @DESCRIPTION : Takes as input string from PERF or SAVED data from previous plugin invocation
+# which should contain space-separated list of var=data pairs. The string is
+# parsed and it returns back hash array of var=>data pairs.
+# - Function written in 2007 for check_snmp_netint, first release 06/01/07
+# - Modified to use quotewords as suggested by Nicholas Scott, release of 05/20/12
+# @LAST CHANGED : 08-27-12 by WL
+# @INPUT : ARG1 - string of text passed from SERVICEPERFDATA OR SERVICESAVEDDATA MACRO
+# @RETURNS : hash array (see description)
+# @PRIVACY & USE : PUBLIC, Maybe used directly or as object instance function
+# TODO: double-check this works when there are no single quotes as check_snmp_netint always did quotes
+sub process_perf {
+ my ($self,$in) = _self_args(@_);
+ my %pdh;
+ my ($nm,$dt);
+ use Text::ParseWords;
+ foreach (quotewords('\s+',1,$in)) {
+ if (/(.*)=(.*)/) {
+ ($nm,$dt)=($1,$2);
+ if (defined($self)) { $self->verb("prev_perf: $nm = $dt"); }
+ else { verb("prev_perf: $nm = $dt"); }
+ # in some of my plugins time_ is to profile execution time for part of plugin
+ # $pdh{$nm}=$dt if $nm !~ /^time_/;
+ $pdh{$nm}=$dt;
+ $pdh{$nm}=$1 if $dt =~ /(\d+)[csB%]/; # 'c' or 's' or B or % maybe have been added
+ # support for more than one set of previously cached performance data
+ # push @prev_time,$1 if $nm =~ /.*\.(\d+)/ && (!defined($prev_time[0]) || $prev_time[0] ne $1);
+ }
+ }
+ return %pdh;
+}
+
+# @DESCRIPTION : Converts variables with white-spaces with per-name enclosed with ''
+# @LAST CHANGED : 08-24-12 by WL
+# @INPUT : ARG1 - varible name
+# @RETURNS : name for perf-out output
+# @PRIVACY & USE : PUBLIC, but its use should be limited. To be used statically and not as an object instance function
+sub perf_name {
+ my $in = shift;
+ my $out = $in;
+ $out =~ s/'\/\(\)/_/g; #' get rid of special characters in performance description name
+ if ($in !~ /\s/ && $in eq $out) {
+ return $in;
+ }
+ return "'".$out."'";
+}
+
+# @DESCRIPTION : Determines appropriate output name (for STATUS and PERF) taking into account
+# rate variales prefix/suffix and 'NAME' override in long thresholds line specification
+# @LAST CHANGED : 08-26-12 by WL
+# @INPUT : ARG1 - variable name (variable as found in dataresults)
+# @RETURNS : name for output
+# @PRIVACY & USE : PUBLIC, but its use should be limited. To be as an object instance function,
+sub out_name {
+ my ($self,$dname) = @_;
+ my $thresholds = $self->{'_thresholds'};
+ my $dataresults = $self-> {'_dataresults'};
+ my $vr = $self->data2varname($dname,1);
+ my $name_out;
+
+ if (defined($vr) && exists($thresholds->{$vr}{'NAME'})) {
+ if (exists($thresholds->{$vr}{'PATTERN'}) || $self->{'enable_regex_match'} == 1) {
+ $thresholds->{$vr}{'NAMES_INDEX'} = {} if !exists($thresholds->{$vr}{'NAMES_INDEX'});
+ if (!exists($thresholds->{$vr}{'NAMES_INDEX'}{$dname})) {
+ my $ncount = scalar(keys %{$thresholds->{$vr}{'NAMES_INDEX'}});
+ $ncount++;
+ $thresholds->{$vr}{'NAMES_INDEX'}{$dname} = $ncount;
+ }
+ $name_out = $thresholds->{$vr}{'NAME'} .'_'. $thresholds->{$vr}{'NAMES_INDEX'}{$dname};
+ }
+ else {
+ $name_out = $thresholds->{$vr}{'NAME'};
+ }
+ }
+ else {
+ # this is for output of rate variables which name internally start with &
+ if ($dname =~ /^&(.*)/) {
+ $name_out = $self->{'o_rprefix'}.$1.$self->{'o_rsuffix'};
+ }
+ else {
+ $name_out = $dname;
+ }
+ }
+ return $name_out;
+}
+
+# @DESCRIPTION : Builds statusline. Adds info on error conditions that would preceed status data.
+# @LAST CHANGED : 08-20-12 by WL
+# @INPUT : ARG1 - variable name
+# ARG2 - string argument for status info
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PUBLIC, but its direct use is discouraged. Must be used as an object instance function
+sub addto_statusinfo_output {
+ my ($self, $var, $sline) = @_;
+ $self->{'_statusinfo'} .= ", " if $self->{'_statusinfo'};
+ $self->{'_statusinfo'} .= trim($sline);
+ $self->{'_dataresults'}{$var}[1]++;
+}
+
+# @DESCRIPTION : Accessor function for statusinfo
+# @LAST CHANGED : 08-22-12 by WL
+# @INPUT : none
+# @RETURNS : statusinfo (error conditions and messages) string
+# @PRIVACY & USE : PUBLIC. Must be used as an object instance function
+sub statusinfo {
+ my $self = shift;
+ if (defined($self) && defined($self->{'_statusinfo'})) {
+ return $self->{'_statusinfo'};
+ }
+ return undef;
+}
+
+# @DESCRIPTION : Builds Statuline. Adds variable data for status line output in non-error condition.
+# @LAST CHANGED : 08-26-12 by WL
+# @INPUT : ARG1 - variable name
+# ARG2 - formatted for human consumption text of collected data for this variable
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PUBLIC, but its direct use is discouraged. Must be used as an object instance function
+sub addto_statusdata_output {
+ my ($self,$dvar,$data) = @_;
+ my $thresholds = $self->{'_thresholds'};
+ my $dataresults = $self -> {'_dataresults'};
+ my $avar = $self->data2varname($dvar,1);
+
+ # $self->verb("debug: addto_statusdata_output - dvar is $dvar and avar is $avar");
+ if ((!exists($thresholds->{$avar}{'DISPLAY'}) || $thresholds->{$avar}{'DISPLAY'} eq 'YES') &&
+ (!exists($dataresults->{$dvar}[1]) || $dataresults->{$dvar}[1] == 0)) {
+ $self->{'_statusdata'} .= ", " if $self->{'_statusdata'};
+ if (defined($data)) {
+ $self->{'_statusdata'} .= trim($data);
+ }
+ elsif (exists($dataresults->{$dvar}[0])) {
+ $self->{'_statusdata'} .= $self->out_name($dvar) ." is ".$dataresults->{$dvar}[0];
+ }
+ $dataresults->{$dvar}[1]++;
+ }
+}
+
+# @DESCRIPTION : Accessor function for statusdata
+# @LAST CHANGED : 08-22-12 by WL
+# @INPUT : none
+# @RETURNS : statusdata string (non-error data from some variables)
+# @PRIVACY & USE : PUBLIC. Must be used as an object instance function
+sub statusdata {
+ my $self = shift;
+ if (defined($self) && defined($self->{'_statusdata'})) {
+ return $self->{'_statusdata'};
+ }
+ return undef;
+}
+
+# @DESCRIPTION : This function sets text or data for data variable PERFORMANCE output
+# (;warn;crit would be added to it later if thresholds were set for this variable)
+# @LAST CHANGED : 08-26-12 by WL
+# @INPUT : ARG1 - variable name
+# ARG2 - either "var=data" text or just "data" (in which case var= is prepended to it)
+# ARG3 - UOM symol ('c' for continous, '%' for percent, 's' for seconds) to added after data
+# if undef then it is looked up in known variables and if one is present there, its used
+# ARG4 - one of: "REPLACE" - if existing preset perfdata is present, it would be replaced with ARG2
+# "ADD" - if existing preset perfdata is there, ARG2 string would be added to it (DEFAULT)
+# "IFNOTSET - only set perfdata to ARG2 if it is empty, otherwise keep existing
+# @RETURNS : nothing (future: 0 on success, -1 on error)
+# @PRIVACY & USE : PUBLIC, but its use should be limited to custom variables added by plugins to data
+# Must be used as an object instance function
+sub set_perfdata {
+ my ($self,$avar,$adata,$unit,$opt) = @_;
+ my $dataresults = $self->{'_dataresults'};
+ my $thresholds = $self->{'_thresholds'};
+ my $known_vars = $self->{'knownStatusVars'};
+ my $bdata = $adata;
+ my $vr = undef;
+
+ # default operation is ADD
+ if (!defined($opt)) {
+ $opt = "ADD";
+ }
+ else {
+ $opt = uc $opt;
+ }
+ if (defined($adata)) {
+ # if only data wthout "var=" create proper perf line
+ $bdata = perf_name($self->out_name($avar)).'='.$adata if $adata !~ /=/;
+ if (defined($unit)) {
+ $bdata .= $unit;
+ }
+ else {
+ # appending UOM is done here
+ $vr = $self->data2varname($avar,1);
+ if (defined($vr)) {
+ if (exists($thresholds->{$vr}{'UOM'})) {
+ $bdata .= $thresholds->{$vr}{'UOM'};
+ }
+ elsif (exists($known_vars->{$vr}[2])) {
+ $bdata .= $known_vars->{$vr}[2];
+ }
+ }
+ }
+ # preset perfdata in dataresults array
+ $dataresults->{$avar}=[undef,0,0,''] if !defined($dataresults->{$avar});
+ $dataresults->{$avar}[2]=-1;
+ if ($opt eq "REPLACE" || !exists($dataresults->{$avar}[3]) || $dataresults->{$avar}[3] eq '') {
+ $dataresults->{$avar}[3]=$bdata;
+ }
+ elsif (exists($dataresults->{$avar}[3]) && $dataresults->{$avar}[3] ne '' && $opt eq "ADD") {
+ $dataresults->{$avar}[3].=$adata;
+ }
+ }
+}
+
+# @DESCRIPTION : This function is used when building performance output
+# @LAST CHANGED : 08-26-12 by WL
+# @INPUT : ARG1 - variable name
+# ARG2 - optional data argument, if not present variable's dataresults are used
+# ARG3 - one of: "REPLACE" - if existing preset perfdata is present, it would be replaced with ARG2
+# "ADD" - if existing preset perfdata is there, ARG2 string would be added to it
+# "IFNOTSET - only set perfdata to ARG2 if it is empty, otherwise keep existing (DEFAULT)
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PUBLIC, but its direct use is discouraged. Must be used as an object instance function
+sub addto_perfdata_output {
+ my ($self,$avar,$adata, $opt) = @_;
+ my $thresholds = $self->{'_thresholds'};
+ my $dataresults = $self-> {'_dataresults'};
+ my $vr = undef;
+
+ if (!defined($opt)) {
+ $opt = "IFNOTSET";
+ }
+ else {
+ $opt = uc $opt;
+ }
+ $vr = $self->data2varname($avar,1);
+ if (defined($avar) && defined($vr) &&
+ (!exists($thresholds->{$vr}{'PERF'}) || $thresholds->{$vr}{'PERF'} eq 'YES') &&
+ (!defined($dataresults->{$avar}[2]) || $dataresults->{$avar}[2] < 1)) {
+ my $bdata = '';
+ if (defined($adata)) {
+ $bdata .= trim($adata);
+ }
+ # this is how most perfdata gets added
+ elsif (defined($dataresults->{$avar}[0])) {
+ $bdata .= perf_name($self->out_name($avar)) .'='. $dataresults->{$avar}[0];
+ }
+ # this would use existing preset data now if it was present due to default
+ # setting UOM from KNOWN_STATUS_VARS array is now in set_perfdata if 3rd arg is undef
+ $self->set_perfdata($avar,$bdata,undef,$opt);
+ # now we actually add to perfdata from [3] of dataresults
+ if (exists($dataresults->{$avar}[3]) && $dataresults->{$avar}[3] ne '') {
+ $bdata = trim($dataresults->{$avar}[3]);
+ $self->{'_perfdata'} .= " " if $self->{'_perfdata'};
+ $self->{'_perfdata'} .= $bdata;
+ $dataresults->{$avar}[2]=0 if $dataresults->{$avar}[2] < 0;
+ $dataresults->{$avar}[2]++;
+ }
+ }
+}
+
+# @DESCRIPTION : Accessor function for map from data collected to variable names specified in options and thresholds
+# @LAST CHANGED : 08-22-13 by WL
+# @INPUT : ARG1 - data variable name
+# ARG2 - if undef or 0 return undef if no match for ARG1 found, if 1 return ARG1
+# @RETURNS : string of variable name as was specified with --variables or --thresholds
+# @PRIVACY & USE : PUBLIC. Must be used as an object instance function
+sub data2varname {
+ my ($self,$dname,$ropt) = @_;
+ my $dataresults = $self->{'_dataresults'};
+
+ return $dataresults->{$dname}[4] if defined($self) && defined($dataresults->{$dname}[4]);
+ return $dname if defined($ropt) && $ropt eq 1;
+ return undef;
+}
+
+# @DESCRIPTION : Sets list and info on known variables and regex for acceptable data types.
+# This function maybe called more than once. If called again, new vars in subsequent
+# calls are added to existing ones and existing vars are replaced if they are there again.
+# @LAST CHANGED : 08-22-12 by WL
+# @INPUT : ARG1 - ref to hash array of known vars. Keys are variable names. Data is an array. Example is:
+# 'version' => [ 'misc', 'VERSION', '' ],
+# 'utilization' => [ 'misc', 'GAUGE', '%' ],
+# 'cmd_get' => [ 'misc', 'COUNTER', 'c', "Total Number of Get Commands from Start" ],
+# The array elements are:
+# 1st - string of source for this variable. not used by the library at all, but maybe used by code getting the data
+# 2nd - type of data in a variable. May be "GAUGE", "VERSION", "COUNTER", "BOOLEAN", "TEXTINFO", "TEXTDATA", "SETTING"
+# 3rd - either empty or one-character UOM to be added to perforance data - 'c' for continous, '%' percent, 's' seconds
+# 4th - either empty or a description of this variable. If not empty, the variable becomes long-option and this is help text
+# ARG2 - regex of acceptable types of data for performance output. Anything else is ignored (i.e. no no output to perf), but
+# is still available for threshold checks. if this is undef, then default of 'GAUGE|COUNTER|^DATA$|BOOLEAN' is used
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PUBLIC, Must be used as object instance function
+sub set_knownvars {
+ my ($self, $known_vars_in, $vartypes_regex_in) = @_;
+ my $known_vars = $self->{'knownStatusVars'};
+
+ if (defined($known_vars_in)) {
+ foreach (keys %{$known_vars_in}) {
+ $known_vars->{$_} = $known_vars_in->{$_};
+ }
+ }
+ if (defined($vartypes_regex_in)) {
+ $self->{'perfOKStatusRegex'} = $vartypes_regex_in;
+ }
+ else {
+ $self->{'perfOKStatusRegex'} = $DEFAULT_PERF_OK_STATUS_REGEX;
+ }
+}
+
+# @DESCRIPTION : Adds known variables definition one at a time
+# @LAST CHANGED : 08-22-12 by WL
+# @INPUT : ARG1 - variable name
+# ARG2 - string of source for this variable. not used by the library at all, but maybe used by code getting the data
+# ARG3 - type of data in a variable. May be "GAUGE", "VERSION", "COUNTER", "BOOLEAN", "TEXTINFO", "TEXTDATA", "SETTING"
+# ARG4 - either empty or one-character UOM symbol to be added to perforance data - 'c' for continous, '%' percent, 's' seconds
+# ARG5 - either empty or a description of this variable. If not empty, the variable becomes long-option and this is help text
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PUBLIC, Must be used as object instance function
+sub add_knownvar {
+ my ($self, $varname, $source, $type, $unit, $description) = @_;
+ my $temp = { $varname => [ $source, $type, $unit, $description] };
+ $self->set_knownvars($temp,undef);
+}
+
+# @DESCRIPTION : This function is used for checking data values against critical and warning thresholds
+# @LAST CHANGED : 08-20-12 by WL
+# @INPUT : ARG1 - variable name (used for text output in case it falls within threshold)
+# ARG2 - data to be checked
+# ARG3 - threshold to be checked, internal structure returned by parse_threshold()
+# @RETURNS : Returns "" (empty string) if data is not within threshold range
+# and text message for status line out about how data is within range otherwise
+# @PRIVACY & USE : PUBLIC. Maybe used directly or as an object instance function
+sub check_threshold {
+ my ($self,$attrib,$data,$th_array) = _self_args(@_);
+ my $mod = $th_array->[0];
+ my $lv1 = $th_array->[1];
+ my $lv2 = $th_array->[2];
+ my $issymb = 1;
+ $issymb = 0 if defined($self) && $self->{'output_comparison_symbols'} eq 0;
+
+ # verb("debug check_threshold: $mod : ".(defined($lv1)?$lv1:'')." : ".(defined($lv2)?$lv2:''));
+ return "" if !defined($lv1) || ($mod eq '' && $lv1 eq '');
+ return " " . $attrib . " is " . $data . ( ($issymb==1)?' = ':' equal to ' ). $lv1 if $mod eq '=' && $data eq $lv1;
+ return " " . $attrib . " is " . $data . ( ($issymb==1)?' != ':' not equal to ' ). $lv1 if $mod eq '!' && $data ne $lv1;
+ return " " . $attrib . " is " . $data . ( ($issymb==1)?' > ':' more than ' ) . $lv1 if $mod eq '>' && $data>$lv1;
+ return " " . $attrib . " is " . $data . ( ($issymb==1)?' > ':' more than ' ) . $lv2 if $mod eq ':' && $data>$lv2;
+ return " " . $attrib . " is " . $data . ( ($issymb==1)?' >= ':' more than or equal to ' ) . $lv1 if $mod eq '>=' && $data>=$lv1;
+ return " " . $attrib . " is " . $data . ( ($issymb==1)?' < ':' less than ' ). $lv1 if ($mod eq '<' || $mod eq ':') && $data<$lv1;
+ return " " . $attrib . " is " . $data . ( ($issymb==1)?' <= ':' less than or equal to ' ) . $lv1 if $mod eq '<=' && $data<=$lv1;
+ return " " . $attrib . " is " . $data . " in range $lv1..$lv2" if $mod eq '@' && $data>=$lv1 && $data<=$lv2;
+ return "";
+}
+
+# @DESCRIPTION : This function is called to parse threshold string
+# @LAST CHANGED : 03-23-13 by WL
+# (the code in this function can be traced back to late 2006. It has not much changed from 2008)
+# @INPUT : ARG1 - String for one variable WARN or CRIT threshold which can be as follows:
+# data - warn if data is above this value if numeric data, or equal for non-numeric
+# >data - warn if data is above this value (default for numeric values)
+# <data - warn if data is below this value (must be followed by number)
+# =data - warn if data is equal to this value (default for non-numeric values)
+# !data - warn if data is not equal to this value
+# Threshold can also be specified as range in two forms:
+# num1:num2 - warn if data is outside range i.e. if data<num1 or data>num2
+# \@num1:num2 - warn if data is in range i.e. data>=num1 && data<=num2
+# @RETURNS : Returns reference to a hash array, this library's structure for holding processed threshold spec
+# @PRIVACY & USE : PUBLIC. Maybe used directly or as an object instance function
+sub parse_threshold {
+ my ($self,$thin) = _self_args(@_);
+
+ # link to an array that holds processed threshold data
+ # array: 1st is type of check, 2nd is threshold value or value1 in range, 3rd is value2 in range,
+ # 4th is extra options such as ^, 5th is nagios spec string representation for perf out
+ my $th_array = [ '', undef, undef, '', '' ];
+ my $th = $thin;
+ my $at = '';
+
+ $at = $1 if $th =~ s/^(\^?[@|>|<|=|!]?~?)//; # check mostly for my own threshold format
+ $th_array->[3]='^' if $at =~ s/\^//; # deal with ^ option
+ $at =~ s/~//; # ignore ~ if it was entered
+ if ($th =~ /^\:([-|+]?\d+\.?\d*)/) { # :number format per nagios spec
+ $th_array->[1]=$1;
+ $th_array->[0]=($at !~ /@/)?'>':'<=';
+ $th_array->[5]=($at !~ /@/)?('~:'.$th_array->[1]):($th_array->[1].':');
+ }
+ elsif ($th =~ /([-|+]?\d+\.?\d*)\:$/) { # number: format per nagios spec
+ $th_array->[1]=$1;
+ $th_array->[0]=($at !~ /@/)?'<':'>=';
+ $th_array->[5]=($at !~ /@/)?'':'@';
+ $th_array->[5].=$th_array->[1].':';
+ }
+ elsif ($th =~ /([-|+]?\d+\.?\d*)\:([-|+]?\d+\.?\d*)/) { # nagios range format
+ $th_array->[1]=$1;
+ $th_array->[2]=$2;
+ if ($th_array->[1] > $th_array->[2]) {
+ print "Incorrect format in '$thin' - in range specification first number must be smaller then 2nd\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ $th_array->[0]=($at !~ /@/)?':':'@';
+ $th_array->[5]=($at !~ /@/)?'':'@';
+ $th_array->[5].=$th_array->[1].':'.$th_array->[2];
+ }
+ if (!defined($th_array->[1])) { # my own format (<,>,=,!)
+ $th_array->[0] = ($at eq '@')?'<=':$at;
+ $th_array->[1] = $th;
+ $th_array->[5] = '~:'.$th_array->[1] if ($th_array->[0] eq '>' || $th_array->[0] eq '>=');
+ $th_array->[5] = $th_array->[1].':' if ($th_array->[0] eq '<' || $th_array->[0] eq '<=');
+ $th_array->[5] = '@'.$th_array->[1].':'.$th_array->[1] if $th_array->[0] eq '=';
+ $th_array->[5] = $th_array->[1].':'.$th_array->[1] if $th_array->[0] eq '!';
+ }
+ if ($th_array->[0] =~ /[>|<]/ && !isnum($th_array->[1])) {
+ print "Numeric value required when '>' or '<' are used !\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ # verb("debug parse_threshold: $th_array->[0] and $th_array->[1]");
+ $th_array->[0] = '=' if !$th_array->[0] && !isnum($th_array->[1]) && $th_array->[1] ne '';
+ if (!$th_array->[0] && isnum($th_array->[1])) { # this is just the number by itself, becomes 0:number check per nagios guidelines
+ $th_array->[2]=$th_array->[1];
+ $th_array->[1]=0;
+ $th_array->[0]=':';
+ $th_array->[5]=$th_array->[2];
+ }
+ return $th_array;
+}
+
+# @DESCRIPTION : this function checks that for numeric data warn threshold is within range of critical
+# @LAST CHANGED : 08-20-12 by WL
+# @INPUT : ARG1 - warhing threshold structure (reference to hash array)
+# ARG2 - critical threshold structure (reference to hash array)
+# @RETURNS : Returns 1 if warning does not fall within critical (there is an error)
+# Returns 0 if everything is ok and warning is within critical
+# @PRIVACY & USE : PUBLIC, but its use is discouraged. Maybe used directly or as an object instance function.
+sub threshold_specok {
+ my ($self, $warn_thar,$crit_thar) = _self_args(@_);
+
+ return 1 if defined($warn_thar) && defined($warn_thar->[1]) &&
+ defined($crit_thar) && defined($crit_thar->[1]) &&
+ isnum($warn_thar->[1]) && isnum($crit_thar->[1]) &&
+ $warn_thar->[0] eq $crit_thar->[0] &&
+ (!defined($warn_thar->[3]) || $warn_thar->[3] !~ /\^/) &&
+ (!defined($crit_thar->[3]) || $crit_thar->[3] !~ /\^/) &&
+ (($warn_thar->[1]>$crit_thar->[1] && ($warn_thar->[0] =~ />/ || $warn_thar->[0] eq '@')) ||
+ ($warn_thar->[1]<$crit_thar->[1] && ($warn_thar->[0] =~ /</ || $warn_thar->[0] eq ':')) ||
+ ($warn_thar->[0] eq ':' && $warn_thar->[2]>=$crit_thar->[2]) ||
+ ($warn_thar->[0] eq '@' && $warn_thar->[2]<=$crit_thar->[2]));
+ return 0; # return with 0 means specs check out and are ok
+}
+
+# @DESCRIPTION : this compares var names from data to names given as plugin options treating them regex
+# @LAST CHANGED : 08-26-12 by WL
+# @INPUT : ARG1 - the name to search for
+# @RETURNS : Keyname for what first one that matched from _thresholds
+# Undef if nothing matched
+# @PRIVACY & USE : PUBLIC, but its direct use should be rare. Must be used as an object instance function.
+sub var_pattern_match {
+ my ($self, $name) = @_;
+ my $thresholds = $self->{'_thresholds'};
+ my $allvars = $self->{'_allVars'};
+ my $is_regex_match = $self->{'enable_regex_match'};
+ my $v;
+ my $pattern;
+
+ foreach $v (@{$allvars}) {
+ $pattern='';
+ if ($is_regex_match eq 1 && !defined($thresholds->{$v}{'PATTERN'})) {
+ $pattern=$v;
+ }
+ elsif ($is_regex_match ne 0 && defined($thresholds->{$v}{'PATTERN'})) {
+ $pattern = $thresholds->{$v}{'PATTERN'};
+ }
+ if ($pattern ne '' && $name =~ /$pattern/) {
+ $self->verb("Data name '".$name."' matches pattern '".$pattern."'");
+ return $v;
+ }
+ }
+ return undef;
+}
+
+# @DESCRIPTION : This function adds data results
+# @LAST CHANGED : 08-27-12 by WL
+# @INPUT : ARG1 - name of data variable
+# ARG2 - data for this variable
+# ARG3 - name of checked variable/parameter corresponding to this data variable
+# default undef, assumed to be same as ARG1
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PUBLIC, Must be used as an object instance function
+sub add_data {
+ my ($self, $dnam, $dval, $anam) = @_;
+ my $thresholds = $self->{'_thresholds'};
+ my $dataresults = $self-> {'_dataresults'};
+ my $datavars = $self -> {'_datavars'};
+ my $perfVars = $self->{'_perfVars'};
+
+ # determine what plugin options-specified var & threshold this data corresponds to
+ if (!defined($anam)) {
+ if ($self->{'enable_regex_match'} == 0) {
+ $anam = $dnam;
+ }
+ else {
+ $anam = $self->var_pattern_match($dnam);
+ $anam = $dnam if !defined($anam);
+ }
+ }
+ # set dataresults
+ if (exists($dataresults->{$dnam})) {
+ $dataresults->{$dnam}[0] = $dval;
+ $dataresults->{$dnam}[4] = $anam if defined($anam);
+ }
+ else {
+ $dataresults->{$dnam} = [$dval, 0, 0, '', $anam];
+ }
+ # reverse map array
+ $datavars->{$anam} = [] if !exists($datavars->{$anam});
+ push @{$datavars->{$anam}}, $dnam;
+ # setperf if all variables go to perf
+ if ($self->{'all_variables_perf'} == 1) {
+ $thresholds->{$anam}={} if !exists($thresholds->{$anam});
+ $thresholds->{$anam}{'PERF_DATALIST'} = [] if !exists($thresholds->{$anam}{'PERF_DATALIST'});
+ push @{$thresholds->{$anam}{'PERF_DATALIST'}}, $dnam;
+ if (!defined($thresholds->{$anam}{'PERF'})) {
+ push @{$perfVars}, $anam;
+ $thresholds->{$anam}{'PERF'} = 'YES';
+ }
+ }
+}
+
+# @DESCRIPTION : Accessor function that gets variable data
+# @LAST CHANGED : 08-20-12 by WL
+# @INPUT : ARG1 - name of data variable
+# @RETURNS : undef if variable does not exist and data otherwise
+# @PRIVACY & USE : PUBLIC, Must be used as an object instance function
+sub vardata {
+ my ($self,$dnam) = @_;
+ my $dataresults = $self->{'_dataresults'};
+ return undef if !exists($dataresults->{$dnam});
+ return $dataresults->{$dnam}[0];
+}
+
+# @DESCRIPTION : This function parses "WARN:threshold,CRIT:threshold,ABSENT:OK|WARNING|CRITICAL|UNKNOWN" combined threshold string
+# Parsing of actual threshold i.e. what is after WARN, CRIT is done by parse_threshold() function
+# @LAST CHANGED : 08-27-12 by WL
+# @INPUT : ARG1 - String containing threshold line like "WARN:threshold,CRIT:threshold,ABSENT:OK|WARNING|CRITICAL|UNKNOWN"
+# Acceptable comma-separated parts threshold specifiers are:
+# WARN:<threshold> - warning threshold
+# CRIT:<treshold> - critical threshold
+# ABSENT:OK|WARNING|CRITICAL|UNKNOWN - nagios exit code if data for this variable is not found
+# ZERO:OK|WARNING|CRITICAL|UNKNOWN - nagios exit code if data is 0
+# DISPLAY:YES|NO - output data in plugin status line
+# PERF:YES|NO - output data as plugin performance data
+# SAVED:YES|NO - put results in saved data (this really should not be set manually)
+# PATTERN:<regex> - enables regex match allowing more than one real data name to match this threshold
+# NAME:<string> - overrides output status and perf name for this variable
+# UOM:<string> - unit of measurement symbol to add to perf
+# @RETURNS : Returns reference to a hash array, a library's structure for holding processed MULTI-THRESHOLD spec
+# Note that this is MULTI-THRESHOLD hash structure, it itself contains threshold hashes returned by parse_threshold()
+# @PRIVACY & USE : PUBLIC, but its use is discouraged. Maybe used directly or as an object instance function.
+sub parse_thresholds_list {
+ my ($self,$in) = _self_args(@_);
+ my $thres = {};
+ my @tin = undef;
+ my $t = undef;
+ my $t2 = undef;
+
+ @tin = split(',', $in);
+ $t = uc $tin[0] if exists($tin[0]);
+ # old format with =warn,crit thresolds without specifying which one
+ if (defined($t) && $t !~ /^WARN/ && $t !~ /^CRIT/ && $t !~ /^ABSENT/ && $t !~ /^ZERO/ &&
+ $t !~ /^DISPLAY/ && $t !~ /^PERF/ && $t !~ /^SAVED/ &&
+ $t !~ /^PATTERN/ && $t !~ /^NAME/ && $t !~ /^UOM/) {
+ if (scalar(@tin)==2) {
+ if (defined($self)) {
+ $thres->{'WARN'} = $self->parse_threshold($tin[0]);
+ $thres->{'CRIT'} = $self->parse_threshold($tin[1]);
+ }
+ else {
+ $thres->{'WARN'} = parse_threshold($tin[0]);
+ $thres->{'CRIT'} = parse_threshold($tin[1]);
+ }
+ }
+ else {
+ print "Can not parse. Unknown threshold specification: $in\n";
+ print "Threshold line should be either both warning and critical thresholds separated by ',' or \n";
+ print "new format of: WARN:threshold,CRIT:threshold,ABSENT:OK|WARNING|CRITICAL|UNKNOWN\n";
+ print "which allows to specify all 3 (CRIT,WARN,ABSENT) or any one of them in any order\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ # new format with prefix specifying if its WARN or CRIT and support of ABSENT
+ else {
+ foreach $t (@tin) {
+ $t2 = uc $t;
+ if ($t2 =~ /^WARN\:(.*)/) {
+ if (defined($self)) {
+ $thres->{'WARN'} = $self->parse_threshold($1);
+ }
+ else {
+ $thres->{'WARN'} = parse_threshold($1);
+ }
+ }
+ elsif ($t2 =~ /^CRIT\:(.*)/) {
+ if (defined($self)) {
+ $thres->{'CRIT'} = $self->parse_threshold($1);
+ }
+ else {
+ $thres->{'CRIT'} = parse_threshold($1);
+ }
+ }
+ elsif ($t2 =~ /^ABSENT\:(.*)/) {
+ my $val = $1;
+ if (defined($ERRORS{$val})) {
+ $thres->{'ABSENT'} = $val;
+ }
+ else {
+ print "Invalid value $val after ABSENT. Acceptable values are: OK, WARNING, CRITICAL, UNKNOWN\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ elsif ($t2 =~ /^ZERO\:(.*)/) {
+ my $val = $1;
+ if (exists($ERRORS{$val})) {
+ $thres->{'ZERO'} = $val;
+ }
+ else {
+ print "Invalid value $val after ZERO. Acceptable values are: OK, WARNING, CRITICAL, UNKNOWN\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ elsif ($t2 =~ /^DISPLAY\:(.*)/) {
+ if ($1 eq 'YES' || $1 eq 'NO') {
+ $thres->{'DISPLAY'} = $1;
+ }
+ else {
+ print "Invalid value $1 after DISPLAY. Specify this as YES or NO.\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ elsif ($t2 =~ /^PERF\:(.*)/) {
+ if ($1 eq 'YES' || $1 eq 'NO') {
+ $thres->{'PERF'} = $1;
+ }
+ else {
+ print "Invalid value $1 after PERF. Specify this as YES or NO.\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ elsif ($t =~ /^PATTERN\:(.*)/i) {
+ $thres->{'PATTERN'} = $1;
+ $self->{'enable_regex_match'} = 2 if defined($self) && $self->{'enable_regex_match'} eq 0;
+ }
+ elsif ($t =~ /^NAME\:(.*)/i) {
+ $thres->{'NAME'} = $1;
+ }
+ elsif ($t =~ /^UOM\:(.*)/i) {
+ $thres->{'UOM'} = $1;
+ }
+ else {
+ print "Can not parse. Unknown threshold specification: $_\n";
+ print "Threshold line should be WARN:threshold,CRIT:threshold,ABSENT:OK|WARNING|CRITICAL|UNKNOWN,ZERO:OK|WARNING|CRITICAL|UNKNOWN\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ }
+ if (exists($thres->{'WARN'}) && exists($thres->{'CRIT'})) {
+ my $check_warncrit = 0;
+ if (defined($self)) {
+ $check_warncrit = $self->threshold_specok($thres->{'WARN'},$thres->{'CRIT'});
+ }
+ else {
+ $check_warncrit = threshold_specok($thres->{'WARN'},$thres->{'CRIT'});
+ }
+ if ($check_warncrit) {
+ print "All numeric warning values must be less then critical (or greater then when '<' is used)\n";
+ print "Note: to override this check prefix warning value with ^\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ return $thres;
+}
+
+# @DESCRIPTION : Adds variable to those whose thresholds would be checked
+# @LAST CHANGED : 08-27-12 by WL
+# @INPUT : ARG1 - name of the data variable
+# ARG2 - either:
+# 1) ref to combined thresholds hash array i.e. { 'WARN' => threshold array, 'CRIT' => threshold array, ABSENT => ... }
+# such hash array is returned by by parse_thresholds_list function
+# -- OR --
+# 2) a tet string with a list of thresholds in the format
+# WARN:threshold,CRIT:thresholod,ABSENT:OK|WARNING|CRITICAL|UNKNOWN,ZERO:WARNING|CRITICAL|UNKNOWN,PATTERN:pattern,NAME:name
+# which would get parsed y parse_thresholds_list function into ref array
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PUBLIC, Recommend function for adding thresholds. Must be used as an object instance function
+sub add_thresholds {
+ my ($self,$var,$th_in) = @_;
+ my $th;
+ if (ref($th_in) && (exists($th_in->{'WARN'}) || exists($th_in->{'CRIT'}) || exists($th_in->{'DISPLAY'}) ||
+ exists($th_in->{'PERF'}) || exists($th_in->{'SAVED'}) || exists($th_in->{'ABSENT'}) ||
+ exists($th_in->{'ZERO'}) || exists($th_in->{'PATTERN'}))) {
+ $th = $th_in;
+ }
+ else {
+ $th = $self->parse_thresholds_list($th_in);
+ }
+ if (!defined($var)) {
+ if (defined($th->{'NAME'})) {
+ $var = $th->{'NAME'};
+ }
+ elsif (defined($th->{'PATTERN'})) {
+ $var = $th->{'PATTERN'};
+ }
+ else {
+ print "Can not parse. No name or pattern in threshold: $th_in\n";
+ print "Specify threshold line as: NAME:name,PATTERN:regex,WARN:threshold,CRIT:threshold,ABSENT:OK|WARNING|CRITICAL|UNKNOWN,ZERO:OK|WARNING|CRITICAL|UNKNOWN\n";
+ $self->usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ push @{$self->{'_allVars'}}, $var if !exists($self->{'_thresholds'}{$var});
+ $self->{'_thresholds'}{$var}=$th;
+}
+
+# @DESCRIPTION : Accessor function for thresholds and related variable settings on what and how to check
+# @LAST CHANGED : 08-20-12 by WL
+# @INPUT : ARG1 - name of data variable
+# ARG2 - name of the threshold or related data setting to return
+# This can be: "WARN", "CRIT", "ABSENT", "ZERO", "DISPLAY", "PERF"
+# @RETURNS : undef if variable does not exist
+# if variable exists and "WARN" or "CRIT" thresholds are requested, it returns asociated
+# threshold hash array structure for named threshold of the type returned by parse_threshold()
+# for ABSENT, ZERO, DISPLAY, PERF and other, it returns a string for this check setting
+# @PRIVACY & USE : PUBLIC, Must be used as an object instance function
+sub get_threshold {
+ my ($self,$var,$thname) = @_;
+ return undef if !exists($self->{'_thresholds'}{$var}) || !exists($self->{'_thresholds'}{$var}{$thname});
+ return $self->{'_thresholds'}{$var}{$thname};
+}
+
+# @DESCRIPTION : Modifier function for thresholds and related variable settings on how to check and display results
+# @LAST CHANGED : 08-20-12 by WL
+# @INPUT : ARG1 - name of data variable
+# ARG2 - type of the threshold or related data setting
+# This can be: "WARN", "CRIT", "ABSENT", "ZERO", "DISPLAY", "PERF"
+# ARG3 - what to set this to, for "WARN" and "CRIT" this must be hash array returned by parse_threshold()
+# @RETURNS : 0 if type you want to set is not one of "WARN", "CRIT", "ZERO" or other acceptable settings
+# 1 on success
+# @PRIVACY & USE : PUBLIC, Must be used as an object instance function
+sub set_threshold {
+ my ($self,$var,$thname,$thdata) = @_;
+ if ($thname ne 'WARN' && $thname ne 'CRIT' && $thname ne 'ZERO' && $thname ne 'PATTERN' && $thname ne 'NAME' &&
+ $thname ne 'ABSENT' && $thname ne 'PERF' && $thname ne 'DISPLAY' && $thname ne 'SAVED' && $thname ne 'UOM') {
+ return 0;
+ }
+ $self->{'_thresholds'}{$var}={} if !exists($self->{'_thresholds'}{$var});
+ $self->{'_thresholds'}{$var}{$thname}=$thdata;
+ return 1;
+}
+
+# @DESCRIPTION : Returns list variables for GetOptions(..) that are long-options based on known/defined variable
+# @LAST CHANGED : 08-20-12 by WL
+# @INPUT : none
+# @RETURNS : Array of additional options based on KNOWN_STATS_VARS
+# @PRIVACY & USE : PUBLIC, Special use case with GetOpt::Long. Must be used as an object instance function
+sub additional_options_list {
+ my $self = shift;
+
+ my $known_vars = $self->{'knownStatusVars'};
+ my ($o_rprefix, $o_rsuffix, $v, $v2) = ('','','','');
+ $o_rprefix = $self->{'o_rprefix'} if defined($self->{'o_rprefix'});
+ $o_rsuffix = $self->{'o_rsuffix'} if defined($self->{'o_rsuffix'});
+ my @VarOptions = ();
+
+ if ($self->{'enable_long_options'} != -1) {
+ if (defined($self) && defined($known_vars)) {
+ foreach $v (keys %{$known_vars}) {
+ if (exists($known_vars->{$v}[3]) && $known_vars->{$v}[3] ne '') {
+ push @VarOptions,$v."=s";
+ if ($self->{'enable_rate_of_change'} eq 1 && $known_vars->{$v}[1] eq 'COUNTER' && ($o_rprefix ne '' || $o_rsuffix ne '')) {
+ $v2 = $o_rprefix.$v.$o_rsuffix;
+ push @VarOptions,$v2."=s"
+ }
+ }
+ }
+ }
+ }
+ if (scalar(@VarOptions)>0) {
+ $self->{'enable_long_options'} = 1;
+ }
+ return @VarOptions;
+}
+
+# @DESCRIPTION : Prints out help for generated long options
+# @LAST CHANGED : 08-20-12 by WL
+# @INPUT : none
+# @RETURNS : a string of text for help output
+# @PRIVACY & USE : PUBLIC, Special use case with GetOpt::Long. Must be used as an object instance function
+sub additional_options_help {
+ my $self = shift;
+ my $vname;
+ my $vname2;
+ my $counter = 0;
+ my $known_vars = $self->{'knownStatusVars'};
+
+ if ($self->{'enable_long_options'} != 1) { return ''; }
+
+ my $out=" These options are all --long_name=<list of specifiers separated by ,>
+ where specifiers are one or more of:
+ WARN:threshold - warning alert threshold
+ CRIT:threshold - critical alert threshold
+ Threshold is a value (usually numeric) which may have the following prefix:
+ > - warn if data is above this value (default for numeric values)
+ < - warn if data is below this value (must be followed by number)
+ = - warn if data is equal to this value (default for non-numeric values)
+ ! - warn if data is not equal to this value
+ Threshold can also be specified as a range in two forms:
+ num1:num2 - warn if data is outside range i.e. if data<num1 or data>num2
+ \@num1:num2 - warn if data is in range i.e. data>=num1 && data<=num2
+ ABSENT:OK|WARNING|CRITICAL|UNKNOWN - Nagios alert (or lock of thereof) if data is absent
+ ZERO:OK|WARNING|CRITICAL|UNKNOWN - Nagios alert (or lock of thereof) if result is 0
+ DISPLAY:YES|NO - Specifies if data should be included in nagios status line output
+ PERF:YES|NO - Output results as performance data or not (always YES if asked for rate)
+ NAME:<string> - Change the name to <string> in status and PERF output\n\n";
+
+ # add more options based on KNOWN_STATUS_VARS array
+ foreach $vname (keys(%{$known_vars})) {
+ if (exists($known_vars->{$vname}[3])) {
+ $counter++;
+ $out .= ' --'.$vname."=WARN:threshold,CRIT:threshold,<other specifiers>\n";
+ $out .= " ".$known_vars->{$vname}[3]."\n";
+ if ($known_vars->{$vname}[1] eq 'COUNTER' && $self->{'enable_rate_of_change'} eq 1) {
+ $vname2=$o_rprefix.$vname.$o_rsuffix;
+ $out .= ' --'.$vname2."=WARN:threshold,CRIT:threshold,<other specifiers>\n";
+ $out .= " Rate of Change of ".$known_vars->{$vname}[3]."\n";
+ }
+ }
+ }
+ if ($counter>0) { return $out; }
+ return "";
+}
+
+# @DESCRIPTION : Processes standard options parsing out of them variables to be checked
+# @LAST CHANGED : 08-20-12 by WL
+# @INPUT : ARG1 - Options data hash from GetOpt::Long
+# ARG2 - option --verbose or -v or --debug : undef normally and "" or filename if debug enabled
+# ARG3 - option --variables or -a in WL's plugins : comma-separated list of variables to check
+# ARG4 - option --warn or -w : comma-separated warning thresholds for variables in ARG3
+# ARG5 - option --crit or -c : comma-separated critical thresholds for variables in ARG3
+# ARG6 - option --perf or -f in WL's plugin: all regular variables should also go to perf data
+# ARG7 - option --perfvars or -A in WL's plugins: command-separated list of variables whose data goes to PERF output
+# ARG8 - prefix to distinguish rate variables, maybe "" but usually this is "rate_"
+# ARG9 - suffix to distinguish rate variables, only if ARG7 is "", otherwise optional and absent
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PUBLIC, To be used shortly after GetOptions. Must be used as an object instance function
+sub options_startprocessing {
+ my ($self, $Options, $o_verb, $o_variables, $o_warn, $o_crit, $o_perf, $o_perfvars, $o_rprefix, $o_rsuffix) = @_;
+
+ # Copy input parameters to object hash array, set them if not present
+ $o_rprefix="" if !defined($o_rprefix);
+ $o_rsuffix="" if !defined($o_rsuffix);
+ $o_crit="" if !defined($o_crit);
+ $o_warn="" if !defined($o_warn);
+ $o_variables="" if !defined($o_variables);
+ $self->{'o_variables'} = $o_variables;
+ $self->{'o_perfvars'} = $o_perfvars;
+ $self->{'o_crit'} = $o_crit;
+ $self->{'o_warn'} = $o_warn;
+ $self->{'o_perf'} = $o_perf;
+ $self->{'o_rprefix'} = $o_rprefix;
+ $self->{'o_rsuffix'} = $o_rsuffix;
+ $self->{'verbose'} = $o_verb if defined($o_verb);
+ # start processing
+ my $perfVars = $self->{'_perfVars'};
+ my $ar_varsL = $self->{'_ar_varsL'};
+ my $ar_critLv = $self->{'_ar_critLv'};
+ my $ar_warnLv = $self->{'_ar_warnLv'};
+ my $known_vars = $self->{'knownStatusVars'};
+ $o_rprefix = lc $o_rprefix;
+ $o_rsuffix = lc $o_rsuffix;
+ # process o_perfvars option
+ if (defined($o_perfvars)) {
+ @{$perfVars} = split( /,/ , lc $o_perfvars );
+ if (scalar(@{$perfVars})==0) {
+ $o_perfvars='*';
+ $self->{'o_perfvars'}='*';
+ }
+ if ($o_perfvars eq '*') {
+ $self->{'all_variables_perf'} = 1;
+ }
+ else {
+ # below loop converts rate variables to internal representation
+ for (my $i=0; $i<scalar(@{$perfVars}); $i++) {
+ $perfVars->[$i] = '&'.$1 if $perfVars->[$i] =~ /^$o_rprefix(.*)$o_rsuffix$/;
+ }
+ }
+ }
+ if (defined($o_warn) || defined($o_crit) || defined($o_variables)) {
+ if (defined($o_variables)) {
+ @{$ar_varsL}=split( /,/ , lc $o_variables );
+ if (defined($o_warn)) {
+ $o_warn.="~" if $o_warn =~ /,$/;
+ @{$ar_warnLv}=split( /,/ , lc $o_warn );
+ }
+ if (defined($o_crit)) {
+ $o_crit.="~" if $o_crit =~ /,$/;
+ @{$ar_critLv}=split( /,/ , lc $o_crit );
+ }
+ }
+ else {
+ print "Specifying warning or critical thresholds requires specifying list of variables to be checked\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ # this is a special loop to check stats-variables options such as "connected_clients=WARN:warning,CRIT:critical"
+ # which are specified as long options (new extended threshold line spec introduced in check_redis and check_memcached)
+ my ($vname,$vname2) = (undef,undef);
+ foreach $vname (keys(%{$known_vars})) {
+ $vname2=$o_rprefix.$vname.$o_rsuffix;
+ if (exists($known_vars->{$vname}[3])) {
+ if (exists($Options->{$vname})) {
+ $self->verb("Option $vname found with spec parameter: ".$Options->{$vname});
+ $self->add_thresholds($vname,$Options->{$vname});
+ }
+ if (exists($Options->{$vname2})) {
+ $self->verb("Rate option $vname2 found with spec parameter: ".$Options->{$vname2});
+ $self->add_thresholds('&'.$vname,$Options->{$vname2});
+ }
+ }
+ }
+ $self->{'_called_options_startprocessing'}=1;
+}
+
+# @DESCRIPTION : Internal function. Parses and sets thresholds for given list of variables after all options have been processed
+# @LAST CHANGED : 08-20-12 by WL
+# @INPUT : none
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PRIVATE, Must be used as an object instance function
+sub _options_setthresholds {
+ my $self = shift;
+
+ my $perfVars = $self->{'_perfVars'};
+ my $ar_varsL = $self->{'_ar_varsL'};
+ my $ar_critLv = $self->{'_ar_critLv'};
+ my $ar_warnLv = $self->{'_ar_warnLv'};
+ my $known_vars = $self->{'knownStatusVars'};
+ my $thresholds = $self->{'_thresholds'};
+ my ($o_rprefix, $o_rsuffix) = ("", "");
+ $o_rprefix = $self->{'o_rprefix'} if exists($self->{'o_rprefix'});
+ $o_rsuffix = $self->{'o_rsuffix'} if exists($self->{'o_rsuffix'});
+
+ if (scalar(@{$ar_warnLv})!=scalar(@{$ar_varsL}) || scalar(@{$ar_critLv})!=scalar(@{$ar_varsL})) {
+ printf "Number of specified warning levels (%d) and critical levels (%d) must be equal to the number of attributes specified at '-a' (%d). If you need to ignore some attribute do it as ',,'\n", scalar(@{$ar_warnLv}), scalar(@{$ar_critLv}), scalar(@{$ar_varsL});
+ $self->verb("Warning Levels: ".join(",",@{$ar_warnLv}));
+ $self->verb("Critical Levels: ".join(",",@{$ar_critLv}));
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ for (my $i=0; $i<scalar(@{$ar_varsL}); $i++) {
+ $ar_varsL->[$i] = '&'.$1 if $ar_varsL->[$i] =~ /^$o_rprefix(.*)$o_rsuffix$/;
+ if ($ar_varsL->[$i] =~ /^&(.*)/) {
+ if (!defined($self->{'o_prevperf'})) {
+ print "Calculating rate variable such as ".$ar_varsL->[$i]." requires previous performance data. Please add '-P \$SERVICEPERFDATA\$' to your nagios command line.\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ if (defined($known_vars->{$1}) && $known_vars->{$1}[0] ne 'COUNTER') {
+ print "$1 is not a COUNTER variable for which rate of change should be calculated\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ if (!exists($thresholds->{$ar_varsL->[$i]})) {
+ my $warn = $self->parse_threshold($ar_warnLv->[$i]);
+ my $crit = $self->parse_threshold($ar_critLv->[$i]);
+ if ($self->threshold_specok($warn,$crit)) {
+ print "All numeric warning values must be less then critical (or greater then when '<' is used)\n";
+ print "Note: to override this check prefix warning value with ^\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ $self->add_thresholds($ar_varsL->[$i], {'WARN'=>$warn,'CRIT'=>$crit} );
+ }
+ }
+}
+
+# @DESCRIPTION : Internal helper function. Finds time when previous performance data was calculated/saved at
+# @DEVNOTE : Right now this library and function only supports one previous performance data set,
+# but check_snmp_netint plugin supports multiple sets and there the code is more complex,
+# As this function originated there, that code is commented out right now.
+# @LAST CHANGED : 08-21-12 by WL
+# @INPUT : ARG1 - reference to previous performance data hash array. It looks for _ptime variable there.
+# ARG2 - string with previous performance time in unix seconds. This may come from separate plugin option.
+# @RETURNS : Time in unix seconds frm 1970 or undef if it was not located
+# @PRIVACY & USE : PRIVATE, Maybe used directly or as an object instance function.
+sub _set_prevtime {
+ my ($self,$prevperf,$o_prevtime) = _self_args(@_);
+ my $perfcheck_time;
+
+ if (defined($o_prevtime)) {
+ # push @prev_time, $o_prevtime;
+ # $prev_perf{ptime}=$o_prevtime;
+ $perfcheck_time=$o_prevtime;
+ }
+ elsif (defined($prevperf) && defined($prevperf->{'_ptime'})) {
+ # push @prev_time, $prev_perf{ptime};
+ $perfcheck_time=$prevperf->{'_ptime'};
+ }
+ else {
+ # @prev_time=();
+ $perfcheck_time=undef;
+ }
+ # numeric sort for timestamp array (this is from lowest time to highiest, i.e. to latest)
+ # my %ptimes=();
+ # $ptimes{$_}=$_ foreach @prev_time;
+ # @prev_time = sort { $a <=> $b } keys(%ptimes);
+ return $perfcheck_time;
+}
+
+# @DESCRIPTION : Processes standard options, setting up thresholds based on options that are to be checked
+# @LAST CHANGED : 08-22-12 by WL
+# @INPUT : none
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PUBLIC, To be called after plugin finished processing its own custom options. Must be used as an object instance function
+sub options_finishprocessing {
+ my $self = shift;
+
+ if (!exists($self->{'_called_options_finishprocessing'})) {
+ # process previous performance data
+ my $prevperf = $self->{'_prevPerf'};
+ if (defined($self->{'o_prevperf'})) {
+ if (defined($self->{'o_perf'}) || defined($self->{'o_perfvars'})) {
+ %{$prevperf}=$self->process_perf($self->{'o_prevperf'});
+ $self->{'_perfcheck_time'} = $self->_set_prevtime($prevperf,$self->{'o_prevtime'});
+ }
+ else {
+ print "--prevperf can only be used with --perf or --perfvars options\n";
+ if (defined($self)) { $self->usage(); }
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ # set thresholds
+ $self->_options_setthresholds();
+ # prepare data results arrays
+ my $dataresults = $self->{'_dataresults'};
+ my $thresholds = $self->{'_thresholds'};
+ $dataresults->{$_} = [undef, 0, 0] foreach(@{$self->{'_allVars'}});
+ if (defined($self->{'_perfVars'})) {
+ foreach(@{$self->{'_perfVars'}}) {
+ $dataresults->{$_} = [undef, 0, 0] if !exists($dataresults->{$_});
+ $thresholds->{$_} = {} if !exists($thresholds->{$_});
+ $thresholds->{$_}{'PERF'} = 'YES';
+ }
+ }
+ # mark as having finished
+ $self->{'_called_options_finishprocessing'}=1;
+ }
+}
+
+# @DESCRIPTION : Accessor function for previously saved perfdata
+# @LAST CHANGED : 08-22-12 by WL
+# @INPUT : ARG1 - varname
+# @RETURNS : value of that variable on previous plugin run, undef if not known
+# @PRIVACY & USE : PUBLIC, Must be used as an object instance function
+sub prev_perf {
+ my ($self,$var) = @_;
+ if (defined($self) && defined($self->{'_prevPerf'}{$var})) {
+ return $self->{'_prevPerf'}{$var};
+ }
+ return undef;
+}
+
+# @DESCRIPTION : Accessor function for exit status code
+# @LAST CHANGED : 08-21-12 by WL
+# @INPUT : none
+# @RETURNS : current expected exit status code
+# @PRIVACY & USE : PUBLIC, Must be used as an object instance function
+sub statuscode {
+ my $self = shift;
+ return $self->{'_statuscode'};
+}
+
+# @DESCRIPTION : Sets plugin exist status
+# @LAST CHANGED : 08-21-12 by WL
+# @INPUT : status code string - one of "WARNING", "CRITICAL", "UNKNOWN".
+# @RETURNS : 0 on success, 1 if this status code is below level that plugin would exit with and as such it was not set
+# @PRIVACY & USE : PUBLIC, Must be used as an object instance function
+sub set_statuscode {
+ my ($self,$newcode) = @_;
+
+ if ($newcode eq 'UNKNOWN') {
+ $self->{'_statuscode'} = 'UNKNOWN';
+ return 0;
+ }
+ if ($self->{'_statuscode'} eq 'UNKNOWN') { return 1; }
+ elsif ($self->{'_statuscode'} eq 'CRITICAL') {
+ if ($newcode eq 'CRITICAL') { return 0;}
+ else { return 1; }
+ }
+ elsif ($self->{'_statuscode'} eq 'WARNING') {
+ if ($newcode eq 'CRITICAL') {
+ $self->{'_statuscode'} ='CRITICAL';
+ return 0;
+ }
+ elsif ($newcode eq 'WARNING') { return 0; }
+ else { return 1; }
+ }
+ elsif ($self->{'_statuscode'} eq 'OK') {
+ if ($newcode eq 'CRITICAL' || $newcode eq 'WARNING') {
+ $self->{'_statuscode'} = $newcode;
+ return 0;
+ }
+ else { return 1; }
+ }
+ else {
+ printf "SYSTEM ERROR: status code $newcode not supported";
+ exit $ERRORS{'UNKNOWN'};
+ }
+ return 1; # should never get here
+}
+
+# @DESCRIPTION : This function is called closer to end of the code after plugin retrieved data and
+# assigned values to variables. This function checks variables against all thresholds.
+# It prepares statusdata and statusinfo and exitcode.
+# @LAST CHANGED : 09-03-12 by WL
+# @INPUT : none
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PUBLIC, To be called after variables have values. Must be used as an object instance function
+sub main_checkvars {
+ my $self = shift;
+
+ $self->options_finishprocessing() if !exists($self->{'_called_options_finshprocessing'});
+ if (exists($self->{'_called_main_checkvars'})) { return; }
+
+ my $thresholds = $self->{'_thresholds'};
+ my $dataresults = $self->{'_dataresults'};
+ my $allVars = $self->{'_allVars'};
+ my $datavars = $self->{'_datavars'};
+
+ my ($dvar,$avar,$aname,$perf_str,$chk)=(undef,undef,undef,undef,undef);
+
+ # main loop to check for warning & critical thresholds
+ for (my $i=0;$i<scalar(@{$allVars});$i++) {
+ $avar = $allVars->[$i];
+ if (!defined($datavars->{$avar}) || scalar(@{$datavars->{$avar}})==0) {
+ if (defined($thresholds->{$avar}{'ABSENT'})) {
+ $self->set_statuscode($thresholds->{$avar}{'ABSENT'});
+ }
+ else {
+ $self->set_statuscode("CRITICAL");
+ }
+ $aname = $self->out_name($avar);
+ $self->addto_statusinfo_output($avar, "$aname data is missing");
+ }
+ foreach $dvar (@{$datavars->{$avar}}) {
+ $aname = $self->out_name($dvar);
+ if (defined($dataresults->{$dvar}[0])) {
+ # main check
+ if (defined($avar)) {
+ if ($dataresults->{$dvar}[0] eq 0 && exists($thresholds->{$avar}{'ZERO'})) {
+ $self->set_statuscode($thresholds->{$avar}{'ZERO'});
+ $self->addto_statusinfo_output($dvar, "$aname is zero") if $self->statuscode() ne 'OK';
+ }
+ else {
+ $chk=undef;
+ if (exists($thresholds->{$avar}{'CRIT'})) {
+ $chk = $self->check_threshold($aname,lc $dataresults->{$dvar}[0], $thresholds->{$avar}{'CRIT'});
+ if ($chk) {
+ $self->set_statuscode("CRITICAL");
+ $self->addto_statusinfo_output($dvar,$chk);
+ }
+ }
+ if (exists($thresholds->{$avar}{'WARN'}) && (!defined($chk) || !$chk)) {
+ $chk = $self->check_threshold($aname,lc $dataresults->{$dvar}[0], $thresholds->{$avar}{'WARN'});
+ if ($chk) {
+ $self->set_statuscode("WARNING");
+ $self->addto_statusinfo_output($dvar,$chk);
+ }
+ }
+ }
+ }
+ # if we did not output to status line yet, do so
+ $self->addto_statusdata_output($dvar,$aname." is ".$dataresults->{$dvar}[0]);
+
+ # if we were asked to output performance, prepare it but do not output until later
+ if ((defined($self->{'o_perf'}) && defined($avar) && !exists($thresholds->{$avar}{'PERF'})) ||
+ (exists($thresholds->{$avar}{'PERF'}) && $thresholds->{$avar}{'PERF'} eq 'YES')) {
+ $perf_str = perf_name($aname).'='.$dataresults->{$dvar}[0];
+ $self->set_perfdata($dvar, $perf_str, undef, "IFNOTSET"); # with undef UOM would get added
+ $dataresults->{$dvar}[2]=0; # this would clear -1 from preset perf data, making it ready for output
+ # below is where threshold info gets added to perfdata
+ if ((exists($thresholds->{$avar}{'WARN'}[5]) && $thresholds->{$avar}{'WARN'}[5] ne '') ||
+ (exists($thresholds->{$avar}{'CRIT'}[5]) && $thresholds->{$avar}{'CRIT'}[5] ne '')) {
+ $perf_str = ';';
+ $perf_str .= $thresholds->{$avar}{'WARN'}[5] if exists($thresholds->{$avar}{'WARN'}[5]) && $thresholds->{$avar}{'WARN'}[5] ne '';
+ $perf_str .= ';'.$thresholds->{$avar}{'CRIT'}[5] if exists($thresholds->{$avar}{'CRIT'}[5]) && $thresholds->{$avar}{'CRIT'}[5] ne '';
+ $self->set_perfdata($dvar, $perf_str, '', "ADD");
+ }
+ }
+ }
+ }
+ }
+ $self->{'_called_main_checkvars'}=1;
+ # $statusinfo=trim($statusinfo);
+ # $statusdata=trim($statusdata);
+}
+
+# @DESCRIPTION : This function is at the end. It prepares PERFOUT for output collecting all perf variables data
+# @LAST CHANGED : 08-26-12 by WL
+# @INPUT : none
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PUBLIC, To be called after variables have values. Must be used as an object instance function
+# Calling this function direcly is optional, its automatically called on 1st call to perfdata()
+sub main_perfvars {
+ my $self = shift;
+
+ my $dataresults = $self->{'_dataresults'};
+ my $PERF_OK_STATUS_REGEX = $self->{'perfOKStatusRegex'};
+ my $perfVars = $self->{'_perfVars'};
+ my $known_vars = $self->{'knownStatusVars'};
+ my $datavars = $self->{'_datavars'};
+ my $avar;
+ my $dvar;
+
+ $self->main_checkvars() if !exists($self->{'_called_main_checkvars'});
+ if (exists($self->{'_called_main_perfvars'})) { return; }
+
+ for (my $i=0;$i<scalar(@{$perfVars});$i++) {
+ $avar=$perfVars->[$i];
+ if (!defined($datavars->{$avar}) || scalar(@{$datavars->{$avar}})==0) {
+ $self->verb("Perfvar: $avar selected for PERFOUT but data not available");
+ }
+ else {
+ foreach $dvar (@{$datavars->{$avar}}) {
+ if (defined($dataresults->{$dvar}[0])) {
+ $self->verb("Perfvar: $dvar ($avar) = ".$dataresults->{$dvar}[0]);
+ if (!defined($known_vars->{$avar}[1]) || $known_vars->{$avar}[1] =~ /$PERF_OK_STATUS_REGEX/ ) {
+ $self->addto_perfdata_output($dvar);
+ }
+ else {
+ $self->verb(" -- not adding to perfdata because of it is '".$known_vars->{$avar}[1]."' type variable --");
+ }
+ }
+ else {
+ $self->verb("Perfvar: $avar selected for PERFOUT but data not defined");
+ }
+ }
+ }
+ }
+ if (defined($self->{'o_prevperf'})) {
+ $self->addto_perfdata_output('_ptime', "_ptime=".time(), "REPLACE");
+ }
+ foreach $dvar (keys %{$dataresults}) {
+ if (defined($dataresults->{$dvar}[3]) && $dataresults->{$dvar}[3] ne '') {
+ $self->verb("Perfvar (Dataresults Loop): $dvar => ".$dataresults->{$dvar}[3]);
+ $self->addto_perfdata_output($dvar);
+ }
+ }
+
+ $self->{'_called_main_perfvars'}=1;
+ # $perfdata = trim($perfdata);
+}
+
+# @DESCRIPTION : This function should be called at the very very end, it returns perf data output
+# @LAST CHANGED : 08-22-12 by WL
+# @INPUT : none
+# @RETURNS : string of perfdata starting with "|"
+# @PRIVACY & USE : PUBLIC, To be called during plugin output. Must be used as an object instance function
+sub perfdata {
+ my $self=shift;
+
+ $self->main_perfvars() if !exists($self->{'_called_main_perfvars'});
+ my $perfdata = trim($self->{'_perfdata'});
+ if ($perfdata ne '') {
+ return " | " . $perfdata;
+ }
+ return "";
+}
+
+# @DESCRIPTION : This function is called after data is available and calculates rate variables
+# based on current and previous (saved in perfdata) values.
+# @LAST CHANGED : 08-27-12 by WL
+# @INPUT : none
+# @RETURNS : nothing (future: 1 on success, 0 on error)
+# @PRIVACY & USE : PUBLIC, To be called after variables have values. Must be used as an object instance function
+sub calculate_ratevars {
+ my $self = shift;
+
+ my $prev_perf = $self->{'_prevPerf'};
+ my $ptime = $self->{'_perfcheck_time'};
+ my $thresholds = $self->{'_thresholds'};
+ my $dataresults = $self->{'_dataresults'};
+ my $datavars = $self->{'_datavars'};
+ my $allVars = $self->{'_allVars'};
+
+ my ($avar,$dvar,$nvar) = (undef,undef,undef);
+ my $timenow=time();
+ if (defined($self->{'o_prevperf'}) && (defined($self->{'o_perf'}) || defined($self->{'o_perfvars'}))) {
+ for (my $i=0;$i<scalar(@{$allVars});$i++) {
+ if ($allVars->[$i] =~ /^&(.*)/) {
+ $avar = $1;
+ if (defined($datavars->{$avar}) && scalar(@{$datavars->{$avar}})>0) {
+ foreach $dvar (@{$datavars->{$avar}}) {
+ $nvar = '&'.$dvar;
+ # this forces perfdata output if it was not already
+ if (defined($dataresults->{$dvar}) && $dataresults->{$dvar}[2]<1 &&
+ (!defined($dataresults->{$dvar}[3]) || $dataresults->{$dvar}[3] eq '')) {
+ $self->set_perfdata($dvar, perf_name($self->out_name($dvar)).'='.$dataresults->{$dvar}[0], undef, "IFNOTSET");
+ $self->set_threshold($dvar,'PERF','YES');
+ $self->set_threshold($dvar,'SAVED','YES'); # will replace PERF in the future
+ }
+ if (defined($prev_perf->{$dvar}) && defined($ptime)) {
+ $self->add_data($nvar,
+ sprintf("%.2f",($dataresults->{$dvar}[0]-$prev_perf->{$dvar})/($timenow-$ptime)));
+ $self->verb("Calculating Rate of Change for $dvar ($avar) : ".$nvar."=". $self->vardata($nvar));
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+}
+##################################### END OF THE LIBRARY FUNCTIONS #########################################
+
+# process --query options (which maybe repeated, that's why loop)
+sub option_query {
+ my $nlib = shift;
+
+ for(my $i=0;$i<scalar(@o_querykey);$i++) {
+ $nlib->verb("Processing query key option: $o_querykey[$i]");
+ my @ar=split(/,/, $o_querykey[$i]);
+ # how to query
+ my @key_querytype = split(':', uc shift @ar);
+ $nlib->verb("- processing query type specification: ".join(':',@key_querytype));
+ $query[$i] = { 'query_type' => $key_querytype[0] };
+ if ($key_querytype[0] eq 'GET' || $key_querytype[0] eq 'LLEN' ||
+ $key_querytype[0] eq 'SLEN' || $key_querytype[0] eq 'HLEN' ||
+ $key_querytype[0] eq 'ZLEN') {
+ if (scalar(@key_querytype)!=1) {
+ print "Incorrect specification. GET, LLEN, SLEN, HLEN, ZLEN do not have any arguments\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ elsif ($key_querytype[0] eq 'HGET' || $key_querytype[0] eq 'HEXISTS' ||
+ $key_querytype[0] eq 'SEXISTS') {
+ if (scalar(@key_querytype)!=2) {
+ print "Incorrect specification of HGET, HEXISTS or SEXIST. Must include hash or set member name as an argument.\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ $query[$i]{'element_name'} = $key_querytype[1];
+ }
+ elsif ($key_querytype[0] eq 'LRANGE' || $key_querytype[0] eq 'ZRANGE') {
+ if ($key_querytype[0] eq 'ZRANGE' && scalar(@key_querytype)!=4) {
+ print "Incorrect specification of ZRANGE. Must include type and start and end (min and max scores).\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ elsif ($key_querytype[0] eq 'LRANGE' && (scalar(@key_querytype)<2 || scalar(@key_querytype)>4)) {
+ print "Incorrect specification of LRANGE. Must include type and start and end range.\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ elsif ($key_querytype[1] ne 'MAX' && $key_querytype[1] ne 'MIN' &&
+ $key_querytype[1] ne 'AVG' && $key_querytype[1] ne 'SUM') {
+ print "Invalid LRANGE/ZRANGE type $key_querytype[1]. This must be either MAX or MIN or AVG or SUM\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ $query[$i]{'query_subtype'} = $key_querytype[1];
+ $query[$i]{'query_range_start'} = $key_querytype[2] if defined($key_querytype[2]);
+ $query[$i]{'query_range_end'} = $key_querytype[3] if defined($key_querytype[3]);
+ }
+ else {
+ print "Invalid key query $key_querytype[0]. Currently supported are GET, LLEN, SLEN, HLEN, ZLEN, HGET, HEXISTS, SEXISTS, LRANGE and ZRANGE.\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ # key to query and how to name it
+ if (scalar(@ar)==0) {
+ print "Invalid query specification. Missing query key name\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ my ($key_query,$key_name) = split(':', shift @ar);
+ $key_name = $key_query if !defined($key_name) || ! $key_name;
+ $nlib->verb("- variable $key_name will receive data from $key_query");
+ $query[$i]{'key_query'} = $key_query;
+ $query[$i]{'key_name'} = $key_name;
+ # parse thresholds and finish processing assigning values to arrays
+ my $th = $nlib->parse_thresholds_list(join(',',@ar));
+ if (exists($th->{'ABSENT'})) {
+ $nlib->verb("- ".$th->{'ABSENT'}." alert will be issued if $key_query is not present");
+ $query[$i]{'alert'} = $th->{'ABSENT'};
+ }
+ if (exists($th->{'WARN'})) {
+ $nlib->verb("- warning threshold ".$th->{'WARN'}." set");
+ $query[$i]{'warn'} = $th->{'WARN'};
+ }
+ if (exists($th->{'CRIT'})) {
+ $nlib->verb("- critical threshold ".$th->{'CRIT'}." set");
+ $query[$i]{'crit'} = $th->{'CRIT'};
+ }
+ $nlib->add_thresholds($key_name,$th);
+ }
+}
+
+# sets password, host, port and other data based on options entered
+sub options_setaccess {
+ if (!defined($o_host)) { print "Please specify hostname (-H)\n"; print_usage(); exit $ERRORS{"UNKNOWN"}; }
+ if (defined($o_pwfile) && $o_pwfile) {
+ if ($o_password) {
+ print "use either -x or -C to enter credentials\n"; print_usage(); exit $ERRORS{"UNKNOWN"};
+ }
+ open my $file, '<', $o_pwfile or die $!;
+ while (<$file>) {
+ # Match first non-blank line that doesn't start with a comment
+ if (!($_ =~ /^\s*#/) && $_ =~ /\S+/) {
+ chomp($PASSWORD = $_);
+ last;
+ }
+ }
+ close $file;
+ print 'Password file is empty' and exit $ERRORS{"UNKNOWN"} if !$PASSWORD;
+ }
+ if (defined($o_password) && $o_password) {
+ $PASSWORD = $o_password;
+ }
+ $HOSTNAME = $o_host if defined($o_host);
+ $PORT = $o_port if defined($o_port);
+ $TIMEOUT = $o_timeout if defined($o_timeout);
+ $DATABASE = $o_database if defined($o_database);
+}
+
+# parse command line options
+sub check_options {
+ my $opt;
+ my $nlib = shift;
+ my %Options = ();
+ Getopt::Long::Configure("bundling");
+ GetOptions(\%Options,
+ 'v:s' => \$o_verb, 'verbose:s' => \$o_verb, "debug:s" => \$o_verb,
+ 'h' => \$o_help, 'help' => \$o_help,
+ 'H:s' => \$o_host, 'hostname:s' => \$o_host,
+ 'p:i' => \$o_port, 'port:i' => \$o_port,
+ 'C:s' => \$o_pwfile, 'credentials:s' => \$o_pwfile,
+ 'x:s' => \$o_password, 'password:s' => \$o_password,
+ 'D:s' => \$o_database, 'database:s' => \$o_database,
+ 't:i' => \$o_timeout, 'timeout:i' => \$o_timeout,
+ 'V' => \$o_version, 'version' => \$o_version,
+ 'a:s' => \$o_variables, 'variables:s' => \$o_variables,
+ 'c:s' => \$o_crit, 'critical:s' => \$o_crit,
+ 'w:s' => \$o_warn, 'warn:s' => \$o_warn,
+ 'f:s' => \$o_perf, 'perfparse:s' => \$o_perf,
+ 'A:s' => \$o_perfvars, 'perfvars:s' => \$o_perfvars,
+ 'T:s' => \$o_timecheck, 'response_time:s' => \$o_timecheck,
+ 'R:s' => \$o_hitrate, 'hitrate:s' => \$o_hitrate,
+ 'r:s' => \$o_repdelay, 'replication_delay:s' => \$o_repdelay,
+ 'P:s' => \$o_prevperf, 'prev_perfdata:s' => \$o_prevperf,
+ 'E:s' => \$o_prevtime, 'prev_checktime:s'=> \$o_prevtime,
+ 'm:s' => \$o_memutilization, 'memory_utilization:s' => \$o_memutilization,
+ 'M:s' => \$o_totalmemory, 'total_memory:s' => \$o_totalmemory,
+ 'q=s' => \@o_querykey, 'query=s' => \@o_querykey,
+ 'o=s' => \@o_check, 'check|option=s' => \@o_check,
+ 'rate_label:s' => \$o_ratelabel,
+ map { ($_) } $nlib->additional_options_list()
+ );
+
+ ($o_rprefix,$o_rsuffix)=split(/,/,$o_ratelabel) if defined($o_ratelabel) && $o_ratelabel ne '';
+
+ # Standard nagios plugin required options
+ if (defined($o_help)) { help($nlib); exit $ERRORS{"UNKNOWN"} };
+ if (defined($o_version)) { p_version(); exit $ERRORS{"UNKNOWN"} };
+
+ # now start options processing in the library
+ $nlib->options_startprocessing(\%Options, $o_verb, $o_variables, $o_warn, $o_crit, $o_perf, $o_perfvars, $o_rprefix, $o_rsuffix);
+
+ # additional variables/options calculated and added by this plugin
+ if (defined($o_timecheck) && $o_timecheck ne '') {
+ $nlib->verb("Processing timecheck thresholds: $o_timecheck");
+ $nlib->add_thresholds('response_time',$o_timecheck);
+ }
+ if (defined($o_hitrate) && $o_hitrate ne '') {
+ $nlib->verb("Processing hitrate thresholds: $o_hitrate");
+ $nlib->add_thresholds('hitrate',$o_hitrate);
+ $nlib->set_threshold('hitrate','ZERO','OK') if !defined($nlib->get_threshold('hitrate','ZERO')); # except case of hitrate=0, don't remember why I added it
+ }
+ if (defined($o_memutilization) && $o_memutilization ne '') {
+ $nlib->verb("Processing memory utilization thresholds: $o_memutilization");
+ $nlib->add_thresholds('memory_utilization',$o_memutilization);
+ }
+ if (defined($o_totalmemory)) {
+ if ($o_totalmemory =~ /^(\d+)B/) {
+ $o_totalmemory = $1;
+ }
+ elsif ($o_totalmemory =~ /^(\d+)K/) {
+ $o_totalmemory = $1*1024;
+ }
+ elsif ($o_totalmemory =~ /^(\d+)M/) {
+ $o_totalmemory = $1*1024*1024;
+ }
+ elsif ($o_totalmemory =~ /^(\d+)G/) {
+ $o_totalmemory = $1*1024*1024*1024;
+ }
+ elsif ($o_totalmemory !~ /^(\d+)$/) {
+ print "Total memory value $o_totalmemory can not be interpreted\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ if (defined($o_repdelay) && $o_repdelay ne '') {
+ $nlib->verb("Processing replication delay thresholds: $o_repdelay");
+ $nlib->add_thresholds('replication_delay',$o_repdelay);
+ }
+
+ # general check option, allows to specify everything, can be repeated more than once
+ foreach $opt (@o_check) {
+ $nlib->verb("Processing general check option: ".$opt);
+ $nlib->add_thresholds(undef,$opt);
+ }
+
+ # query option processing
+ option_query($nlib);
+
+ # finish it up
+ $nlib->options_finishprocessing();
+ options_setaccess();
+}
+
+# Get the alarm signal (just in case nagios screws up)
+$SIG{'ALRM'} = sub {
+ $redis->quit if defined($redis);
+ print ("ERROR: Alarm signal (Nagios time-out)\n");
+ exit $ERRORS{"UNKNOWN"};
+};
+
+########## MAIN #######
+
+my $nlib = Naglio->lib_init('plugin_name' => 'check_redis.pl',
+ 'plugins_authors' => 'William Leibzon',
+ 'plugin_description' => 'Redis Monitoring Plugin for Nagios',
+ 'usage_function' => \&print_usage,
+ 'enable_long_options' => 1,
+ 'enable_rate_of_change' => 1);
+$nlib->set_knownvars(\%KNOWN_STATUS_VARS, $PERF_OK_STATUS_REGEX);
+
+check_options($nlib);
+$nlib->verb("check_redis.pl plugin version ".$Version);
+
+# Check global timeout if plugin screws up
+if (defined($TIMEOUT)) {
+ $nlib->verb("Alarm at $TIMEOUT");
+ alarm($TIMEOUT);
+}
+else {
+ $nlib->verb("no timeout defined : $o_timeout + 10");
+ alarm ($o_timeout+10);
+}
+
+# some more variables for processing of the results
+my $dbversion = "";
+my $vnam;
+my $vval;
+my %dbs=(); # database-specific info, this is almost unused right now
+my %slaves=();
+my $avar;
+
+# connect using tcp and verify the port is working
+my $sock = new IO::Socket::INET(
+ PeerAddr => $HOSTNAME,
+ PeerPort => $PORT,
+ Proto => 'tcp',
+);
+if (!$sock) {
+ print "CRITICAL ERROR - Can not connect to '$HOSTNAME' on port $PORT\n";
+ exit $ERRORS{'CRITICAL'};
+}
+close($sock);
+
+# now do connection using Redis library
+my $start_time;
+my $dsn = $HOSTNAME.":".$PORT;
+$nlib->verb("connecting to $dsn");
+$start_time = [ Time::HiRes::gettimeofday() ] if defined($o_timecheck);
+
+$redis = Redis-> new ( server => $dsn, 'debug' => (defined($o_verb))?1:0 );
+
+if ($PASSWORD) {
+ $redis->auth($PASSWORD);
+}
+if ($DATABASE) {
+ $redis->select($DATABASE);
+}
+
+if (!$redis) {
+ print "CRITICAL ERROR - Redis Library - can not connect to '$HOSTNAME' on port $PORT\n";
+ exit $ERRORS{'CRITICAL'};
+}
+
+if (!$redis->ping) {
+ print "CRITICAL ERROR - Redis Library - can not ping '$HOSTNAME' on port $PORT\n";
+ exit $ERRORS{'CRITICAL'};
+}
+
+# This returns hashref of various statistics/info data
+my $stats = $redis->info();
+
+# Check specified key if option -q was used
+for (my $i=0; $i<scalar(@query);$i++) {
+ my $result=undef;
+ if ($query[$i]{'query_type'} eq 'GET') {
+ $nlib->verb("Getting redis key: ".$query[$i]{'key_query'});
+ $result = $redis->get($query[$i]{'key_query'});
+ }
+ elsif ($query[$i]{'query_type'} eq 'LLEN') {
+ $nlib->verb("Getting number of items for list with redis key: ".$query[$i]{'key_query'});
+ $result = $redis->llen($query[$i]{'key_query'});
+ }
+ elsif ($query[$i]{'query_type'} eq 'HLEN') {
+ $nlib->verb("Getting number of items for hash with redis key: ".$query[$i]{'key_query'});
+ $result = $redis->hlen($query[$i]{'key_query'});
+ }
+ elsif ($query[$i]{'query_type'} eq 'SLEN') {
+ $nlib->verb("Getting number of items for set with redis key: ".$query[$i]{'key_query'});
+ $result = $redis->scard($query[$i]{'key_query'});
+ }
+ elsif ($query[$i]{'query_type'} eq 'ZLEN') {
+ $nlib->verb("Getting number of items for sorted set with redis key: ".$query[$i]{'key_query'});
+ $result = $redis->zcard($query[$i]{'key_query'});
+ }
+ elsif ($query[$i]{'query_type'} eq 'HGET') {
+ $nlib->verb("Getting hash member ".$query[$i]{'element_name'}." with redis key: ".$query[$i]{'key_query'});
+ $result = $redis->hget($query[$i]{'key_query'},$query[$i]{'element_name'});
+ }
+ elsif ($query[$i]{'query_type'} eq 'HEXISTS') {
+ $nlib->verb("Checking if there exists hash member ".$query[$i]{'element_name'}." with redis key: ".$query[$i]{'key_query'});
+ $result = $redis->hexists($query[$i]{'key_query'},$query[$i]{'element_name'});
+ }
+ elsif ($query[$i]{'query_type'} eq 'SEXISTS') {
+ $nlib->verb("Checking if there exists set member ".$query[$i]{'element_name'}." with redis key: ".$query[$i]{'key_query'});
+ $result = $redis->sismember($query[$i]{'key_query'},$query[$i]{'element_name'});
+ }
+ elsif ($query[$i]{'query_type'} eq 'LRANGE' || $query[$i]{'query_type'} eq 'ZRANGE') {
+ my $range_start;
+ my $range_end;
+ if (defined($query[$i]{'query_range_start'}) && $query[$i]{'query_range_start'} ne '') {
+ $range_start=$query[$i]{'query_range_start'};
+ }
+ else {
+ $range_start=0;
+ }
+ if (defined($query[$i]{'query_range_end'}) && $query[$i]{'query_range_end'} ne '') {
+ $range_end= $query[$i]{'query_range_end'};
+ }
+ elsif ($query[$i]{'query_type'} eq 'LRANGE') {
+ $nlib->verb("Getting (lrange) redis key: ".$query[$i]{'key_query'});
+ $range_end = $redis->llen($query[$i]{'key_query'})-1;
+ }
+ else {
+ print "ERROR - can not do ZRANGE if you do not specify mix and max score.";
+ exit $ERRORS{"UNKNOWN"};
+ }
+ my @list;
+ if ($query[$i]{'query_type'} eq 'LRANGE') {
+ @list = $redis->lrange($query[$i]{'key_query'}, $range_start, $range_end);
+ }
+ else {
+ @list = $redis->zrange($query[$i]{'key_query'}, $range_start, $range_end);
+ }
+ if (scalar(@list)>0) {
+ $result=shift @list;
+ foreach(@list) {
+ $result+=$_ if $query[$i]{'query_subtype'} eq 'SUM' || $query[$i]{'query_subtype'} eq 'AVG';
+ $result=$_ if ($query[$i]{'query_subtype'} eq 'MIN' && $_ < $result) ||
+ ($query[$i]{'query_subtype'} eq 'MAX' && $_ > $result);
+ }
+ $result = $result / (scalar(@list)+1) if $query[$i]{'query_subtype'} eq 'AVG';
+ }
+ }
+ if (defined($result)) {
+ $query[$i]{'result'} = $result;
+ $nlib->add_data($query[$i]{'key_name'}, $result);
+ $nlib->verb("Result of querying ".$query[$i]{'key_query'}." is: $result");
+ }
+ else {
+ $nlib->verb("could not get results for ".$query[$i]{'key_query'});
+ }
+ # else {
+ # if (exists($query[$i]{'alert'}) && $query[$i]{'alert'} ne 'OK') {
+ # $statuscode=$query[$i]{'alert'} if $statuscode ne 'CRITICAL';
+ # $statusinfo.=", " if $statusinfo;
+ # $statusinfo.= "Query on ".$query[$i]{'key_query'}." did not succeed";
+ # }
+ # }
+}
+
+# end redis session
+$redis->quit;
+
+# load stats data into internal hash array
+my $total_keys=0;
+my $total_expires=0;
+foreach $vnam (keys %{$stats}) {
+ $vval = $stats->{$vnam};
+ if (defined($vval)) {
+ $nlib->verb("Stats Line: $vnam = $vval");
+ if (exists($KNOWN_STATUS_VARS{$vnam}) && $KNOWN_STATUS_VARS{$vnam}[1] eq 'VERSION') {
+ $dbversion .= $vval;
+ }
+ elsif ($vnam =~ /^db\d+$/) {
+ $dbs{$vnam}= {'name'=>$vnam};
+ foreach (split(/,/,$vval)) {
+ my ($k,$d) = split(/=/,$_);
+ $nlib->add_data($vnam.'_'.$k,$d);
+ $dbs{$vnam}{$k}=$d;
+ $nlib->verb(" - stats data added: ".$vnam.'_'.$k.' = '.$d);
+ $total_keys+=$d if $k eq 'keys' && Naglio::isnum($d);
+ $total_expires+=$d if $k eq 'expires' && Naglio::isnum($d);
+ }
+ }
+ elsif ($vnam =~ /~slave/) {
+ # TODO TODO TODO TODO
+ }
+ else {
+ $nlib->add_data($vnam, $vval);
+ }
+ }
+ else {
+ $nlib->verb("Stats Data: $vnam = NULL");
+ }
+}
+$nlib->verb("Calculated Data: total_keys=".$total_keys);
+$nlib->verb("Calculated Data: total_expires=".$total_expires);
+$nlib->add_data('total_keys',$total_keys);
+$nlib->add_data('total_expires',$total_expires);
+
+# Response Time
+if (defined($o_timecheck)) {
+ $nlib->add_data('response_time',Time::HiRes::tv_interval($start_time));
+ $nlib->addto_statusdata_output('response_time',sprintf("response in %.3fs",$nlib->vardata('response_time')));
+ if (defined($o_perf)) {
+ $nlib->set_perfdata('response_time','response_time='.$nlib->vardata('response_time'),'s');
+ }
+}
+
+# calculate rate variables
+$nlib->calculate_ratevars();
+
+# Hitrate
+my $hitrate=0;
+my $hits_total=0;
+my $hits_hits=undef;
+my $hitrate_all=0;
+if (defined($o_hitrate) && defined($nlib->vardata('keyspace_hits')) && defined($nlib->vardata('keyspace_misses'))) {
+ for $avar ('keyspace_hits', 'keyspace_misses') {
+ if (defined($o_prevperf) && defined($o_perf)) {
+ $nlib->set_perfdata($avar,$avar."=".$nlib->vardata($avar),'c');
+ }
+ $hits_hits = $nlib->vardata('keyspace_hits') if $avar eq 'keyspace_hits';
+ $hits_total += $nlib->vardata($avar);
+ }
+ $nlib->verb("Calculating Hitrate : total=".$hits_total." hits=".$hits_hits);
+ if (defined($hits_hits) && defined($nlib->prev_perf('keyspace_hits')) && defined($nlib->prev_perf('keyspace_misses')) && $hits_hits > $nlib->prev_perf('keyspace_hits')) {
+ $hitrate_all = $hits_hits/$hits_total*100 if $hits_total!=0;
+ $hits_hits -= $nlib->prev_perf('keyspace_hits');
+ $hits_total -= $nlib->prev_perf('keyspace_misses');
+ $hits_total -= $nlib->prev_perf('keyspace_hits');
+ verb("Calculating Hitrate. Adjusted based on previous values. total=".$hits_total." hits=".$hits_hits);
+ }
+ if (defined($hits_hits)) {
+ if ($hits_total!=0) {
+ $hitrate= sprintf("%.4f", $hits_hits/$hits_total*100);
+ }
+ $nlib->add_data('hitrate',$hitrate);
+ my $sdata .= sprintf(" hitrate is %.2f%%", $hitrate);
+ $sdata .= sprintf(" (%.2f%% from launch)", $hitrate_all) if ($hitrate_all!=0);
+ $nlib->addto_statusdata_output('hitrate',$sdata);
+ if (defined($o_perf)) {
+ $nlib->set_perfdata('hitrate',"hitrate=$hitrate",'%');
+ }
+ }
+}
+
+# Replication Delay
+my $repl_delay=0;
+if (defined($o_repdelay) && defined($nlib->vardata('master_last_io_seconds_ago')) && defined($nlib->vardata('role'))) {
+ if ($nlib->vardata('role') eq 'slave') {
+ $repl_delay = $nlib->vardata('master_link_down_since_seconds');
+ if (!defined($repl_delay) || $repl_delay < $nlib->vardata('master_last_io_seconds_ago')) {
+ $repl_delay = $nlib->vardata('master_last_io_seconds_ago','s');
+ }
+ if (defined($repl_delay) && $repl_delay>=0) {
+ $nlib->add_data('replication_delay',$repl_delay);
+ $nlib->addto_statusdata_output('replication_delay',sprintf("replication_delay is %d", $nlib->vardata('replication_delay')));
+ if (defined($o_perf)) {
+ $nlib->set_perfdata('replication_delay',sprintf("replication_delay=%d", $nlib->vardata('replication_delay')));
+ }
+ }
+ }
+}
+
+# Memory Use Utilization
+if (defined($o_memutilization) && defined($nlib->vardata('used_memory_rss'))) {
+ if (defined($o_totalmemory)) {
+ $nlib->add_data('memory_utilization',$nlib->vardata('used_memory_rss')/$o_totalmemory*100);
+ $nlib->verb('memory utilization % : '.$nlib->vardata('memory_utilization').' = '.$nlib->vardata('used_memory_rss').' (used_memory_rss) / '.$o_totalmemory.' * 100');
+ }
+ elsif ($o_memutilization ne '') {
+ print "ERROR: Can not calculate memory utilization if you do not specify total memory on a system (-M option)\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ if (defined($o_perf) && defined($nlib->vardata('memory_utilization'))) {
+ $nlib->set_perfdata('memory_utilization',sprintf(" memory_utilization=%.4f", $nlib->vardata('memory_utilization')),'%');
+ }
+ if (defined($nlib->vardata('used_memory_human')) && defined($nlib->vardata('used_memory_peak_human'))) {
+ my $sdata="memory use is ".$nlib->vardata('used_memory_human')." (";
+ $sdata.='peak '.$nlib->vardata('used_memory_peak_human');
+ if (defined($nlib->vardata('memory_utilization'))) {
+ $sdata.= sprintf(", %.2f%% of max", $nlib->vardata('memory_utilization'));
+ }
+ if (defined($nlib->vardata('mem_fragmentation_ratio'))) {
+ $sdata.=", fragmentation ".$nlib->vardata('mem_fragmentation_ratio').'%';
+ }
+ $sdata.=")";
+ $nlib->addto_statusdata_output('memory_utilization',$sdata);
+ }
+}
+
+# Check thresholds in all variables and prepare status and performance data for output
+$nlib->main_checkvars();
+$nlib->main_perfvars();
+
+# now output the results
+print $nlib->statuscode() . ': '.$nlib->statusinfo();
+print " - " if $nlib->statusinfo();
+print "REDIS " . $dbversion . ' on ' . $HOSTNAME. ':'. $PORT;
+print ' has '.scalar(keys %dbs).' databases ('.join(',',keys(%dbs)).')';
+print " with $total_keys keys" if $total_keys > 0;
+print ', up '.$nlib->uptime_info($nlib->vardata('uptime_in_seconds')) if defined($nlib->vardata('uptime_in_seconds'));
+print " - " . $nlib->statusdata() if $nlib->statusdata();
+print $nlib->perfdata();
+print "\n";
+
+# end exit
+exit $ERRORS{$nlib->statuscode()};
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/control
new file mode 100644
index 0000000..b10da66
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/control
@@ -0,0 +1,13 @@
+Homepage: https://github.com/willixix/WL-NagiosPlugins
+Watch: https://raw.githubusercontent.com/willixix/WL-NagiosPlugins/master/check_redis.pl Version[ :]+([0-9.]+)
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: Redis Server check plugin
+ This plugin checks Redis NoSQL database status variables,
+ measures its response time and if specified allows one to set thresholds
+ on one or more key data. You can set thresholds for data in stats
+ variables and some of them are also conveniently available as long options
+ with special threshold syntax. Plugin also calculates statistics such as
+ Hitrate (calculated as rate of change of hits/misses) and memory use and
+ can check replication delay.
+Recommends: libredis-perl
+Version: 0.73
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/copyright
new file mode 100644
index 0000000..f3ab5da
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/copyright
@@ -0,0 +1,17 @@
+Author : William Leibzon - william@leibzon.org
+Licence : GPL - summary below, full text at http://www.fsf.org/licenses/gpl.txt
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+MA 02110-1301 USA.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/redis.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/redis.cfg
new file mode 100644
index 0000000..3e0be11
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_redis/redis.cfg
@@ -0,0 +1,5 @@
+# 'check_redis' command definition
+define command{
+ command_name check_redis
+ command_line /usr/lib/nagios/plugins/check_redis -H $HOSTADDRESS$ $ARG1$
+ }
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/Makefile
new file mode 100644
index 0000000..ecdd3cb
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/Makefile
@@ -0,0 +1,11 @@
+PLUGIN := check_smstools
+CLEANFILES := check_smstools
+DOCFILES := README.check_smstools
+
+
+include ../common.mk
+
+check_smstools: bin/check_smstools
+ cp $< $@
+ chmod 755 $@
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/README.check_smstools b/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/README.check_smstools
new file mode 100644
index 0000000..893806e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/README.check_smstools
@@ -0,0 +1,45 @@
+check_smstools
+--------------
+
+Depends:
+--------
+- Nagios::Plugin
+- smstools3
+
+Usage:
+------
+The plugin can be used to monitor a gsm modem used together with smstools.
+For this to work it relies on a smstools feature which should be available
+since version 3.1 called regular_run_cmd.
+
+So the following change is needed in the modem section of
+the modem that is to be monitored:
+
+regular_run_cmd = AT+CSQ
+regular_run_cmd = AT+CREG?
+regular_run_cmd = AT+COPS?
+regular_run_interval = 60
+regular_run_statfile = /var/log/smstools/smsd_stats/modem_status
+
+The interval and the file can of course be adjusted. However the file given
+above is the default file used by the plugin. If it is changed then the plugin
+needs to be called with --stat-file <filename>. The commands however are
+required, except for the AT+COPS? command. This is only for operator detection
+and can be disabled, if one isn't interested what operator the modem is
+registered to.
+
+Known Bugs:
+-----------
+Currently the script does not work with the embedded perl interpreter for unknown reasons.
+Therefore it contains a
+
+# nagios: -epn
+
+header, which causes nagios to not use the embedded perl interpreter for it.
+
+License:
+-------
+This plugin is licensed under the terms of the GPL v2 or later. See COPYING for details.
+Author:
+------
+Patrick Schoenfeld <schoenfeld@debian.org>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/bin/check_smstools b/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/bin/check_smstools
new file mode 100755
index 0000000..a7a0336
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/bin/check_smstools
@@ -0,0 +1,241 @@
+#!/usr/bin/perl
+
+#
+# Retrieves the status of an SMS Modem via smstools3.
+#
+
+# Author: Patrick Schoenfeld <schoenfeld@debian.org>
+# This file is licensed under the terms of the GPL v2 or later.
+# See the file COPYING for details.
+
+# Currently this plugin does not work with nagios embedded perl
+# nagios: -epn
+
+use strict;
+use warnings;
+use Nagios::Plugin;
+use POSIX;
+
+# Define regular expressions used to find the correct lines from
+# the status file
+my $signal_command = 'AT\+CSQ';
+my $registration_status_command = 'AT\+CREG\?';
+my $operator_command = 'AT\+COPS\?';
+
+# Define a regular expression that is used to check against
+# the answer of the modem to the AT+CREG? command in order
+# to determine registration status of the modem
+my $registration_status_expect = '.,1';
+
+# Define the default path of the status file
+my $status_file = '/var/log/smstools/smsd_stats/modem_status';
+
+# Default Threshoulds
+my $warning_lvl = 12; # WARNING, if signal level < threshould
+my $critical_lvl = 10; # CRITICAL, if signal level < threshould
+my $maxage = 60; # CRIRTICAL, if status file is more then x seconds old
+
+# Status variables
+my $siglvl;
+my $sigdbm;
+my $operator;
+my $expected_operator;
+my $registration_status;
+my $timestamp;
+my $np;
+
+sub init_plugin {
+ $np = Nagios::Plugin->new(usage => "usage: %s");
+
+ $np->add_arg(
+ spec => 'warning|w=f',
+ help => 'the signal level (as a positive float between 0..32) at which' .
+ 'to emit a WARNING state if the signal level is below this value'
+ );
+
+ $np->add_arg(
+ spec => 'critical|c=f',
+ help => 'the signal level (as a positive float between 0..32) at which to ' .
+ 'emit a CRITICAL state if the signal level is below this value'
+ );
+
+ $np->add_arg(
+ spec => 'max-age=i',
+ help => 'specify the maximum tolerated age of the status file in seconds'
+ );
+
+ $np->add_arg(
+ spec => 'status-file=s',
+ help => 'specifies the file which is checked for the status information'
+ );
+
+ $np->add_arg(
+ spec => 'expected-operator=s',
+ help => 'Specifies an operator that is expected. If the registered operator ' .
+ 'is not the same as specified here, the plugin will exit with a ' .
+ 'CRITICAL state'
+ );
+
+ $np->add_arg(
+ spec => 'debug|d',
+ help => 'Enable debug mode'
+ );
+
+ $np->getopts;
+
+ if ($np->opts->warning) {
+ $warning_lvl = $np->opts->warning;
+ }
+
+ if ($np->opts->critical) {
+ $critical_lvl = $np->opts->critical;
+ }
+
+ if ($np->opts->get('status-file')) {
+ $status_file = $np->opts->get('status-file');
+ }
+
+ if ($np->opts->get('max-age')) {
+ $maxage = $np->opts->get('max-age');
+ }
+
+ if ($np->opts->get('expected-operator')) {
+ $expected_operator = $np->opts->get('expected-operator');
+ }
+ if ($critical_lvl > $warning_lvl) {
+ $np->nagios_die("Critical level ($critical_lvl) is higher then the warning level ($warning_lvl)");
+ }
+
+ # Test if status_file is readable
+ unless (-r $status_file)
+ {
+ $np->nagios_die("Unable to read modem status file");
+ }
+}
+
+sub parse_logline {
+ my $line = shift;
+ my %result;
+
+ # Use the line without the timestamp
+ $line = substr($line, 22);
+ $line =~ s/://g;
+
+ # Split line into an array
+ my @line = split(/\s/, $line);
+
+ # Modem
+ chomp $line[1];
+ $result{'modem'} = $line[1];
+
+ # Command
+ $result{'cmd'} = $line[3];
+
+ # Answer
+ $result{'answer'} = $line[5];
+
+ return %result;
+}
+
+sub process_statusfile {
+ open(STATUS_FILE, "< $status_file") or $np->nagios_die("Unable to open modem status file");
+
+ # Check status file freshness
+ my $fileage = (stat(STATUS_FILE))[9];
+ my $fileage_difference = time() - $fileage;
+
+ if ($fileage_difference > $maxage) {
+ $np->nagios_exit(CRITICAL, "Status file has not changed since $maxage seconds\n");
+ }
+
+ while(<STATUS_FILE>) {
+ my %result = parse_logline($_);
+
+ unless ($registration_status) {
+ if ($result{'cmd'} =~ /$registration_status_command/) {
+ $registration_status = $result{'answer'};
+ }
+ }
+
+ unless ($siglvl) {
+ if ($result{'cmd'} =~ /$signal_command/) {
+ $siglvl = $result{'answer'};
+ $siglvl =~ s/,/./g;
+ $sigdbm = (2*$siglvl) - 113;
+ }
+ }
+
+ unless ($operator) {
+ if ($result{'cmd'} =~ /$operator_command/) {
+ $operator = $result{'answer'};
+ $operator =~ s/0,0,"//g;
+ }
+ }
+ # No need to parse the rest of the file, if signal
+ # and registration status are known
+ if ($siglvl and $registration_status and $operator) {
+ last;
+ }
+ }
+
+ close(STATUS_FILE);
+}
+
+sub check_registration {
+ unless ($registration_status) {
+ $np->nagios_die("Unable to determine modem registration status.");
+ }
+
+ unless ($registration_status =~ /$registration_status_expect/) {
+ $np->nagios_exit(CRITICAL, "Modem is not registered to a GSM network.");
+ }
+}
+
+sub check_signal {
+ unless ($siglvl) {
+ $np->nagios_die("Unable to determine the modem signal strength.");
+ }
+
+ if (($siglvl < 0) or ($siglvl > 31)) {
+ $np->nagios_die("Unable to determine the modem signal strength.");
+ }
+
+ # Add performance data information
+ $np->add_perfdata(
+ label => 'level',
+ value => $siglvl
+ );
+
+ $np->add_perfdata(
+ label => 'dBm',
+ value => $sigdbm
+ );
+
+ if ($siglvl <= $critical_lvl) {
+ $np->nagios_exit(CRITICAL, "Modem is registered ($operator), but signal quality ($siglvl) is below threshould.");
+ }
+
+ if ($siglvl <= $warning_lvl) {
+ $np->nagios_exit(WARNING, "Modem is registered ($operator), but signal quality ($siglvl) is below threshould.");
+ }
+
+ # If we get here we can exit with OK
+ $np->nagios_exit(OK, "Modem is registered ($operator). Signal quality is $siglvl / $sigdbm dBm.");
+}
+
+sub check_operator {
+ unless ($operator) {
+ $operator = "Unknown Operator";
+ }
+
+ if ($expected_operator) {
+ if ($operator ne $expected_operator) {
+ $np->nagios_exit(CRITICAL, "Modem is registered to $operator while $expected_operator is expected.");
+ }
+ }
+}
+init_plugin;
+process_statusfile;
+check_registration;
+check_operator;
+check_signal;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/control
new file mode 100644
index 0000000..255eb1b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/control
@@ -0,0 +1,7 @@
+Homepage: http://exchange.nagios.org/directory/Plugins/Hardware/Mobile-Devices/check_smstools/details
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to check GSM Modems using smstools
+ check_smstools is a plugin to monitor a GSM modem
+ signal quality and registration status with smstools.
+Recommends: libmonitoring-plugin-perl | libnagios-plugin-perl
+Suggests: smstools (>= 3~)
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/copyright
new file mode 100644
index 0000000..c947edf
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_smstools/copyright
@@ -0,0 +1,2 @@
+Author: Patrick Schoenfeld <schoenfeld@debian.org>
+This file is licensed under the terms of the GPL v2 or later.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/Makefile
new file mode 100644
index 0000000..6e6037d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/Makefile
@@ -0,0 +1,9 @@
+PLUGIN := check_snmp_environment
+CLEANFILES := check_snmp_environment
+
+include ../common.mk
+
+check_snmp_environment: check_snmp_environment.pl
+ cp $< $@
+ chmod 755 $@
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/check_snmp_environment.pl b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/check_snmp_environment.pl
new file mode 100644
index 0000000..2be3fc0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/check_snmp_environment.pl
@@ -0,0 +1,2744 @@
+#!/usr/bin/perl
+# ============================================================================
+# ============================== INFO ========================================
+# ============================================================================
+# Version : 0.7
+# Date : February 21 2011
+# Author : Michiel Timmers ( michiel.timmers AT gmx.net)
+# Based on : "check_snmp_env" plugin (version 1.3) from Patrick Proy
+# Licence : GPL - summary below
+#
+# ============================================================================
+# ============================== SUMMARY =====================================
+# ============================================================================
+# This plugin is an enhancement on the "check_snmp_env" plugin (version 1.3)
+# from Patrick Proy. The basic function of this script is to check various
+# hardware based information, like power supply's, fans, cards, modules etc.
+# Although some of the checks in this plugin are also in the "check_snmp_env"
+# I strongly suggest using this version as some of the checks in
+# "check_snmp_env" aren't efficient or don't give alarms.
+#
+# The default SNMP version has been changed from SNMPv1 to SNMPv2c because
+# of the use of SNMP Bulk option which is more efficient. SNMPv3 also
+# uses SNMP Bulk.
+#
+# This scrip supports IPv6. You can use the "-6" switch for this.
+#
+# ============================================================================
+# ============================== SUPPORTED CHECKS ============================
+# ============================================================================
+# The following check are supported:
+#
+# NOTE(!!): There are several Cisco checks, on many Cisco devices multiple
+# Cisco checks will functions.
+#
+# cisco __________: Cisco Systems : Fan, power-supply, voltage, temperature
+# ciscoSW ________: Cisco Systems : Card and module status check
+# ciscoNEW _______: Cisco Systems : Sensor check for devices that have
+# the CISCO-ENTITY-SENSOR-MIB
+# nokia __________: Nokia IP : Fan, power-supply
+# bc _____________: Blue Coat Systems : Fan, power-supply, voltage, disk
+# iron ___________: IronPort : Fan, power-supply, temperature
+# foundry ________: Foundry Network : power supply, temperature
+# linux __________: lm-sensors : Fan, voltage, temperature, misc
+# extremeSW ______: Extreme Networks : Slot, power-supply, fan, temperature
+# juniper ________: Juniper Networks : Component status check
+# procurve _______: HP ProCurve : Fan, power-supply, temperature
+# netscreen ______: NetScreen : Slot, fan, power-supply
+# citrix _________: Citrix NetScaler : Fan, , voltage, temperture,
+# HA state, SSL engine
+# transmode ______: Transmode Systems : Check alarm table that is
+# not deactivated and not acknowledged
+#
+# Check the http://exchange.nagios.org website for new versions.
+# For comments, questions, problems and patches send me an
+# e-mail (michiel.timmmers AT gmx.net).
+#
+# ============================================================================
+# ============================== TODO ========================================
+# ============================================================================
+# - cisco / ciscoSW and ciscoNEW needs to be checked regarding OID's
+# - Make use of "set_status" subroutine for all checks
+# - "linux" check does nothing (need all possible values of lm-sensors
+# to implement). Perhaps IPMI support, currently lacks general MIB
+# - "cisco","nokia","ironport","foundry","linux" needs clean up, need
+# snmpwalks for this
+# - Make more use of verbose output
+# - utils.pm will become deprecated. Replacement with Nagios::Plugin?
+# What are the effects of switching to Nagios::Plugin?
+#
+# ============================================================================
+# ============================== VERSIONS ====================================
+# ============================================================================
+# version 0.2 : - juniper: Ignores a "Unknown" PCMCIA card
+# - Juniper: Standby(7) wasn't defined correctly
+# - juniper: Instance id's longer than 7 characters were failing
+# version 0.3 : - ciscoSW: Corrected the modules OID for Cisco
+# - ciscoSW: Standby cards don't generate critical status anymore
+# version 0.4 : - extreme: Added support for devices from Extreme Networks
+# version 0.5 : - juniper: J series routers now supported
+# version 0.6 : - general: Added support for IPv6 communication
+# version 0.7 : - ciscoNEW: Support for Cisco with CISCO-ENTITY-SENSOR-MIB
+# - procurve: Support for HP ProCurve
+# - netscreen: Support for Netscreen
+# - citrix: Support for Citrix Netscaler
+# - transmode: Support for Transmode
+# - extreme: Added checks for power-supply, fans and temperature
+# - juniper:
+# - bc: Blue Coat check wasn't working properly
+# - general: Default SNMP version is now SNMPv2c
+# - general: Switch default SNMPv3 from md5/des to sha/aes
+# - general: Lots of small fixes
+#
+# ============================================================================
+# ============================== LICENCE =====================================
+# ============================================================================
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>
+#
+# ============================================================================
+# ============================== HELP ========================================
+# ============================================================================
+# Help : ./check_snmp_environment.pl --help
+#
+# ============================================================================
+
+use warnings;
+use strict;
+use Net::SNMP;
+use Getopt::Long;
+#use lib "/usr/local/nagios/libexec";
+#use utils qw(%ERRORS $TIMEOUT);
+
+
+# ============================================================================
+# ============================== NAGIOS VARIABLES ============================
+# ============================================================================
+
+my $TIMEOUT = 15; # This is the global script timeout, not the SNMP timeout
+my %ERRORS = ('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
+my @Nagios_state = ("UNKNOWN","OK","WARNING","CRITICAL"); # Nagios states coding
+
+
+# ============================================================================
+# ============================== OID VARIABLES ===============================
+# ============================================================================
+
+# System description
+my $sysdescr = "1.3.6.1.2.1.1.1.0"; # Global system description
+
+# CISCO-ENVMON-MIB
+my $ciscoEnvMonMIB = "1.3.6.1.4.1.9.9.13"; # Cisco env base table
+my %CiscoEnvMonState = (1,"normal",2,"warning",3,"critical",4,"shutdown",5,"notPresent",6,"notFunctioning"); # Cisco states
+my %CiscoEnvMonNagios = (1,1 ,2,2 ,3,3 ,4,3 ,5,0, 6,3); # Nagios states returned for CIsco states (coded see @Nagios_state).
+my $ciscoVoltageTable = $ciscoEnvMonMIB.".1.2.1"; # Cisco voltage table
+my $ciscoVoltageTableIndex = $ciscoVoltageTable.".1"; #Index table
+my $ciscoVoltageTableDesc = $ciscoVoltageTable.".2"; #Description
+my $ciscoVoltageTableValue = $ciscoVoltageTable.".3"; #Value
+my $ciscoVoltageTableState = $ciscoVoltageTable.".7"; #Status
+
+my $ciscoTempTable = $ciscoEnvMonMIB.".1.3.1"; # Cisco temprature table
+my $ciscoTempTableIndex = $ciscoTempTable.".1"; #Index table
+my $ciscoTempTableDesc = $ciscoTempTable.".2"; #Description
+my $ciscoTempTableValue = $ciscoTempTable.".3"; #Value
+my $ciscoTempTableState = $ciscoTempTable.".6"; #Status
+
+my $ciscoFanTable = $ciscoEnvMonMIB.".1.4.1"; # Cisco fan table
+my $ciscoFanTableIndex = $ciscoFanTable.".1"; #Index table
+my $ciscoFanTableDesc = $ciscoFanTable.".2"; #Description
+my $ciscoFanTableState = $ciscoFanTable.".3"; #Status
+
+my $ciscoPSTable = $ciscoEnvMonMIB.".1.5.1"; # Cisco power supply table
+my $ciscoPSTableIndex = $ciscoPSTable.".1"; #Index table
+my $ciscoPSTableDesc = $ciscoPSTable.".2"; #Description
+my $ciscoPSTableState = $ciscoPSTable.".3"; #Status
+
+# Nokia env mib
+my $nokia_temp_tbl = "1.3.6.1.4.1.94.1.21.1.1.5";
+my $nokia_temp = "1.3.6.1.4.1.94.1.21.1.1.5.0";
+my $nokia_fan_table = "1.3.6.1.4.1.94.1.21.1.2";
+my $nokia_fan_status = "1.3.6.1.4.1.94.1.21.1.2.1.1.2";
+my $nokia_ps_table = "1.3.6.1.4.1.94.1.21.1.3";
+my $nokia_ps_temp = "1.3.6.1.4.1.94.1.21.1.3.1.1.2";
+my $nokia_ps_status = "1.3.6.1.4.1.94.1.21.1.3.1.1.3";
+
+# Bluecoat env mib
+my @bc_SensorCode = ("","ok","unknown","not-installed","voltage-low-warning","voltage-low-critical",
+ "no-power","voltage-high-warning","voltage-high-critical","voltage-high-severe",
+ "temperature-high-warning","temperature-high-critical","temperature-high-severe",
+ "fan-slow-warning","fan-slow-critical","fan-stopped"); # BC element status returned by MIB
+my @bc_status_code = (3,0,3,3,1,2,2,1,2,2,1,2,2,1,2,2); # nagios status equivallent to BC status
+my @bc_SensorStatus = ("","ok","unavailable","nonoperational"); # ok(1),unavailable(2),nonoperational(3)
+my @bc_status_sensor = (3,0,1,2); # nagios status equivallent to BC status
+my @bc_mesure = ("","","","Enum","volts","celsius","rpm");
+my $bc_sensor_table = "1.3.6.1.4.1.3417.2.1.1.1.1.1"; # sensor table
+my $bc_sensor_Units = "1.3.6.1.4.1.3417.2.1.1.1.1.1.3"; # cf bc_mesure
+my $bc_sensor_Scale = "1.3.6.1.4.1.3417.2.1.1.1.1.1.4"; # * 10^value
+my $bc_sensor_Value = "1.3.6.1.4.1.3417.2.1.1.1.1.1.5"; # value
+my $bc_sensor_Code = "1.3.6.1.4.1.3417.2.1.1.1.1.1.6"; # bc_SensorCode
+my $bc_sensor_Status = "1.3.6.1.4.1.3417.2.1.1.1.1.1.7"; # bc_SensorStatus
+my $bc_sensor_Name = "1.3.6.1.4.1.3417.2.1.1.1.1.1.9"; # name
+my $bc_dsk_table = "1.3.6.1.4.1.3417.2.2.1.1.1.1"; # disk table
+my $bc_dsk_status = "1.3.6.1.4.1.3417.2.2.1.1.1.1.3"; # bc_DiskStatus - present(1), initializing(2), inserted(3), offline(4), removed(5), not-present(6), empty(7), bad(8), unknown(9
+my $bc_dsk_vendor = "1.3.6.1.4.1.3417.2.2.1.1.1.1.5"; # bc_DiskStatus
+my $bc_dsk_product = "1.3.6.1.4.1.3417.2.2.1.1.1.1.6"; # bc_DiskStatus
+my $bc_dsk_serial = "1.3.6.1.4.1.3417.2.2.1.1.1.1.8"; # bc_DiskStatus
+my @bc_DiskStatus = ("","present","initializing","inserted","offline","removed","not-present","empty","bad","unknown");
+my @bc_dsk_status_nagios = (3,0,1,1,1,1,0,0,2,3);
+
+# Iron Port env mib
+my $iron_ps_table = "1.3.6.1.4.1.15497.1.1.1.8"; # power-supply table
+my $iron_ps_status = "1.3.6.1.4.1.15497.1.1.1.8.1.2"; #powerSupplyNotInstalled(1), powerSupplyHealthy(2), powerSupplyNoAC(3), powerSupplyFaulty(4)
+my @iron_ps_status_name = ("","powerSupplyNotInstalled","powerSupplyHealthy","powerSupplyNoAC","powerSupplyFaulty");
+my @iron_ps_status_nagios = (3,3,0,2,2);
+my $iron_ps_ha = "1.3.6.1.4.1.15497.1.1.1.8.1.3"; # ps redundancy status- powerSupplyRedundancyOK(1), powerSupplyRedundancyLost(2)
+my @iron_ps_ha_name = ("","powerSupplyRedundancyOK","powerSupplyRedundancyLost");
+my @iron_ps_ha_nagios = (3,0,1);
+my $iron_ps_name = "1.3.6.1.4.1.15497.1.1.1.8.1.4"; # ps name
+my $iron_tmp_table = "1.3.6.1.4.1.15497.1.1.1.9"; # temp table
+my $iron_tmp_celcius = "1.3.6.1.4.1.15497.1.1.1.9.1.2"; # temp in celcius
+my $iron_tmp_name = "1.3.6.1.4.1.15497.1.1.1.9.1.3"; # name
+my $iron_fan_table = "1.3.6.1.4.1.15497.1.1.1.10"; # fan table
+my $iron_fan_rpm = "1.3.6.1.4.1.15497.1.1.1.10.1.2"; # fan speed in RPM
+my $iron_fan_name = "1.3.6.1.4.1.15497.1.1.1.10.1.3"; # fan name
+
+# Foundry BigIron Router Switch (FOUNDRY-SN-AGENT-MIB)
+my $foundry_temp = "1.3.6.1.4.1.1991.1.1.1.1.18.0"; # Chassis temperature in Deg C *2
+my $foundry_temp_warn = "1.3.6.1.4.1.1991.1.1.1.1.19.0"; # Chassis warn temperature in Deg C *2
+my $foundry_temp_crit = "1.3.6.1.4.1.1991.1.1.1.1.20.0"; # Chassis warn temperature in Deg C *2
+my $foundry_ps_table = "1.3.6.1.4.1.1991.1.1.1.2.1"; # PS table
+my $foundry_ps_desc = "1.3.6.1.4.1.1991.1.1.1.2.1.1.2"; # PS desc
+my $foundry_ps_status = "1.3.6.1.4.1.1991.1.1.1.2.1.1.3"; # PS status
+my $foundry_fan_table = "1.3.6.1.4.1.1991.1.1.1.3.1"; # FAN table
+my $foundry_fan_desc = "1.3.6.1.4.1.1991.1.1.1.3.1.1.2"; # FAN desc
+my $foundry_fan_status = "1.3.6.1.4.1.1991.1.1.1.3.1.1.3"; # FAN status
+my @foundry_status = (3,0,2); # oper status : 1:other, 2: Normal, 3: Failure
+
+# lm-sensors
+my $linux_env_table = "1.3.6.1.4.1.2021.13.16"; # Global env table
+my $linux_temp = "1.3.6.1.4.1.2021.13.16.2.1"; # temperature table
+my $linux_temp_descr = "1.3.6.1.4.1.2021.13.16.2.1.2"; # temperature entry description
+my $linux_temp_value = "1.3.6.1.4.1.2021.13.16.2.1.3"; # temperature entry value (mC)
+my $linux_fan = "1.3.6.1.4.1.2021.13.16.3.1"; # fan table
+my $linux_fan_descr = "1.3.6.1.4.1.2021.13.16.3.1.2"; # fan entry description
+my $linux_fan_value = "1.3.6.1.4.1.2021.13.16.3.1.3"; # fan entry value (RPM)
+my $linux_volt = "1.3.6.1.4.1.2021.13.16.4.1"; # voltage table
+my $linux_volt_descr = "1.3.6.1.4.1.2021.13.16.4.1.2"; # voltage entry description
+my $linux_volt_value = "1.3.6.1.4.1.2021.13.16.4.1.3"; # voltage entry value (mV)
+my $linux_misc = "1.3.6.1.4.1.2021.13.16.5.1"; # misc table
+my $linux_misc_descr = "1.3.6.1.4.1.2021.13.16.5.1.2"; # misc entry description
+my $linux_misc_value = "1.3.6.1.4.1.2021.13.16.5.1.3"; # misc entry value
+
+# Cisco switches (catalys & IOS)
+my $cisco_chassis_card_descr = "1.3.6.1.4.1.9.3.6.11.1.3"; # Chassis card description
+my $cisco_chassis_card_slot = "1.3.6.1.4.1.9.3.6.11.1.7"; # Chassis card slot number
+my $cisco_chassis_card_state = "1.3.6.1.4.1.9.3.6.11.1.9"; # operating status of card - 1 : Not specified, 2 : Up, 3: Down, 4 : standby
+my @cisco_chassis_card_status_text = ("Unknown","Not specified","Up","Down","Standby");
+my @cisco_chassis_card_status = (2,2,0,2,0);
+my $cisco_module_descr = "1.3.6.1.2.1.47.1.1.1.1.13"; # Chassis card description
+my $cisco_module_slot = "1.3.6.1.4.1.9.5.1.3.1.1.25"; # Chassis card slot number
+my $cisco_module_state = "1.3.6.1.4.1.9.9.117.1.2.1.1.2"; # operating status of card - 1:unknown, 2:ok, 3:disabled, 4:okButDiagFailed, 5:boot, 6:selfTest, 7:failed, 8:missing, 9:mismatchWithParent,
+ # 10:mismatchConfig, 11:diagFailed, 12:dormant, 13:outOfServiceAdmin, 14:outOfServiceEnvTemp, 15:poweredDown, 16:poweredUp,
+ # 17:powerDenied, 18:powerCycled, 19:okButPowerOverWarning, 20:okButPowerOverCritical, 21:syncInProgress
+my @cisco_module_status_text =("Unknown", "unknown", "OK", "Disabled", "OkButDiagFailed", "Boot",
+ "SelfTest", "Failed", "Missing", "MismatchWithParent", "MismatchConfig",
+ "DiagFailed", "Dormant", "OutOfServiceAdmin", "OutOfServiceEnvTemp", "PoweredDown",
+ "PoweredUp", "PowerDenied", "PowerCycled", "OkButPowerOverWarning",
+ "OkButPowerOverCritical", "SyncInProgress");
+my @cisco_module_status = (3,3,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2);
+
+# Juniper routers (JUNOS)
+my $juniper_operating_descr = "1.3.6.1.4.1.2636.3.1.13.1.5"; # Component description
+my $juniper_operating_state = "1.3.6.1.4.1.2636.3.1.13.1.6"; # Operating status of component- Unknown(1), Running(2), Ready(3), Reset(4), RunningAtFullSpeed(5), Down(6), Standby(7)
+my @juniper_operating_status_text = ("--Invalid--","Unknown","Running","Ready","Reset","RunningAtFullSpeed","Down","Standby");
+my @juniper_operating_status = (3,3,0,0,1,0,2,0);
+
+# Extreme switches
+my $extreme_slot_table = "1.3.6.1.4.1.1916.1.1.2.2.1";
+my $extreme_slot_name = "1.3.6.1.4.1.1916.1.1.2.2.1.2"; # Component description
+my $extreme_slot_state = "1.3.6.1.4.1.1916.1.1.2.2.1.5"; # Operating status of component - NotPresent(1), testing(2), mismatch(3), failed(4), operational(5), powerdown(6), unknown(7)
+my $extreme_slot_serialnumber = "1.3.6.1.4.1.1916.1.1.2.2.1.6";
+my @extreme_slot_state_text = ("--Invalid--","NotPresent","Testing","Mismatch","Failed","Operational","Powerdown","Unknown");
+my @extreme_slot_nagios = (3,0,2,2,2,0,2,3);
+my $extreme_ps_table = "1.3.6.1.4.1.1916.1.1.1.27.1";
+my $extreme_ps_status = "1.3.6.1.4.1.1916.1.1.1.27.1.2";
+my @extreme_ps_status_text = ("--Invalid--","notPresent","presentOK","presentNotOK");
+my @extreme_ps_nagios = (3,1,0,2);
+my $extreme_fan_table = "1.3.6.1.4.1.1916.1.1.1.9.1";
+my $extreme_fan_number = "1.3.6.1.4.1.1916.1.1.1.9.1.1";
+my $extreme_fan_operational = "1.3.6.1.4.1.1916.1.1.1.9.1.2";
+my @extreme_fan_operational_text = ("--Invalid--","Operational","Not operational");
+my @extreme_fan_nagios = (3,0,2);
+my $extreme_temperature_alarm = "1.3.6.1.4.1.1916.1.1.1.7.0";
+my @extreme_temperature_alarm_text = ("--Invalid--","OverTemperature","OK");
+my @extreme_temperature_nagios = (3,2,0);
+my $extreme_temperature_current = "1.3.6.1.4.1.1916.1.1.1.8.0";
+
+
+# HP ProCurve switches
+my $procurve_operating_descr = "1.3.6.1.4.1.11.2.14.11.1.2.6.1.7"; # Component description
+my $procurve_operating_state = "1.3.6.1.4.1.11.2.14.11.1.2.6.1.4"; # Operating status of component - Unknown(1), Bad(2), Warning(3), Good(4), NotPresent(5)
+my @procurve_operating_status_text = ("--Invalid--","Unknown","Bad","Warning","Good","NotPresent");
+my @procurve_operating_status = (3,3,2,1,0,4);
+
+# Netscreen
+my $netscreen_slot_operating_descr = "1.3.6.1.4.1.3224.21.5.1.2"; # Component description
+my $netscreen_slot_operating_state = "1.3.6.1.4.1.3224.21.5.1.3"; # Operating status of component - Fail?(0), Good(1)
+my @netscreen_slot_operating_status_text = ("Fail","Good");
+my @netscreen_slot_operating_status = (2,0);
+my $netscreen_power_operating_descr = "1.3.6.1.4.1.3224.21.1.1.3"; # Component description
+my $netscreen_power_operating_state = "1.3.6.1.4.1.3224.21.1.1.2"; # Operating status of component - Fail(0), Good(1)
+my @netscreen_power_operating_status_text = ("Fail","Good");
+my @netscreen_power_operating_status = (2,0);
+my $netscreen_fan_operating_descr = "1.3.6.1.4.1.3224.21.2.1.3"; # Component description
+my $netscreen_fan_operating_state = "1.3.6.1.4.1.3224.21.2.1.2"; # Operating status of component - Fail(0), Good(1), Not Installed(2)
+my @netscreen_fan_operating_status_text = ("Fail","Good","Not Installed");
+my @netscreen_fan_operating_status = (2,0,4);
+
+# Cisco CISCO-ENTITY-SENSOR-MIB
+my $cisco_ios_xe_physicaldescr = "1.3.6.1.2.1.47.1.1.1.1.7";
+my $cisco_ios_xe_type = "1.3.6.1.4.1.9.9.91.1.1.1.1.1";
+my @cisco_ios_xe_type_text = ("not_specified","other","unknown","voltsAC","voltsDC","amperes","watts","hertz","celsius","percent","rpm","cmm","truthvalue","specialEnum","dBm");
+my $cisco_ios_xe_scale = "1.3.6.1.4.1.9.9.91.1.1.1.1.2";
+my @cisco_ios_xe_scale_power = ("0","-24","-21","-18","-15","12","e-9","e-6","e-3","e0","e3","e6","9","12","15","18","21","24");
+my $cisco_ios_xe_precision = "1.3.6.1.4.1.9.9.91.1.1.1.1.3";
+my $cisco_ios_xe_value = "1.3.6.1.4.1.9.9.91.1.1.1.1.4";
+my $cisco_ios_xe_status = "1.3.6.1.4.1.9.9.91.1.1.1.1.5";
+my @cisco_ios_xe_operating_text = ("--Invalid--","ok","unavailable","nonoperational");
+my @cisco_ios_xe_operating_status = (0,1,2,3);
+my $cisco_ios_xe_threshold_severity = "1.3.6.1.4.1.9.9.91.1.2.1.1.2";
+my $cisco_ios_xe_threshold_value = "1.3.6.1.4.1.9.9.91.1.2.1.1.4";
+
+# Citrix NetScaler
+my $citrix_desc = "1.3.6.1.4.1.5951.4.1.1.41.7.1.1";
+my $citrix_value = "1.3.6.1.4.1.5951.4.1.1.41.7.1.2";
+my $citrix_high_availability_state = "1.3.6.1.4.1.5951.4.1.1.23.24.0";
+my @citrix_high_availability_state_text = ("unknown","init","down","up","partialFail","monitorFail","monitorOk","completeFail","dumb","disabled","partialFailSsl","routemonitorFail");
+my $citrix_ssl_engine_state = "1.3.6.1.4.1.5951.4.1.1.47.2.0";
+my @citrix_ssl_engine_state_text = ("down","up");
+
+# Transmode WDM MIB/OID
+my $transmode_table = "1.3.6.1.4.1.11857.1.1.3.2.1"; # Alarm Active Entry table
+my $transmode_alarm_rack = "1.3.6.1.4.1.11857.1.1.3.2.1.2"; # Non Acked Alarm rack
+my $transmode_alarm_slot = "1.3.6.1.4.1.11857.1.1.3.2.1.3"; # Non Acked Alarm slot
+my $transmode_alarm_descr = "1.3.6.1.4.1.11857.1.1.3.2.1.4"; # Non Acked Alarm description
+my $transmode_alarm_sev = "1.3.6.1.4.1.11857.1.1.3.2.1.5"; # Non Acked Alarm severity
+my $transmode_alarm_unit = "1.3.6.1.4.1.11857.1.1.3.2.1.6"; # Non Acked Alarm unit
+my $transmode_alarm_serial = "1.3.6.1.4.1.11857.1.1.3.2.1.7"; # Non Acked Alarm serial
+my $transmode_alarm_time_start = "1.3.6.1.4.1.11857.1.1.3.2.1.8"; # Time of Alarm Start
+my $transmode_alarm_time_end = "1.3.6.1.4.1.11857.1.1.3.2.1.9"; # Time of Alarm End
+my @transmode_alarm_status_text = ("Indeterminate","Critical","Major","Minor","Warning");
+my @transmode_alarm_status = (1,2,2,1,1);
+
+
+# ============================================================================
+# ============================== GLOBAL VARIABLES ============================
+# ============================================================================
+
+my $Version = '0.7'; # Version number of this script
+my $o_host = undef; # Hostname
+my $o_community = undef; # Community
+my $o_port = 161; # Port
+my $o_help = undef; # Want some help ?
+my $o_verb = undef; # Verbose mode
+my $o_version = undef; # Print version
+my $o_timeout = undef; # Timeout (Default 5)
+my $o_perf = undef; # Output performance data
+my $o_version1 = undef; # Use SNMPv1
+my $o_version2 = undef; # Use SNMPv2c
+my $o_domain = undef; # Use IPv6
+my $o_check_type = "cisco"; # Default check is "cisco"
+my @valid_types = ("cisco","nokia","bc","iron","foundry","linux","ciscoSW","extremeSW","juniper","procurve","netscreen","ciscoNEW","citrix","transmode");
+my $o_temp = undef; # Max temp
+my $o_fan = undef; # Min fan speed
+my $o_login = undef; # Login for SNMPv3
+my $o_passwd = undef; # Pass for SNMPv3
+my $v3protocols = undef; # V3 protocol list.
+my $o_authproto = 'sha'; # Auth protocol
+my $o_privproto = 'aes'; # Priv protocol
+my $o_privpass = undef; # priv password
+
+
+# ============================================================================
+# ============================== SUBROUTINES (FUNCTIONS) =====================
+# ============================================================================
+
+# Subroutine: Print version
+sub p_version {
+ print "check_snmp_environment version : $Version\n";
+}
+
+# Subroutine: Print Usage
+sub print_usage {
+ print "Usage: $0 [-v] -H <host> [-6] -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -T (cisco|ciscoSW|ciscoNEW|nokia|bc|iron|foundry|linux|extremeSW|juniper|procurve|netscreen|citrix|transmode) [-F <rpm>] [-c <celcius>] [-f] [-t <timeout>] [-V]\n";
+}
+
+# Subroutine: Check number
+sub isnnum { # Return true if arg is not a number
+ my $num = shift;
+ if ( $num =~ /^(\d+\.?\d*)|(^\.\d+)$/ ) { return 0 ;}
+ return 1;
+}
+
+# Subroutine: Set final status
+sub set_status { # Return worst status with this order : OK, unknown, warning, critical
+ my $new_status = shift;
+ my $cur_status = shift;
+ if ($new_status == 1 && $cur_status != 2) {$cur_status = $new_status;}
+ if ($new_status == 2) {$cur_status = $new_status;}
+ if ($new_status == 3 && $cur_status == 0) {$cur_status = $new_status;}
+ return $cur_status;
+}
+
+# Subroutine: Check if SNMP table could be retrieved, otherwise give error
+sub check_snmp_result {
+ my $snmp_table = shift;
+ my $snmp_error_mesg = shift;
+
+ # Check if table is defined and does not contain specified error message.
+ # Had to do string compare it will not work with a status code
+ if (!defined($snmp_table) && $snmp_error_mesg !~ /table is empty or does not exist/) {
+ printf("ERROR: ". $snmp_error_mesg . " : UNKNOWN\n");
+ exit $ERRORS{"UNKNOWN"};
+ }
+}
+
+# Subroutine: Print complete help
+sub help {
+ print "\nSNMP environmental plugin for Nagios\nVersion: ",$Version,"\n\n";
+ print_usage();
+ print <<EOT;
+
+Options:
+-v, --verbose
+ Print extra debugging information
+-h, --help
+ Print this help message
+-H, --hostname=HOST
+ Hostname or IPv4/IPv6 address of host to check
+-6, --use-ipv6
+ Use IPv6 connection
+-C, --community=COMMUNITY NAME
+ Community name for the host's SNMP agent
+-1, --v1
+ Use SNMPv1
+-2, --v2c
+ Use SNMPv2c (default)
+-l, --login=LOGIN ; -x, --passwd=PASSWD
+ Login and auth password for SNMPv3 authentication
+ If no priv password exists, implies AuthNoPriv
+-X, --privpass=PASSWD
+ Priv password for SNMPv3 (AuthPriv protocol)
+-L, --protocols=<authproto>,<privproto>
+ <authproto> : Authentication protocol (md5|sha : default sha)
+ <privproto> : Priv protocole (des|aes : default aes)
+-P, --port=PORT
+ SNMP port (Default 161)
+-T, --type=cisco|ciscoSW|ciscoNEW|nokia|bc|iron|foundry|linux|extremeSW|juniper|procurve|netscreen|citrix|transmode
+ Environmental check :
+ cisco __________: Cisco Systems : Fan, power-supply, voltage, temperature
+ ciscoSW ________: Cisco Systems : Card and module status check
+ ciscoNEW _______: Cisco Systems : Sensor check for devices that have the CISCO-ENTITY-SENSOR-MIB
+ nokia __________: Nokia IP : Fan, power-supply
+ bc _____________: Blue Coat Systems : Fan, power-supply, voltage, disk
+ iron ___________: IronPort : Fan, power-supply, temperature
+ foundry ________: Foundry Network : power supply, temperature
+ linux __________: lm-sensors : Fan, voltage, temperature, misc
+ extremeSW ______: Extreme Networks : Slot, power-supply, fan, temperature
+ juniper ________: Juniper Networks : Component status check
+ procurve _______: HP ProCurve : Fan, power-supply, temperature
+ netscreen ______: NetScreen : Slot, fan, power-supply (ScreenOS 6.1 and newer)
+ citrix _________: Citrix NetScaler : Fan, , voltage, temperture (thresholds are hardcoded), HA state, SSL engine
+ transmode ______: Transmode Systems : Check alarm table that is not deactivated and not acknowledged
+-F, --fan=<rpm>
+ Minimum fan rpm value (only needed for 'iron' & 'linux')
+-c, --celcius=<celcius>
+ Maximum temp in degree celcius (only needed for 'iron' & 'linux')
+-f, --perfparse
+ Perfparse compatible output
+-t, --timeout=INTEGER
+ Timeout for SNMP in seconds (Default: 5)
+-V, --version
+ Prints version number
+
+Notes:
+- Check the http://exchange.nagios.org website for new versions.
+- For questions, problems and patches send me an e-mail (michiel.timmmers AT gmx.net).
+
+EOT
+}
+
+# Subroutine: Verbose output
+sub verb {
+ my $t=shift;
+ print $t,"\n" if defined($o_verb);
+}
+
+# Subroutine: Verbose output
+sub check_options {
+ Getopt::Long::Configure ("bundling");
+ GetOptions(
+ 'v' => \$o_verb, 'verbose' => \$o_verb,
+ 'h' => \$o_help, 'help' => \$o_help,
+ 'H:s' => \$o_host, 'hostname:s' => \$o_host,
+ 'p:i' => \$o_port, 'port:i' => \$o_port,
+ 'C:s' => \$o_community, 'community:s' => \$o_community,
+ 'l:s' => \$o_login, 'login:s' => \$o_login,
+ 'x:s' => \$o_passwd, 'passwd:s' => \$o_passwd,
+ 'X:s' => \$o_privpass, 'privpass:s' => \$o_privpass,
+ 'L:s' => \$v3protocols, 'protocols:s' => \$v3protocols,
+ 't:i' => \$o_timeout, 'timeout:i' => \$o_timeout,
+ 'V' => \$o_version, 'version' => \$o_version,
+ '6' => \$o_domain, 'use-ipv6' => \$o_domain,
+ '1' => \$o_version1, 'v1' => \$o_version1,
+ '2' => \$o_version2, 'v2c' => \$o_version2,
+ 'f' => \$o_perf, 'perfparse' => \$o_perf,
+ 'T:s' => \$o_check_type, 'type:s' => \$o_check_type,
+ 'F:i' => \$o_fan, 'fan:i' => \$o_fan,
+ 'c:i' => \$o_temp, 'celcius:i' => \$o_temp
+ );
+
+ # Check the -T option
+ my $T_option_valid=0;
+ foreach (@valid_types) {
+ if ($_ eq $o_check_type) {
+ $T_option_valid=1;
+ }
+ }
+ if ( $T_option_valid == 0 ) {
+ print "Invalid check type (-T)!\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ # Basic checks
+ if (defined($o_timeout) && (isnnum($o_timeout) || ($o_timeout < 2) || ($o_timeout > 60))) {
+ print "Timeout must be >1 and <60 !\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ if (!defined($o_timeout)) {
+ $o_timeout=5;
+ }
+ if (defined ($o_help) ) {
+ help();
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ if (defined($o_version)) {
+ p_version();
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ # check host and filter
+ if ( ! defined($o_host) ) {
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ # Check IPv6
+ if (defined ($o_domain)) {
+ $o_domain="udp/ipv6";
+ } else {
+ $o_domain="udp/ipv4";
+ }
+
+ # Check SNMP information
+ if ( !defined($o_community) && (!defined($o_login) || !defined($o_passwd)) ){
+ print "Put SNMP login info!\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ if ((defined($o_login) || defined($o_passwd)) && (defined($o_community) || defined($o_version2)) ){
+ print "Can't mix SNMP v1,v2c,v3 protocols!\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ # Check SNMPv3 information
+ if (defined ($v3protocols)) {
+ if (!defined($o_login)) {
+ print "Put SNMP V3 login info with protocols!\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ my @v3proto=split(/,/,$v3protocols);
+ if ((defined ($v3proto[0])) && ($v3proto[0] ne "")) {
+ $o_authproto=$v3proto[0];
+ }
+ if (defined ($v3proto[1])) {
+ $o_privproto=$v3proto[1];
+ }
+ if ((defined ($v3proto[1])) && (!defined($o_privpass))) {
+ print "Put SNMP v3 priv login info with priv protocols!\n";
+ print_usage();
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+}
+
+
+# ============================================================================
+# ============================== MAIN ========================================
+# ============================================================================
+
+check_options();
+
+# Check gobal timeout if SNMP screws up
+if (defined($TIMEOUT)) {
+ verb("Alarm at ".$TIMEOUT." + ".$o_timeout);
+ alarm($TIMEOUT+$o_timeout);
+} else {
+ verb("no global timeout defined : ".$o_timeout." + 15");
+ alarm ($o_timeout+15);
+}
+
+# Report when the script gets "stuck" in a loop or takes to long
+$SIG{'ALRM'} = sub {
+ print "UNKNOWN: Script timed out\n";
+ exit $ERRORS{"UNKNOWN"};
+};
+
+# Connect to host
+my ($session,$error);
+if (defined($o_login) && defined($o_passwd)) {
+ # SNMPv3 login
+ verb("SNMPv3 login");
+ if (!defined ($o_privpass)) {
+ # SNMPv3 login (Without encryption)
+ verb("SNMPv3 AuthNoPriv login : $o_login, $o_authproto");
+ ($session, $error) = Net::SNMP->session(
+ -domain => $o_domain,
+ -hostname => $o_host,
+ -version => 3,
+ -username => $o_login,
+ -authpassword => $o_passwd,
+ -authprotocol => $o_authproto,
+ -timeout => $o_timeout
+ );
+ } else {
+ # SNMPv3 login (With encryption)
+ verb("SNMPv3 AuthPriv login : $o_login, $o_authproto, $o_privproto");
+ ($session, $error) = Net::SNMP->session(
+ -domain => $o_domain,
+ -hostname => $o_host,
+ -version => 3,
+ -username => $o_login,
+ -authpassword => $o_passwd,
+ -authprotocol => $o_authproto,
+ -privpassword => $o_privpass,
+ -privprotocol => $o_privproto,
+ -timeout => $o_timeout
+ );
+ }
+} else {
+ if ((defined ($o_version2)) || (!defined ($o_version1))) {
+ # SNMPv2 login
+ verb("SNMP v2c login");
+ ($session, $error) = Net::SNMP->session(
+ -domain => $o_domain,
+ -hostname => $o_host,
+ -version => 2,
+ -community => $o_community,
+ -port => $o_port,
+ -timeout => $o_timeout
+ );
+ } else {
+ # SNMPv1 login
+ verb("SNMP v1 login");
+ ($session, $error) = Net::SNMP->session(
+ -domain => $o_domain,
+ -hostname => $o_host,
+ -version => 1,
+ -community => $o_community,
+ -port => $o_port,
+ -timeout => $o_timeout
+ );
+ }
+}
+
+# Check if there are any problems with the session
+if (!defined($session)) {
+ printf("ERROR opening session: %s.\n", $error);
+ exit $ERRORS{"UNKNOWN"};
+}
+
+my $exit_val=undef;
+
+
+# ============================================================================
+# ============================== CISCO =======================================
+# ============================================================================
+
+if ($o_check_type eq "cisco") {
+
+verb("Checking cisco env");
+
+# Get load table
+my $resultat = $session->get_table(Baseoid => $ciscoEnvMonMIB);
+&check_snmp_result($resultat,$session->error);
+
+# Get env data index
+my (@voltindex,@tempindex,@fanindex,@psindex)=(undef,undef,undef,undef);
+my ($voltexist,$tempexist,$fanexist,$psexist)=(0,0,0,0);
+my @oid=undef;
+foreach my $key ( keys %$resultat) {
+ verb("OID : $key, Desc : $$resultat{$key}");
+ if ( $key =~ /$ciscoVoltageTableDesc/ ) {
+ @oid=split (/\./,$key);
+ $voltindex[$voltexist++] = pop(@oid);
+ }
+ if ( $key =~ /$ciscoTempTableDesc/ ) {
+ @oid=split (/\./,$key);
+ $tempindex[$tempexist++] = pop(@oid);
+ }
+ if ( $key =~ /$ciscoFanTableDesc/ ) {
+ @oid=split (/\./,$key);
+ $fanindex[$fanexist++] = pop(@oid);
+ }
+ if ( $key =~ /$ciscoPSTableDesc/ ) {
+ @oid=split (/\./,$key);
+ $psindex[$psexist++] = pop(@oid);
+ }
+}
+
+if ( ($voltexist ==0) && ($tempexist ==0) && ($fanexist ==0) && ($psexist ==0) ) {
+ print "No Environemental data found : UNKNOWN \n";
+ exit $ERRORS{"UNKNOWN"};
+}
+
+my $perf_output="";
+# Get the data
+my ($i,$cur_status)=(undef,undef);
+
+my $volt_global=0;
+my %volt_status;
+if ($fanexist !=0) {
+ for ($i=0;$i < $voltexist; $i++) {
+ $cur_status=$$resultat{$ciscoVoltageTableState. "." . $voltindex[$i]};
+ verb ($$resultat{$ciscoVoltageTableDesc .".".$voltindex[$i]});
+ verb ($cur_status);
+ if (!defined ($cur_status)) { ### Error TODO
+ $volt_global=1;
+ }
+ if (defined($$resultat{$ciscoVoltageTableValue."." . $voltindex[$i]})) {
+ $perf_output.=" '".$$resultat{$ciscoVoltageTableDesc .".".$voltindex[$i]}."'=" ;
+ $perf_output.=$$resultat{$ciscoVoltageTableValue."." . $voltindex[$i]};
+ }
+ if ($Nagios_state[$CiscoEnvMonNagios{$cur_status}] ne "OK") {
+ $volt_global= 1;
+ $volt_status{$$resultat{$ciscoVoltageTableDesc .".".$voltindex[$i]}}=$cur_status;
+ }
+ }
+}
+
+
+my $temp_global=0;
+my %temp_status;
+if ($tempexist !=0) {
+ for ($i=0;$i < $tempexist; $i++) {
+ $cur_status=$$resultat{$ciscoTempTableState . "." . $tempindex[$i]};
+ verb ($$resultat{$ciscoTempTableDesc .".".$tempindex[$i]});
+ verb ($cur_status);
+ if (!defined ($cur_status)) { ### Error TODO
+ $temp_global=1;
+ }
+ if (defined($$resultat{$ciscoTempTableValue."." . $tempindex[$i]})) {
+ $perf_output.=" '".$$resultat{$ciscoTempTableDesc .".".$tempindex[$i]}."'=" ;
+ $perf_output.=$$resultat{$ciscoTempTableValue."." . $tempindex[$i]};
+ }
+ if ($Nagios_state[$CiscoEnvMonNagios{$cur_status}] ne "OK") {
+ $temp_global= 1;
+ $temp_status{$$resultat{$ciscoTempTableDesc .".".$tempindex[$i]}}=$cur_status;
+ }
+ }
+}
+
+
+my $fan_global=0;
+my %fan_status;
+if ($fanexist !=0) {
+ for ($i=0;$i < $fanexist; $i++) {
+ $cur_status=$$resultat{$ciscoFanTableState . "." . $fanindex[$i]};
+ verb ($$resultat{$ciscoFanTableDesc .".".$fanindex[$i]});
+ verb ($cur_status);
+ if (!defined ($cur_status)) { ### Error TODO
+ $fan_global=1;
+ }
+ if ($Nagios_state[$CiscoEnvMonNagios{$cur_status}] ne "OK") {
+ $fan_global= 1;
+ $fan_status{$$resultat{$ciscoFanTableDesc .".".$fanindex[$i]}}=$cur_status;
+ }
+ }
+}
+
+my $ps_global=0;
+my %ps_status;
+if ($psexist !=0) {
+ for ($i=0;$i < $psexist; $i++) {
+ $cur_status=$$resultat{$ciscoPSTableState . "." . $psindex[$i]};
+ if (!defined ($cur_status)) { ### Error TODO
+ $fan_global=1;
+ }
+ if ($Nagios_state[$CiscoEnvMonNagios{$cur_status}] ne "OK") {
+ $ps_global= 1;
+ $ps_status{$$resultat{$ciscoPSTableDesc .".".$psindex[$i]}}=$cur_status;
+ }
+ }
+}
+
+my $global_state=0;
+my $output="";
+
+if ($fanexist !=0) {
+ if ($fan_global ==0) {
+ $output .= $fanexist." Fan OK";
+ $global_state=1 if ($global_state==0);
+ } else {
+ foreach (keys %fan_status) {
+ $output .= "Fan " . $_ . ":" . $CiscoEnvMonState {$fan_status{$_}} ." ";
+ if ($global_state < $CiscoEnvMonNagios{$fan_status{$_}} ) {
+ $global_state = $CiscoEnvMonNagios{$fan_status{$_}} ;
+ }
+ }
+ }
+}
+
+if ($psexist !=0) {
+ $output .= ", " if ($output ne "");
+ if ($ps_global ==0) {
+ $output .= $psexist." ps OK";
+ $global_state=1 if ($global_state==0);
+ } else {
+ foreach (keys %ps_status) {
+ $output .= "ps " . $_ . ":" . $CiscoEnvMonState {$ps_status{$_}} ." ";
+ if ($global_state < $CiscoEnvMonNagios{$ps_status{$_}} ) {
+ $global_state = $CiscoEnvMonNagios{$ps_status{$_}} ;
+ }
+ }
+ }
+}
+
+if ($voltexist !=0) {
+ $output .= ", " if ($output ne "");
+ if ($volt_global ==0) {
+ $output .= $voltexist." volt OK";
+ $global_state=1 if ($global_state==0);
+ } else {
+ foreach (keys %volt_status) {
+ $output .= "volt " . $_ . ":" . $CiscoEnvMonState {$volt_status{$_}} ." ";
+ if ($global_state < $CiscoEnvMonNagios{$volt_status{$_}} ) {
+ $global_state = $CiscoEnvMonNagios{$volt_status{$_}} ;
+ }
+ }
+ }
+}
+
+if ($tempexist !=0) {
+ $output .= ", " if ($output ne "");
+ if ($temp_global ==0) {
+ $output .= $tempexist." temp OK";
+ $global_state=1 if ($global_state==0);
+ } else {
+ foreach (keys %temp_status) {
+ $output .= "temp " . $_ . ":" . $CiscoEnvMonState {$temp_status{$_}} ." ";
+ if ($global_state < $CiscoEnvMonNagios{$temp_status{$_}} ) {
+ $global_state = $CiscoEnvMonNagios{$temp_status{$_}} ;
+ }
+ }
+ }
+}
+
+# Clear the SNMP Transport Domain and any errors associated with the object.
+$session->close;
+
+#print $output," : ",$Nagios_state[$global_state]," | ",$perf_output,"\n";
+print $output," : ",$Nagios_state[$global_state],"\n";
+$exit_val=$ERRORS{$Nagios_state[$global_state]};
+
+exit $exit_val;
+
+}
+
+
+# ============================================================================
+# ============================== NOKIA =======================================
+# ============================================================================
+
+if ($o_check_type eq "nokia") {
+
+verb("Checking nokia env");
+
+# Define variables
+my $resultat;
+my ($fan_status,$ps_status,$temp_status)=(0,0,0);
+my ($fan_exist,$ps_exist,$temp_exist)=(0,0,0);
+my ($num_fan,$num_ps)=(0,0);
+my ($num_fan_nok,$num_ps_nok)=(0,0);
+my $global_status=0;
+my $output="";
+
+# get temp
+$resultat = $session->get_table(Baseoid => $nokia_temp_tbl);
+
+if (defined($resultat)) {
+ verb ("temp found");
+ $temp_exist=1;
+ if ($$resultat{$nokia_temp} != 1) {
+ $temp_status=2;$global_status=1;
+ $output="Temp CRITICAL ";
+ } else {
+ $output="Temp OK ";
+ }
+}
+
+# Get fan table
+$resultat = $session->get_table(Baseoid => $nokia_fan_table);
+
+if (defined($resultat)) {
+ $fan_exist=1;
+ foreach my $key ( keys %$resultat) {
+ verb("OID : $key, Desc : $$resultat{$key}");
+ if ( $key =~ /$nokia_fan_status/ ) {
+ if ($$resultat{$key} != 1) { $fan_status=1; $num_fan_nok++}
+ $num_fan++;
+ }
+ }
+ if ($fan_status==0) {
+ $output.= ", ".$num_fan." fan OK";
+ } else {
+ $output.= ", ".$num_fan_nok."/".$num_fan." fan CRITICAL";
+ $global_status=2;
+ }
+}
+
+# Get ps table
+$resultat = $session->get_table(Baseoid => $nokia_ps_table);
+
+if (defined($resultat)) {
+ $ps_exist=1;
+ foreach my $key ( keys %$resultat) {
+ verb("OID : $key, Desc : $$resultat{$key}");
+ if ( $key =~ /$nokia_ps_status/ ) {
+ if ($$resultat{$key} != 1) { $ps_status=1; $num_ps_nok++;}
+ $num_ps++;
+ }
+ if ( $key =~ /$nokia_ps_temp/ ) {
+ if ($$resultat{$key} != 1) { if ($ps_status==0) {$ps_status=2;$num_ps_nok++;} }
+ }
+ }
+ if ($ps_status==0) {
+ $output.= ", ".$num_ps." ps OK";
+ } elsif ($ps_status==2) {
+ $output.= ", ".$num_ps_nok."/".$num_ps." ps WARNING (temp)";
+ if ($global_status != 2) {$global_status=1;}
+ } else {
+ $output.= ", ".$num_ps_nok."/".$num_ps." ps CRITICAL";
+ $global_status=2;
+ }
+}
+
+# Clear the SNMP Transport Domain and any errors associated with the object.
+$session->close;
+
+verb ("status : $global_status");
+
+if ( ($fan_exist+$ps_exist+$temp_exist) == 0) {
+ print "No environemental informations found : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+}
+
+if ($global_status==0) {
+ print $output." : all OK\n";
+ exit $ERRORS{"OK"};
+}
+
+if ($global_status==1) {
+ print $output." : WARNING\n";
+ exit $ERRORS{"WARNING"};
+}
+
+if ($global_status==2) {
+ print $output." : CRITICAL\n";
+ exit $ERRORS{"CRITICAL"};
+}
+}
+
+
+# ============================================================================
+# ============================== BLUECOAT ====================================
+# ============================================================================
+
+if ($o_check_type eq "bc") {
+
+ verb("Checking bluecoat env");
+
+ # Define variables
+ my $final_status = 0;
+ my $output = "";
+ my $output_perf = "";
+ my $tmp_status_sensor;
+ my $tmp_status_code;
+ my ($num_fan,$num_other,$num_volt,$num_temp,$num_disk)=(0,0,0,0,0);
+ my ($num_fan_ok,$num_other_ok,$num_volt_ok,$num_temp_ok,$num_disk_ok)=(0,0,0,0,0);
+ my ($sens_name,$sens_status,$sens_scale,$sens_value,$sens_code,$sens_unit)=(undef,undef,undef,undef,undef,undef);
+
+ # Get SNMP table(s) and check the result
+ my $resultat_sensor = $session->get_table(Baseoid => $bc_sensor_table);
+ &check_snmp_result($resultat_sensor,$session->error);
+ my $resultat_disk = $session->get_table(Baseoid => $bc_dsk_table);
+ &check_snmp_result($resultat_disk,$session->error);
+
+ # Check the sensor table
+ if (defined($resultat_sensor)) {
+ verb ("sensor table found");
+ foreach my $key ( keys %$resultat_sensor) {
+ if ($key =~ /$bc_sensor_Name/) {
+ $sens_name = $$resultat_sensor{$key};
+ $key =~ s/$bc_sensor_Name//;
+
+ $sens_status = $$resultat_sensor{$bc_sensor_Status.$key};
+ $sens_scale = $$resultat_sensor{$bc_sensor_Scale.$key};
+ $sens_value = $$resultat_sensor{$bc_sensor_Value.$key} * 10 ** $sens_scale;
+ $sens_code = $$resultat_sensor{$bc_sensor_Code.$key};
+ $sens_unit = $$resultat_sensor{$bc_sensor_Units.$key};
+ $sens_scale = $$resultat_sensor{$bc_sensor_Scale.$key};
+
+ if ($sens_status != 1 || $sens_code != 1) { # check is there is something wrong with either the status or code
+ if ($output ne "") { $output.=", ";}
+ if ($sens_status != 1 && $sens_code != 1) { # If both the status and code are not reporting "ok" use the following output
+ $output .= $sens_name ." sensor ".$bc_SensorStatus[$sens_status].", reports ".$sens_value." ".$bc_mesure[$sens_unit]." (".$bc_SensorCode[$sens_code].")";
+ }
+ if ($sens_status != 1 && $sens_code == 1) { # If only the status is not reporting "ok"
+ $output .= $sens_name ." sensor ".$bc_SensorStatus[$sens_status];
+ }
+ if ($sens_status == 1 && $sens_code != 1) { # If only the code is not reporting "ok"
+ $output .= $sens_name ." reports ".$sens_value." ".$bc_mesure[$sens_unit]." (".$bc_SensorCode[$sens_code].")";
+ }
+
+ # Set the status
+ $tmp_status_sensor = $bc_status_sensor[$sens_status];
+ $tmp_status_code = $bc_status_code[$sens_code];
+ $final_status = &set_status($tmp_status_sensor,$final_status);
+ $final_status = &set_status($tmp_status_code,$final_status);
+ }
+
+ # If performance data is enabled then output name with value
+ if (defined($o_perf)) {
+ if ($output_perf ne "") { $output_perf .=" ";}
+ $output_perf .= "'".$sens_name."'=";
+ my $perf_value = $sens_value;
+ $output_perf .= $perf_value;
+ }
+
+ # Count fans sensors
+ if ($bc_mesure[$sens_unit] eq "rpm") {
+ $num_fan++;
+ if ($sens_status == 1 && $sens_code == 1) { $num_fan_ok++; }
+ }
+
+ # Count temperature sensors
+ if ($bc_mesure[$sens_unit] eq "celsius") {
+ $num_temp++;
+ if ($sens_status == 1 && $sens_code == 1) { $num_temp_ok++; }
+ }
+
+ # Count voltage sensors
+ if ($bc_mesure[$sens_unit] eq "volts") {
+ $num_volt++;
+ if ($sens_status == 1 && $sens_code == 1) { $num_volt_ok++; }
+ }
+ if (!$bc_mesure[$sens_unit] =~ /rpm|celsius|volts/) {
+ $num_other++;
+ if ($sens_status == 1 && $sens_code == 1) { $num_other_ok++;}
+ }
+ }
+ }
+ }
+
+ # Check the disk table
+ if (defined($resultat_disk )) {
+ foreach my $key ( keys %$resultat_disk ) {
+ my ($dsk_name,$dsk_status)=(undef,undef);
+ if ( $key =~ /$bc_dsk_status/ ) {
+ $num_disk++;
+ $dsk_status=$bc_dsk_status_nagios[$$resultat_disk{$key}];
+ $key =~ s/$bc_dsk_status//;
+
+ if ( $dsk_status != 0) {
+ if ($output ne "") { $output.=", ";}
+ $output .= $$resultat_disk{$bc_dsk_vendor.$key} . "(S/N:".$$resultat_disk{$bc_dsk_serial.$key} ." MODEL:". $$resultat_disk{$bc_dsk_product.$key} . ") - ". $bc_DiskStatus[$$resultat_disk {$bc_dsk_status.$key}];
+ $final_status = &set_status($dsk_status,$final_status);
+ } else {
+ $num_disk_ok++;
+ }
+ if($$resultat_disk{$bc_dsk_status.$key} == 6){
+ $num_disk--;
+ $num_disk_ok--;
+ }
+
+ }
+ }
+ }
+
+ # Clear the SNMP Transport Domain and any errors associated with the object.
+ $session->close;
+
+ if ($num_fan+$num_other+$num_volt+$num_temp+$num_disk == 0) {
+ print "No information found : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ if ($output ne "") {$output.=" : ";}
+
+ if ($num_fan!=0) {
+ if ($num_fan == $num_fan_ok) {
+ $output.= $num_fan . " fan OK, ";
+ } else {
+ $output.= $num_fan_ok . "/" . $num_fan ." fan OK, ";
+ }
+ }
+
+ if ($num_temp!=0) {
+ if ($num_temp == $num_temp_ok) {
+ $output.= $num_temp . " temp OK, ";
+ } else {
+ $output.= $num_temp_ok . "/" . $num_temp ." temp OK, ";
+ }
+ }
+
+ if ($num_volt!=0) {
+ if ($num_volt == $num_volt_ok) {
+ $output.= $num_volt . " volt OK, ";
+ } else {
+ $output.= $num_volt_ok . "/" . $num_volt ." volt OK, ";
+ }
+ }
+
+ if ($num_other!=0) {
+ if ($num_other == $num_other_ok) {
+ $output.= $num_other . " other OK, ";
+ } else {
+ $output.= $num_other_ok . "/" . $num_other ." other OK, ";
+ }
+ }
+
+ if ($num_disk!=0) {
+ if ($num_disk == $num_disk_ok) {
+ $output.= $num_disk . " disk OK";
+ } else {
+ $output.= $num_disk_ok . "/" . $num_disk ." disk OK";
+ }
+ }
+
+ if ($final_status == 3) {
+ print $output," : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ if ($final_status == 2) {
+ print $output," : CRITICAL\n";
+ exit $ERRORS{"CRITICAL"};
+ }
+
+ if ($final_status == 1) {
+ print $output," : WARNING\n";
+ exit $ERRORS{"WARNING"};
+ }
+
+ print $output," : OK\n";
+ exit $ERRORS{"OK"};
+}
+
+
+# ============================================================================
+# ============================== IRONPORT ====================================
+# ============================================================================
+
+if ($o_check_type eq "iron") {
+
+verb("Checking Ironport env");
+
+my $resultat;
+# status : 0=ok, 1=warn, 2=crit
+my ($fan_status,$ps_status,$temp_status)=(0,0,0);
+my ($fan_exist,$ps_exist,$temp_exist)=(0,0,0);
+my ($num_fan,$num_ps,$num_temp)=(0,0,0);
+my ($num_fan_nok,$num_ps_nok,$num_temp_nok)=(0,0,0);
+my $global_status=0;
+my $output="";
+# get temp if $o_temp is defined
+if (defined($o_temp)) {
+ verb("Checking temp < $o_temp");
+ $resultat = $session->get_table(Baseoid => $iron_tmp_table);
+
+ if (defined($resultat)) {
+ verb ("temp found");
+ $temp_exist=1;
+ foreach my $key ( keys %$resultat) {
+ verb("OID : $key, Desc : $$resultat{$key}");
+ if ( $key =~ /$iron_tmp_celcius/ ) {
+ verb("Status : $$resultat{$key}");
+ if ($$resultat{$key} > $o_temp) {
+ my @index_oid=split(/\./,$key);
+ my $index_oid_key=pop(@index_oid);
+ $output .= ",Temp : ". $$resultat{ $iron_tmp_name.".".$index_oid_key}." : ".$$resultat{$key}." C";
+ $temp_status=2;
+ $num_temp_nok++;
+ }
+ $num_temp++;
+ }
+ }
+ if ($temp_status==0) {
+ $output.= ", ".$num_temp." temp < ".$o_temp." OK";
+ } else {
+ $output.= ", ".$num_temp_nok."/".$num_temp." temp probes CRITICAL";
+ $global_status=2;
+ }
+ }
+}
+
+# Get fan status if $o_fan is defined
+if (defined($o_fan)) {
+ verb("Checking fan > $o_fan");
+ $resultat = $session->get_table(Baseoid => $iron_fan_table);
+
+ if (defined($resultat)) {
+ verb ("fan found");
+ $fan_exist=1;
+ foreach my $key ( keys %$resultat) {
+ verb("OID : $key, Desc : $$resultat{$key}");
+ if ( $key =~ /$iron_fan_rpm/ ) {
+ verb("Status : $$resultat{$key}");
+ if ($$resultat{$key} < $o_fan) {
+ my @index_oid=split(/\./,$key);
+ my $index_oid_key=pop(@index_oid);
+ $output .= ",Fan ". $$resultat{ $iron_fan_name.".".$index_oid_key}." : ".$$resultat{$key}." RPM";
+ $fan_status=2;
+ $num_fan_nok++;
+ }
+ $num_fan++;
+ }
+ }
+ if ($fan_status==0) {
+ $output.= ", ".$num_fan." fan > ".$o_fan." OK";
+ } else {
+ $output.= ", ".$num_fan_nok."/".$num_fan." fans CRITICAL";
+ $global_status=2;
+ }
+ }
+}
+
+# Get power supply status
+ verb("Checking PS");
+ $resultat = $session->get_table(Baseoid => $iron_ps_table);
+
+ if (defined($resultat)) {
+ verb ("ps found");
+ $ps_exist=1;
+ foreach my $key ( keys %$resultat) {
+ verb("OID : $key, Desc : $$resultat{$key}");
+ if ( $key =~ /$iron_ps_status/ ) {
+ verb("Status : $iron_ps_status_name[$$resultat{$key}]");
+ if ($iron_ps_status_nagios[$$resultat{$key}] != 0) {
+ my @index_oid=split(/\./,$key);
+ my $index_oid_key=pop(@index_oid);
+ $output .= ",PS ". $$resultat{$iron_ps_name.".".$index_oid_key}." : ".$iron_ps_status_name[$$resultat{$key}];
+ $ps_status=2;
+ $num_ps_nok++;
+ }
+ $num_ps++;
+ }
+ }
+ if ($ps_status==0) {
+ $output.= ", ".$num_ps." ps OK";
+ } else {
+ $output.= ", ".$num_ps_nok."/".$num_ps." ps CRITICAL";
+ $global_status=2;
+ }
+ }
+
+# Clear the SNMP Transport Domain and any errors associated with the object.
+$session->close;
+
+verb ("status : $global_status");
+
+if ( ($fan_exist+$ps_exist+$temp_exist) == 0) {
+ print "No environemental informations found : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+}
+
+$output =~ s/^,//;
+
+if ($global_status==0) {
+ print $output." : all OK\n";
+ exit $ERRORS{"OK"};
+}
+
+if ($global_status==1) {
+ print $output." : WARNING\n";
+ exit $ERRORS{"WARNING"};
+}
+
+if ($global_status==2) {
+ print $output." : CRITICAL\n";
+ exit $ERRORS{"CRITICAL"};
+}
+}
+
+
+# ============================================================================
+# ============================== FOUNDRY =====================================
+# ============================================================================
+
+if ($o_check_type eq "foundry") {
+
+verb("Checking foundry env");
+
+# Define variables
+my $global_status = 0;
+my $output = "";
+my @foundry_temp_oid=($foundry_temp,$foundry_temp_warn,$foundry_temp_crit);
+
+# Get SNMP table(s) and check the result
+my $result_temp = $session->get_request(Varbindlist => \@foundry_temp_oid);
+
+my $temp_found=0;
+if (defined($result_temp)) {
+ $temp_found=1;
+ #Temp found
+ $output = "Temp : " . $$result_temp{$foundry_temp} / 2;
+ if ($$result_temp{$foundry_temp} > $$result_temp{$foundry_temp_crit}) { # Temp above critical
+ $output.= " > ". $$result_temp{$foundry_temp_crit} / 2 . " : CRITICAL";
+ $global_status=3;
+ } elsif ( $$result_temp{$foundry_temp} > $$result_temp{$foundry_temp_warn}) { # Temp above warning
+ $output.= " > ". $$result_temp{$foundry_temp_warn} / 2 . " : WARNING";
+ $global_status=2;
+ } else {
+ $output.= " < ". $$result_temp{$foundry_temp_warn} / 2 . " : OK";
+ $global_status=1;
+ }
+}
+
+# Get PS table (TODO : Bug in FAN table, see with Foundry).
+
+my $result_ps = $session->get_table(Baseoid => $foundry_ps_table);
+&check_snmp_result($result_ps,$session->error);
+
+my $ps_num=0;
+if (defined($result_ps)) {
+ $output .=", " if defined($output);
+ foreach my $key ( keys %$result_ps) {
+ verb("OID : $key, Desc : $$result_ps{$key}");
+ if ($$result_ps{$key} =~ /$foundry_ps_desc/) {
+ $ps_num++;
+ my @oid_list = split (/\./,$key);
+ my $index_ps = pop (@oid_list);
+ $index_ps= $foundry_ps_status . "." . $index_ps;
+ if (defined ($$result_ps{$index_ps})) {
+ if ($$result_ps{$index_ps} == 3) {
+ $output.="PS ".$$result_ps{$key}." : FAILURE";
+ $global_status=3;
+ } elsif ($$result_ps{$index_ps} == 2) {
+ $global_status=1 if ($global_status==0);
+ } else {
+ $output.= "ps ".$$result_ps{$key}." : OTHER";
+ }
+ } else {
+ $output.= "ps ".$$result_ps{$key}." : UNDEFINED STATUS";
+ }
+ }
+ }
+}
+
+
+# Clear the SNMP Transport Domain and any errors associated with the object.
+$session->close;
+
+if (($ps_num+$temp_found) == 0) {
+ print "No data found : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+}
+
+if ($global_status==1) {
+ print $output." : all OK\n";
+ exit $ERRORS{"OK"};
+}
+
+if ($global_status==2) {
+ print $output." : WARNING\n";
+ exit $ERRORS{"WARNING"};
+}
+
+if ($global_status==3) {
+ print $output." : CRITICAL\n";
+ exit $ERRORS{"CRITICAL"};
+}
+
+print $output." : UNKNOWN\n";
+exit $ERRORS{"UNKNOWN"};
+
+}
+
+
+# ============================================================================
+# ============================== LINUX LM-SENSORS ============================
+# ============================================================================
+
+if ($o_check_type eq "linux") {
+
+ verb("Checking linux env");
+
+ # Define variables
+ my $output = "";
+ my $index;
+ my ($sens_name,$sens_status,$sens_value,$sens_unit)=(undef,undef,undef,undef);
+
+ # Get SNMP table(s) and check the result
+ my $resultat = $session->get_table(Baseoid => $linux_env_table);
+ &check_snmp_result($resultat,$session->error);
+
+ foreach my $key ( keys %$resultat) {
+ if ($key =~ /$linux_temp_descr/) {
+ $sens_name=$$resultat{$key};
+ $index=(split /\./,$key)[-1];
+ $sens_value=$$resultat{$linux_temp_value.".".$index}/1000;
+ printf("TSensor %s : %.0f\n",$sens_name,$sens_value);
+ }
+ if ($key =~ /$linux_fan_descr/) {
+ $sens_name=$$resultat{$key};
+ $index=(split /\./,$key)[-1];
+ $sens_value=$$resultat{$linux_fan_value.".".$index};
+ printf("FSensor %s : %.0f\n",$sens_name,$sens_value);
+ }
+ if ($key =~ /$linux_volt_descr/) {
+ $sens_name=$$resultat{$key};
+ $index=(split /\./,$key)[-1];
+ $sens_value=$$resultat{$linux_volt_value.".".$index}/1000;
+ printf("VSensor %s : %.2f\n",$sens_name,$sens_value);
+ }
+ if ($key =~ /$linux_misc_descr/) {
+ $sens_name=$$resultat{$key};
+ $index=(split /\./,$key)[-1];
+ $sens_value=$$resultat{$linux_misc_value.".".$index};
+ printf("MSensor %s : %.2f\n",$sens_name,$sens_value);
+ }
+ }
+ # Clear the SNMP Transport Domain and any errors associated with the object.
+ $session->close;
+
+ print "Not implemented yet : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+}
+
+
+# ============================================================================
+# ============================== CISCO CARD/MODULE ===========================
+# ============================================================================
+
+if ($o_check_type eq "ciscoSW") {
+
+ verb("Checking ciscoSW env");
+
+ # Define variables
+ my $output ="";
+ my $final_status =0;
+ my $card_output ="";
+ my $modules_output ="";
+ my $tmp_status;
+ my $result_t;
+ my $index;
+ my @temp_oid;
+ my ($num_cards,$num_cards_ok,$num_modules,$num_modules_ok)=(0,0,0,0);
+
+ # Get SNMP table(s) and check the result
+ my $resultat_c = $session->get_table(Baseoid => $cisco_chassis_card_state);
+ &check_snmp_result($resultat_c,$session->error);
+ my $resultat_m = $session->get_table(Baseoid => $cisco_module_state);
+ &check_snmp_result($resultat_m,$session->error);
+
+ # Check cards
+ if (defined($resultat_c)) {
+ foreach my $key ( keys %$resultat_c) {
+ if ($key =~ /$cisco_chassis_card_state/) {
+ $num_cards++;
+ $tmp_status=$cisco_chassis_card_status[$$resultat_c{$key}];
+ if ($tmp_status == 0) {
+ $num_cards_ok++;
+ } else {
+ $final_status=2;
+ $index=(split /\./,$key)[-1];
+ @temp_oid=($cisco_chassis_card_descr.".".$index,$cisco_chassis_card_slot.".".$index);
+ $result_t = $session->get_request( Varbindlist => \@temp_oid);
+ if (!defined($result_t)) { $card_output.="Invalid card(UNKNOWN)";}
+ else {
+ if ($card_output ne "") {$card_output.=", ";}
+ $card_output.= "Card slot " . $$result_t{$cisco_chassis_card_slot.".".$index};
+ $card_output.= "(" .$$result_t{$cisco_chassis_card_descr.".".$index} ."): ";
+ $card_output.= "status " . $cisco_chassis_card_status_text[$$resultat_c{$key}];
+ }
+ }
+ }
+ }
+ if ($card_output ne "") {$card_output.=", ";}
+ }
+
+ # Check modules
+ if (defined($resultat_m)) {
+ foreach my $key ( keys %$resultat_m) {
+ if ($key =~ /$cisco_module_state/) {
+ $num_modules++;
+ $tmp_status=$cisco_module_status[$$resultat_m{$key}];
+ if ($tmp_status == 0) {
+ $num_modules_ok++;
+ } else {
+ my $module_slot_present=0;
+ $index=(split /\./,$key)[-1];
+ @temp_oid=($cisco_module_slot.".".$index);
+ $result_t = $session->get_request( Varbindlist => \@temp_oid);
+ if (defined($result_t)) {
+ if ($modules_output ne "") {$modules_output.=", ";}
+ $modules_output.= "Module slot " . $$result_t{$cisco_module_slot.".".$index};
+ $module_slot_present=1;
+ }
+ @temp_oid=($cisco_module_descr.".".$index);
+ $result_t = $session->get_request( Varbindlist => \@temp_oid);
+ if (defined($result_t)) {
+ if ($module_slot_present == 1) {
+ $modules_output.= "(" .$$result_t{$cisco_module_descr.".".$index} ."): ";
+ } else {
+ if ($modules_output ne "") {$modules_output.=", ";}
+ $modules_output.= "Module (" .$$result_t{$cisco_module_descr.".".$index} ."): ";
+ }
+ $modules_output.= "status " . $cisco_module_status_text[$$resultat_m{$key}];
+ $module_slot_present=1;
+ }
+ if ($module_slot_present == 0) {
+ $modules_output.="Invalid module(UNKNOWN) : status " . $cisco_module_status_text[$$resultat_m{$key}];
+ }
+ if ($tmp_status == 1 && $final_status==0) {
+ $final_status=1;
+ } else {
+ $final_status=2;
+ }
+ }
+ }
+ }
+ }
+
+ # Clear the SNMP Transport Domain and any errors associated with the object.
+ $session->close;
+
+ if ($num_cards==0 && $num_modules==0) {
+ print "No cards/modules found : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+ $output=$card_output . $modules_output;
+ if ($output ne "") {$output.=" : ";}
+ if ($num_cards!=0) {
+ if ($num_cards == $num_cards_ok) {
+ $output.= $num_cards . " cards OK, ";
+ } else {
+ $output.= $num_cards_ok . "/" . $num_cards ." cards OK, ";
+ $final_status=2;
+ }
+ }
+
+ if ($num_modules!=0) {
+ if ($num_modules == $num_modules_ok) {
+ $output.= $num_modules . " modules OK ";
+ } else {
+ $output.= $num_modules_ok . "/" . $num_modules ." modules OK ";
+ $final_status=2;
+ }
+ }
+
+ if ($final_status == 2) {
+ print $output," : CRITICAL\n";
+ exit $ERRORS{"CRITICAL"};
+ }
+
+ if ($final_status == 1) {
+ print $output," : WARNING\n";
+ exit $ERRORS{"WARNING"};
+ }
+
+ print $output," : OK\n";
+ exit $ERRORS{"OK"};
+}
+
+
+# ============================================================================
+# ============================== JUNIPER =====================================
+# ============================================================================
+
+if ($o_check_type eq "juniper") {
+
+ verb("Checking juniper env");
+
+ # Define variables
+ my $output = "";
+ my $final_status = 0;
+ my $card_output = "";
+ my $ignore = ": Ignored: ";
+ my $tmp_status;
+ my $result_t;
+ my $index;
+ my @temp_oid;
+ my ($num_cards,$num_cards_ok)=(0,0);
+
+ # Get SNMP table(s) and check the result
+ my $resultat_c = $session->get_table(Baseoid => $juniper_operating_state);
+ &check_snmp_result($resultat_c,$session->error);
+
+ if (defined($resultat_c)) {
+ foreach my $key ( keys %$resultat_c) {
+ if ($key =~ /$juniper_operating_state/) {
+ $num_cards++;
+ $tmp_status=$juniper_operating_status[$$resultat_c{$key}];
+ if ($tmp_status == 0) {
+ $num_cards_ok++;
+ } else {
+ $index = $key;
+ $index =~ s/^$juniper_operating_state.//;
+ @temp_oid=($juniper_operating_descr.".".$index);
+ $result_t = $session->get_request( Varbindlist => \@temp_oid);
+ if ($$result_t{$juniper_operating_descr.".".$index} =~ /PCMCIA|USB|Flash|Fan Tray [0-9]$/ && $tmp_status == 3) {
+ $ignore.= "(" .$$result_t{$juniper_operating_descr.".".$index} ."),";
+ }
+
+ else {
+ $final_status = &set_status($tmp_status,$final_status);
+ if (!defined($result_t)) {
+ $card_output.="Invalid component(UNKNOWN)";
+ }
+ else {
+ if ($card_output ne "") {$card_output.=", ";}
+ $card_output.= "(" .$$result_t{$juniper_operating_descr.".".$index} ."): ";
+ $card_output.= "status " . $juniper_operating_status_text[$$resultat_c{$key}];
+ }
+ }
+ }
+ }
+ }
+ if ($card_output ne "") {$card_output.=", ";}
+ }
+
+ # Clear the SNMP Transport Domain and any errors associated with the object.
+ $session->close;
+
+ if ($num_cards==0) {
+ print "No components found : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+ $output=$card_output;
+ if ($output ne "") {$output.=" : ";}
+ if ($num_cards!=0) {
+ if ($num_cards == $num_cards_ok) {
+ $output.= $num_cards . " components OK";
+ } else {
+ $output.= $num_cards_ok . "/" . $num_cards ." components OK" .$ignore;
+ }
+ }
+
+ if ($final_status == 3) {
+ print $output," : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ if ($final_status == 2) {
+ print $output," : CRITICAL\n";
+ exit $ERRORS{"CRITICAL"};
+ }
+
+ if ($final_status == 1) {
+ print $output," : WARNING\n";
+ exit $ERRORS{"WARNING"};
+ }
+
+ print $output," : OK\n";
+ exit $ERRORS{"OK"};
+}
+
+
+# ============================================================================
+# ============================== EXTREME =====================================
+# ============================================================================
+
+if ($o_check_type eq "extremeSW") {
+
+ verb("Checking extreme env");
+
+ # Define variables
+ my $tmp_status;
+ my $index;
+ my $output = "";
+ my $final_status = 0;
+ my $slot_output = "";
+ my $ps_output = "";
+ my $fan_output = "";
+ my $temperature_output = "";
+ my ($num_slot,$num_slot_ok) = (0,0);
+ my ($num_ps,$num_ps_ok) = (0,0);
+ my ($num_fan,$num_fan_ok) = (0,0);
+ my ($slot_name,$slot_state,$slot_serialnumber,$slot_state_text) = (undef,undef,undef,undef);
+ my ($ps_status,$ps_status_text) = (undef,undef);
+ my ($fan_number,$fan_operational,$fan_operational_text) = (undef,undef,undef);
+ my ($temperature_state,$temperature_state_text,$temperature_current) = (undef,undef,undef);
+
+ # Get SNMP table(s) and check the result
+ my $resultat_slot = $session->get_table(Baseoid => $extreme_slot_table);
+ &check_snmp_result($resultat_slot,$session->error);
+ my $resultat_ps = $session->get_table(Baseoid => $extreme_ps_table);
+ &check_snmp_result($resultat_ps,$session->error);
+ my $resultat_fan = $session->get_table(Baseoid => $extreme_fan_table);
+ &check_snmp_result($resultat_fan,$session->error);
+ my @extreme_temp_alarm_oid =($extreme_temperature_alarm);
+ my $resultat_temp_alarm = $session->get_request( Varbindlist => \@extreme_temp_alarm_oid );
+ my @extreme_temp_current_oid =($extreme_temperature_current);
+ my $resultat_temp_current = $session->get_request( Varbindlist => \@extreme_temp_current_oid );
+
+ # Check slot
+ if (defined($resultat_slot)) {
+ foreach my $key ( keys %$resultat_slot) {
+ if ($key =~ /$extreme_slot_name/) {
+ $key =~ s/$extreme_slot_name//;
+
+ # Set the slot variables
+ $slot_name = $$resultat_slot{$extreme_slot_name.$key};
+ $slot_state = $$resultat_slot{$extreme_slot_state.$key};
+ $slot_state_text = $extreme_slot_state_text[$slot_state];
+ $slot_serialnumber = $$resultat_slot{$extreme_slot_serialnumber.$key};
+ $tmp_status = $extreme_slot_nagios[$slot_state];
+ $final_status = &set_status($tmp_status,$final_status);
+
+ if ($slot_state != 1){
+ $num_slot++;
+ if ($tmp_status == 0) {
+ $num_slot_ok++;
+ }
+
+ else {
+ if ($slot_output ne "") {$slot_output.=", ";}
+ $slot_output.= "(Slot: " . $slot_name;
+ $slot_output.= " Status: " . $slot_state_text;
+ $slot_output.= " S/N: " . $slot_serialnumber . ")";
+ }
+ }
+ }
+ }
+ if ($slot_output ne "") {$slot_output.=", ";}
+ }
+
+ # Check power-supply
+ if (defined($resultat_ps)) {
+ foreach my $key ( keys %$resultat_ps) {
+ if ($key =~ /$extreme_ps_status/) {
+ $num_ps++;
+ $key =~ s/$extreme_ps_status//;
+
+ # Set the slot variables
+ $ps_status = $$resultat_ps{$extreme_ps_status.$key};
+ $ps_status_text = $extreme_ps_status_text[$ps_status];
+ $tmp_status = $extreme_ps_nagios[$ps_status];
+ $final_status = &set_status($tmp_status,$final_status);
+
+ if ($tmp_status == 0) {
+ $num_ps_ok++;
+ }
+
+ else {
+ if ($ps_output ne "") {$ps_output.=", ";}
+ $ps_output.= "(Power-supply status: " . $ps_status_text . ")";
+ }
+ }
+ }
+ if ($ps_output ne "") {$ps_output.=", ";}
+ }
+
+ # Check fan
+ if (defined($resultat_fan)) {
+ foreach my $key ( keys %$resultat_fan) {
+ if ($key =~ /$extreme_fan_number/) {
+ $num_fan++;
+ $key =~ s/$extreme_fan_number//;
+
+ # Set the slot variables
+ $fan_number = $$resultat_fan{$extreme_fan_number.$key};
+ $fan_operational = $$resultat_fan{$extreme_fan_operational.$key};
+ $fan_operational_text = $extreme_fan_operational_text[$fan_operational];
+ $tmp_status = $extreme_fan_nagios[$fan_operational];
+ $final_status = &set_status($tmp_status,$final_status);
+
+ if ($tmp_status == 0) {
+ $num_fan_ok++;
+ }
+
+ else {
+ if ($fan_output ne "") {$fan_output.=", ";}
+ $fan_output.= "(Fan: " . $fan_number;
+ $fan_output.= " Status: " . $fan_operational_text . ")";
+ }
+ }
+ }
+ if ($fan_output ne "") {$fan_output.=", ";}
+ }
+
+ # Check temperature
+ if (defined($resultat_temp_alarm) && defined($resultat_temp_current)){
+ $temperature_state = $$resultat_temp_alarm{$extreme_temperature_alarm};
+ $temperature_state_text = $extreme_temperature_alarm_text[$temperature_state];
+ $temperature_current = $$resultat_temp_current{$extreme_temperature_current};
+
+ $tmp_status = $extreme_temperature_nagios[$temperature_state];
+ $final_status = &set_status($tmp_status,$final_status);
+
+ $temperature_output.= "Temp: " . $temperature_state_text;
+ $temperature_output.= " (" . $temperature_current . " celcius)";
+ }
+
+ # Clear the SNMP Transport Domain and any errors associated with the object.
+ $session->close;
+
+ if ($num_slot == 0 && $num_ps == 0 && $num_fan == 0) {
+ print "No slot/power-supply/fan found : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ $output=$slot_output . $ps_output . $fan_output;
+
+ if ($output ne "") {$output.=": ";}
+
+ if ($num_slot != 0) {
+ if ($num_slot == $num_slot_ok) {
+ $output.= $num_slot . " slots OK, ";
+ } else {
+ $output.= $num_slot_ok . "/" . $num_slot ." slots OK, ";
+ }
+ }
+
+ if ($num_ps != 0) {
+ if ($num_ps == $num_ps_ok) {
+ $output.= $num_ps . " power-supply OK, ";
+ } else {
+ $output.= $num_ps_ok . "/" . $num_ps ." power-supply OK, ";
+ }
+ }
+
+ if ($num_fan != 0) {
+ if ($num_fan == $num_fan_ok) {
+ $output.= $num_fan . " fans OK, ";
+ } else {
+ $output.= $num_fan_ok . "/" . $num_fan ." fans OK, ";
+ }
+ }
+
+ $output.= $temperature_output;
+
+ if ($final_status == 3) {
+ print $output," : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ if ($final_status == 2) {
+ print $output," : CRITICAL\n";
+ exit $ERRORS{"CRITICAL"};
+ }
+
+ if ($final_status == 1) {
+ print $output," : WARNING\n";
+ exit $ERRORS{"WARNING"};
+ }
+
+ print $output," : OK\n";
+ exit $ERRORS{"OK"};
+}
+
+
+# ============================================================================
+# ============================== HP PROCURVE =================================
+# ============================================================================
+
+if ($o_check_type eq "procurve") {
+
+ verb("Checking procurve env");
+
+ # Define variables
+ my $output = "";
+ my $final_status = 0;
+ my $power_output = "";
+ my $fan_output = "";
+ my $temp_output = "";
+ my $tmp_status;
+ my $index;
+ my @temp_oid;
+ my ($num_power,$num_power_ok,$num_fan,$num_fan_ok,$num_temp,$num_temp_ok)=(0,0,0,0,0,0);
+
+ # Get SNMP table(s) and check the result
+ my $resultat_state = $session->get_table(Baseoid => $procurve_operating_state);
+ &check_snmp_result($resultat_state,$session->error);
+ my $resultat_descr = $session->get_table(Baseoid => $procurve_operating_descr);
+ &check_snmp_result($resultat_descr,$session->error);
+
+ if (defined($resultat_state)) {
+ foreach my $key ( keys %$resultat_state) {
+ if ($key =~ /$procurve_operating_state/) {
+
+ $tmp_status=$procurve_operating_status[$$resultat_state{$key}];
+
+ $index = $key;
+ $index =~ s/^$procurve_operating_state.//;
+
+ my $description = $$resultat_descr{$procurve_operating_descr.".".$index};
+
+ if ($description =~ /Power/ ) {$num_power++;}
+ if ($description =~ /Fan/ ) {$num_fan++;}
+ if ($description =~ /temperature/ ) {$num_temp++;}
+
+ if ($description =~ /Power/ && $tmp_status == 0) {$num_power_ok++;}
+ if ($description =~ /Fan/ && $tmp_status == 0) {$num_fan_ok++;}
+ if ($description =~ /temperature/ && $tmp_status == 0) {$num_temp_ok++;}
+
+ if ($tmp_status != 0) {
+ if ($description =~ /Power/ && $tmp_status == 4) {$num_power--;}
+ if ($description =~ /Fan/ && $tmp_status == 4) {$num_fan--;}
+ if ($description =~ /temperature/ && $tmp_status == 4) {$num_temp--;}
+
+ if ($tmp_status != 4) {
+ if ($tmp_status == 1 && $final_status != 2) {$final_status=$tmp_status;}
+ if ($tmp_status == 2) {$final_status=$tmp_status;}
+ if ($tmp_status == 3 && $final_status == 0) {$final_status=$tmp_status;}
+
+ if ($description =~ /Power/ ) {
+ if (!defined($description)) {$power_output.="Invalid power(UNKNOWN)";}
+ else {
+ if ($power_output ne "") {$power_output.=", ";}
+ $power_output.= "(".$description."): ";
+ $power_output.= "status " . $procurve_operating_status_text[$$resultat_state{$key}];
+ }
+ }
+
+ if ($description =~ /Fan/ ) {
+ if (!defined($description)) {$fan_output.="Invalid fan(UNKNOWN)";}
+ else {
+ if ($fan_output ne "") {$fan_output.=", ";}
+ $fan_output.= "(".$description."): ";
+ $fan_output.= "status " . $procurve_operating_status_text[$$resultat_state{$key}];
+ }
+ }
+
+ if ($description =~ /temperature/ ) {
+ if (!defined($description)) {$power_output.="Invalid temp(UNKNOWN)";}
+ else {
+ if ($temp_output ne "") {$temp_output.=", ";}
+ $temp_output.= "(".$description."): ";
+ $temp_output.= "status " . $procurve_operating_status_text[$$resultat_state{$key}];
+ }
+ }
+ }
+ }
+ }
+ }
+ if ($power_output ne "") {$power_output.=", ";}
+ if ($fan_output ne "") {$fan_output.=", ";}
+ if ($temp_output ne "") {$temp_output.=", ";}
+ }
+
+ # Clear the SNMP Transport Domain and any errors associated with the object.
+ $session->close;
+
+ if ($num_power==0 && $num_fan==0 && $num_temp==0) {
+ print "No power/fan/temp found : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ $output=$power_output . $fan_output . $temp_output;
+ if ($output ne "") {$output.=" : ";}
+
+ if ($num_power!=0) {
+ if ($num_power == $num_power_ok) {
+ $output.= $num_power . " power OK, ";
+ } else {
+ $output.= $num_power_ok . "/" . $num_power ." power OK, ";
+ }
+ }
+
+ if ($num_fan!=0) {
+ if ($num_fan == $num_fan_ok) {
+ $output.= $num_fan . " fan OK, ";
+ } else {
+ $output.= $num_fan_ok . "/" . $num_fan ." fan OK, ";
+ }
+ }
+
+ if ($num_temp!=0) {
+ if ($num_temp == $num_temp_ok) {
+ $output.= $num_temp . " temp OK";
+ } else {
+ $output.= $num_temp_ok . "/" . $num_temp ." temp OK";
+ }
+ }
+
+ if ($final_status == 3) {
+ print $output," : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ if ($final_status == 2) {
+ print $output," : CRITICAL\n";
+ exit $ERRORS{"CRITICAL"};
+ }
+
+ if ($final_status == 1) {
+ print $output," : WARNING\n";
+ exit $ERRORS{"WARNING"};
+ }
+
+ print $output," : OK\n";
+ exit $ERRORS{"OK"};
+}
+
+
+# ============================================================================
+# ============================== NETSCREEN ===================================
+# ============================================================================
+
+if ($o_check_type eq "netscreen") {
+
+ verb("Checking netscreen env");
+
+ # Define variables
+ my $output = "";
+ my $final_status = 0;
+ my $slot_output = "";
+ my $power_output = "";
+ my $fan_output = "";
+ my $tmp_status;
+ my $result_t;
+ my $index;
+ my @temp_oid;
+ my ($num_slot,$num_slot_ok,$num_power,$num_power_ok,$num_fan,$num_fan_ok)=(0,0,0,0,0,0);
+
+ # Get SNMP table(s) and check the result
+ my $resultat_s = $session->get_table(Baseoid => $netscreen_slot_operating_state);
+ &check_snmp_result($resultat_s,$session->error);
+ my $resultat_p = $session->get_table(Baseoid => $netscreen_power_operating_state);
+ &check_snmp_result($resultat_p,$session->error);
+ my $resultat_f = $session->get_table(Baseoid => $netscreen_fan_operating_state);
+ &check_snmp_result($resultat_f,$session->error);
+
+ # Check if the ScreenOS version is not below 6.1 or 5GT, these are not supported
+ my @netscreen_os_oid = ($sysdescr);
+ my $netscreen_version = $session->get_request(Varbindlist => \@netscreen_os_oid);
+ if( ($$netscreen_version{$sysdescr} !~ /version 6.[1-9]/) || ($$netscreen_version{$sysdescr} =~ /5GT/) )
+ {
+ print "Not checked, ScreenOS version below 6.1 and/or 5GT: OK\n";
+ exit $ERRORS{"OK"};
+ }
+
+ # Check slots
+ if (defined($resultat_s)) {
+ foreach my $key ( keys %$resultat_s) {
+ if ($key =~ /$netscreen_slot_operating_state/) {
+ $num_slot++;
+ $tmp_status = $netscreen_slot_operating_status[$$resultat_s{$key}];
+ $final_status = &set_status($tmp_status,$final_status);
+
+ if ($tmp_status == 0) {
+ $num_slot_ok++;
+ } else {
+ $index = $key;
+ $index =~ s/^$netscreen_slot_operating_state.//;
+ @temp_oid=($netscreen_slot_operating_descr.".".$index);
+ $result_t = $session->get_request( Varbindlist => \@temp_oid);
+
+ if (!defined($result_t)) {$slot_output.="Invalid slot(UNKNOWN)";}
+
+ else {
+ if ($slot_output ne "") {$slot_output.=", ";}
+ $slot_output.= "(" .$$result_t{$netscreen_slot_operating_descr.".".$index} ."): ";
+ $slot_output.= "status " . $netscreen_slot_operating_status_text[$$resultat_s{$key}];
+ }
+ }
+ }
+ }
+ if ($slot_output ne "") {$slot_output.=", ";}
+ }
+
+ # Check power
+ if (defined($resultat_p)) {
+ foreach my $key ( keys %$resultat_p) {
+ if ($key =~ /$netscreen_power_operating_state/) {
+ $num_power++;
+ $tmp_status = $netscreen_power_operating_status[$$resultat_p{$key}];
+ $final_status = &set_status($tmp_status,$final_status);
+
+ if ($tmp_status == 0) {
+ $num_power_ok++;
+ } else {
+ $index = $key;
+ $index =~ s/^$netscreen_power_operating_state.//;
+ @temp_oid=($netscreen_power_operating_descr.".".$index);
+ $result_t = $session->get_request( Varbindlist => \@temp_oid);
+
+ if (!defined($result_t)) {$slot_output.="Invalid power(UNKNOWN)";}
+
+ else {
+ if ($power_output ne "") {$power_output.=", ";}
+ $power_output.= "(" .$$result_t{$netscreen_power_operating_descr.".".$index} ."): ";
+ $power_output.= "status " . $netscreen_power_operating_status_text[$$resultat_p{$key}];
+ }
+ }
+ }
+ }
+ if ($power_output ne "") {$power_output.=", ";}
+ }
+
+ # Check fans
+ if (defined($resultat_f)) {
+ foreach my $key ( keys %$resultat_f) {
+ if ($key =~ /$netscreen_fan_operating_state/) {
+ $num_fan++;
+ $tmp_status = $netscreen_fan_operating_status[$$resultat_f{$key}];
+ $final_status = &set_status($tmp_status,$final_status);
+ if ($tmp_status == 0) {
+ $num_fan_ok++;
+ } else {
+ if($tmp_status == 4) {
+ $num_fan--;
+ } else {
+ $index = $key;
+ $index =~ s/^$netscreen_fan_operating_state.//;
+ @temp_oid=($netscreen_fan_operating_descr.".".$index);
+ $result_t = $session->get_request( Varbindlist => \@temp_oid);
+
+ if (!defined($result_t)) {$fan_output.="Invalid fan(UNKNOWN)";}
+
+ else {
+ if ($fan_output ne "") {$fan_output.=", ";}
+ $fan_output.= "(" .$$result_t{$netscreen_fan_operating_descr.".".$index} ."): ";
+ $fan_output.= "status " . $netscreen_fan_operating_status_text[$$resultat_f{$key}];
+ }
+ }
+ }
+ }
+ }
+ if ($fan_output ne "") {$fan_output.=", ";}
+ }
+
+ # Clear the SNMP Transport Domain and any errors associated with the object.
+ $session->close;
+
+ if ($num_slot==0 && $num_power==0 && $num_fan==0) {
+ print "No slot/power/fan found : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ $output=$slot_output . $power_output . $fan_output;
+ if ($output ne "") {$output.=" : ";}
+
+ if ($num_slot!=0) {
+ if ($num_slot == $num_slot_ok) {
+ $output.= $num_slot . " slots OK, ";
+ } else {
+ $output.= $num_slot_ok . "/" . $num_slot ." slots OK, ";
+ }
+ }
+
+ if ($num_power!=0) {
+ if ($num_power == $num_power_ok) {
+ $output.= $num_power . " power OK, ";
+ } else {
+ $output.= $num_power_ok . "/" . $num_power ." power OK ";
+ }
+ }
+
+ if ($num_fan!=0) {
+ if ($num_fan == $num_fan_ok) {
+ $output.= $num_fan . " fans OK";
+ } else {
+ $output.= $num_fan_ok . "/" . $num_fan ." fans OK";
+ }
+ }
+
+ if ($final_status == 3) {
+ print $output," : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ if ($final_status == 2) {
+ print $output," : CRITICAL\n";
+ exit $ERRORS{"CRITICAL"};
+ }
+
+ if ($final_status == 1) {
+ print $output," : WARNING\n";
+ exit $ERRORS{"WARNING"};
+ }
+
+ print $output," : OK\n";
+ exit $ERRORS{"OK"};
+}
+
+
+# ============================================================================
+# ============================== CISCO (CISCO-ENTITY-SENSOR-MIB) =============
+# ============================================================================
+
+if ($o_check_type eq "ciscoNEW") {
+
+ verb("Checking Cisco CISCO-ENTITY-SENSOR-MIB env");
+
+ # Define variables
+ my $output = "";
+ my $final_status = 0;
+ my $sensor_output = "";
+ my $tmp_status;
+ my $result_t;
+ my $index;
+ my @temp_oid;
+ my ($num_sensors,$num_sensors_ok,$num_thresholds,$num_thresholds_ok) = (0,0,0,0);
+
+ # Get SNMP table(s) and check the result
+ my $resultat_status = $session->get_table(Baseoid => $cisco_ios_xe_status);
+ &check_snmp_result($resultat_status,$session->error);
+ my $resultat_type = $session->get_table(Baseoid => $cisco_ios_xe_type);
+ &check_snmp_result($resultat_type,$session->error);
+ my $resultat_precision = $session->get_table(Baseoid => $cisco_ios_xe_precision);
+ &check_snmp_result($resultat_precision,$session->error);
+ my $resultat_value = $session->get_table(Baseoid => $cisco_ios_xe_value);
+ &check_snmp_result($resultat_value,$session->error);
+ my $resultat_threshold_value = $session->get_table(Baseoid => $cisco_ios_xe_threshold_value);
+ &check_snmp_result($resultat_threshold_value,$session->error);
+ my $resultat_threshold_severity = $session->get_table(Baseoid => $cisco_ios_xe_threshold_severity);
+ &check_snmp_result($resultat_threshold_severity,$session->error);
+
+ if (defined($resultat_status)) {
+ foreach my $key ( keys %$resultat_status) {
+ if ($key =~ /$cisco_ios_xe_status/) {
+ $num_sensors++;
+
+ $tmp_status=$cisco_ios_xe_operating_status[$$resultat_status{$key}];
+
+ $index = $key;
+ $index =~ s/^$cisco_ios_xe_status.//;
+
+ if ($tmp_status == 1) {
+ $num_sensors_ok++;
+
+ # Get sensor TYPE
+ my $CiscoType = $$resultat_type{$cisco_ios_xe_type.".".$index};
+
+ if ($CiscoType == 8) {
+
+ # Get sensor PRECISION
+ my $CiscoPrecision = $$resultat_precision{$cisco_ios_xe_precision.".".$index};
+
+ if ($CiscoPrecision == 0){
+
+ # Get sensor THRESHOLD VALUE 1
+ my $CiscoThreshold_value1 = $$resultat_threshold_value{$cisco_ios_xe_threshold_value.".".$index.".1"};
+
+ if (defined($CiscoThreshold_value1)){
+
+ # Get sensor VALUE
+ my $CiscoValue = $$resultat_value{$cisco_ios_xe_value.".".$index};
+
+ # Get sensor THRESHOLD SEVERITY 2
+ my $CiscoThreshold_severity2 = $$resultat_threshold_severity{$cisco_ios_xe_threshold_severity.".".$index.".2"};
+
+ if ($CiscoThreshold_severity2 ne "noSuchInstance") {
+ $num_thresholds++;
+
+ if (($CiscoValue < $CiscoThreshold_value1) || ($CiscoThreshold_severity2 == 10)){
+ $num_thresholds_ok++;
+ } else {
+ $final_status=2;
+
+ # Get sensor DESCRIPTION
+ @temp_oid=($cisco_ios_xe_physicaldescr.".".$index);
+ $result_t = $session->get_request( Varbindlist => \@temp_oid);
+
+ if ($output ne "") {$output.=", ";}
+ $output.= "(" .$$result_t{$cisco_ios_xe_physicaldescr.".".$index}.": ".$CiscoValue." Celsius)";
+ }
+ }
+ }
+ }
+ }
+
+ } else {
+ $final_status=2;
+
+ # Get sensor DESCRIPTION
+ @temp_oid=($cisco_ios_xe_physicaldescr.".".$index);
+ $result_t = $session->get_request( Varbindlist => \@temp_oid);
+
+ if ($tmp_status == 2){
+ if ($output ne "") {$output.=", ";}
+ $output.= "(" .$$result_t{$cisco_ios_xe_physicaldescr.".".$index}.": sensor unavailable)";
+ }
+ if ($tmp_status == 3){
+ if ($output ne "") {$output.=", ";}
+ $output.= "(" .$$result_t{$cisco_ios_xe_physicaldescr.".".$index}.": sensor nonoperational)";
+ }
+ }
+ }
+ }
+ }
+
+ # Clear the SNMP Transport Domain and any errors associated with the object.
+ $session->close;
+
+ if ($num_sensors==0) {
+ print "No components found : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ if ($output ne "") {$output.=" : ";}
+ if ($num_sensors!=0) {
+ if (($num_sensors == $num_sensors_ok) && ($num_thresholds == $num_thresholds_ok)){
+ $output.= $num_sensors . " sensors reported OK (".$num_thresholds." thresholds reported OK)";
+ } else {
+ $output.= $num_sensors_ok . "/" . $num_sensors ." sensors reported OK (".$num_thresholds." sensors using thresholds)";
+ }
+ }
+
+ if ($final_status == 3) {
+ print $output," : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ if ($final_status == 2) {
+ print $output," : CRITICAL\n";
+ exit $ERRORS{"CRITICAL"};
+ }
+
+ if ($final_status == 1) {
+ print $output," : WARNING\n";
+ exit $ERRORS{"WARNING"};
+ }
+
+ print $output," : OK\n";
+ exit $ERRORS{"OK"};
+}
+
+
+# ============================================================================
+# ============================== CITRIX NETSCALER ============================
+# ============================================================================
+
+if ($o_check_type eq "citrix") {
+
+ verb("Checking citrix");
+
+ # Define variables
+ my $output = "";
+ my $final_status = 0;
+ my $voltage_output = "";
+ my $powersupply_output = "";
+ my $fan_output = "";
+ my $temp_output = "";
+ my $ha_state_output = "";
+ my $ssl_engine_output = "";
+ my $ha_state_and_ssl_engine = "";
+ my $result_t;
+ my $index;
+ my @temp_oid;
+ my $using_voltage_threshold;
+ my ($num_voltage,$num_voltage_ok,$num_powersupply,$num_powersupply_ok,$num_fan,$num_fan_ok,$num_temp,$num_temp_ok)=(0,0,0,0,0,0);
+
+ # Get SNMP table(s) and check the result
+ my $resultat_status = $session->get_table(Baseoid => $citrix_desc);
+ &check_snmp_result($resultat_status,$session->error);
+ my $resultat_value = $session->get_table(Baseoid => $citrix_value);
+ &check_snmp_result($resultat_value,$session->error);
+
+ if (defined($resultat_status)) {
+ foreach my $key ( keys %$resultat_status) {
+ if ($key =~ /$citrix_desc/) {
+ my $reported_counter_name = $$resultat_status{$key};
+ $using_voltage_threshold = 0;
+
+ $index = $key;
+ $index =~ s/^$citrix_desc.//;
+
+ my $reported_counter_value = $$resultat_value{$citrix_value.".".$index};
+
+ # Thresholds are hardcoded and are based on the "Citrix NetScaler SNMP OID Reference - Release 9.2" document.
+ # If a threshold for a specific component is not available in this document then a logical threshold has been picked.
+
+ if ($reported_counter_name =~ /Voltage/ ) {
+ $num_voltage++; my $ha_state_and_ssl_engine ="";
+
+ # Measures the +5V power supply in millivolt
+ if ($reported_counter_name =~ /\+5.0VSupplyVoltage/ ){
+ $using_voltage_threshold = 1;
+ if (($reported_counter_value > 4500 ) && ($reported_counter_value < 5500)) {
+ $num_voltage_ok++;
+ } else {
+ if ($voltage_output ne "") {$voltage_output.=", ";}
+ $voltage_output.= "(" .$reported_counter_name.": ";
+ $voltage_output.= $reported_counter_value." mV)";
+ $final_status = 2;
+ }
+ }
+
+ # Measures the +12V power supply in millivolt
+ if ($reported_counter_name =~ /\+12.0VSupplyVoltage/ ){
+ $using_voltage_threshold = 1;
+ if (($reported_counter_value > 10800 ) && ($reported_counter_value < 13200)) {
+ $num_voltage_ok++;
+ } else {
+ if ($voltage_output ne "") {$voltage_output.=", ";}
+ $voltage_output.= "(" .$reported_counter_name.": ";
+ $voltage_output.= $reported_counter_value." mV)";
+ $final_status = 2;
+ }
+ }
+
+ # Measures the -5V power supply in millivolt
+ if ($reported_counter_name =~ /\-5.0VSupplyVoltage/ ){
+ $using_voltage_threshold = 1;
+ if (($reported_counter_value > -5500 ) && ($reported_counter_value < -4500)) {
+ $num_voltage_ok++;
+ } else {
+ if ($voltage_output ne "") {$voltage_output.=", ";}
+ $voltage_output.= "(" .$reported_counter_name.": ";
+ $voltage_output.= $reported_counter_value." mV)";
+ $final_status = 2;
+ }
+ }
+
+ # Measures the -12V power supply in millivolt
+ if ($reported_counter_name =~ /\-12.0VSupplyVoltage/ ){
+ $using_voltage_threshold = 1;
+ if (($reported_counter_value > -13200 ) && ($reported_counter_value < -10800)) {
+ $num_voltage_ok++;
+ } else {
+ if ($voltage_output ne "") {$voltage_output.=", ";}
+ $voltage_output.= "(" .$reported_counter_name.": ";
+ $voltage_output.= $reported_counter_value." mV)";
+ $final_status = 2;
+ }
+ }
+
+ # Measures the +3.3V main and standby power supply in millivolt
+ if ($reported_counter_name =~ /3.3VSupplyVoltage/ ){
+ $using_voltage_threshold = 1;
+ if (($reported_counter_value > 2970 ) && ($reported_counter_value < 3630)) {
+ $num_voltage_ok++;
+ } else {
+ if ($voltage_output ne "") {$voltage_output.=", ";}
+ $voltage_output.= "(" .$reported_counter_name.": ";
+ $voltage_output.= $reported_counter_value." mV)";
+ $final_status = 2;
+ }
+
+
+ }
+
+ # Measures the +5V standby power supply in millivolt
+ if ($reported_counter_name =~ /PowerSupply5vStandbyVoltage/ ){
+ $using_voltage_threshold = 1;
+ if (($reported_counter_value > 4500 ) && ($reported_counter_value < 5500)) {
+ $num_voltage_ok++;
+ } else {
+ if ($voltage_output ne "") {$voltage_output.=", ";}
+ $voltage_output.= "(" .$reported_counter_name.": ";
+ $voltage_output.= $reported_counter_value." mV)";
+ $final_status = 2;
+ }
+ }
+
+ # Measures the processor core voltage in millivolt
+ if ($reported_counter_name =~ /CPU0CoreVoltage|CPU1CoreVoltage/ ){
+ $using_voltage_threshold = 1;
+ if (($reported_counter_value > 1080 ) && ($reported_counter_value < 1650)) {
+ $num_voltage_ok++;
+ } else {
+ if ($voltage_output ne "") {$voltage_output.=", ";}
+ $voltage_output.= "(" .$reported_counter_name.": ";
+ $voltage_output.= $reported_counter_value." mV)";
+ $final_status = 2;
+ }
+ }
+
+ # If no defined voltage description is found, uses the following thresholds
+ if ($using_voltage_threshold == 0){
+ if (($reported_counter_value > 1000 ) && ($reported_counter_value < 6000)){
+ $num_voltage_ok++;
+ } else {
+ if ($voltage_output ne "") {$voltage_output.=", ";}
+ $voltage_output.= "(" .$reported_counter_name.": ";
+ $voltage_output.= $reported_counter_value." mV)";
+ $final_status = 2;
+ }
+ }
+ }
+
+ # Power Supply check. No documentation available about possible values. "3" appears to be "OK", so anything other then that will be reported
+ if ($reported_counter_name =~ /PowerSupply1FailureStatus|PowerSupply2FailureStatus/ ) {
+ $num_powersupply++;
+ if ($reported_counter_value == 3 ){
+ $num_powersupply_ok++;
+ } else {
+ if ($powersupply_output ne "") {$powersupply_output.=", ";}
+ $powersupply_output.= "(" .$reported_counter_name.": ";
+ $powersupply_output.= $reported_counter_value." Failure)";
+ $final_status = 2;
+ }
+ }
+
+ # Fan speed threshold in RPM. Documentation is not clear about the thresholds
+ if ($reported_counter_name =~ /Fan/ ) {
+ $num_fan++;
+ if (($reported_counter_value > 5000 ) && ($reported_counter_value < 15000)){
+ $num_fan_ok++;
+ } else {
+ if ($fan_output ne "") {$fan_output.=", ";}
+ $fan_output.= "(" .$reported_counter_name.": ";
+ $fan_output.= $reported_counter_value." RPM)";
+ $final_status = 2;
+ }
+ }
+
+ # It looks like Citrix NetScaler devices are based on Intel XEON processors. Most of them appear to have a maximum operation temperature of 75 degrees Celsius.
+ if ($reported_counter_name =~ /CPU0Temperature|CPU1Temperature/ ) {
+ $num_temp++;
+ if (($reported_counter_value > 50 ) && ($reported_counter_value < 72)){
+ $num_temp_ok++;
+ } else {
+ if ($temp_output ne "") {$temp_output.=", ";}
+ $temp_output.= "(" .$reported_counter_name.": ";
+ $temp_output.= $reported_counter_value." Celsius)";
+ $final_status = 2;
+ }
+ }
+
+ # Internal temperature in degrees Celsius. No defined threshold in documentation.
+ if ($reported_counter_name =~ /InternalTemperature/ ) {
+ $num_temp++;
+ if (($reported_counter_value > 20 ) && ($reported_counter_value < 40)){
+ $num_temp_ok++;
+ } else {
+ if ($temp_output ne "") {$temp_output.=", ";}
+ $temp_output.= "(" .$reported_counter_name.": ";
+ $temp_output.= $reported_counter_value." Celsius)";
+ $final_status = 2;
+ }
+ }
+ }
+ }
+
+ # Get High Availability State
+ @temp_oid=($citrix_high_availability_state);
+ $result_t = $session->get_request( Varbindlist => \@temp_oid);
+ my $ha_cur_state = $$result_t{$citrix_high_availability_state};
+ if (defined($ha_cur_state)){
+ $ha_state_output.= "HA State " . $citrix_high_availability_state_text[$ha_cur_state];
+ if ($ha_cur_state != 3){
+ $final_status = 2;
+ }
+ }
+
+ # Get High Availability State
+ @temp_oid=($citrix_ssl_engine_state);
+ $result_t = $session->get_request( Varbindlist => \@temp_oid);
+ my $ssl_engine_state = $$result_t{$citrix_ssl_engine_state};
+ if (defined($ssl_engine_state)){
+ $ssl_engine_output.= "SSL Engine " . $citrix_ssl_engine_state_text[$ssl_engine_state];
+ if ($ssl_engine_state != 1){
+ $final_status = 2;
+ }
+ }
+
+ if ((defined($ha_cur_state)) && (defined($ssl_engine_state))){$ha_state_and_ssl_engine = " (".$ha_state_output.", ".$ssl_engine_output.")"};
+ if ((defined($ha_cur_state)) && (!defined($ssl_engine_state))){$ha_state_and_ssl_engine = " - (".$ha_state_output.")"};
+ if ((!defined($ha_cur_state)) && (defined($ssl_engine_state))){$ha_state_and_ssl_engine = " - (".$ssl_engine_output.")"};
+
+ if ($voltage_output ne "") {$voltage_output.=", ";}
+ if ($powersupply_output ne "") {$powersupply_output.=", ";}
+ if ($fan_output ne "") {$fan_output.=", ";}
+ if ($temp_output ne "") {$temp_output.=", ";}
+ }
+
+ # Clear the SNMP Transport Domain and any errors associated with the object.
+ $session->close;
+
+ if ($num_voltage==0 && $num_fan==0 && $num_temp==0) {
+ print "No power/fan/temp found : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ $output=$voltage_output . $fan_output . $temp_output ;
+
+ if ($output ne "") {$output.=" : ";}
+
+ if ($num_powersupply!=0) {
+ if ($num_powersupply == $num_powersupply_ok) {
+ $output.= $num_powersupply . " powersupply OK, ";
+ } else {
+ $output.= $num_powersupply_ok . "/" . $num_powersupply ." powersupply OK, ";
+ }
+ }
+
+ if ($num_voltage!=0) {
+ if ($num_voltage == $num_voltage_ok) {
+ $output.= $num_voltage . " voltage OK, ";
+ } else {
+ $output.= $num_voltage_ok . "/" . $num_voltage ." voltage OK, ";
+ }
+ }
+
+ if ($num_fan!=0) {
+ if ($num_fan == $num_fan_ok) {
+ $output.= $num_fan . " fan OK, ";
+ } else {
+ $output.= $num_fan_ok . "/" . $num_fan ." fan OK, ";
+ }
+ }
+
+ if ($num_temp!=0) {
+ if ($num_temp == $num_temp_ok) {
+ $output.= $num_temp . " temp OK";
+ } else {
+ $output.= $num_temp_ok . "/" . $num_temp ." temp OK";
+ }
+ }
+
+
+ $output.= $ha_state_and_ssl_engine;
+
+
+ if ($final_status == 3) {
+ print $output," : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ if ($final_status == 2) {
+ print $output," : CRITICAL\n";
+ exit $ERRORS{"CRITICAL"};
+ }
+
+ if ($final_status == 1) {
+ print $output," : WARNING\n";
+ exit $ERRORS{"WARNING"};
+ }
+
+ print $output," : OK\n";
+ exit $ERRORS{"OK"};
+
+}
+
+
+# ============================================================================
+# ============================== TRANSMODE ===================================
+# ============================================================================
+
+if ($o_check_type eq "transmode") {
+
+ verb("Checking transmode env");
+
+ # Define variables
+ my $final_status = 0;
+ my $tmp_status = undef;
+ my $num_alarms = 0;
+ my $num_ignored = 0;
+ my $alarm_output = "";
+ my $output = "";
+ my ($alarm_serv,$alarm_serv_txt,$alarm_descr,$alarm_time_start,$alarm_time_end,$alarm_rack,$alarm_slot,$alarm_unit)=(undef,undef,undef,undef,undef,undef,undef,undef);
+
+ # Get SNMP table(s) and check the result
+ my $resultat_c = $session->get_table(Baseoid => $transmode_table);
+ &check_snmp_result($resultat_c,$session->error);
+
+ if (defined($resultat_c)) {
+ foreach my $key ( keys %$resultat_c) {
+ if ($key =~ /$transmode_alarm_sev/) {
+ $alarm_serv = $$resultat_c{$key};
+ $key =~ s/$transmode_alarm_sev//;
+
+ # Set the alarm variables
+ $alarm_descr = $$resultat_c{$transmode_alarm_descr.$key};
+ $alarm_time_start = $$resultat_c{$transmode_alarm_time_start.$key};
+ $alarm_time_end = $$resultat_c{$transmode_alarm_time_end.$key};
+ $alarm_rack = $$resultat_c{$transmode_alarm_rack.$key};
+ $alarm_slot = $$resultat_c{$transmode_alarm_slot.$key};
+ $alarm_unit = $$resultat_c{$transmode_alarm_unit.$key};
+ $alarm_serv_txt = $transmode_alarm_status_text[$alarm_serv];
+ $tmp_status = $transmode_alarm_status[$alarm_serv];
+
+ # Ignore client related alarms or alarms that are deactivated
+ if (($alarm_descr =~ /client|Client/ ) || ($alarm_time_end =~ /[0-9]{4}[-][0-9]{2}[-][0-9]{2}/)) {
+ $num_ignored++;
+ }
+
+ # Print reported alarms that are not ignored
+ else {
+ $final_status = &set_status($tmp_status,$final_status);
+ $num_alarms++;
+ $alarm_output .= "Rack:" . $alarm_rack;
+ $alarm_output .= " Slot:" . $alarm_slot;
+ $alarm_output .= " Unit:" . $alarm_unit;
+ $alarm_output .= " Desc:" . $alarm_descr;
+ $alarm_output .= " Time:" . $alarm_time_start;
+ $alarm_output .= " Sev:" . $alarm_serv_txt .",";
+ }
+ }
+ }
+ }
+
+ # Clear the SNMP Transport Domain and any errors associated with the object.
+ $session->close;
+
+ if ($num_alarms == 0) {
+ print "No alarms found : OK\n";
+ exit $ERRORS{"OK"};
+ }
+
+ $output=$alarm_output;
+
+ if ($output ne "") {$output.=" : ";}
+
+ if ($num_alarms != 0) {
+ $output .= $num_alarms . " Active alarm(s) found, ".$num_ignored." ignored";
+ }
+
+ if ($final_status == 3) {
+ print $output," : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ if ($final_status == 2) {
+ print $output," : CRITICAL\n";
+ exit $ERRORS{"CRITICAL"};
+ }
+
+ if ($final_status == 1) {
+ print $output," : WARNING\n";
+ exit $ERRORS{"WARNING"};
+ }
+
+ print $output," : OK\n";
+ exit $ERRORS{"OK"};
+}
+
+
+# ============================================================================
+# ============================== NO CHECK DEFINED ============================
+# ============================================================================
+
+print "Unknown check type : UNKNOWN\n";
+exit $ERRORS{"UNKNOWN"};
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/control
new file mode 100644
index 0000000..edc5e58
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/control
@@ -0,0 +1,12 @@
+Homepage: http://exchange.nagios.org/directory/Plugins/Hardware/Network-Gear/Cisco/Check-various-hardware-environmental-sensors/details
+Watch: http://exchange.nagios.org/directory/Plugins/Hardware/Network-Gear/Cisco/Check-various-hardware-environmental-sensors/details Current Version</div><div class="data">([0-9.]+)</div>
+Recommends: libnet-snmp-perl
+Description: plugin to check various hardware statuses
+ Using snmp the plugin is able to retrieve Fan, power-supply,
+ voltage, temperature, card and module status and various other
+ information from Cisco, Nokia, Blue Coat, IronPort,
+ Foundry Network, Linux (using lm-sensors), Extreme Networks,
+ Juniper Networks, HP ProCurve, Netscreen, Citrix NetScaler
+ and Transmode Systems hardware.
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Version: 0.7
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/copyright
new file mode 100644
index 0000000..01c9b55
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_environment/copyright
@@ -0,0 +1,17 @@
+
+Author : Michiel Timmers ( michiel.timmers AT gmx.net)
+Based on : "check_snmp_env" plugin (version 1.3) from Patrick Proy
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/Makefile
new file mode 100644
index 0000000..52de70c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/Makefile
@@ -0,0 +1,4 @@
+#/usr/bin/make -f
+
+include ../common.mk
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/check_snmp_time b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/check_snmp_time
new file mode 100644
index 0000000..37e5528
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/check_snmp_time
@@ -0,0 +1,333 @@
+#!/usr/bin/perl -w
+############################## check_snmp_time.pl #################
+my $Version='1.1';
+# Date : Dec 08 2010
+# Purpose : Nagios plugin to check the time on a server using SNMP.\n";
+# Author : Karl Bolingbroke, 2007
+# Updated : Frank Migge (support at frank4dd dot com)
+# Help : http://www.frank4dd.com/howto
+# Licence : GPL - http://www.fsf.org/licenses/gpl.txt
+#################################################################
+#
+# Help : ./check_snmp_time.pl -h
+#
+# This plugin queries the remote systems time through SNMP and compares
+# it against the local time on the Nagios server. This identifies systems
+# with no correct time set and sends alarms if the time is off to far.
+# HOST-RESOURCES-MIB::hrSystemDate.0 used here returns 8 or 11 byte octets.
+# SNMP translation needs to be switched off and we need to convert the
+# received SNMP data into readable strings.
+#
+# snmpget example data on Windows 2003
+# susie112:~ > snmpget -v 1 -c SECro 192.168.100.21 1.3.6.1.2.1.25.1.2.0
+# HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2010-12-10,14:27:36.5
+# example data on Linux 2.6
+# susie112:~ > snmpget -v 1 -c SECro 192.168.103.32 1.3.6.1.2.1.25.1.2.0
+# HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2010-12-10,14:27:44.0,+9:0
+# example data on AIX 6.1
+# susie112:~ > snmpget -v 1 -c SECro 192.168.98.109 1.3.6.1.2.1.25.1.2.0
+# HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2010-12-10,14:27:59.0
+
+
+use strict;
+use Net::SNMP 5.0;
+use Getopt::Long;
+use Date::Format;
+use Time::Local;
+
+# Nagios specific
+
+my $TIMEOUT = 15;
+my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
+
+# HOST-RESOURCES-MIB::hrSystemDate.0 OID
+my $remote_time_oid = '1.3.6.1.2.1.25.1.2.0';
+
+# Globals
+my $o_host = undef; # hostname
+my $o_community = undef; # community
+my $o_port = 161; # port
+my $o_help= undef; # wan't some help ?
+my $o_verb= undef; # verbose mode
+my $o_version= undef; # print version
+# End compatibility
+my $o_tzoff= 0; # remote TZ offset in mins
+my $o_warn= undef; # warning level in seconds
+my $o_crit= undef; # critical level in seconds
+my $o_timeout= undef; # Timeout (Default 5)
+my $o_perf= undef; # Output performance data
+my $o_version2= undef; # use snmp v2c
+# SNMPv3 specific
+my $o_login= undef; # Login for snmpv3
+my $o_passwd= undef; # Pass for snmpv3
+my $v3protocols=undef; # V3 protocol list.
+my $o_authproto='md5'; # Auth protocol
+my $o_privproto='des'; # Priv protocol
+my $o_privpass= undef; # priv password
+
+# functions
+
+sub p_version { print "check_snmp_time version : $Version\n"; }
+
+sub print_usage {
+ print "Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -w <warn level> -c <crit level> [-f] [-t <timeout>] [-V]\n";
+}
+
+sub isnnum { # Return true if arg is not a number
+ my $num = shift;
+ if ( $num =~ /^(\d+\.?\d*)|(^\.\d+)$|^-(\d+\.?\d*)|(^-\.\d+)$/ ) { return 0 ;}
+ return 1;
+}
+
+sub help {
+ print "\nRemote SNMP System Time Monitor for Nagios version ",$Version,"\n";
+ print "GPL licence, (c) 2007 Karl Bolingbroke, update (c)2010 Frank Migge\n\n";
+ print_usage();
+ print <<EOT;
+
+This plugin queries the remote systems time through SNMP and compares it against the local time on the Nagios server. This identifies systems with no correct time set and sends alarms if the time is off to far.
+
+-v, --verbose
+ print extra debugging information
+-h, --help
+ print this help message
+-H, --hostname=HOST
+ name or IP address of host to check
+-C, --community=COMMUNITY NAME
+ community name for the host's SNMP agent (implies v1 protocol)
+-2, --v2c
+ Use snmp v2c
+-l, --login=LOGIN ; -x, --passwd=PASSWD
+ Login and auth password for snmpv3 authentication
+ If no priv password exists, implies AuthNoPriv
+-X, --privpass=PASSWD
+ Priv password for snmpv3 (AuthPriv protocol)
+-L, --protocols=<authproto>,<privproto>
+ <authproto> : Authentication protocol (md5|sha : default md5)
+ <privproto> : Priv protocole (des|aes : default des)
+-P, --port=PORT
+ SNMP port (Default 161)
+-o, --tzoffset=MINS
+ the remote systems timezone offset to the Nagios server, in minutes
+-w, --warn=INTEGER
+ warning level for time difference in seconds
+-c, --crit=INTEGER
+ critical level for time difference in seconds
+-f, --perfparse
+ Perfparse compatible output
+-t, --timeout=INTEGER
+ timeout for SNMP in seconds (Default: 5)
+-V, --version
+ prints version number
+EOT
+}
+
+# For verbose output
+sub verb { my $t=shift; print $t,"\n" if defined($o_verb) ; }
+
+sub check_options {
+ Getopt::Long::Configure ("bundling");
+ GetOptions(
+ 'v' => \$o_verb, 'verbose' => \$o_verb,
+ 'h' => \$o_help, 'help' => \$o_help,
+ 'H:s' => \$o_host, 'hostname:s' => \$o_host,
+ 'p:i' => \$o_port, 'port:i' => \$o_port,
+ 'C:s' => \$o_community, 'community:s' => \$o_community,
+ 'l:s' => \$o_login, 'login:s' => \$o_login,
+ 'x:s' => \$o_passwd, 'passwd:s' => \$o_passwd,
+ 'X:s' => \$o_privpass, 'privpass:s' => \$o_privpass,
+ 'L:s' => \$v3protocols, 'protocols:s' => \$v3protocols,
+ 't:i' => \$o_timeout, 'timeout:i' => \$o_timeout,
+ 'V' => \$o_version, 'version' => \$o_version,
+ '2' => \$o_version2, 'v2c' => \$o_version2,
+ 'c:s' => \$o_crit, 'critical:s' => \$o_crit,
+ 'w:s' => \$o_warn, 'warn:s' => \$o_warn,
+ 'o:i' => \$o_tzoff, 'tzoffset:s' => \$o_tzoff,
+ 'f' => \$o_perf, 'perfparse' => \$o_perf,
+ );
+ # Basic checks
+ if (defined($o_timeout) && (isnnum($o_timeout) || ($o_timeout < 2) || ($o_timeout > 60)))
+ { print "Timeout must be >1 and <60 !\n"; print_usage(); exit $ERRORS{"UNKNOWN"}}
+ if (!defined($o_timeout)) {$o_timeout=5;}
+ if (defined ($o_help) ) { help(); exit $ERRORS{"UNKNOWN"}};
+ if (defined($o_version)) { p_version(); exit $ERRORS{"UNKNOWN"}};
+ if ( ! defined($o_host) ) # check host and filter
+ { print_usage(); exit $ERRORS{"UNKNOWN"}}
+ # check snmp information
+ if ( !defined($o_community) && (!defined($o_login) || !defined($o_passwd)) )
+ { print "Put snmp login info!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}}
+ if ((defined($o_login) || defined($o_passwd)) && (defined($o_community) || defined($o_version2)) )
+ { print "Can't mix snmp v1,2c,3 protocols!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}}
+ if (defined ($v3protocols)) {
+ if (!defined($o_login)) { print "Put snmp V3 login info with protocols!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}}
+ my @v3proto=split(/,/,$v3protocols);
+ if ((defined ($v3proto[0])) && ($v3proto[0] ne "")) {$o_authproto=$v3proto[0]; } # Auth protocol
+ if (defined ($v3proto[1])) {$o_privproto=$v3proto[1]; } # Priv protocol
+ if ((defined ($v3proto[1])) && (!defined($o_privpass))) {
+ print "Put snmp V3 priv login info with priv protocols!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}}
+ }
+ # Check remote timezone offset
+ if (defined($o_tzoff) && (isnnum($o_tzoff) || ($o_tzoff < -600) || ($o_tzoff > 600)))
+ { print "Timezone offset must be > -600 and < 600 !\n"; print_usage(); exit $ERRORS{"UNKNOWN"}}
+ # Check warnings and critical
+ if (!defined($o_warn) || !defined($o_crit))
+ { print "put warning and critical info!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}}
+ # Get rid of % sign
+ $o_warn =~ s/\%//g;
+ $o_crit =~ s/\%//g;
+ if ( isnnum($o_warn) || isnnum($o_crit) )
+ { print "Numeric value for warning or critical !\n";print_usage(); exit $ERRORS{"UNKNOWN"}}
+ if ($o_warn > $o_crit)
+ { print "warning <= critical ! \n";print_usage(); exit $ERRORS{"UNKNOWN"}}
+}
+
+########## MAIN #######
+check_options();
+
+# Check gobal timeout if snmp screws up
+if (defined($TIMEOUT)) {
+ verb("Alarm at $TIMEOUT + 5");
+ alarm($TIMEOUT+5);
+} else {
+ verb("no global timeout defined : $o_timeout + 10");
+ alarm ($o_timeout+10);
+}
+
+$SIG{'ALRM'} = sub {
+ print "No answer from host\n";
+ exit $ERRORS{"UNKNOWN"};
+};
+
+# Connect to host
+my ($session,$error);
+if ( defined($o_login) && defined($o_passwd)) {
+ # SNMPv3 login
+ verb("SNMPv3 login");
+ if (!defined ($o_privpass)) {
+ verb("SNMPv3 AuthNoPriv login : $o_login, $o_authproto");
+ ($session, $error) = Net::SNMP->session(
+ -hostname => $o_host,
+ -version => '3',
+ -username => $o_login,
+ -authpassword => $o_passwd,
+ -authprotocol => $o_authproto,
+ -translate => 0,
+ -timeout => $o_timeout
+ );
+ } else {
+ verb("SNMPv3 AuthPriv login : $o_login, $o_authproto, $o_privproto");
+ ($session, $error) = Net::SNMP->session(
+ -hostname => $o_host,
+ -version => '3',
+ -username => $o_login,
+ -authpassword => $o_passwd,
+ -authprotocol => $o_authproto,
+ -privpassword => $o_privpass,
+ -privprotocol => $o_privproto,
+ -translate => 0,
+ -timeout => $o_timeout
+ );
+ }
+} else {
+ if (defined ($o_version2)) {
+ # SNMPv2 Login
+ verb("SNMP v2c login");
+ ($session, $error) = Net::SNMP->session(
+ -hostname => $o_host,
+ -version => 2,
+ -community => $o_community,
+ -port => $o_port,
+ -translate => 0,
+ -timeout => $o_timeout
+ );
+ } else {
+ # SNMPV1 login
+ verb("SNMP v1 login");
+ ($session, $error) = Net::SNMP->session(
+ -hostname => $o_host,
+ -community => $o_community,
+ -port => $o_port,
+ -translate => 0,
+ -timeout => $o_timeout
+ );
+ }
+}
+if (!defined($session)) {
+ printf("ERROR opening session: %s.\n", $error);
+ exit $ERRORS{"UNKNOWN"};
+}
+
+my $exit_val=undef;
+
+############## Start SNMP time check ################
+
+# 1. get local time "seconds since epoch, UTC" into local_timestamp
+my $local_timestamp = time;
+
+# 2. get remote date and time
+my $result = $session->get_request(-varbindlist => [$remote_time_oid],);
+
+if (!defined($result)) {
+ printf("ERROR: Description table : %s.\n", $session->error);
+ $session->close;
+ exit $ERRORS{"UNKNOWN"};
+}
+
+$session->close;
+
+if (!defined ($$result{$remote_time_oid})) {
+ print "No time information : UNKNOWN\n";
+ exit $ERRORS{"UNKNOWN"};
+}
+
+# 3. convert remote date and time into remote_timestamp "seconds since epoch, localtime"
+my $remote_octets = $result->{$remote_time_oid};
+# translate the received binary data i.e. #0x07da0c0a17393a002b0900
+my @remote_date = unpack 'n C6 a C2', $remote_octets;
+#
+my $remote_timestamp = timelocal($remote_date[5],$remote_date[4],$remote_date[3],
+ $remote_date[2],$remote_date[1]-1, $remote_date[0]);
+
+# 4. calculate remote timezone offset
+$remote_timestamp = $remote_timestamp + ($o_tzoff * 60);
+
+my $local_timestring = time2str("%Y-%m-%e_%T", $local_timestamp);
+my $remote_timestring = time2str("%Y-%m-%e_%T", $remote_timestamp);
+verb("Local Time: $local_timestring\nRemote Time: $remote_timestring");
+
+# 5. compare offset against -w and -c values
+my $offset = $local_timestamp - $remote_timestamp;
+
+# 6. return offset in seconds, together with Nagios status:
+if ( $offset == 0 ) {
+ print "$o_host clock is accurate to the second";
+} else {
+ if ( abs($offset) != $offset ) {
+ print "$o_host clock is ".abs($offset)." seconds late";
+ }
+ if ( abs($offset) == $offset ) {
+ print "$o_host clock is $offset seconds early";
+ }
+}
+
+
+$exit_val=$ERRORS{"OK"};
+if ( abs($offset) > $o_crit ) {
+ print " ($offset > +/-$o_crit) : CRITICAL";
+ $exit_val=$ERRORS{"CRITICAL"};
+ }
+if ( abs($offset) > $o_warn ) {
+ # output warn error only if no critical was found
+ if ($exit_val eq $ERRORS{"OK"}) {
+ print " ($offset > +/-$o_warn) : WARNING";
+ $exit_val=$ERRORS{"WARNING"};
+ }
+}
+print " : OK" if ($exit_val eq $ERRORS{"OK"});
+if (defined($o_perf)) {
+ print " | local=$local_timestring remote=$remote_timestring offset=$offset";
+}
+print "\n";
+
+
+exit $exit_val;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/control
new file mode 100644
index 0000000..cc9c7f2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/control
@@ -0,0 +1,12 @@
+Homepage: https://raw.github.com/mludvig/nagios-plugins/master/check_snmp_time.pl
+Watch: https://raw.github.com/mludvig/nagios-plugins/master/check_snmp_time.pl Version='([0-9.]+)';
+Recommends: libnet-snmp-perl (>= 5), libtimedate-perl
+Version: 1.1
+Uploaders: Jan Wagner <waja@cyconet.org>
+Description: plugin to check the time on a server using SNMP
+ This plugin queries the remote systems time through SNMP and compares
+ it against the local time on the Nagios server. This identifies systems
+ with no correct time set and sends alarms if the time is off to far.
+ HOST-RESOURCES-MIB::hrSystemDate.0 used here returns 8 or 11 byte octets.
+ SNMP translation needs to be switched off and to be converted the
+ received SNMP data into readable strings.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/copyright
new file mode 100644
index 0000000..39d7cdf
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/copyright
@@ -0,0 +1,7 @@
+(c) 2007 Karl Bolingbroke
+(c) 2010 Frank Migge <support@frank4dd.com>
+
+License: GPL-1
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 1 can be found in "/usr/share/common-licenses/GPL-1".
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/snmp_time.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/snmp_time.cfg
new file mode 100644
index 0000000..290ea50
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_snmp_time/snmp_time.cfg
@@ -0,0 +1,11 @@
+# 'check_snmp_time' command definition
+define command{
+ command_name check_snmp_time
+ command_line /usr/lib/nagios/plugins/check_snmp_time -H $HOSTADDRESS$ -C $ARG1$ -w $ARG2$ -c $ARG3$ -p $ARG4$ -f
+}
+
+# 'check_snmp_time_v2' command definition
+define command{
+ command_name check_snmp_time_v2
+ command_line /usr/lib/nagios/plugins/check_snmp_time -H $HOSTADDRESS$ -2 -C $ARG1$ -w $ARG2$ -c $ARG3$ -p $ARG4$ -f
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/Makefile
new file mode 100644
index 0000000..1617620
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/Makefile
@@ -0,0 +1,8 @@
+#/usr/bin/make -f
+
+PLUGIN = src/check_ssl_cert
+MANPAGES = src/check_ssl_cert.1
+DOCFILES = src/README.md
+
+include ../common.mk
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._COPYRIGHT b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._COPYRIGHT
new file mode 100644
index 0000000..a4a325e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._COPYRIGHT
Binary files differ
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._Makefile
new file mode 100644
index 0000000..e79375b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._Makefile
Binary files differ
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._NEWS b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._NEWS
new file mode 100644
index 0000000..652057b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._NEWS
Binary files differ
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._check_ssl_cert b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._check_ssl_cert
new file mode 100755
index 0000000..3754d3a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/._check_ssl_cert
Binary files differ
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/AUTHORS b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/AUTHORS
new file mode 100644
index 0000000..d947afe
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/AUTHORS
@@ -0,0 +1,82 @@
+Matteo Corti <matteo@corti.li>
+
+Thanks:
+
+* Many thanks to Kenny McCormack for his help on comp.unix.shell on
+ how to implement a timeout
+* Many thanks to Dan Wallis for several patches and fixes
+ (see the Changelog)
+* Many thanks to Tuomas Haarala for the -P option patch to
+ check TLS certs using other protocols
+* Many thanks to Marcus Rejås for the -N and -n patches
+* Many thanks to Marc Fournier for
+ - the == bashism fix
+ - the mktemp error handling patch
+* Many thanks to Wolfgang Schricker for
+ - the selfsigned bug report and cleanup fixes
+ - the patch adding the possibility to check local files (-f option)
+* Many thanks to Yannick Gravel for the patch fixing the plugin output
+ and the fix on the test order
+* Many thanks to Scott Worthington for the --critical and --warning hints
+* Many thanks to Lawren Quigley-Jones for
+ - the -A,--noauth patch
+ - the trap fix
+* Many thanks to Matthias Fuhrmeister for the -servername patch
+* Many thanks to Raphael Thoma for the patch allowing HTTP to be
+ specified as protocol and the fix on -N with wildcards
+* Many thanks to Sven Nierlein for the client certificate authentication patch
+* Many thanks to Rob Yamry for the help in debugging a problem with
+ certain versions of OpenSSL and TLS extensions
+* Many thanks to Jim Hopp for the "No certificate returned" enhancement patch
+* Many thanks to Javier Gonel for the TLS servername patch
+* Many thanks to Christian Ruppert for the XMPP patch
+* Many thanks to Robin H. Johnson for the 'timeout' patch
+* Many thanks to Max Winterstein for the SSL version patch
+* Many thanks to Colin Smith for the RPM build Makefile patch
+* Many thanks to Andreas Dijkman for the RPM dependencies patch
+* Many thanks to Lawren Quigley-Jones for the common name patch
+* Many thanks to Ryan Nowakowski for the OCSP patch
+* Many thanks to Jérémy Lecour for the review and corrections
+* Many thanks to Mark Ruys for the OCSP patch
+* Many thanks to Milan Koudelka for the serial number patch
+* Many thanks to Konstantin Shalygin for the UTF-8 patch
+* Many thanks to Sam Richards for the SNI patch
+* Many thanks to Sergei Shmanko (https://github.com/sshmanko) for the wildcard
+ certificate patch
+* Many thanks to juckerf (https://github.com/juckerf) for patch to increase
+ control over which SSL/TLS versions to use
+* Many thanks to Rolf Eike Beer for the IRC and SMTP check patch
+* Many thanks to Viktor Szépe for the formatting and style patches
+* Many thanks to Philippe Kueck for the CN patch
+* Many thanks to Ricardo (https://github.com/bb-Ricardo) and xert (https://github.com/xert) for the date timestamp patch
+* Many thanks to xert for the SSLLabs patch
+* Many thanks to Leynos (https://github.com/leynos) for the OCSP proxy patch
+* Many thanks to Philippe Kueck for the selection of the cipher authentication
+* Many thanks to Jalonet (https://github.com/jalonet) for the file/PEM patch
+* Many thanks to Sander Cornelissen (https://github.com/scornelissen85) for the multiple CNs patch
+* Many thanks to Pavel Rochnyak (https://github.com/rpv-tomsk) for the issuer certificate cache patch and
+ the wildcard support in alternative names
+* Many thanks to Vamp898 (https://github.com/Vamp898) for the LDAP patch
+* Many thanks to Emilian Ertel for the curl and date patches
+* Many thanks to Kosta Velikov for the grep patch
+* Many thanks to Vojtech Horky for the OpenSSL 1.1 patch
+* Many thanks to Nicolas Lafont (https://github.com/ManicoW) for the Common Name fix
+* Many thanks to d7415 (https://github.com/d7415) for the -help patch
+* Many thanks to Åukasz WÄ…sikowski (https://github.com/IdahoPL) for the curl and date display patches
+* Many thanks to booboo-at-gluga-de (https://github.com/booboo-at-gluga-de) for the CRL patch
+* Many thanks to Georg (https://github.com/gbotti) for the fingerprint patch
+* Many thanks to Wim van Ravesteijn (https://github.com/wimvr) for the DER encoded CRL files patch
+* Many thanks to yasirathackersdotmu (https://github.com/yasirathackersdotmu)
+* Many thanks to Christoph Moench-Tegeder (https://github.com/moench-tegeder) for the curl patch
+* Many thanks to Dan Pritts for the --terse patch
+* Many thanks to eeertel (https://github.com/eeertel) for the SNI warning patch
+* Many thanks to Vojtech Horky (https://github.com/vhotspur) for the --format patch
+* Many thanks to Markus Frosch (https://github.com/lazyfrosch) for the cleanup patch
+* Many thanks to Ricardo Bartels (https://github.com/bb-Ricardo) for the patches fixing unit tests, long output on Linux, extending the issuer checks to the whole chain
+* Many thanks to eimamagi (https://github.com/eimamagi) for the client key patch and for the CA file and directory support
+* Many thanks to Stefan Schlesinger for the HTTP_REQUEST patch
+* Many thanks to sokol-44 (https://github.com/sokol-44) for the HTTP request fix
+* Many thanks to Jonas Meurer (https://github.com/mejo-) for the IMAP / IMAPS fix
+* Many thanks to Mathieu Simon (https://github.com/matsimon) for the IMAPS and POP3S patch
+* Many thanks to Nico (https://github.com/nicox) for the SSLlabs patch
+* Many thanks to barakAtSoluto (https://github.com/barakAtSoluto) for the SSLlabs warning patch \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/COPYING b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/COPYRIGHT b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/COPYRIGHT
new file mode 100644
index 0000000..c014738
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/COPYRIGHT
@@ -0,0 +1,75 @@
+
+ Copyright (c) 2007-2013 ETH Zurich
+ Copyright (c) 2007-2019 Matteo Corti
+
+with the following individuals added to the list of Contributing Authors
+
+ Dan Wallis
+ Lawren Quigley-Jones
+ Marc Fournier
+ Marcus Rejås
+ Matteo Corti
+ Matthias Fuhrmeister
+ Raphael Thoma
+ Scott Worthington
+ Sven Nierlein
+ Tuomas Haarala
+ Wolfgang Schricker
+ Yannick Gravel
+ Jim Hopp
+ Javier Gonel
+ Christian Ruppert
+ Robin H. Johnson
+ Max Winterstein
+ Colin Smith
+ Andreas Dijkman
+ Ryan Nowakowski
+ Jérémy Lecour
+ Mark Ruys
+ Milan Koudelka
+ Konstantin Shalygin
+ Sam Richards
+ Sergei Shmanko
+ Rolf Eike Beer
+ Viktor Szépe
+ Philippe Kueck
+ Sander Cornelissen
+ Pavel Rochnyak
+ Vamp898 (https://github.com/Vamp898)
+ Emilian Ertel
+ Kosta Velikov
+ Vojtech Horky
+ Nicolas Lafont (https://github.com/ManicoW)
+ d7415 (https://github.com/d7415)
+ Åukasz WÄ…sikowski (https://github.com/IdahoPL)
+ booboo-at-gluga-de (https://github.com/booboo-at-gluga-de)
+ Georg (https://github.com/gbotti)
+ Wim van Ravesteijn (https://github.com/wimvr)
+ yasirathackersdotmu (https://github.com/yasirathackersdotmu)
+ Christoph Moench-Tegeder (https://github.com/moench-tegeder)
+ Dan Pritts
+ eeertel (https://github.com/eeertel)
+ Vojtech Horky (https://github.com/vhotspur)
+ Markus Frosch (https://github.com/lazyfrosch)
+ Ricardo Bartels (https://github.com/bb-Ricardo)
+ eimamagi (https://github.com/eimamagi)
+ Stefan Schlesinger
+ sokol-44 (https://github.com/sokol-44)
+ Jonas Meurer (https://github.com/mejo-)
+ Mathieu Simon (https://github.com/matsimon)
+ Nico (https://github.com/nicox)
+ barakAtSoluto (https://github.com/barakAtSoluto)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/ChangeLog b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/ChangeLog
new file mode 100644
index 0000000..11cab7b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/ChangeLog
@@ -0,0 +1,593 @@
+2019-02-27 Matteo Corti <matteo@corti.li>
+
+ * test/unit_tests.sh (testMultipleAltNamesFailTwo): removed outdated tests
+
+2019-02-27 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: better error message in case of wrong intermediate certificate
+
+2019-02-19 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Better error message in case of OCSP failure
+
+2019-02-08 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Check the readability of the certificate file
+
+2019-02-01 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: applied patch for the SSLlabs warning
+
+2019-01-16 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: replaced echo -e with printf
+
+2018-12-24 Matteo Corti <corti@macmini.home>
+
+ * check_ssl_cert: Better output in case of errors while using SNI
+
+2018-12-19 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Better help about IMAP IMAPS POP3 and POP3S
+ * check_ssl_cert: Support for SNI and SSL Labs
+
+2018-12-11 Matteo Corti <corti@macmini.home>
+
+ * check_ssl_cert: Differentiate IMAP with STARTTLS on port 143 and IMAPS on 993
+ * check_ssl_cert: Fixed a vulnerability in the parsing of the certificate issuer
+
+2018-11-07 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Fixed a problem with IMAP on port 993
+ * check_ssl_cert: fixed a problem with newlines in the HTTP request
+
+2018-11-05 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: CA file and directory support
+
+2018-10-19 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Fixed the HTTP request string
+
+2018-10-18 eimamagi <https://github.com/eimamagi>
+
+ * check_ssl_cert: Allow to specify a client certificate key
+
+2018-10-15 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert (exec_with_timeout): fixed the check on the the return value
+
+2018-08-10 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: disabling OCSP checks if no OCSP host is found
+
+2018-07-20 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Applied a patch from Markus Frosch to fix the cleanup of temporary files
+
+2018-07-01 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: do not trap on EXIT
+ * check_ssl_cert: remove temporary file when no signals are trapped
+
+2018-06-28 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: fixed a bug in the deletion of temporary files when a signal is caught
+
+2018-06-25 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: added a check to require OCSP stapling
+
+2018-04-29 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Remooved the SNI name check patch (see #78)
+
+2018-04-19 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Merged the SNI name check patch
+
+2018-04-17 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Merged the --terse patch, added performance data to the terse output and reordered the help
+
+2018-04-12 Matteo Corti <matteo@corti.li>
+
+ * Makefile: Checks if the copyright year is correct. make test is now dependent on make dist
+
+2018-04-06 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Added UTF8 output
+
+2018-04-05 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Added debugging output for cURL
+
+2018-03-29 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Fixed a bug introduced in the last verstion
+
+2018-03-28 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Removed cURL dependency when not checking SSL Labs
+
+2018-03-17 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Added support for TLS 1.3
+
+2018-03-06 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Fixed OCSP check with LibreSSL
+ * check_ssl_cert: Lists the number or default root certificates in debug mode
+
+2018-01-19 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Fixed a bug processing more than one OCSP host
+
+2017-12-15 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Fixed a bug in the specification of the xmpphost parameter
+
+2017-12-14 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Added an option to specify the 'to' attribute of the XMPP stream element
+
+2017-11-29 Wim van Ravesteijn https://github.com/wimvr
+
+ * check_ssl_cert: Support for DER encoded CRL files
+
+2017-11-28 Georg https://github.com/gbotti
+
+ * check_ssl_cert: added --fingerprint to check the SHA1 fingerprint of the certificate
+
+2017-11-17 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert (fetch_certificate): adding support for -xmpphost if available
+
+2017-11-16 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert (fetch_certificate): fixing XMPP support
+
+2017-11-16 <corti@corti.li>
+
+ * check_ssl_cert (fetch_certificate): adding support for IPv6 addresses
+
+2017-09-18 Bernd Stroessenreuther <booboo@gluga.de>
+
+ * check_ssl_cert: with -f option you now can also pass a certificate revocation list (CRL) to check its validity period
+
+2017-09-10 Matteo Corti <corti@mac-mini-1.home>
+
+ * check_ssl_cert: OCSP check is now terminated by a timeout
+
+2017-09-09 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: The SAN requirement is now optional
+
+2017-07-28 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Use openssl s_client's -help option to test for SNI support (thanks to d7415)
+
+2017-07-24 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Fix in the Common Name parsing
+
+2017-06-23 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Checks for missing subjectAlternativeName extension
+
+2017-06-15 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Do not try to check OCSP if the protocol is not HTTP or HTTPS
+
+2017-05-15 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Fixed a problem with the detection of OCSP URLs
+
+2017-05-02 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Added --location to curl to follow redirects
+ * check_ssl_cert: Fixed the indentation of EOF in the embedded Perl script
+ * check_ssl_cert: Added --force-date-perl to force the usage of Perl for date computations and a test to be sure no errors in Perl are left undetected
+
+2017-04-28 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Fixed a bug occurring when more than one issuNer URI is present
+
+2017-03-07 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Added LDAP support
+
+2017-03-01 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: By errors it makes more sense to show the supplied host instead of the CN
+
+2017-02-16 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Support for newer OpenSSL versions (1.1)
+
+2017-02-10 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Added the --sni option
+
+2017-02-08 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Patch from Pavel Rochnyak: Changed the CN output when --altnames is used
+
+2017-02-02 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Fixed the command line argument parsing
+ * check_ssl_cert: Fixed -servername
+
+2017-01-29 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Added patches from Pavel Rochnyak for the issuer certificate cache patch
+ and the wildcard support in alternative names
+
+2016-12-23 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Added patch to specify multiple CNs (see https://github.com/matteocorti/check_ssl_cert/pull/35)
+
+2016-12-13 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: fixed a minor problem with --debug
+
+2016-12-06 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: fixed a problem when specifying a CN beginnging with *
+
+2016-12-04 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: fixed problem when file is returing PEM certificate on newer Linux distributions
+
+2016-09-19 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: enabling proxy support in the OCSP check (thanks to Leynos)
+
+2016-08-04 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: disabling OCSP checks when no issuer URI is found
+
+2016-07-29 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: fixed case insensitive comparison of CNs
+
+2016-07-29 https://github.com/bb-Ricardo
+
+ * check_ssl_cert: calculate expiration primary with date
+
+2016-07-12 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: fixed the parsing of the CN field
+
+2016-06-25 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: fixed OSCP header on old OpenSSL versions
+
+2016-06-24 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: OCSP is now default
+
+ * check_ssl_certe: Fixed OCSP host
+
+2016-06-15 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Better curl error handling
+
+2016-06-10 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Added an option to clear the cached result at SSLLabs
+
+2016-06-01 juckerf (https://github.com/juckerf)
+
+ * check_ssl_cert: Increase control over which SSL/TLS versions to use
+
+2016-05-17 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: added more debugging info (-v is automatic if -d is spefied, system info and cert written to a file)
+
+2016-04-27 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Fixes a bug in the OpenSSL error parsing
+
+2016-04-05 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: In case of an s_client error does not output the full (ugly) error. The error is shown in verbose mode
+
+2016-03-29 Sergei Shmanko
+
+ * check_ssl_cert: Fix wildcard match regex, add additional unit tests
+
+2016-03-21 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert (exec_with_timeout): issues a critical status
+ when using the 'timout' utility
+
+2016-03-19 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: fixed CN parsing on non-GNU systems
+
+2016-03-19 Sergei https://github.com/sshmanko
+
+ * check_ssl_cert: handle wildcard certificates
+
+2016-03-10 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert (check_attr): Better handling of verification errors
+
+2016-03-09 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert (convert_ssl_lab_grade): accepts lowercase letters for SSL Labs grades
+ * check_ssl_cert (check_attr): waits for SSL Labs results
+
+2016-03-08 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Tries to extract an error message from SSL Labs
+ if no status is returned
+
+2016-03-07 Sam Richards
+ * check_ssl_cert: Support SNI even when we don't want to check cn
+
+2016-03-07 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: DNS errors by SSL Labs are ignored (as they are just
+ a sign that the result is not cached)
+
+2016-03-03 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Initial support for SSL Labs checks
+
+2016-03-01 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: Fixed a bug which prevented the check on the expiration
+
+2015-10-31 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: added a patch to check the certificate's serial number
+ (thanks to Milan Koudelka)
+
+2015-10-20 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: fixex a problem with OCSP paths w/o URLs
+
+2015-04-07 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: corrected some typos (thanks to Jérémy Lecour)
+ * check_ssl_cert: removed check on the openssl binary name
+
+2014-10-21 Matteo Corti <matteo@corti.li>
+
+ * check_ssl_cert: added a patch to check revocation via OCSP (thanks
+ to Ryan Nowakowski)
+
+2014-02-28 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * Makefile: added a target to build an rpm
+
+2013-12-23 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: added the --tls1 option to force TLS 1
+
+2013-10-09 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: whole script reviewed with shellcheck
+
+2013-10-01 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: fixes with shellcheck (quoting)
+
+2013-07-29 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: Added an option to force a given SSL version
+
+2013-03-02 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: Fixed a bug occuring with TLS and multiple names in
+ the certificate
+
+2012-12-07 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: removed "test -a/-o" (test has an undefined
+ behavior with more than 4 elements)
+
+ * check_ssl_cert: fixed #122 (-N was always comparing the CN with 'localhost')
+
+2012-11-16 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * simplified the sourcing of the script file for testing
+
+2012-10-11 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * added some unit tests with shUnit2
+
+2012-09-19 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: improved the "No certificate returned" error message
+
+2012-07-13 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: added the number of days from or to expiration in the
+ plugin output
+
+2012-07-11 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: fixed a bug with Perl date computation on some systems
+
+2012-07-06 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: performance data in days
+ * check_ssl_cert: long output (certificate attributes)
+
+2012-04-05 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: handle broken OpenSSL clients (-servername not working)
+
+2012-04-04 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: removed an hard coded reference to the error number by the
+ SSL chain verification
+
+2011-10-22 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: added a --altnames option to match the CN to alternative
+ names
+
+2011-09-01 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: applied a patch from Sven Nierlein
+ (certificate authentication)
+
+2011-03-10 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: allows http to specified as protocol
+ (thanks to Raphael Thoma)
+ * check_ssl_cert: fixes the -N check for certs with wildcards
+ (thanks to Raphael Thoma)
+
+2011-01-24 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: added an option to specify the openssl executable
+
+2010-12-16 Dan Wallis
+
+ * check_ssl_cert: Sets $VERBOSE to avoid using value supplied by Nagios
+ * check_ssl_cert: Quotes regular expression for grep to avoid shell globbing
+
+2010-12-09 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert.spec: standardized the RPM package name
+
+ * check_ssl_cert: added support for the TLS servername extension
+ (thanks to Matthias Fuhrmeister)
+
+2010-11-02 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * INSTALL: specifies that expect is needed for timeouts
+
+2010-10-29 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * README: specifies that expect is needed for timeouts
+
+2010-10-28 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: trap on more signals (thanks to Lawren Quigley-Jones)
+
+2010-10-14 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: added a patch from Yannick Gravel putting the
+ chain verification at the end of the tests
+
+2010-10-01 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: added a patch from Lawren Quigley-Jones which
+ implements a new command line argument (-A) to disable the
+ certificate chain check
+
+2010-09-15 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: fixed option processing (bug #78)
+
+2010-08-26 Dan Wallis
+
+ * check_ssl_cert: overloads --rootcert for use with directories as
+ well as files (-CApath versus -CAfile)
+
+2010-07-21 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: added a patch from Marc Fournier to check the creation of the temporary files
+ * check_ssl_cert: added the --temp option to specify where to store the temporary files
+
+2010-07-10 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: improved the error messages
+ * check_ssl_cert: checks for certificates without email addresses (if -e is specified)
+
+2010-07-09 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: added a "long" version for all the command line options
+ * check_ssl_cert: added a critical and warning option for the certificate validity (in days)
+ * check_ssl_cert: the plugin always issues a critical warning if the certificate is expired
+ * check_ssl_cert: added a man page
+
+2010-07-07 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: [Wolfgang Schricker patch] Add -f to check local files
+
+2010-07-01 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: [Yannick Gravel patch] Restore displaying the CN in every messages:
+ a previous patch changed something and only
+ critical were adjusted.
+ * check_ssl_cert: [Yannick Gravel patch] Adjust what is displayed after the from in
+ the OK message to display the matched ISSUER
+ (CN or O).
+
+2010-06-08 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: added the -s option to allow self signed certificates
+
+2010-03-11 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: fixed the == bashism
+
+2010-03-08 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: applied patch from Marcus Rejås with the -n and -N options
+
+2009-12-02 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: check if the issuer matches the O= or the CN= field of the Root Cert
+
+2009-11-30 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: cleaned up error messages if the CN is not yet known
+ * check_ssl_cert: added certificate chain verification
+ * check_ssl_cert: allow backslashes escaped in the error messages (e.g., for \n used by Nagios 3)
+ * check_ssl_cert: -r can be used to specify a root certificate to be used for the verification
+
+2009-03-31 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: standard timeout of 15 seconds (can be set with the -t option)
+
+2009-03-30 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: -P option to specify the protocol
+
+2008-05-13 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: applied a patch from Dan Wallis to output the CN
+ in all the messages
+
+2008-02-28 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: shortened the error message in case of no connection
+ (only the first line is reported)
+
+2008-02-25 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: [Dan Wallis patch] removed nmap dependency
+ * check_ssl_cert: [Dan Wallis patch] mktemp for the temporaries
+ * check_ssl_cert: [Dan Wallis patch] using trap to cleanup temporaries
+ * check_ssl_cert: [Dan Wallis patch] POSIX compliance and cleanup
+ * check_ssl_cert: [Dan Wallis patch] POSIX compliance and cleanup
+ * check_ssl_cert: [Dan Wallis patch] better handling of missing
+ certificate and non resolvable host
+ * check_ssl_cert: [Dan Wallis patch] stricter check for "notAfter" in the
+ certificate analysis
+
+2007-09-04 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: better error messages (both the actual and the
+ expected values are displayed)
+
+2007-08-31 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: new options to enforce email and
+ organization. Temporary files are now removed before termination
+
+2007-08-15 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: openssl s_client closes the connection cleanly
+
+2007-08-10 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_ssl_cert: initial release
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/INSTALL b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/INSTALL
new file mode 100644
index 0000000..20916e2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/INSTALL
@@ -0,0 +1,21 @@
+Requirements
+============
+
+- OpenSSL
+
+Optional dependencies
+=====================
+
+- In order to use timeouts the plugin needs 'expect' in the current PATH
+ See: http://en.wikipedia.org/wiki/Expect
+
+- In order to perform date computations the plugin needs a Perl
+ interpreter and the module Date::Parse
+
+- In order to use the SSL Lab Assessment 'curl' is required to reside in the
+ current PATH.
+
+Installation
+============
+
+Simply copy the plugin to your nagios plugin directory
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/Makefile
new file mode 100644
index 0000000..2325f68
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/Makefile
@@ -0,0 +1,53 @@
+PLUGIN=check_ssl_cert
+VERSION=`cat VERSION`
+DIST_DIR=$(PLUGIN)-$(VERSION)
+DIST_FILES=AUTHORS COPYING ChangeLog INSTALL Makefile NEWS README.md TODO VERSION $(PLUGIN) $(PLUGIN).spec COPYRIGHT ${PLUGIN}.1 test
+YEAR=`date +"%Y"`
+
+dist: version_check
+ rm -rf $(DIST_DIR) $(DIST_DIR).tar.gz
+ mkdir $(DIST_DIR)
+ cp -r $(DIST_FILES) $(DIST_DIR)
+ tar cfz $(DIST_DIR).tar.gz $(DIST_DIR)
+ tar cfj $(DIST_DIR).tar.bz2 $(DIST_DIR)
+
+install:
+ mkdir -p $(DESTDIR)
+ install -m 755 $(PLUGIN) $(DESTDIR)
+ mkdir -p ${MANDIR}/man1
+ install -m 644 ${PLUGIN}.1 ${MANDIR}/man1/
+
+version_check:
+ grep -q "VERSION\ *=\ *[\'\"]*$(VERSION)" $(PLUGIN)
+ grep -q "^%define\ version\ *$(VERSION)" $(PLUGIN).spec
+ grep -q -- "- $(VERSION)-" $(PLUGIN).spec
+ grep -q "\"$(VERSION)\"" $(PLUGIN).1
+ grep -q "${VERSION}" NEWS
+ echo "Version check: OK"
+
+clean:
+ rm -f *~
+ rm -rf rpmroot
+
+distclean: clean
+ rm -rf check_ssl_cert-[0-9]*
+ rm -f *.crt
+ rm -f *.error
+
+test: dist
+ ( export SHUNIT2="$$(pwd)/shunit2/shunit2" && cd test && ./unit_tests.sh )
+
+copyright_check:
+ grep -q "(c) Matteo Corti, 2007-$(YEAR)" README.md
+ grep -q "Copyright (c) 2007-$(YEAR) Matteo Corti" COPYRIGHT
+ grep -q "Copyright (c) 2007-$(YEAR) Matteo Corti <matteo@corti.li>" $(PLUGIN)
+ echo "Copyright year check: OK"
+
+rpm: dist
+ mkdir -p rpmroot/SOURCES rpmroot/BUILD
+ cp $(DIST_DIR).tar.gz rpmroot/SOURCES
+ rpmbuild --define "_topdir `pwd`/rpmroot" -ba check_ssl_cert.spec
+
+
+
+.PHONY: install clean test rpm distclean
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/NEWS b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/NEWS
new file mode 100644
index 0000000..5102772
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/NEWS
@@ -0,0 +1,161 @@
+2019-02-08 Version 1.82.0: Added a check on the readability of the certificate file
+2019-02-01 Version 1.81.0: Added an option to specify a warning level with SSL Labs
+2019-01-16 Version 1.80.1: Fixed a problem on systems not supporting echo -e
+2018-12-24 Version 1.80.0: Better output in case of errors while using SNI
+2018-12-10 Version 1.79.0: Differentiate between IMAP on port 143 and IMAPS on port 993
+ Fixed a vulnerability in the parsing of the certificate issuer
+2018-11-07 Version 1.78.0: Bug fixes in IMAP and HTTP requests
+2018-11-05 Version 1.77.0: CA file and directory support
+2018-10-19 Version 1.76.0: Sends a correct HTTP request
+2018-10-18 Version 1.75.0: Allow to specify a client certificate key
+2018-10-15 Version 1.74.0: Fixed a bug generating a confusing error message on timeout
+2018-09-10 Version 1.73.0: Fixed a bug in the cleanup of temporary files, fixed a bug with certificates without OCSP
+ Fixed tests with more reliable hosts
+ Allows to check against all the issuers in the CA chain
+ Fixed a bug with --long-output on Linux
+ Fixed the validation of --critical and --warning
+2018-07-01 Version 1.72.0: Corrected a bug introduced in 1.71.0: remove temporary files
+2018-07-01 Version 1.71.0: Corrected a bug introduced in 1.70.0: wrong exit codes
+2018-06-28 Version 1.70.0: Improved the management of temporary files
+2018-06-25 Version 1.69.0: Added an option to require OCSP stapling
+2018-04-29 Version 1.68.0: Removed the SNI name check
+2018-04-17 Version 1.67.0: Terse output, warning if the specified server name is not found in the certificate and --format option
+2018-04-06 Version 1.66.0: UTF-8 output
+2018-03-29 Version 1.65.0: Bug fix release
+2018-03-28 Version 1.64.0: Remove cURL dependency
+2018-03-17 Version 1.63.0: Support for TLS 1.3
+2018-03-06 Version 1.62.0: Support for LibreSSL
+2018-01-19 Version 1.61.0: Fixed a bug handling more than one OCSP host
+2017-12-15 Version 1.60.0: Fixed a bug related to XMPP introduced in the last version
+2017-12-14 Version 1.59.0: Added an option to specify the 'to' attribute of the XMPP stream element
+2017-11-29 Version 1.58.0: Support for DER encoded CRL files
+2017-11-28 Version 1.57.0: Added --fingerprint to check the SHA1 fingerprint of the certificate
+2017-11-17 Version 1.56.0: Added support for -xmpphost if available
+2017-11-16 Version 1.55.0: Fixed XMPP support and IPv6 addresses as host
+2017-09-19 Version 1.54.0: With the -f command line option, you can also specify a certificate revocation list (CRL)
+2017-09-10 Version 1.53.0: The timeout is applied to OCSP checks
+2017-09-09 Version 1.52.0: The SAN requirement check is now optional
+2017-07-28 Version 1.51.0: Use openssl s_client's -help option to test for SNI support
+2017-07-24 Version 1.50.0: Fix in the Common Name parsing
+2017-07-17 Version 1.49.0: Support for OpenSSL 1.1
+2017-06-22 Version 1.48.0: Checks for missing subjectAlternativeName extension (https://support.google.com/chrome/a/answer/7391219?hl=en)
+2017-06-15 Version 1.47.0: Fixed an issue with OCSP URI with protocols other than HTTP or HTTPS
+2017-05-15 Version 1.46.0: Fixed a problem with the detection of OCSP URLs
+2017-05-02 Version 1.45.0: Fixed bugs in the date computation and OCSP checks
+2017-04-28 Version 1.44.0: Fixed a bug occurring when more than one issuer URI is present
+2017-03-07 Version 1.43.0: Support for LDAP
+2017-02-16 Version 1.42.0: Support for OpenSSL > 1.1.0
+2017-02-10 Version 1.41.0: Added --sni to specify the server name
+2017-02-08 Version 1.40.0: Changed the CN output when --altnames is used
+2017-02-02 Version 1.39.0: Fixed a bug related to SNI
+2017-02-02 Version 1.38.2: Fixed a bug in the command line argument parsing
+2017-01-29 Version 1.38.1: Small corrections in the documentation
+2017-01-28 Version 1.38.0: Added support for wildcards in alternative names and caching of the issuer certificate
+2016-12-23 Version 1.37.0: Added a patch to specify multiple CNs
+2016-12-13 Version 1.36.2: fixed a minor problem with --debug
+2016-12-06 Version 1.36.1: fixed a problem when specifying a CN beginning with *
+2016-12-04 Version 1.36.0: fixed problem when file is returing PEM certificate on newer
+ Linux distributions
+ added an option to specify the location of the file utility
+2016-10-18 Version 1.35.0: added support for the selection of the cipher authentication
+2016-09-19 Version 1.34.0: added proxy support for the OCSP checks (thanks to Leynos)
+2016-08-04 Version 1.33.0: disabling OCSP checks when no issuer URI is found
+2016-07-29 Version 1.32.0: added support for date with timestamp calculation and
+ fixed case sensitive comparison of CN
+2016-07-12 Version 1.31.0 Fixed the parsing of the CN field
+2016-06-30 Version 1.30.0 OCSP check is fixed and enabled by default
+2016-06-15 Version 1.29.0 New option to clear the cached value at SSL Labs
+ IRC support
+2016-06-01 Version 1.28.0 Increased control over which SSL/TLS versions to use
+2016-03-29 Version 1.27.0 Fixes a bug in the OpenSSL error parsing
+2016-03-29 Version 1.26.0 Fixes a bug in wildcard match
+2016-03-21 Version 1.25.0 Fixes a bug on CN parsing on non-GNU systems
+ Handle wildcard certificates
+2016-03-09 Version 1.24.0 Waits for SSL Labs Results
+2016-03-07 Version 1.23.0 Supports SNI even when not checking CN and does not
+ issue a critical when SSL Labs is still checking a host
+2016-03-03 Version 1.22.0 Initial support for SSL Labs checks
+ Support for UTF output (thanks to Konstantin Shalygin)
+2016-03-01 Version 1.21.0 Fixed a bug which prevented the check on the expiration date
+2016-02-26 Version 1.20.0 Added debugging output (-d or --debug)
+ Improved the handling of OpenSSL error messages
+ Does not stop the validation if the server requires a
+ client certificate
+2016-02-25 Version 1.19.0 Added a check for certificates signed with SHA-1 or MD5
+ Added an option to disable the expiration date check
+2015-10-31 Version 1.18.0 Added an option to check the certificate's serial number
+ (thanks to Milan Koudelka)
+2015-10-20 Version 1.17.2 Fixed a bug with OCSP
+2015-04-07 Version 1.17.1 Fixed the check on the openssl binary
+2014-10-21 Version 1.17.0 Added an option to check revocation via OCSP
+2014-06-06 Version 1.16.2 Fixed a problem with -servername when -n was not specified
+2014-02-28 Version 1.16.1 Added a Make target for the RPM package
+2013-12-23 Version 1.16.0 Added an option to force TLS version 1
+2013-07-29 Version 1.15.0 Added an option to force a certain SSL version (thanks
+ to Max Winterstein)
+2013-05-12 Version 1.14.6 Added XMPP and timeout support (thanks to Christian
+ Ruppert and Robin H. Johnson)
+2013-03-02 Version 1.14.5 Fixed a bug occuring with TLS and multiple names in
+ the certificate
+2012-12-07 Version 1.14.4 Fixed a bug causing -N to always compare the CN
+ with 'localhost'
+2012-09-19 Version 1.14.3 Improved the error message in case of a failure in
+ the certificate download
+2012-07-13 Version 1.14.2 Added the name since or to expiration in the plugin
+ output.
+2012-07-11 Version 1.14.1 FIxed a bug with Perl date computation on some systems
+2012-07-06 Version 1.14.0 The status now includes performance data in days until
+ expiration (requires perl with Date::Parse).
+ It is now possible to print additional information in
+ the plugins long output (multiline, Nagios 3 only)
+2012-04-05 Version 1.13.0 The plugin will now try to fetch the certificate without
+ without TLS extensions in case of error
+2012-04-04 Version 1.12.0 Fixed a bug in the chain verification (hard coded
+ error number)
+2011-10-22 Version 1.11.0 --altname option
+2011-09-01 Version 1.10.0 Applied a patch from Sven Nierlein to authenicate
+ using a client certificate
+2011-03-10 Version 1.9.1 Allows HTTP as protocol and fixes -N with wildcards
+2011-01-24 Version 1.9.0 Added an option to specify the openssl executable
+2010-12-16 Version 1.8.1 Fixed bugs with environment bleeding & shell globbing
+2010-12-08 Version 1.8.0 Added support for TLS servername extension in
+ ClientHello
+2010-10-28 Version 1.7.7 Fixed a bug in the signal specification introduced
+ in 1.7.6
+2010-10-28 Version 1.7.6 Better temporary file clean up (thanks to Lawren
+ Quigley-Jones)
+2010-10-14 Version 1.7.5 Applied a patch from Yannick Gravel fixing the test
+ order
+2010-10-01 Version 1.7.4 Applied a patch from Lawren Quigley-Jones adding the
+ -A option
+2010-09-15 Version 1.7.3 Fixed a bug in the option processing
+2010-08-26 Version 1.7.2 Removes useless use of cat, better test for expect
+ utility
+2010-08-26 Version 1.7.1 Replaces "-verify 6" which was erroneously removed in
+ the previous version
+2010-08-26 Version 1.7.0 Overloaded --rootcert option to allow -CApath as well
+ as -CAfile
+2010-07-21 Version 1.6.1 Added an option to specify where to temporarily
+ store the certificate
+2010-07-09 Version 1.6.0 Added long command line options and substituted
+ -days with --critical and --warning
+2010-07-07 Version 1.5.2 Added the -f option to check a local file
+2010-07-01 Version 1.5.1 Fixed the plugin output
+2010-03-11 Version 1.4.4 Fixed bug #64 (== bashism)
+2010-03-09 Version 1.4.3 -N and -n options to compare the CN to an hostname
+2009-12-02 Version 1.4.2 the -i ISSUER option now checks if the O= or the
+ CN= fields of the root certificate match
+2009-11-30 Version 1.4.1 -r to specify the root cert to be used for
+ verification
+2009-11-30 Version 1.4.0 certificate chain verification
+2009-03-30 Version 1.3.0 -P option to check TLS certificates
+ (SMTP, FTP, POP3, ...)
+2008-05-13 Version 1.2.2 include the CN in the messages (D. Wallis)
+2008-02-25 Version 1.2.1 better error handling
+2008-02-25 Version 1.2.0 general cleanup (POSIX compliance, removed
+ nmap dependency, ...) from Dan Wallis
+2007-08-31 Version 1.1.0 - option to enforce a given email address
+ - option to enforce a given organization
+ - temporary files cleanup upon exit
+2007-08-15 Bug fix: openssl did not close the connection cleanly
+2007-08-10 First release (1.0)
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/README.md b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/README.md
new file mode 100644
index 0000000..a7bc7e2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/README.md
@@ -0,0 +1,167 @@
+
+ (c) Matteo Corti, ETH Zurich, 2007-2012
+
+ (c) Matteo Corti, 2007-2019
+ see AUTHORS for the complete list of contributors
+
+# check_ssl_cert
+
+A Nagios plugin to check an X.509 certificate:
+ - checks if the server is running and delivers a valid certificate
+ - checks if the CA matches a given pattern
+ - checks the validity
+
+## Usage
+
+```
+
+Usage: check_ssl_cert -H host [OPTIONS]
+
+Arguments:
+ -H,--host host server
+
+Options:
+ -A,--noauth ignore authority warnings (expiration only)
+ --altnames matches the pattern specified in -n with alternate
+ names too
+ -C,--clientcert path use client certificate to authenticate
+ --clientpass phrase set passphrase for client certificate.
+ -c,--critical days minimum number of days a certificate has to be valid
+ to issue a critical status
+ --curl-bin path path of the curl binary to be used
+ -d,--debug produces debugging output
+ --ecdsa cipher selection: force ECDSA authentication
+ -e,--email address pattern to match the email address contained in the
+ certificate
+ -f,--file file local file path (works with -H localhost only)
+ with -f you can not only pass a x509 certificate file
+ but also a certificate revocation list (CRL) to check
+ the validity period
+ --file-bin path path of the file binary to be used
+ --fingerprint SHA1 pattern to match the SHA1-Fingerprint
+ --force-perl-date force the usage of Perl for date computations
+ --format FORMAT format output template on success, for example
+ "%SHORTNAME% OK %CN% from '%CA_ISSUER_MATCHED%'"
+ -h,--help,-? this help message
+ --ignore-exp ignore expiration date
+ --ignore-ocsp do not check revocation with OCSP
+ --ignore-sig-alg do not check if the certificate was signed with SHA1
+ or MD5
+ --ignore-ssl-labs-cache Forces a new check by SSL Labs (see -L)
+ -i,--issuer issuer pattern to match the issuer of the certificate
+ --issuer-cert-cache dir directory where to store issuer certificates cache
+ -L,--check-ssl-labs grade SSL Labs assessment
+ (please check https://www.ssllabs.com/about/terms.html)
+ --check-ssl-labs-warn-grade SSL-Labs grade on which to warn
+ --long-output list append the specified comma separated (no spaces) list
+ of attributes to the plugin output on additional lines
+ Valid attributes are:
+ enddate, startdate, subject, issuer, modulus,
+ serial, hash, email, ocsp_uri and fingerprint.
+ 'all' will include all the available attributes.
+ -n,--cn name pattern to match the CN of the certificate (can be
+ specified multiple times)
+ --no_ssl2 disable SSL version 2
+ --no_ssl3 disable SSL version 3
+ --no_tls1 disable TLS version 1
+ --no_tls1_1 disable TLS version 1.1
+ --no_tls1_2 disable TLS version 1.2
+ -N,--host-cn match CN with the host name
+ -o,--org org pattern to match the organization of the certificate
+ --openssl path path of the openssl binary to be used
+ -p,--port port TCP port
+ -P,--protocol protocol use the specific protocol
+ {http|smtp|pop3|pop3s|imap|imaps|ftp|xmpp|irc|ldap}
+ http: default
+ smtp,pop3,imap,imaps,ftp,ldap: switch to TLS
+ -s,--selfsigned allows self-signed certificates
+ --serial serialnum pattern to match the serial number
+ --sni name sets the TLS SNI (Server Name Indication) extension
+ in the ClientHello message to 'name'
+ --ssl2 forces SSL version 2
+ --ssl3 forces SSL version 3
+ --require-ocsp-stapling require OCSP stapling
+ --require-san require the presence of a Subject Alternative Name
+ extension
+ -r,--rootcert path root certificate or directory to be used for
+ certificate validation
+ --rootcert-dir path root directory to be used for certificate validation
+ --rootcert-file path root certificate to be used for certificate validation
+ --rsa cipher selection: force RSA authentication
+ --temp dir directory where to store the temporary files
+ --terse terse output
+ -t,--timeout seconds timeout after the specified time
+ (defaults to 15 seconds)
+ --tls1 force TLS version 1
+ --tls1_1 force TLS version 1.1
+ --tls1_2 force TLS version 1.2
+ --tls1_3 force TLS version 1.3
+ -v,--verbose verbose output
+ -V,--version version
+ -w,--warning days minimum number of days a certificate has to be valid
+ to issue a warning status
+ --xmpphost name specifies the host for the 'to' attribute of the stream element
+
+Deprecated options:
+ --days days minimum number of days a certificate has to be valid
+ (see --critical and --warning)
+ --ocsp check revocation via OCSP
+ -S,--ssl version force SSL version (2,3)
+ (see: --ssl2 or --ssl3)
+```
+
+## Expect
+
+check_ssl_cert requires 'expect' to enable timeouts. If expect is not
+present on your system timeouts will be disabled.
+
+See: http://en.wikipedia.org/wiki/Expect
+
+## Virtual servers
+
+check_ssl_client supports the servername TLS extension in ClientHello
+if the installed openssl version provides it. This is needed if you
+are checking a machine with virtual hosts.
+
+## SSL Labs
+
+If `-L` or `--check-ssl-labs` are specified the plugin will check the
+cached status using the SSL Labs Assessment API (see
+https://www.ssllabs.com/about/terms.html).
+
+The plugin will ask for a cached result (maximum age 1 day) to avoid
+to many checks. The first time you issue the check you could therefore
+get an outdated result.
+
+## Notes
+
+The root certificate corresponding to the checked certificate must be
+available to openssl or specified with the `-r cabundle` or
+`--rootcert cabundle` option, where cabundle is either a file for `-CAfile`
+or a directory for `-CApath`.
+
+On macOS the root certificates bundle is stored in the Keychain and
+openssl will complain with:
+
+```
+verification error: unable to get local issuer certificate
+```
+
+The bundle can be extracted with:
+
+```
+$ sudo security find-certificate -a \
+ -p /System/Library/Keychains/SystemRootCertificates.keychain > cabundle.crt
+```
+
+and then submitted to `check_ssl_cert` with the `-r,--rootcert path` option
+
+```
+ ./check_ssl_cert -H www.google.com -r ./cabundle.crt
+```
+
+## Bugs
+
+The timeout is applied to each action involving a download.
+
+Report bugs to https://github.com/matteocorti/check_ssl_cert/issues
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/TODO b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/TODO
new file mode 100644
index 0000000..5f53f0a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/TODO
@@ -0,0 +1,5 @@
+* Use nmap --script ssl-enum-ciphers instead of SSL Labs?
+* Get rid of the CN checks and just use the subjectAlternativeName
+ http://unmitigatedrisk.com/?p=381
+ https://nameconstraints.bettertls.com/#!about
+* Loop over all the provided OCSP hosts (https://github.com/matteocorti/check_ssl_cert/issues/72) \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/VERSION b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/VERSION
new file mode 100644
index 0000000..71fae54
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/VERSION
@@ -0,0 +1 @@
+1.82.0
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/check_ssl_cert b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/check_ssl_cert
new file mode 100755
index 0000000..602b159
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/check_ssl_cert
@@ -0,0 +1,2483 @@
+#!/bin/sh
+#
+# check_ssl_cert
+#
+# Checks an X.509 certificate:
+# - checks if the server is running and delivers a valid certificate
+# - checks if the CA matches a given pattern
+# - checks the validity
+#
+# See the INSTALL file for installation instructions
+#
+# Copyright (c) 2007-2012 ETH Zurich.
+# Copyright (c) 2007-2019 Matteo Corti <matteo@corti.li>
+#
+# This module is free software; you can redistribute it and/or modify it
+# under the terms of GNU general public license (gpl) version 3.
+# See the LICENSE file for details.
+
+################################################################################
+# Constants
+
+VERSION=1.82.0
+SHORTNAME="SSL_CERT"
+
+VALID_ATTRIBUTES=",startdate,enddate,subject,issuer,serial,modulus,serial,hash,email,ocsp_uri,fingerprint,"
+
+SIGNALS="HUP INT QUIT TERM ABRT"
+
+# return value for the creation of temporary files
+TEMPFILE=""
+
+################################################################################
+# Functions
+
+################################################################################
+# Prints usage information
+# Params
+# $1 error message (optional)
+usage() {
+
+ if [ -n "$1" ] ; then
+ echo "Error: $1" 1>&2
+ fi
+
+ #### The following line is 80 characters long (helps to fit the help text in a standard terminal)
+ ######--------------------------------------------------------------------------------
+
+ echo
+ echo "Usage: check_ssl_cert -H host [OPTIONS]"
+ echo
+ echo "Arguments:"
+ echo " -H,--host host server"
+ echo
+ echo "Options:"
+ echo " -A,--noauth ignore authority warnings (expiration only)"
+ echo " --altnames matches the pattern specified in -n with alternate"
+ echo " names too"
+ echo " -C,--clientcert path use client certificate to authenticate"
+ echo " --clientpass phrase set passphrase for client certificate."
+ echo " -c,--critical days minimum number of days a certificate has to be valid"
+ echo " to issue a critical status"
+ echo " --curl-bin path path of the curl binary to be used"
+ echo " -d,--debug produces debugging output"
+ echo " --ecdsa cipher selection: force ECDSA authentication"
+ echo " -e,--email address pattern to match the email address contained in the"
+ echo " certificate"
+ echo " -f,--file file local file path (works with -H localhost only)"
+ echo " with -f you can not only pass a x509 certificate file"
+ echo " but also a certificate revocation list (CRL) to check"
+ echo " the validity period"
+ echo " --file-bin path path of the file binary to be used"
+ echo " --fingerprint SHA1 pattern to match the SHA1-Fingerprint"
+ echo " --force-perl-date force the usage of Perl for date computations"
+ echo " --format FORMAT format output template on success, for example"
+ echo " \"%SHORTNAME% OK %CN% from '%CA_ISSUER_MATCHED%'\""
+ echo " -h,--help,-? this help message"
+ echo " --ignore-exp ignore expiration date"
+ echo " --ignore-ocsp do not check revocation with OCSP"
+ echo " --ignore-sig-alg do not check if the certificate was signed with SHA1"
+ echo " or MD5"
+ echo " --ignore-ssl-labs-cache Forces a new check by SSL Labs (see -L)"
+ echo " -i,--issuer issuer pattern to match the issuer of the certificate"
+ echo " --issuer-cert-cache dir directory where to store issuer certificates cache"
+ echo " -K,--clientkey path use client certificate key to authenticate"
+ echo " -L,--check-ssl-labs grade SSL Labs assessment"
+ echo " (please check https://www.ssllabs.com/about/terms.html)"
+ echo " --check-ssl-labs-warn-grade SSL-Labs grade on which to warn"
+ echo " --long-output list append the specified comma separated (no spaces) list"
+ echo " of attributes to the plugin output on additional lines"
+ echo " Valid attributes are:"
+ echo " enddate, startdate, subject, issuer, modulus,"
+ echo " serial, hash, email, ocsp_uri and fingerprint."
+ echo " 'all' will include all the available attributes."
+ echo " -n,--cn name pattern to match the CN of the certificate (can be"
+ echo " specified multiple times)"
+ echo " --no_ssl2 disable SSL version 2"
+ echo " --no_ssl3 disable SSL version 3"
+ echo " --no_tls1 disable TLS version 1"
+ echo " --no_tls1_1 disable TLS version 1.1"
+ echo " --no_tls1_2 disable TLS version 1.2"
+ echo " -N,--host-cn match CN with the host name"
+ echo " -o,--org org pattern to match the organization of the certificate"
+ echo " --openssl path path of the openssl binary to be used"
+ echo " -p,--port port TCP port"
+ echo " -P,--protocol protocol use the specific protocol"
+ echo " {http|smtp|pop3|pops3s|imap|imaps|ftp|xmpp|irc|ldap}"
+ echo " http: default"
+ echo " smtp,pop3,imap,ftp,ldap: switch to TLS"
+ echo " -s,--selfsigned allows self-signed certificates"
+ echo " --serial serialnum pattern to match the serial number"
+ echo " --sni name sets the TLS SNI (Server Name Indication) extension"
+ echo " in the ClientHello message to 'name'"
+ echo " --ssl2 forces SSL version 2"
+ echo " --ssl3 forces SSL version 3"
+ echo " --require-ocsp-stapling require OCSP stapling"
+ echo " --require-san require the presence of a Subject Alternative Name"
+ echo " extension"
+ echo " -r,--rootcert path root certificate or directory to be used for"
+ echo " certificate validation"
+ echo " --rootcert-dir path root directory to be used for certificate validation"
+ echo " --rootcert-file path root certificate to be used for certificate validation"
+ echo " --rsa cipher selection: force RSA authentication"
+ echo " --temp dir directory where to store the temporary files"
+ echo " --terse terse output"
+ echo " -t,--timeout seconds timeout after the specified time"
+ echo " (defaults to 15 seconds)"
+ echo " --tls1 force TLS version 1"
+ echo " --tls1_1 force TLS version 1.1"
+ echo " --tls1_2 force TLS version 1.2"
+ echo " --tls1_3 force TLS version 1.3"
+ echo " -v,--verbose verbose output"
+ echo " -V,--version version"
+ echo " -w,--warning days minimum number of days a certificate has to be valid"
+ echo " to issue a warning status"
+ echo " --xmpphost name specifies the host for the 'to' attribute of the stream element"
+ echo
+ echo "Deprecated options:"
+ echo " --days days minimum number of days a certificate has to be valid"
+ echo " (see --critical and --warning)"
+ echo " --ocsp check revocation via OCSP"
+ echo " -S,--ssl version force SSL version (2,3)"
+ echo " (see: --ssl2 or --ssl3)"
+ echo
+ echo "Report bugs to https://github.com/matteocorti/check_ssl_cert/issues"
+ echo
+
+ exit 3
+
+}
+
+################################################################################
+# trap passing the signal name
+# see https://stackoverflow.com/questions/2175647/is-it-possible-to-detect-which-trap-signal-in-bash/2175751#2175751
+trap_with_arg() {
+ func="$1" ; shift
+ for sig ; do
+ # shellcheck disable=SC2064
+ trap "$func $sig" "$sig"
+ done
+}
+
+################################################################################
+# Cleanup temporary files
+remove_temporary_files() {
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] cleaning up temporary files"
+ # shellcheck disable=SC2086
+ echo $TEMPORARY_FILES | tr '\ ' '\n' | sed 's/^/[DBG] /'
+ fi
+ # shellcheck disable=SC2086
+ if [ -n "$TEMPORARY_FILES" ]; then
+ rm -f $TEMPORARY_FILES
+ fi
+}
+
+################################################################################
+# Cleanup when exiting
+cleanup() {
+ SIGNAL=$1
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] signal caught $SIGNAL"
+ fi
+ remove_temporary_files
+ # shellcheck disable=SC2086
+ trap - $SIGNALS
+ exit
+}
+
+create_temporary_file() {
+
+ # create a temporary file
+ TEMPFILE="$( mktemp -t "${0##*/}XXXXXX" 2> /dev/null )"
+ if [ -z "${TEMPFILE}" ] || [ ! -w "${TEMPFILE}" ] ; then
+ unknown 'temporary file creation failure.'
+ fi
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] temporary file $TEMPFILE created"
+ fi
+
+ # add the file to the list of temporary files
+ TEMPORARY_FILES="$TEMPORARY_FILES $TEMPFILE"
+
+}
+
+################################################################################
+# Exits with a critical message
+# Params
+# $1 error message
+critical() {
+ if [ -n "${HOST}" ] ; then
+ if [ -n "${SNI}" ] ; then
+ tmp=" ${SNI}"
+ else
+ tmp=" ${HOST}"
+ fi
+ fi
+ remove_temporary_files
+ printf '%s CRITICAL%s: %s%s%s\n' "${SHORTNAME}" "${tmp}" "$1" "${PERFORMANCE_DATA}" "${LONG_OUTPUT}"
+ exit 2
+}
+
+################################################################################
+# Exits with a warning message
+# Param
+# $1 warning message
+warning() {
+ if [ -n "${HOST}" ] ; then
+ if [ -n "${SNI}" ] ; then
+ tmp=" ${SNI}"
+ else
+ tmp=" ${HOST}"
+ fi
+ fi
+ remove_temporary_files
+ printf '%s WARN%s: %s%s%s\n' "${SHORTNAME}" "${tmp}" "$1" "${PERFORMANCE_DATA}" "${LONG_OUTPUT}"
+ exit 1
+}
+
+################################################################################
+# Exits with an 'unknown' status
+# Param
+# $1 message
+unknown() {
+ if [ -n "${HOST}" ] ; then
+ if [ -n "${SNI}" ] ; then
+ tmp=" ${SNI}"
+ else
+ tmp=" ${HOST}"
+ fi
+ fi
+ remove_temporary_files
+ printf '%s UNKNOWN%s: %s\n' "${SHORTNAME}" "${tmp}" "$1"
+ exit 3
+}
+
+################################################################################
+# Executes command with a timeout
+# Params:
+# $1 timeout in seconds
+# $2 command
+# Returns 1 if timed out 0 otherwise
+exec_with_timeout() {
+
+ time=$1
+
+ # start the command in a subshell to avoid problem with pipes
+ # (spawn accepts one command)
+ command="/bin/sh -c \"$2\""
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] executing with timeout (${time}s): $2"
+ fi
+
+ if [ -n "${TIMEOUT_BIN}" ] ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] ${TIMEOUT_BIN} $time $command"
+ fi
+
+ eval "${TIMEOUT_BIN} $time $command" > /dev/null 2>&1
+
+ if [ $? -eq 137 ] ; then
+ critical "Timeout after ${time} seconds"
+ fi
+
+ elif [ -n "${EXPECT}" ] ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] expect -c \"set echo \\\"-noecho\\\"; set timeout $time; spawn -noecho $command; expect timeout { exit 1 } eof { exit 0 }\""
+ fi
+
+ expect -c "set echo \"-noecho\"; set timeout $time; spawn -noecho $command; expect timeout { exit 1 } eof { exit 0 }"
+
+ RET=$?
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] expect returned ${RET}"
+ fi
+
+ if [ "${RET}" -eq 1 ] ; then
+ critical "Timeout after ${time} seconds"
+ fi
+
+ else
+
+ eval "${command}"
+
+ fi
+
+}
+
+################################################################################
+# Checks if a given program is available and executable
+# Params
+# $1 program name
+# Returns 1 if the program exists and is executable
+check_required_prog() {
+
+ PROG=$(command -v "$1" 2> /dev/null)
+
+ if [ -z "$PROG" ] ; then
+ critical "cannot find program: $1"
+ fi
+
+ if [ ! -x "$PROG" ] ; then
+ critical "$PROG is not executable"
+ fi
+
+}
+
+################################################################################
+# Converts SSL Labs grades to a numeric value
+# (see https://www.ssllabs.com/downloads/SSL_Server_Rating_Guide.pdf)
+# Params
+# $1 program name
+# Sets NUMERIC_SSL_LAB_GRADE
+convert_ssl_lab_grade() {
+
+ GRADE="$1"
+
+ unset NUMERIC_SSL_LAB_GRADE
+
+ case "${GRADE}" in
+ 'A+'|'a+')
+ # Value not in documentation
+ NUMERIC_SSL_LAB_GRADE=85
+ shift
+ ;;
+ A|a)
+ NUMERIC_SSL_LAB_GRADE=80
+ shift
+ ;;
+ 'A-'|'a-')
+ # Value not in documentation
+ NUMERIC_SSL_LAB_GRADE=75
+ shift
+ ;;
+ B|b)
+ NUMERIC_SSL_LAB_GRADE=65
+ shift
+ ;;
+ C|c)
+ NUMERIC_SSL_LAB_GRADE=50
+ shift
+ ;;
+ D|d)
+ NUMERIC_SSL_LAB_GRADE=35
+ shift
+ ;;
+ E|e)
+ NUMERIC_SSL_LAB_GRADE=20
+ shift
+ ;;
+ F|f)
+ NUMERIC_SSL_LAB_GRADE=0
+ shift
+ ;;
+ T|t)
+ # No trust: value not in documentation
+ NUMERIC_SSL_LAB_GRADE=0
+ shift
+ ;;
+ M|m)
+ # Certificate name mismatch: value not in documentation
+ NUMERIC_SSL_LAB_GRADE=0
+ shift
+ ;;
+ *)
+ unknown "Connot convert SSL Lab grade ${GRADE}"
+ ;;
+ esac
+
+}
+
+################################################################################
+# Tries to fetch the certificate
+
+fetch_certificate() {
+
+ RET=0
+
+ # IPv6 addresses need brackets in a URI
+ if [ "${HOST}" != "${HOST#*[0-9].[0-9]}" ]; then
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] ${HOST} is an IPv4 address"
+ fi
+ elif [ "${HOST}" != "${HOST#*:[0-9a-fA-F]}" ]; then
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] ${HOST} is an IPv6 address"
+ fi
+ if [ -z "${HOST##*[*}" ] ; then
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] ${HOST} is already specified with brakcets"
+ fi
+ else
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] adding brackets to ${HOST}"
+ fi
+ HOST="[${HOST}]"
+ fi
+ else
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] ${HOST} is not an IP address"
+ fi
+ fi
+
+ # Check if a protocol was specified (if not HTTP switch to TLS)
+ if [ -n "${PROTOCOL}" ] && [ "${PROTOCOL}" != "http" ] && [ "${PROTOCOL}" != "https" ] ; then
+
+ case "${PROTOCOL}" in
+ smtp)
+ exec_with_timeout "$TIMEOUT" "echo -e 'QUIT\\r' | $OPENSSL s_client ${CLIENT} ${CLIENTPASS} -starttls ${PROTOCOL} -connect $HOST:$PORT ${SERVERNAME} -verify 6 ${ROOT_CA} ${SSL_VERSION} ${SSL_VERSION_DISABLED} ${SSL_AU} 2> ${ERROR} 1> ${CERT}"
+ RET=$?
+ ;;
+ irc)
+ exec_with_timeout "$TIMEOUT" "echo -e 'QUIT\\r' | $OPENSSL s_client ${CLIENT} ${CLIENTPASS} -connect $HOST:$PORT ${SERVERNAME} -verify 6 ${ROOT_CA} ${SSL_VERSION} ${SSL_VERSION_DISABLED} ${SSL_AU} 2> ${ERROR} 1> ${CERT}"
+ RET=$?
+ ;;
+ pop3|imap|ftp|ldap)
+ exec_with_timeout "$TIMEOUT" "echo 'Q' | $OPENSSL s_client ${CLIENT} ${CLIENTPASS} -starttls ${PROTOCOL} -connect $HOST:$PORT ${SERVERNAME} -verify 6 ${ROOT_CA} ${SSL_VERSION} ${SSL_VERSION_DISABLED} ${SSL_AU} 2> ${ERROR} 1> ${CERT}"
+ RET=$?
+ ;;
+ pop3s|imaps)
+ exec_with_timeout "$TIMEOUT" "echo 'Q' | $OPENSSL s_client ${CLIENT} ${CLIENTPASS} -connect $HOST:$PORT ${SERVERNAME} -verify 6 ${ROOT_CA} ${SSL_VERSION} ${SSL_VERSION_DISABLED} ${SSL_AU} 2> ${ERROR} 1> ${CERT}"
+ RET=$?
+ ;;
+ xmpp)
+ exec_with_timeout "$TIMEOUT" "echo 'Q' | $OPENSSL s_client ${CLIENT} ${CLIENTPASS} -starttls ${PROTOCOL} -connect $HOST:$XMPPPORT ${XMPPHOST} -verify 6 ${ROOT_CA} ${SSL_VERSION} ${SSL_VERSION_DISABLED} ${SSL_AU} 2> ${ERROR} 1> ${CERT}"
+ RET=$?
+ ;;
+ *)
+ unknown "Error: unsupported protocol ${PROTOCOL}"
+ ;;
+ esac
+
+ elif [ -n "${FILE}" ] ; then
+
+ if [ "${HOST}" = "localhost" ] ; then
+ exec_with_timeout "$TIMEOUT" "/bin/cat '${FILE}' 2> ${ERROR} 1> ${CERT}"
+ RET=$?
+ else
+ unknown "Error: option 'file' works with -H localhost only"
+ fi
+
+ else
+
+ exec_with_timeout "$TIMEOUT" "echo '${HTTP_REQUEST}' | $OPENSSL s_client ${CLIENT} ${CLIENTPASS} -crlf -ign_eof -connect $HOST:$PORT ${SERVERNAME} -showcerts -verify 6 ${ROOT_CA} ${SSL_VERSION} ${SSL_VERSION_DISABLED} ${SSL_AU} 2> ${ERROR} 1> ${CERT}"
+ RET=$?
+
+ fi
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] storing a copy of the retrieved certificate in ${HOST}.crt"
+ cp "${CERT}" "${HOST}.crt"
+
+ echo "[DBG] storing a copy of the OpenSSL errors in ${HOST}.error"
+ cp "${ERROR}" "${HOST}.error"
+
+ fi
+
+ if [ "${RET}" -ne 0 ] ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ sed 's/^/[DBG] SSL error: /' "${ERROR}"
+ fi
+
+ # s_client could verify the server certificate because the server requires a client certificate
+ if grep -q '^Acceptable client certificate CA names' "${CERT}" ; then
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "The server requires a client certificate"
+ fi
+
+ else
+
+ # Try to clean up the error message
+ # Remove the 'verify and depth' lines
+ # Take the 1st line (seems OK with the use cases I tested)
+ ERROR_MESSAGE=$(
+ grep -v '^depth' "${ERROR}" \
+ | grep -v '^verify' \
+ | head -n 1
+ )
+ critical "SSL error: ${ERROR_MESSAGE}"
+
+ fi
+
+ fi
+
+}
+
+################################################################################
+# Adds metric to performance data
+# Params
+# $1 performance data in nagios plugin format,
+# see https://nagios-plugins.org/doc/guidelines.html#AEN200
+add_performance_data() {
+ if [ -z "${PERFORMANCE_DATA}" ]; then
+ PERFORMANCE_DATA="|${1}"
+ else
+ PERFORMANCE_DATA="${PERFORMANCE_DATA} $1"
+ fi
+}
+
+################################################################################
+# Prepares sed-style command for variable replacement
+# Params
+# $1 variable name (e.g. SHORTNAME)
+# $2 variable value (e.g. SSL_CERT)
+var_for_sed() {
+ echo "s|%$1%|$( echo "$2" | sed -e 's#|#\\\\|#g' )|g"
+}
+
+################################################################################
+# Main
+################################################################################
+main() {
+
+ # Default values
+ DEBUG=""
+ OPENSSL=""
+ FILE_BIN=""
+ CURL_BIN=""
+ IGNORE_SSL_LABS_CACHE=""
+ PORT="443"
+ XMPPPORT="5222"
+ XMPPHOST=""
+ SNI=""
+ TIMEOUT="15"
+ VERBOSE=""
+ FORCE_PERL_DATE=""
+ REQUIRE_SAN=""
+ REQUIRE_OCSP_STAPLING=""
+ OCSP="1" # enabled by default
+ FORMAT=""
+
+ # Set the default temp dir if not set
+ if [ -z "${TMPDIR}" ] ; then
+ TMPDIR="/tmp"
+ fi
+
+ ################################################################################
+ # Process command line options
+ #
+ # We do no use getopts since it is unable to process long options
+
+ while true; do
+
+ case "$1" in
+ ########################################
+ # Options without arguments
+ -A|--noauth)
+ NOAUTH=1
+ shift
+ ;;
+ --altnames)
+ ALTNAMES=1
+ shift
+ ;;
+ -d|--debug)
+ DEBUG=1
+ VERBOSE=1
+ shift
+ ;;
+ -h|--help|-\?)
+ usage
+ exit 0
+ ;;
+ --force-perl-date)
+ FORCE_PERL_DATE=1
+ shift
+ ;;
+ --ignore-exp)
+ NOEXP=1
+ shift
+ ;;
+ --ignore-sig-alg)
+ NOSIGALG=1
+ shift
+ ;;
+ --ignore-ssl-labs-cache)
+ IGNORE_SSL_LABS_CACHE="&startNew=on"
+ shift
+ ;;
+ --no_ssl2)
+ SSL_VERSION_DISABLED="${SSL_VERSION_DISABLED} -no_ssl2"
+ shift
+ ;;
+ --no_ssl3)
+ SSL_VERSION_DISABLED="${SSL_VERSION_DISABLED} -no_ssl3"
+ shift
+ ;;
+ --no_tls1)
+ SSL_VERSION_DISABLED="${SSL_VERSION_DISABLED} -no_tls1"
+ shift
+ ;;
+ --no_tls1_1)
+ SSL_VERSION_DISABLED="${SSL_VERSION_DISABLED} -no_tls1_1"
+ shift
+ ;;
+ --no_tls1_2)
+ SSL_VERSION_DISABLED="${SSL_VERSION_DISABLED} -no_tls1_2"
+ shift
+ ;;
+ -N|--host-cn)
+ COMMON_NAME="__HOST__"
+ shift
+ ;;
+ -s|--selfsigned)
+ SELFSIGNED=1
+ shift
+ ;;
+ --rsa)
+ SSL_AU="-cipher aRSA"
+ shift
+ ;;
+ --ecdsa)
+ SSL_AU="-cipher aECDSA"
+ shift
+ ;;
+ --ssl2)
+ SSL_VERSION="-ssl2"
+ shift
+ ;;
+ --ssl3)
+ SSL_VERSION="-ssl3"
+ shift
+ ;;
+ --tls1)
+ SSL_VERSION="-tls1"
+ shift
+ ;;
+ --tls1_1)
+ SSL_VERSION="-tls1_1"
+ shift
+ ;;
+ --tls1_2)
+ SSL_VERSION="-tls1_2"
+ shift
+ ;;
+ --tls1_3)
+ SSL_VERSION="-tls1_3"
+ shift
+ ;;
+ --ocsp)
+ # deprecated
+ shift
+ ;;
+ --ignore-ocsp)
+ OCSP=""
+ shift
+ ;;
+ --terse)
+ TERSE=1
+ shift
+ ;;
+ -v|--verbose)
+ VERBOSE=1
+ shift
+ ;;
+ -V|--version)
+ echo "check_ssl_cert version ${VERSION}"
+ exit 3
+ ;;
+ ########################################
+ # Options with arguments
+ -c|--critical)
+ if [ $# -gt 1 ]; then
+ CRITICAL="$2"
+ shift 2
+ else
+ unknown "-c,--critical requires an argument"
+ fi
+ ;;
+ --curl-bin)
+ if [ $# -gt 1 ]; then
+ CURL_BIN="$2"
+ shift 2
+ else
+ unknown "--curl-bin requires an argument"
+ fi
+ ;;
+ # Deprecated option: used to be as --warning
+ --days)
+ if [ $# -gt 1 ]; then
+ WARNING="$2"
+ shift 2
+ else
+ unknown "-d,--days requires an argument"
+ fi
+ ;;
+ -e|--email)
+ if [ $# -gt 1 ]; then
+ ADDR="$2"
+ shift 2
+ else
+ unknown "-e,--email requires an argument"
+ fi
+ ;;
+ -f|--file)
+ if [ $# -gt 1 ]; then
+ FILE="$2"
+ shift 2
+ else
+ unknown "-f,--file requires an argument"
+ fi
+ ;;
+ --file-bin)
+ if [ $# -gt 1 ]; then
+ FILE_BIN="$2"
+ shift 2
+ else
+ unknown "--file-bin requires an argument"
+ fi
+ ;;
+ --format)
+ if [ $# -gt 1 ]; then
+ FORMAT="$2"
+ shift 2
+ else
+ unknown "-format requires an argument"
+ fi
+ ;;
+ -H|--host)
+ if [ $# -gt 1 ]; then
+ HOST="$2"
+ shift 2
+ else
+ unknown "-H,--host requires an argument"
+ fi
+ ;;
+ -i|--issuer)
+ if [ $# -gt 1 ]; then
+ ISSUER="$2"
+ shift 2
+ else
+ unknown "-i,--issuer requires an argument"s
+ fi
+ ;;
+ --issuer-cert-cache)
+ if [ $# -gt 1 ]; then
+ ISSUER_CERT_CACHE="$2"
+ shift 2
+ else
+ unknown "--issuer-cert-cache requires an argument"
+ fi
+ ;;
+ -L|--check-ssl-labs)
+ if [ $# -gt 1 ]; then
+ SSL_LAB_CRIT_ASSESSMENT="$2"
+ shift 2
+ else
+ unknown "-L|--check-ssl-labs requires an argument"
+ fi
+ ;;
+ --check-ssl-labs-warn-grade)
+ if [ $# -gt 1 ]; then
+ SSL_LAB_WARN_ASSESTMENT="$2"
+ shift 2
+ else
+ unknown "--check-ssl-labs-warn-grade requires an argument"
+ fi
+ ;;
+ --serial)
+ if [ $# -gt 1 ]; then
+ SERIAL_LOCK="$2"
+ shift 2
+ else
+ unknown "--serial requires an argument"
+ fi
+ ;;
+ --fingerprint)
+ if [ $# -gt 1 ]; then
+ FINGERPRINT_LOCK="$2"
+ shift 2
+ else
+ unknown "--fingerprint requires an argument - SHA1 Fingerprint"
+ fi
+ ;;
+ --long-output)
+ if [ $# -gt 1 ]; then
+ LONG_OUTPUT_ATTR="$2"
+ shift 2
+ else
+ unknown "--long-output requires an argument"
+ fi
+ ;;
+ -n|--cn)
+ if [ $# -gt 1 ]; then
+ if [ -n "${COMMON_NAME}" ]; then
+ COMMON_NAME="${COMMON_NAME} ${2}"
+ else
+ COMMON_NAME="${2}"
+ fi
+ shift 2
+ else
+ unknown "-n,--cn requires an argument"
+ fi
+ ;;
+ -o|--org)
+ if [ $# -gt 1 ]; then
+ ORGANIZATION="$2"
+ shift 2
+ else
+ unknown "-o,--org requires an argument"
+ fi
+ ;;
+ --openssl)
+ if [ $# -gt 1 ]; then
+ OPENSSL="$2"
+ shift 2
+ else
+ unknown "--openssl requires an argument"
+ fi
+ ;;
+ -p|--port)
+ if [ $# -gt 1 ]; then
+ PORT="$2"
+ XMPPPORT="$2"
+ shift 2
+ else
+ unknown "-p,--port requires an argument"
+ fi
+ ;;
+ -P|--protocol)
+ if [ $# -gt 1 ]; then
+ PROTOCOL="$2"
+ shift 2
+ else
+ unknown "-P,--protocol requires an argument"
+ fi
+ ;;
+ -r|--rootcert)
+ if [ $# -gt 1 ]; then
+ ROOT_CA="$2"
+ shift 2
+ else
+ unknown "-r,--rootcert requires an argument"
+ fi
+ ;;
+ --rootcert-dir)
+ if [ $# -gt 1 ]; then
+ ROOT_CA_DIR="$2"
+ shift 2
+ else
+ unknown "--rootcert-dir requires an argument"
+ fi
+ ;;
+ --rootcert-file)
+ if [ $# -gt 1 ]; then
+ ROOT_CA_FILE="$2"
+ shift 2
+ else
+ unknown "--rootcert-file requires an argument"
+ fi
+ ;;
+ -C|--clientcert)
+ if [ $# -gt 1 ]; then
+ CLIENT_CERT="$2"
+ shift 2
+ else
+ unknown "-c,--clientcert requires an argument"
+ fi
+ ;;
+ -K|--clientkey)
+ if [ $# -gt 1 ]; then
+ CLIENT_KEY="$2"
+ shift 2
+ else
+ unknown "-K,--clientkey requires an argument"
+ fi
+ ;;
+ --clientpass)
+ if [ $# -gt 1 ]; then
+ CLIENT_PASS="$2"
+ shift 2
+ else
+ unknown "--clientpass requires an argument"
+ fi
+ ;;
+ --require-ocsp-stapling)
+ REQUIRE_OCSP_STAPLING=1
+ shift
+ ;;
+ --require-san)
+ REQUIRE_SAN=1
+ shift
+ ;;
+ --sni)
+ if [ $# -gt 1 ]; then
+ SNI="$2"
+ shift 2
+ else
+ unknown "--sni requires an argument"
+ fi
+ ;;
+ -S|--ssl)
+ if [ $# -gt 1 ]; then
+
+ if [ "$2" = "2" ] || [ "$2" = "3" ] ; then
+ SSL_VERSION="-ssl${2}"
+ shift 2
+ else
+ unknown "invalid argument for --ssl"
+ fi
+
+ else
+
+ unknown "--ssl requires an argument"
+
+ fi
+ ;;
+ -t|--timeout)
+ if [ $# -gt 1 ]; then
+ TIMEOUT="$2"
+ shift 2
+ else
+ unknown "-t,--timeout requires an argument"
+ fi
+ ;;
+ --temp)
+ if [ $# -gt 1 ] ; then
+ # Override TMPDIR
+ TMPDIR="$2"
+ shift 2
+ else
+ unknown "--temp requires an argument"
+ fi
+ ;;
+ -w|--warning)
+ if [ $# -gt 1 ]; then
+ WARNING="$2"
+ shift 2
+ else
+ unknown "-w,--warning requires an argument"
+ fi
+ ;;
+ --xmpphost)
+ if [ $# -gt 1 ]; then
+ XMPPHOST="$2"
+ shift 2
+ else
+ unknown "--xmpphost requires an argument"
+ fi
+ ;;
+ ########################################
+ # Special
+ --)
+ shift
+ break
+ ;;
+ -*)
+ unknown "invalid option: ${1}"
+ ;;
+ *)
+ if [ -n "$1" ] ; then
+ unknown "invalid option: ${1}"
+ fi
+ break
+ ;;
+ esac
+
+ done
+
+ ################################################################################
+ # Set COMMON_NAME to hostname if -N was given as argument
+ if [ "$COMMON_NAME" = "__HOST__" ] ; then
+ COMMON_NAME="${HOST}"
+ fi
+
+ ################################################################################
+ # Sanity checks
+
+ ###############
+ # Check options
+ if [ -z "${HOST}" ] ; then
+ usage "No host specified"
+ fi
+
+ if [ -n "${ALTNAMES}" ] && [ -z "${COMMON_NAME}" ] ; then
+ unknown "--altnames requires a common name to match (--cn or --host-cn)"
+ fi
+
+ if [ -n "${ROOT_CA}" ] ; then
+
+ if [ ! -r "${ROOT_CA}" ] ; then
+ unknown "Cannot read root certificate ${ROOT_CA}"
+ fi
+
+ if [ -d "${ROOT_CA}" ] ; then
+ ROOT_CA="-CApath ${ROOT_CA}"
+ elif [ -f "${ROOT_CA}" ] ; then
+ ROOT_CA="-CAfile ${ROOT_CA}"
+ else
+ unknown "Root certificate of unknown type $(file "${ROOT_CA}" 2> /dev/null)"
+ fi
+
+ fi
+
+ if [ -n "${ROOT_CA_DIR}" ] ; then
+
+ if [ ! -d "${ROOT_CA_DIR}" ] ; then
+ unknown "${ROOT_CA_DIR} is not a directory";
+ fi
+
+ if [ ! -r "${ROOT_CA_DIR}" ] ; then
+ unknown "Cannot read root directory ${ROOT_CA_DIR}"
+ fi
+
+ ROOT_CA_DIR="-CApath ${ROOT_CA_DIR}"
+ fi
+
+ if [ -n "${ROOT_CA_FILE}" ] ; then
+
+ if [ ! -r "${ROOT_CA_FILE}" ] ; then
+ unknown "Cannot read root certificate ${ROOT_CA_FILE}"
+ fi
+
+ ROOT_CA_FILE="-CAfile ${ROOT_CA_FILE}"
+ fi
+
+ if [ -n "${ROOT_CA_DIR}" ] || [ -n "${ROOT_CA_FILE}" ]; then
+ ROOT_CA="${ROOT_CA_DIR} ${ROOT_CA_FILE}"
+ fi
+
+ if [ -n "${CLIENT_CERT}" ] ; then
+
+ if [ ! -r "${CLIENT_CERT}" ] ; then
+ unknown "Cannot read client certificate ${CLIENT_CERT}"
+ fi
+
+ fi
+
+ if [ -n "${CLIENT_KEY}" ] ; then
+
+ if [ ! -r "${CLIENT_KEY}" ] ; then
+ unknown "Cannot read client certificate key ${CLIENT_KEY}"
+ fi
+
+ fi
+
+ if [ -n "${CRITICAL}" ] ; then
+
+ if ! echo "${CRITICAL}" | grep -q '^[0-9][0-9]*$' ; then
+ unknown "invalid number of days ${CRITICAL}"
+ fi
+
+ fi
+
+ if [ -n "${WARNING}" ] ; then
+
+ if ! echo "${WARNING}" | grep -q '^[0-9][0-9]*$' ; then
+ unknown "invalid number of days ${WARNING}"
+ fi
+
+ fi
+
+ if [ -n "${CRITICAL}" ] && [ -n "${WARNING}" ] ; then
+
+ if [ "${WARNING}" -le "${CRITICAL}" ] ; then
+ unknown "--warning (${WARNING}) is less than or equal to --critical (${CRITICAL})"
+ fi
+
+ fi
+
+ if [ -n "${TMPDIR}" ] ; then
+
+ if [ ! -d "${TMPDIR}" ] ; then
+ unknown "${TMPDIR} is not a directory";
+ fi
+
+ if [ ! -w "${TMPDIR}" ] ; then
+ unknown "${TMPDIR} is not writable";
+ fi
+
+ fi
+
+ if [ -n "${OPENSSL}" ] ; then
+
+ if [ ! -x "${OPENSSL}" ] ; then
+ unknown "${OPENSSL} ist not an executable"
+ fi
+
+ #if ! "${OPENSSL}" list-standard-commands | grep -q s_client ; then
+ # unknown "${OPENSSL} ist not an openssl executable"
+ #fi
+
+ fi
+
+ if [ -n "${SSL_LAB_CRIT_ASSESSMENT}" ] ; then
+ convert_ssl_lab_grade "${SSL_LAB_CRIT_ASSESSMENT}"
+ SSL_LAB_CRIT_ASSESSMENT_NUMERIC="${NUMERIC_SSL_LAB_GRADE}"
+ fi
+
+ if [ -n "${SSL_LAB_WARN_ASSESTMENT}" ] ; then
+ convert_ssl_lab_grade "${SSL_LAB_WARN_ASSESTMENT}"
+ SSL_LAB_WARN_ASSESTMENT_NUMERIC="${NUMERIC_SSL_LAB_GRADE}"
+ if ( $SSL_LAB_WARN_ASSESTMENT_NUMERIC < $SSL_LAB_CRIT_ASSESSMENT_NUMERIC ); then
+ unknown "--check-ssl-labs-warn-grade must be greater than -L|--check-ssl-labs"
+ fi
+ fi
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] ROOT_CA = ${ROOT_CA}"
+ fi
+
+ #######################
+ # Check needed programs
+
+ # OpenSSL
+ if [ -z "${OPENSSL}" ] ; then
+ check_required_prog openssl
+ OPENSSL=$PROG
+ fi
+
+ # file
+ if [ -z "${FILE_BIN}" ] ; then
+ check_required_prog file
+ FILE_BIN=$PROG
+ fi
+
+ # curl
+ if [ -z "${CURL_BIN}" ] ; then
+ if [ -n "${SSL_LAB_CRIT_ASSESSMENT}" ] || [ -n "${OCSP}" ] ; then
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] cURL binary needed. SSL Labs = ${SSL_LAB_CRIT_ASSESSMENT}, OCSP = ${OCSP}"
+ echo "[DBG] cURL binary not specified"
+ fi
+ check_required_prog curl
+ CURL_BIN=$PROG
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] cURL available: ${CURL_BIN}"
+ fi
+ else
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] cURL binary not needed. SSL Labs = ${SSL_LAB_CRIT_ASSESSMENT}, OCSP = ${OCSP}"
+ fi
+ fi
+ fi
+
+ # Expect (optional)
+ EXPECT="$(command -v expect 2> /dev/null)"
+ test -x "${EXPECT}" || EXPECT=""
+ if [ -n "${VERBOSE}" ] ; then
+ if [ -z "${EXPECT}" ] ; then
+ echo "expect not available"
+ else
+ echo "expect available (${EXPECT})"
+ fi
+ fi
+
+ # Timeout (optional)
+ TIMEOUT_BIN="$(command -v timeout 2> /dev/null)"
+ test -x "${TIMEOUT_BIN}" || TIMEOUT_BIN=""
+ if [ -n "${VERBOSE}" ] ; then
+
+ if [ -z "${TIMEOUT_BIN}" ] ; then
+ echo "timeout not available"
+ else
+ echo "timeout available (${TIMEOUT_BIN})"
+ fi
+
+ fi
+
+ if [ -z "${TIMEOUT_BIN}" ] && [ -z "${EXPECT}" ] && [ -n "${VERBOSE}" ] ; then
+ echo "disabling timeouts"
+ fi
+
+ PERL="$(command -v perl 2> /dev/null)"
+
+ if [ -n "${DEBUG}" ] && [ -n "${PERL}" ] ; then
+ echo "[DBG] perl available: ${PERL}"
+ fi
+
+ DATEBIN="$(command -v date 2> /dev/null)"
+
+ if [ -n "${DEBUG}" ] && [ -n "${DATEBIN}" ] ; then
+ echo "[DBG] date available: ${DATEBIN}"
+ fi
+
+ DATETYPE=""
+
+ if ! "${DATEBIN}" +%s >/dev/null 2>&1 ; then
+
+ # Perl with Date::Parse (optional)
+ test -x "${PERL}" || PERL=""
+ if [ -z "${PERL}" ] && [ -n "${VERBOSE}" ] ; then
+ echo "Perl not found: disabling date computations"
+ fi
+
+ if ! ${PERL} -e "use Date::Parse;" > /dev/null 2>&1 ; then
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "Perl module Date::Parse not installed: disabling date computations"
+ fi
+
+ PERL=""
+
+ else
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "Perl module Date::Parse installed: enabling date computations"
+ fi
+
+ DATETYPE="PERL"
+
+ fi
+
+ else
+
+ if $DATEBIN --version >/dev/null 2>&1 ; then
+ DATETYPE="GNU"
+ else
+ DATETYPE="BSD"
+ fi
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "found ${DATETYPE} date with timestamp support: enabling date computations"
+ fi
+
+ fi
+
+ if [ -n "${FORCE_PERL_DATE}" ] ; then
+ DATETYPE="PERL"
+ fi
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] check_ssl_cert version: ${VERSION}"
+ echo "[DBG] OpenSSL binary: ${OPENSSL}"
+ echo "[DBG] OpenSSL version: $( ${OPENSSL} version )"
+
+ OPENSSL_DIR="$( ${OPENSSL} version -d | sed -E 's/OPENSSLDIR: "([^"]*)"/\1/' )"
+
+ echo "[DBG] OpenSSL configuration directory: ${OPENSSL_DIR}"
+
+ DEFAULT_CA=0
+ if [ -f "${OPENSSL_DIR}"/cert.pem ] ; then
+ DEFAULT_CA="$( grep -c BEGIN "${OPENSSL_DIR}"/cert.pem )"
+ elif [ -f "${OPENSSL_DIR}"/certs ] ; then
+ DEFAULT_CA="$( grep -c BEGIN "${OPENSSL_DIR}"/certs )"
+ fi
+ echo "[DBG] ${DEFAULT_CA} root certificates installed by default"
+
+ echo "[DBG] System info: $( uname -a )"
+ echo "[DBG] Date computation: ${DATETYPE}"
+ fi
+
+ ################################################################################
+ # Check if openssl s_client supports the -servername option
+ #
+ # openssl s_client now has a -help option, so we can use that.
+ # Some older versions support -servername, but not -help
+ # => We supply an invalid command line option to get the help
+ # on standard error for these intermediate versions.
+ #
+ SERVERNAME=
+ if ${OPENSSL} s_client -help 2>&1 | grep -q -- -servername || ${OPENSSL} s_client not_a_real_option 2>&1 | grep -q -- -servername; then
+
+ if [ -n "${SNI}" ]; then
+ SERVERNAME="-servername ${SNI}"
+ else
+ SERVERNAME="-servername ${HOST}"
+ fi
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] '${OPENSSL} s_client' supports '-servername': using ${SERVERNAME}"
+ fi
+
+ else
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "'${OPENSSL} s_client' does not support '-servername': disabling virtual server support"
+ fi
+
+ fi
+
+ ################################################################################
+ # Check if openssl s_client supports the -xmpphost option
+ #
+ if ${OPENSSL} s_client -help 2>&1 | grep -q -- -xmpphost ; then
+
+ XMPPHOST="-xmpphost ${XMPPHOST:-$HOST}"
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] '${OPENSSL} s_client' supports '-xmpphost': using ${XMPPHOST}"
+ fi
+
+ else
+
+ if [ -n "${XMPPHOST}" ] ; then
+ unknown " s_client' does not support '-xmpphost'"
+ fi
+
+ XMPPHOST=
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "'${OPENSSL} s_client' does not support '-xmpphost': disabling 'to' attribute"
+ fi
+
+ fi
+
+ ################################################################################
+ # check if openssl s_client supports the SSL TLS version
+ if [ -n "${SSL_VERSION}" ] ; then
+ if ! "${OPENSSL}" s_client -help 2>&1 | grep -q -- "${SSL_VERSION}" ; then
+ unknown "OpenSSL does not support the ${SSL_VERSION} version"
+ fi
+ fi
+
+ ################################################################################
+ # define the HTTP request string
+ if [ -n "${SNI}" ]; then
+ HOST_HEADER="${SNI}"
+ else
+ HOST_HEADER="${HOST}"
+ fi
+
+ HTTP_REQUEST="HEAD / HTTP/1.1\\nHost: ${HOST_HEADER}\\nUser-Agent: check_ssl_cert/${VERSION}\\nConnection: close\\n\\n"
+
+ ################################################################################
+ # Fetch the X.509 certificate
+
+ # Temporary storage for the certificate and the errors
+ create_temporary_file; CERT=$TEMPFILE
+ create_temporary_file; ERROR=$TEMPFILE
+
+ if [ -n "${OCSP}" ] ; then
+
+ create_temporary_file; ISSUER_CERT_TMP=$TEMPFILE
+ create_temporary_file; ISSUER_CERT_TMP2=$TEMPFILE
+
+ fi
+
+ if [ -n "${REQUIRE_OCSP_STAPLING}" ] ; then
+ create_temporary_file; OCSP_RESPONSE_TMP=$TEMPFILE
+ fi
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "downloading certificate to ${TMPDIR}"
+ fi
+
+ CLIENT=""
+ if [ -n "${CLIENT_CERT}" ] ; then
+ CLIENT="-cert ${CLIENT_CERT}"
+ fi
+ if [ -n "${CLIENT_KEY}" ] ; then
+ CLIENT="${CLIENT} -key ${CLIENT_KEY}"
+ fi
+
+ CLIENTPASS=""
+ if [ -n "${CLIENT_PASS}" ] ; then
+ CLIENTPASS="-pass pass:${CLIENT_PASS}"
+ fi
+
+ # Cleanup before program termination
+ # Using named signals to be POSIX compliant
+ # shellcheck disable=SC2086
+ trap_with_arg cleanup $SIGNALS
+
+ fetch_certificate
+
+ if grep -q 'sslv3\ alert\ unexpected\ message' "${ERROR}" ; then
+
+ if [ -n "${SERVERNAME}" ] ; then
+
+ # Some OpenSSL versions have problems with the -servername option
+ # We try without
+ if [ -n "${VERBOSE}" ] ; then
+ echo "'${OPENSSL} s_client' returned an error: trying without '-servername'"
+ fi
+
+ SERVERNAME=""
+ fetch_certificate
+
+ fi
+
+ if grep -q 'sslv3\ alert\ unexpected\ message' "${ERROR}" ; then
+
+ critical "cannot fetch certificate: OpenSSL got an unexpected message"
+
+ fi
+
+ fi
+
+ if grep -q "BEGIN X509 CRL" "${CERT}" ; then
+ # we are dealing with a CRL file
+ OPENSSL_COMMAND="crl"
+ OPENSSL_PARAMS="-nameopt utf8,oneline,-esc_msb"
+ OPENSSL_ENDDATE_OPTION="-nextupdate"
+ else
+ # look if we are dealing with a regular certificate file (x509)
+ if ! grep -q "CERTIFICATE" "${CERT}" ; then
+
+ if [ -n "${FILE}" ] ; then
+
+ if [ -r "${FILE}" ] ; then
+
+ if "${OPENSSL}" crl -in "${CERT}" -inform DER | grep -q "BEGIN X509 CRL" ; then
+ if [ -n "${VERBOSE}" ] ; then
+ echo "File is DER encoded CRL"
+ fi
+ OPENSSL_COMMAND="crl"
+ OPENSSL_PARAMS="-inform DER -nameopt utf8,oneline,-esc_msb"
+ OPENSSL_ENDDATE_OPTION="-nextupdate"
+ else
+ critical "'${FILE}' is not a valid certificate file"
+ fi
+
+ else
+
+ critical "'${FILE}' is not readable"
+
+ fi
+
+ else
+ # See
+ # http://stackoverflow.com/questions/1251999/sed-how-can-i-replace-a-newline-n
+ #
+ # - create a branch label via :a
+ # - the N command appends a newline and and the next line of the input
+ # file to the pattern space
+ # - if we are before the last line, branch to the created label $!ba
+ # ($! means not to do it on the last line (as there should be one final newline))
+ # - finally the substitution replaces every newline with a space on
+ # the pattern space
+ ERROR_MESSAGE="$(sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/; /g' "${ERROR}")"
+ if [ -n "${VERBOSE}" ] ; then
+ echo "Error: ${ERROR_MESSAGE}"
+ fi
+ critical "No certificate returned"
+ fi
+ else
+ # parameters for regular x509 certifcates
+ OPENSSL_COMMAND="x509"
+ OPENSSL_PARAMS="-nameopt utf8,oneline,-esc_msb"
+ OPENSSL_ENDDATE_OPTION="-enddate"
+ fi
+
+ fi
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "parsing the ${OPENSSL_COMMAND} certificate file"
+ fi
+
+ ################################################################################
+ # Parse the X.509 certificate or crl
+
+ # shellcheck disable=SC2086
+ DATE="$($OPENSSL "${OPENSSL_COMMAND}" ${OPENSSL_PARAMS} -in "${CERT}" ${OPENSSL_ENDDATE_OPTION} -noout | sed -e "s/^notAfter=//" -e "s/^nextUpdate=//")"
+
+ if [ ${OPENSSL_COMMAND} = "crl" ]; then
+ CN=""
+ SUBJECT=""
+ SERIAL=0
+ OCSP_URI=""
+ VALID_ATTRIBUTES=",lastupdate,nextupdate,issuer,"
+ # shellcheck disable=SC2086
+ ISSUERS="$($OPENSSL "${OPENSSL_COMMAND}" ${OPENSSL_PARAMS} -in "${CERT}" -issuer -noout)"
+ else
+ # we need to remove everything before 'CN = ', to remove an eventual email supplied with / and additional elements (after ', ')
+ # shellcheck disable=SC2086
+ CN="$($OPENSSL x509 -in "${CERT}" -subject -noout ${OPENSSL_PARAMS} |
+ sed -e "s/^.*[[:space:]]*CN[[:space:]]=[[:space:]]//" -e "s/\\/[[:alpha:]][[:alpha:]]*=.*\$//" -e "s/,.*//" )"
+
+ # shellcheck disable=SC2086
+ SUBJECT="$($OPENSSL x509 -in "${CERT}" -subject -noout ${OPENSSL_PARAMS})"
+
+ SERIAL="$($OPENSSL x509 -in "${CERT}" -serial -noout | sed -e "s/^serial=//")"
+
+ FINGERPRINT="$($OPENSSL x509 -in "${CERT}" -fingerprint -sha1 -noout | sed -e "s/^SHA1 Fingerprint=//")"
+
+ # TO DO: we just take the first result: a loop over all the hosts should
+ # shellcheck disable=SC2086
+ OCSP_URI="$($OPENSSL "${OPENSSL_COMMAND}" ${OPENSSL_PARAMS} -in "${CERT}" -ocsp_uri -noout | head -n 1)"
+
+ # count the certificates in the chain
+ NUM_CERTIFICATES=$(grep -c -- "-BEGIN CERTIFICATE-" "${CERT}")
+
+ # start with first certificate
+ CERT_IN_CHAIN=1
+ # shellcheck disable=SC2086
+ while [ $CERT_IN_CHAIN -le $NUM_CERTIFICATES ]; do
+ if [ -n "$ISSUERS" ]; then
+ ISSUERS="$ISSUERS\\n"
+ fi
+ # shellcheck disable=SC2086
+ ISSUERS="$ISSUERS$(sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' "${CERT}" | \
+ awk -v n=$CERT_IN_CHAIN '/-BEGIN CERTIFICATE-/{l++} (l==n) {print}' | \
+ $OPENSSL "${OPENSSL_COMMAND}" ${OPENSSL_PARAMS} -issuer -noout)"
+
+ CERT_IN_CHAIN=$(( CERT_IN_CHAIN + 1 ))
+ done
+ fi
+
+ # Handle properly openssl x509 -issuer -noout output format differences:
+ # OpenSSL 1.1.0: issuer=C = XY, ST = Alpha, L = Bravo, O = Charlie, CN = Charlie SSL CA
+ # OpenSSL 1.0.2: issuer= /C=XY/ST=Alpha/L=Bravo/O=Charlie/CN=Charlie SSL CA 3
+ # shellcheck disable=SC2086
+ ISSUERS=$(echo "$ISSUERS" | sed 's/\\n/\n/g' | sed -e "s/^.*\\/CN=//" -e "s/^.* CN = //" -e "s/^.*, O = //" -e "s/\\/[A-Za-z][A-Za-z]*=.*\$//" -e "s/, [A-Za-z][A-Za-z]* =.*\$//")
+
+ # we just consider the first URI
+ # TODO check SC2016
+ # shellcheck disable=SC2086,SC2016
+ ISSUER_URI="$($OPENSSL "${OPENSSL_COMMAND}" ${OPENSSL_PARAMS} -in "${CERT}" -text -noout | grep "CA Issuers" | head -n 1 | sed -e "s/^.*CA Issuers - URI://" | tr -d '"!|;$(){}<>`&')"
+
+ # TODO: should be checked
+ # shellcheck disable=SC2021
+ if [ -z "${ISSUER_URI}" ] ; then
+ if [ -n "${VERBOSE}" ] ; then
+ echo "cannot find the CA Issuers in the certificate: disabling OCSP checks"
+ fi
+ OCSP=""
+ elif [ "${ISSUER_URI}" != "$(echo "${ISSUER_URI}" | tr -d '[[:space:]]')" ]; then
+ if [ -n "${VERBOSE}" ] ; then
+ echo "unable to fetch the CA issuer certificate (spaces in URI)"
+ fi
+ OCSP=""
+ elif ! echo "${ISSUER_URI}" | grep -qi '^http' ; then
+ if [ -n "${VERBOSE}" ] ; then
+ echo "unable to fetch the CA issuer certificate (unsupported protocol)"
+ fi
+ OCSP=""
+ fi
+
+ # Check OCSP stapling
+ if [ -n "${REQUIRE_OCSP_STAPLING}" ] ; then
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "checking OCSP stapling"
+ fi
+
+ exec_with_timeout "$TIMEOUT" "printf '${HTTP_REQUEST}' | openssl s_client -connect ${HOST}:${PORT} ${SERVERNAME} -status 2> /dev/null | grep -A 17 'OCSP response:' > $OCSP_RESPONSE_TMP"
+
+ if [ -n "${DEBUG}" ] ; then
+ sed 's/^/[DBG]\ /' "${OCSP_RESPONSE_TMP}"
+ fi
+
+ if ! grep -q 'Next Update' "${OCSP_RESPONSE_TMP}" ; then
+ critical "OCSP stapling not enabled"
+ else
+ if [ -n "${VERBOSE}" ] ; then
+ echo " OCSP stapling enabled"
+ fi
+ fi
+
+ fi
+
+ # shellcheck disable=SC2086
+ SIGNATURE_ALGORITHM="$($OPENSSL "${OPENSSL_COMMAND}" ${OPENSSL_PARAMS} -in "${CERT}" -text -noout | grep 'Signature Algorithm' | head -n 1)"
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] ${SUBJECT}"
+ echo "[DBG] CN = ${CN}"
+ # shellcheck disable=SC2162
+ echo "$ISSUERS" | while read LINE; do
+ echo "[DBG] CA = ${LINE}"
+ done
+ echo "[DBG] SERIAL = ${SERIAL}"
+ echo "[DBG] FINGERPRINT= ${FINGERPRINT}"
+ echo "[DBG] OCSP_URI = ${OCSP_URI}"
+ echo "[DBG] ISSUER_URI = ${ISSUER_URI}"
+ echo "[DBG] ${SIGNATURE_ALGORITHM}"
+ fi
+
+ if echo "${SIGNATURE_ALGORITHM}" | grep -q "sha1" ; then
+
+ if [ -n "${NOSIGALG}" ] ; then
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "${OPENSSL_COMMAND} Certificate is signed with SHA-1"
+ fi
+
+ else
+
+ critical "${OPENSSL_COMMAND} Certificate is signed with SHA-1"
+
+ fi
+
+ fi
+
+ if echo "${SIGNATURE_ALGORITHM}" | grep -qi "md5" ; then
+
+ if [ -n "${NOSIGALG}" ] ; then
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "${OPENSSL_COMMAND} Certificate is signed with MD5"
+ fi
+
+ else
+
+ critical "${OPENSSL_COMMAND} Certificate is signed with MD5"
+
+ fi
+
+ fi
+
+ ################################################################################
+ # Generate the long output
+ if [ -n "${LONG_OUTPUT_ATTR}" ] ; then
+
+ check_attr() {
+ ATTR="$1"
+ if ! echo "${VALID_ATTRIBUTES}" | grep -q ",${ATTR}," ; then
+ unknown "Invalid certificate attribute: ${ATTR}"
+ else
+ # shellcheck disable=SC2086
+ value="$(${OPENSSL} "${OPENSSL_COMMAND}" ${OPENSSL_PARAMS} -in "${CERT}" -noout -nameopt utf8,oneline,-esc_msb -"${ATTR}" | sed -e "s/.*=//")"
+ LONG_OUTPUT="${LONG_OUTPUT}\\n${ATTR}: ${value}"
+ fi
+
+ }
+
+ # Split on comma
+ if [ "${LONG_OUTPUT_ATTR}" = "all" ] ; then
+ LONG_OUTPUT_ATTR="${VALID_ATTRIBUTES}"
+ fi
+ attributes=$( echo ${LONG_OUTPUT_ATTR} | tr ',' "\\n" )
+ for attribute in $attributes ; do
+ check_attr "${attribute}"
+ done
+
+ LONG_OUTPUT="$(echo "$LONG_OUTPUT" | sed 's/\\n/\n/g')"
+
+ fi
+
+ ################################################################################
+ # Compute for how many days the certificate will be valid
+ if [ -n "${DATETYPE}" ]; then
+
+ # shellcheck disable=SC2086
+ CERT_END_DATE=$($OPENSSL "${OPENSSL_COMMAND}" ${OPENSSL_PARAMS} -in "${CERT}" -noout ${OPENSSL_ENDDATE_OPTION} | sed -e "s/.*=//")
+
+ OLDLANG=$LANG
+ LANG=en_US
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] Date computations: ${DATETYPE}"
+ fi
+
+ case "${DATETYPE}" in
+ "BSD")
+ DAYS_VALID=$(( ( $(${DATEBIN} -jf "%b %d %T %Y %Z" "${CERT_END_DATE}" +%s) - $(${DATEBIN} +%s) ) / 86400 ))
+ ;;
+
+ "GNU")
+ DAYS_VALID=$(( ( $(${DATEBIN} -d "${CERT_END_DATE}" +%s) - $(${DATEBIN} +%s) ) / 86400 ))
+ ;;
+
+ "PERL")
+ # Warning: some shell script formatting tools will indent the EOF! (should be at position 0)
+ if ! DAYS_VALID=$(perl - "${CERT_END_DATE}" <<-"EOF"
+ use strict;
+ use warnings;
+ use Date::Parse;
+ my $cert_date = str2time( $ARGV[0] );
+ my $days = int (( $cert_date - time ) / 86400 + 0.5);
+ print "$days\n";
+EOF
+ ) ; then
+ # somethig went wrong with the embedded Perl code: check the indentation of EOF
+ unknown "Error computing the certificate validity with Perl"
+ fi
+ ;;
+ esac
+
+ LANG=$OLDLANG
+
+ if [ -n "${VERBOSE}" ] ; then
+
+ if [ "${DAYS_VALID}" -ge 0 ] ; then
+ echo "The certificate will expire in ${DAYS_VALID} day(s)"
+ else
+ echo "The certificate expired "$((- DAYS_VALID))" day(s) ago"
+ fi
+
+ fi
+ add_performance_data "days=$DAYS_VALID;${WARNING};${CRITICAL};;"
+
+ fi
+
+ ################################################################################
+ # Check the presence of a subjectAlternativeName (required for Chrome)
+
+ # shellcheck disable=SC2086
+ SUBJECT_ALTERNATIVE_NAME=$($OPENSSL "${OPENSSL_COMMAND}" ${OPENSSL_PARAMS} -in "${CERT}" -text |
+ grep --after-context=1 "509v3 Subject Alternative Name:" |
+ tail -n 1 |
+ sed -e "s/DNS://g" |
+ sed -e "s/,//g" |
+ sed -e "s/^\\ *//"
+ )
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] subjectAlternativeName = ${SUBJECT_ALTERNATIVE_NAME}"
+ fi
+ if [ -n "${REQUIRE_SAN}" ] && [ -z "${SUBJECT_ALTERNATIVE_NAME}" ] && [ ${OPENSSL_COMMAND} != "crl" ] ; then
+ critical "The certificate for this site does not contain a Subject Alternative Name extension containing a domain name or IP address."
+ fi
+
+ ################################################################################
+ # Check the CN
+ if [ -n "$COMMON_NAME" ] ; then
+
+ ok=""
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] check CN: ${CN}"
+ fi
+
+ # Common name is case insensitive: using grep for comparison (and not 'case' with 'shopt -s nocasematch' as not defined in POSIX
+
+ if echo "${CN}" | grep -q -i "^\\*\\." ; then
+
+ # Match the domain
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] the common name ${CN} begins with a '*'"
+ echo "[DBG] checking if the common name matches ^$(echo "${CN}" | cut -c 3-)\$"
+ fi
+ if echo "${COMMON_NAME}" | grep -q -i "^$(echo "${CN}" | cut -c 3-)\$" ; then
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] the common name ${COMMON_NAME} matches ^$( echo "${CN}" | cut -c 3- )\$"
+ fi
+ ok="true"
+
+ fi
+
+ # Or the literal with the wildcard
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] checking if the common name matches ^$(echo "${CN}" | sed -e 's/[.]/[.]/g' -e 's/[*]/[A-Za-z0-9\-]*/' )\$"
+ fi
+ if echo "${COMMON_NAME}" | grep -q -i "^$(echo "${CN}" | sed -e 's/[.]/[.]/g' -e 's/[*]/[A-Za-z0-9\-]*/' )\$" ; then
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] the common name ${COMMON_NAME} matches ^$(echo "${CN}" | sed -e 's/[.]/[.]/g' -e 's/[*]/[A-Za-z0-9\-]*/' )\$"
+ fi
+ ok="true"
+ fi
+
+ # Or if both are exactly the same
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] checking if the common name matches ^${CN}\$"
+ fi
+ if echo "${COMMON_NAME}" | grep -q -i "^${CN}\$" ; then
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] the common name ${COMMON_NAME} matches ^${CN}\$"
+ fi
+ ok="true"
+ fi
+
+ else
+
+ if echo "${COMMON_NAME}" | grep -q -i "^${CN}$" ; then
+ ok="true"
+ fi
+
+ fi
+
+ # Check alternate names
+ if [ -n "${ALTNAMES}" ] && [ -z "$ok" ]; then
+
+ for cn in ${COMMON_NAME} ; do
+
+ ok=""
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] checking altnames against ${cn}"
+ fi
+
+ for alt_name in ${SUBJECT_ALTERNATIVE_NAME} ; do
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] check Altname: ${alt_name}"
+ fi
+
+ if echo "${alt_name}" | grep -q -i "^\\*\\." ; then
+
+ # Match the domain
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] the altname ${alt_name} begins with a '*'"
+ echo "[DBG] checking if the common name matches ^$(echo "${alt_name}" | cut -c 3-)\$"
+ fi
+ if echo "${cn}" | grep -q -i "^$(echo "${alt_name}" | cut -c 3-)\$" ; then
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] the common name ${cn} matches ^$( echo "${alt_name}" | cut -c 3- )\$"
+ fi
+ ok="true"
+
+ fi
+
+ # Or the literal with the wildcard
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] checking if the common name matches ^$(echo "${alt_name}" | sed -e 's/[.]/[.]/g' -e 's/[*]/[A-Za-z0-9\-]*/' )\$"
+ fi
+ if echo "${cn}" | grep -q -i "^$(echo "${alt_name}" | sed -e 's/[.]/[.]/g' -e 's/[*]/[A-Za-z0-9\-]*/' )\$" ; then
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] the common name ${cn} matches ^$(echo "${alt_name}" | sed -e 's/[.]/[.]/g' -e 's/[*]/[A-Za-z0-9\-]*/' )\$"
+ fi
+ ok="true"
+ fi
+
+ # Or if both are exactly the same
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] checking if the common name matches ^${alt_name}\$"
+ fi
+ if echo "${cn}" | grep -q -i "^${alt_name}\$" ; then
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] the common name ${cn} matches ^${alt_name}\$"
+ fi
+ ok="true"
+ fi
+
+ else
+
+ if echo "${cn}" | grep -q -i "^${alt_name}$" ; then
+ ok="true"
+ fi
+
+ fi
+
+ if [ -n "$ok" ] ; then
+ #fail=$cn
+ break;
+ fi
+
+ done
+
+ if [ -z "$ok" ] ; then
+ fail=$cn
+ break;
+ fi
+
+ done
+
+ fi
+
+ if [ -n "$fail" ] ; then
+ critical "invalid CN ('$CN' does not match '$fail')"
+ fi
+
+ if [ -z "$ok" ] ; then
+ critical "invalid CN ('$CN' does not match '$COMMON_NAME')"
+ fi
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] CN check finished"
+ fi
+
+ fi
+
+ ################################################################################
+ # Check the issuer
+ if [ -n "${ISSUER}" ] ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] check ISSUER: ${ISSUER}"
+ fi
+
+ ok=""
+ CA_ISSUER_MATCHED=$(echo "${ISSUERS}" | grep "^${ISSUER}\$" | head -n1)
+
+ if [ -n "${CA_ISSUER_MATCHED}" ]; then
+ ok="true"
+ else
+ # this looks ugly but preserves spaces in CA name
+ critical "invalid CA ('${ISSUER}' does not match '$(echo "${ISSUERS}" | tr '\n' '|' | sed "s/|\$//g" | sed "s/|/\\' or \\'/g")')"
+ fi
+
+ else
+
+ CA_ISSUER_MATCHED="$(echo "${ISSUERS}" | head -n1)"
+
+ fi
+
+ ################################################################################
+ # Check the serial number
+ if [ -n "${SERIAL_LOCK}" ] ; then
+
+ ok=""
+
+ if echo "${SERIAL}" | grep -q "^${SERIAL_LOCK}\$" ; then
+ ok="true"
+ fi
+
+ if [ -z "$ok" ] ; then
+ critical "invalid serial number ('${SERIAL}' does not match '${SERIAL_LOCK}')"
+ fi
+
+ fi
+ ################################################################################
+ # Check the Fingerprint
+ if [ -n "${FINGERPRINT_LOCK}" ] ; then
+
+ ok=""
+
+ if echo "${FINGERPRINT}" | grep -q "^${FINGERPRINT_LOCK}\$" ; then
+ ok="true"
+ fi
+
+ if [ -z "$ok" ] ; then
+ critical "invalid SHA1 Fingerprint ('${FINGERPRINT}' does not match '${FINGERPRINT_LOCK}')"
+ fi
+
+ fi
+
+ ################################################################################
+ # Check the validity
+ if [ -z "${NOEXP}" ] ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] Checking expiration date"
+ fi
+
+ if [ ${OPENSSL_COMMAND} = "x509" ]; then
+ # x509 certificates (default)
+
+ # We always check expired certificates
+ if ! $OPENSSL x509 -in "${CERT}" -noout -checkend 0 > /dev/null ; then
+ critical "${OPENSSL_COMMAND} certificate is expired (was valid until $DATE)"
+ fi
+
+ if [ -n "${CRITICAL}" ] ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] executing: $OPENSSL x509 -in ${CERT} -noout -checkend $(( CRITICAL * 86400 ))"
+ fi
+
+ if ! $OPENSSL x509 -in "${CERT}" -noout -checkend $(( CRITICAL * 86400 )) > /dev/null ; then
+ critical "${OPENSSL_COMMAND} certificate will expire in ${DAYS_VALID} day(s) on $DATE"
+ fi
+
+ fi
+
+ if [ -n "${WARNING}" ] ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] executing: $OPENSSL x509 -in ${CERT} -noout -checkend $(( WARNING * 86400 ))"
+ fi
+
+ if ! $OPENSSL x509 -in "${CERT}" -noout -checkend $(( WARNING * 86400 )) > /dev/null ; then
+ warning "${OPENSSL_COMMAND} certificate will expire in ${DAYS_VALID} day(s) on $DATE"
+ fi
+
+ fi
+ elif [ ${OPENSSL_COMMAND} = "crl" ]; then
+ # CRL certificates
+
+ # We always check expired certificates
+ if [ "${DAYS_VALID}" -lt 1 ] ; then
+ critical "${OPENSSL_COMMAND} certificate is expired (was valid until $DATE)"
+ fi
+
+ if [ -n "${CRITICAL}" ] ; then
+ if [ "${DAYS_VALID}" -lt "${CRITICAL}" ] ; then
+ critical "${OPENSSL_COMMAND} certificate will expire in ${DAYS_VALID} day(s) on $DATE"
+ fi
+
+ fi
+
+ if [ -n "${WARNING}" ] ; then
+ if [ "${DAYS_VALID}" -lt "${WARNING}" ] ; then
+ warning "${OPENSSL_COMMAND} certificate will expire in ${DAYS_VALID} day(s) on $DATE"
+ fi
+
+ fi
+ fi
+
+ fi
+
+ ################################################################################
+ # Check SSL Labs
+ if [ -n "${SSL_LAB_CRIT_ASSESSMENT}" ] ; then
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "Checking SSL Labs assessment"
+ fi
+
+ while true; do
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] executing ${CURL_BIN} --silent \"https://api.ssllabs.com/api/v2/analyze?host=${HOST}${IGNORE_SSL_LABS_CACHE}\""
+ fi
+
+ if [ -n "${SNI}" ] ; then
+ JSON="$(${CURL_BIN} --silent "https://api.ssllabs.com/api/v2/analyze?host=${SNI}${IGNORE_SSL_LABS_CACHE}")"
+ CURL_RETURN_CODE=$?
+ else
+ JSON="$(${CURL_BIN} --silent "https://api.ssllabs.com/api/v2/analyze?host=${HOST}${IGNORE_SSL_LABS_CACHE}")"
+ CURL_RETURN_CODE=$?
+ fi
+
+ if [ ${CURL_RETURN_CODE} -ne 0 ] ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] curl returned ${CURL_RETURN_CODE}: ${CURL_BIN} --silent \"https://api.ssllabs.com/api/v2/analyze?host=${HOST}${IGNORE_SSL_LABS_CACHE}\""
+ fi
+
+ unknown "Error checking SSL Labs: curl returned ${CURL_RETURN_CODE}, see 'man curl' for details"
+
+ fi
+
+ JSON="$(printf '%s' "${JSON}" | tr '\n' ' ' )"
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] Checking SSL Labs: ${CURL_BIN} --silent \"https://api.ssllabs.com/api/v2/analyze?host=${HOST}\""
+ echo "[DBG] SSL Labs JSON: ${JSON}"
+ fi
+
+ # We clear the cache only on the first run
+ IGNORE_SSL_LABS_CACHE=""
+
+ SSL_LABS_HOST_STATUS=$(echo "${JSON}" \
+ | sed 's/.*"status":[ ]*"\([^"]*\)".*/\1/')
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] SSL Labs status: ${SSL_LABS_HOST_STATUS}"
+ fi
+
+ case "${SSL_LABS_HOST_STATUS}" in
+ 'ERROR')
+ SSL_LABS_STATUS_MESSAGE=$(echo "${JSON}" \
+ | sed 's/.*"statusMessage":[ ]*"\([^"]*\)".*/\1/')
+ critical "Error checking SSL Labs: ${SSL_LABS_STATUS_MESSAGE}"
+ ;;
+ 'READY')
+ if ! echo "${JSON}" | grep -q "grade" ; then
+
+ # Something went wrong
+ SSL_LABS_STATUS_MESSAGE=$(echo "${JSON}" \
+ | sed 's/.*"statusMessage":[ ]*"\([^"]*\)".*/\1/')
+ critical "SSL Labs error: ${SSL_LABS_STATUS_MESSAGE}"
+
+ else
+
+ SSL_LABS_HOST_GRADE=$(echo "${JSON}" \
+ | sed 's/.*"grade":[ ]*"\([^"]*\)".*/\1/')
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] SSL Labs grade: ${SSL_LABS_HOST_GRADE}"
+ fi
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "SSL Labs grade: ${SSL_LABS_HOST_GRADE}"
+ fi
+
+ convert_ssl_lab_grade "${SSL_LABS_HOST_GRADE}"
+ SSL_LABS_HOST_GRADE_NUMERIC="${NUMERIC_SSL_LAB_GRADE}"
+
+ add_performance_data "ssllabs=${SSL_LABS_HOST_GRADE_NUMERIC}%;;${SSL_LAB_CRIT_ASSESSMENT_NUMERIC}"
+
+ # Check the grade
+ if [ "${SSL_LABS_HOST_GRADE_NUMERIC}" -lt "${SSL_LAB_CRIT_ASSESSMENT_NUMERIC}" ] ; then
+ critical "SSL Labs grade is ${SSL_LABS_HOST_GRADE} (instead of ${SSL_LAB_CRIT_ASSESSMENT})"
+ elif [ -n "${SSL_LAB_WARN_ASSESTMENT_NUMERIC}" ]; then
+ if [ "${SSL_LABS_HOST_GRADE_NUMERIC}" -lt "${SSL_LAB_WARN_ASSESTMENT_NUMERIC}" ] ; then
+ warning "SSL Labs grade is ${SSL_LABS_HOST_GRADE} (instead of ${SSL_LAB_WARN_ASSESTMENT})"
+ fi
+ fi
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] SSL Labs grade (converted): ${SSL_LABS_HOST_GRADE_NUMERIC}"
+ fi
+
+ # We have a result: exit
+ break
+
+ fi
+ ;;
+ 'IN_PROGRESS')
+ # Data not yet available: warn and continue
+ if [ -n "${VERBOSE}" ] ; then
+ echo "Warning: no cached data by SSL Labs, check initiated"
+ fi
+ ;;
+ 'DNS')
+ if [ -n "${VERBOSE}" ] ; then
+ echo 'SSL Labs cannot resolve the domain name'
+ fi
+ ;;
+ *)
+ # Try to extract a message
+ SSL_LABS_ERROR_MESSAGE=$(echo "${JSON}" \
+ | sed 's/.*"message":[ ]*"\([^"]*\)".*/\1/')
+
+ if [ -z "${SSL_LABS_ERROR_MESSAGE}" ] ; then
+ SSL_LABS_ERROR_MESSAGE="${JSON}"
+ fi
+
+ critical "Cannot check status on SSL Labs: ${SSL_LABS_ERROR_MESSAGE}"
+ esac
+
+ WAIT_TIME=60
+ if [ -n "${VERBOSE}" ] ; then
+ echo "Waiting ${WAIT_TIME} seconds"
+ fi
+
+ sleep "${WAIT_TIME}"
+
+ done
+
+ fi
+
+ ################################################################################
+ # Check revocation via OCSP
+ if [ -n "${OCSP}" ]; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] Checking revokation via OCSP"
+ fi
+
+ ISSUER_HASH="$($OPENSSL x509 -in "${CERT}" -noout -issuer_hash)"
+
+ if [ -z "${ISSUER_HASH}" ] ; then
+ unknown 'unable to find issuer certificate hash.'
+ fi
+
+ if [ -n "${ISSUER_CERT_CACHE}" ] ; then
+
+ if [ -r "${ISSUER_CERT_CACHE}/${ISSUER_HASH}.crt" ]; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] Found cached Issuer Certificate: ${ISSUER_CERT_CACHE}/${ISSUER_HASH}.crt"
+ fi
+ ISSUER_CERT="${ISSUER_CERT_CACHE}/${ISSUER_HASH}.crt"
+
+ else
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] Not found cached Issuer Certificate: ${ISSUER_CERT_CACHE}/${ISSUER_HASH}.crt"
+ fi
+
+ fi
+
+ fi
+
+ if [ -z "${ISSUER_CERT}" ] ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] OCSP: fetching issuer certificate ${ISSUER_URI} to ${ISSUER_CERT_TMP}"
+ fi
+
+ exec_with_timeout "$TIMEOUT" "${CURL_BIN} --silent --location ${ISSUER_URI} > ${ISSUER_CERT_TMP}"
+
+ if [ -n "${DEBUG}" ] ; then
+
+ echo "[DBG] OCSP: issuer certificate type: $(${FILE_BIN} "${ISSUER_CERT_TMP}" | sed 's/.*://' )"
+
+ fi
+
+ # check the result
+ if ! "${FILE_BIN}" "${ISSUER_CERT_TMP}" | grep -E -q ': (ASCII|PEM)' ; then
+
+ if "${FILE_BIN}" "${ISSUER_CERT_TMP}" | grep -q ': data' ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] OCSP: converting issuer certificate from DER to PEM"
+ fi
+
+ cp "${ISSUER_CERT_TMP}" "${ISSUER_CERT_TMP2}"
+
+ $OPENSSL x509 -inform DER -outform PEM -in "${ISSUER_CERT_TMP2}" -out "${ISSUER_CERT_TMP}"
+
+ else
+
+ unknown "Unable to fetch a valid certificate issuer intermediate certificate."
+
+ fi
+
+ fi
+
+ if [ -n "${DEBUG}" ] ; then
+
+ # remove trailing /
+ FILE_NAME=${ISSUER_URI%/}
+
+ # remove everything up to the last slash
+ FILE_NAME=${FILE_NAME##*/}
+
+ echo "[DBG] OCSP: storing a copy of the retrieved issuer certificate to ${FILE_NAME}"
+
+ cp "${ISSUER_CERT_TMP}" "${FILE_NAME}"
+ fi
+
+ if [ -n "${ISSUER_CERT_CACHE}" ] ; then
+ if [ ! -w "${ISSUER_CERT_CACHE}" ]; then
+
+ unknown "Issuer certificates cache ${ISSUER_CERT_CACHE} is not writeable!"
+
+ fi
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] Storing Issuer Certificate to cache: ${ISSUER_CERT_CACHE}/${ISSUER_HASH}.crt"
+ fi
+
+ cp "${ISSUER_CERT_TMP}" "${ISSUER_CERT_CACHE}/${ISSUER_HASH}.crt"
+
+ fi
+
+ ISSUER_CERT=${ISSUER_CERT_TMP}
+
+ fi
+ OCSP_HOST="$(echo "${OCSP_URI}" | sed -e "s@.*//\\([^/]\\+\\)\\(/.*\\)\\?\$@\\1@g" | sed 's/^http:\/\///' | sed 's/\/.*//' )"
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] OCSP: host = ${OCSP_HOST}"
+ fi
+
+ if [ -n "${OCSP_HOST}" ] ; then
+
+ # check if -header is supported
+ OCSP_HEADER=""
+
+ # ocsp -header is supported in OpenSSL versions from 1.0.0, but not documented until 1.1.0
+ # so we check if the major version is greater than 0
+ if "${OPENSSL}" version | grep -q '^LibreSSL' || [ "$( ${OPENSSL} version | sed -e 's/OpenSSL \([0-9]\).*/\1/g' )" -gt 0 ] ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] openssl ocsp supports the -header option"
+ fi
+
+ # the -header option was first accepting key and value separated by space. The newer versions are using key=value
+ KEYVALUE=""
+ if openssl ocsp -help 2>&1 | grep header | grep -q 'key=value' ; then
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] openssl ocsp -header requires 'key=value'"
+ fi
+ KEYVALUE=1
+ else
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] openssl ocsp -header requires 'key value'"
+ fi
+ fi
+
+ # http_proxy is sometimes lower- and sometimes uppercase. Programs usually check both
+ # shellcheck disable=SC2154
+ if [ -n "${http_proxy}" ] ; then
+ HTTP_PROXY="${http_proxy}"
+ fi
+
+ if [ -n "${HTTP_PROXY:-}" ] ; then
+
+ if [ -n "${KEYVALUE}" ] ; then
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] executing $OPENSSL ocsp -no_nonce -issuer ${ISSUER_CERT} -cert ${CERT} -host ${HTTP_PROXY#*://} -path ${OCSP_URI} -header HOST=${OCSP_HOST}"
+ fi
+ OCSP_RESP="$($OPENSSL ocsp -no_nonce -issuer "${ISSUER_CERT}" -cert "${CERT}" -host "${HTTP_PROXY#*://}" -path "${OCSP_URI}" -header HOST="${OCSP_HOST}" 2>&1 )"
+ else
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] executing $OPENSSL ocsp -no_nonce -issuer ${ISSUER_CERT} -cert ${CERT} -host ${HTTP_PROXY#*://} -path ${OCSP_URI} -header HOST ${OCSP_HOST}"
+ fi
+ OCSP_RESP="$($OPENSSL ocsp -no_nonce -issuer "${ISSUER_CERT}" -cert "${CERT}" -host "${HTTP_PROXY#*://}" -path "${OCSP_URI}" -header HOST "${OCSP_HOST}" 2>&1 )"
+ fi
+
+ else
+
+ if [ -n "${KEYVALUE}" ] ; then
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] executing $OPENSSL ocsp -no_nonce -issuer ${ISSUER_CERT} -cert ${CERT} -url ${OCSP_URI} ${OCSP_HEADER} -header HOST=${OCSP_HOST}"
+ fi
+ OCSP_RESP="$($OPENSSL ocsp -no_nonce -issuer "${ISSUER_CERT}" -cert "${CERT}" -url "${OCSP_URI}" -header "HOST=${OCSP_HOST}" 2>&1 )"
+ else
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] executing $OPENSSL ocsp -no_nonce -issuer ${ISSUER_CERT} -cert ${CERT} -url ${OCSP_URI} ${OCSP_HEADER} -header HOST ${OCSP_HOST}"
+ fi
+ OCSP_RESP="$($OPENSSL ocsp -no_nonce -issuer "${ISSUER_CERT}" -cert "${CERT}" -url "${OCSP_URI}" -header HOST "${OCSP_HOST}" 2>&1 )"
+ fi
+
+ fi
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "${OCSP_RESP}" | sed 's/^/[DBG] OCSP: response = /'
+ fi
+
+ if echo "${OCSP_RESP}" | grep -qi "revoked" ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo '[DBG] OCSP: revoked'
+ fi
+
+ critical "certificate is revoked"
+
+ elif ! echo "${OCSP_RESP}" | grep -qi "good" ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] OCSP: not good. HTTP_PROXY = ${HTTP_PROXY}"
+ fi
+
+ if [ -n "${HTTP_PROXY:-}" ] ; then
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] executing $OPENSSL ocsp -no_nonce -issuer \"${ISSUER_CERT}\" -cert \"${CERT}]\" -host \"${HTTP_PROXY#*://}\" -path \"${OCSP_URI}\" \"${OCSP_HEADER}\" 2>&1"
+ fi
+
+ if [ -n "${OCSP_HEADER}" ] ; then
+ OCSP_RESP="$($OPENSSL ocsp -no_nonce -issuer "${ISSUER_CERT}" -cert "${CERT}" -host "${HTTP_PROXY#*://}" -path "${OCSP_URI}" "${OCSP_HEADER}" 2>&1 )"
+ else
+ OCSP_RESP="$($OPENSSL ocsp -no_nonce -issuer "${ISSUER_CERT}" -cert "${CERT}" -host "${HTTP_PROXY#*://}" -path "${OCSP_URI}" 2>&1 )"
+ fi
+
+ else
+
+ if [ -n "${DEBUG}" ] ; then
+ echo "[DBG] executing $OPENSSL ocsp -no_nonce -issuer \"${ISSUER_CERT}\" -cert \"${CERT}\" -url \"${OCSP_URI}\" \"${OCSP_HEADER}\" 2>&1"
+ fi
+
+ if [ -n "${OCSP_HEADER}" ] ; then
+ OCSP_RESP="$($OPENSSL ocsp -no_nonce -issuer "${ISSUER_CERT}" -cert "${CERT}" -url "${OCSP_URI}" "${OCSP_HEADER}" 2>&1 )"
+ else
+ OCSP_RESP="$($OPENSSL ocsp -no_nonce -issuer "${ISSUER_CERT}" -cert "${CERT}" -url "${OCSP_URI}" 2>&1 )"
+ fi
+
+ fi
+
+ critical "OCSP error: '${OCSP_RESP}'"
+
+ fi
+
+ else
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "openssl ocsp does not support the -header option: disabling OCSP checks"
+ fi
+
+ fi
+
+ else
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "no OCSP host found: disabling OCSP checks"
+ fi
+
+ fi
+
+ fi
+
+ ################################################################################
+ # Check the organization
+ if [ -n "$ORGANIZATION" ] ; then
+
+ ORG=$($OPENSSL x509 -in "${CERT}" -subject -noout | sed -e "s/.*\\/O=//" -e "s/\\/.*//")
+
+ if ! echo "$ORG" | grep -q "^$ORGANIZATION" ; then
+ critical "invalid organization ('$ORGANIZATION' does not match '$ORG')"
+ fi
+
+ fi
+
+ ################################################################################
+ # Check the organization
+ if [ -n "$ADDR" ] ; then
+
+ EMAIL=$($OPENSSL x509 -in "${CERT}" -email -noout)
+
+ if [ -n "${VERBOSE}" ] ; then
+ echo "checking email (${ADDR}): ${EMAIL}"
+ fi
+
+ if [ -z "${EMAIL}" ] ; then
+ critical "the certificate does not contain an email address"
+ fi
+
+ if ! echo "$EMAIL" | grep -q "^$ADDR" ; then
+ critical "invalid email ($ADDR does not match $EMAIL)"
+ fi
+
+ fi
+
+ ################################################################################
+ # Check if the certificate was verified
+ if [ -z "${NOAUTH}" ] && grep -q '^verify\ error:' "${ERROR}" ; then
+
+ if grep -q '^verify\ error:num=[0-9][0-9]*:self\ signed\ certificate' "${ERROR}" ; then
+
+ if [ -z "${SELFSIGNED}" ] ; then
+ critical "Cannot verify certificate, self signed certificate"
+ else
+ SELFSIGNEDCERT="self signed "
+ fi
+
+ else
+
+ if [ -n "${DEBUG}" ] ; then
+ sed 's/^/[DBG] Error: /' "${ERROR}"
+ fi
+
+ # Process errors
+ details=$( grep '^verify\ error:' "${ERROR}" | sed 's/verify\ error:num=[0-9]*://' | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/, /g' )
+ critical "Cannot verify certificate: ${details}"
+
+ fi
+
+ fi
+
+ ################################################################################
+ # If we get this far, assume all is well. :)
+
+ # If --altnames was specified or if the certificate is wildcard,
+ # then we show the specified CN in addition to the certificate CN
+ CHECKEDNAMES=""
+ if [ -n "${ALTNAMES}" ] && [ -n "${COMMON_NAME}" ] && [ "${CN}" != "${COMMON_NAME}" ]; then
+ CHECKEDNAMES="(${COMMON_NAME}) "
+ elif [ -n "${COMMON_NAME}" ] && echo "${CN}" | grep -q -i "^\\*\\." ; then
+ CHECKEDNAMES="(${COMMON_NAME}) "
+ fi
+
+ if [ -n "${DAYS_VALID}" ] ; then
+ # nicer formatting
+ if [ "${DAYS_VALID}" -gt 1 ] ; then
+ DAYS_VALID=" (expires in ${DAYS_VALID} days)"
+ elif [ "${DAYS_VALID}" -eq 1 ] ; then
+ DAYS_VALID=" (expires tomorrow)"
+ elif [ "${DAYS_VALID}" -eq 0 ] ; then
+ DAYS_VALID=" (expires today)"
+ elif [ "${DAYS_VALID}" -eq -1 ] ; then
+ DAYS_VALID=" (expired yesterday)"
+ else
+ DAYS_VALID=" (expired ${DAYS_VALID} days ago)"
+ fi
+ fi
+
+ if [ -n "${SSL_LABS_HOST_GRADE}" ] ; then
+ SSL_LABS_HOST_GRADE=", SSL Labs grade: ${SSL_LABS_HOST_GRADE}"
+ fi
+
+ if [ -z "${CN}" ]; then
+ DISPLAY_CN=""
+ else
+ DISPLAY_CN="'${CN}' "
+ fi
+
+ if [ -z "$FORMAT" ]; then
+ if [ -n "${TERSE}" ]; then
+ FORMAT="%SHORTNAME% OK %CN% %DAYS_VALID%"
+ else
+ FORMAT="%SHORTNAME% OK - %OPENSSL_COMMAND% %SELFSIGNEDCERT%certificate %DISPLAY_CN%%CHECKEDNAMES%from '%CA_ISSUER_MATCHED%' valid until %DATE%%DAYS_VALID%%SSL_LABS_HOST_GRADE%"
+ fi
+ fi
+
+ if [ -n "${TERSE}" ]; then
+ EXTRA_OUTPUT="${PERFORMANCE_DATA}"
+ else
+ EXTRA_OUTPUT="${LONG_OUTPUT}${PERFORMANCE_DATA}"
+ fi
+
+ echo "${FORMAT}${EXTRA_OUTPUT}" | sed \
+ -e "$( var_for_sed CA_ISSUER_MATCHED "${CA_ISSUER_MATCHED}" )" \
+ -e "$( var_for_sed CHECKEDNAMES "${CHECKEDNAMES}" )" \
+ -e "$( var_for_sed CN "${CN}" )" \
+ -e "$( var_for_sed DATE "${DATE}" )" \
+ -e "$( var_for_sed DAYS_VALID "${DAYS_VALID}" )" \
+ -e "$( var_for_sed DISPLAY_CN "${DISPLAY_CN}" )" \
+ -e "$( var_for_sed OPENSSL_COMMAND "${OPENSSL_COMMAND}" )" \
+ -e "$( var_for_sed SELFSIGNEDCERT "${SELFSIGNEDCERT}" )" \
+ -e "$( var_for_sed SHORTNAME "${SHORTNAME}" )" \
+ -e "$( var_for_sed SSL_LABS_HOST_GRADE "${SSL_LABS_HOST_GRADE}" )"
+
+ remove_temporary_files
+
+ exit 0
+
+}
+
+if [ -z "${SOURCE_ONLY}" ]; then
+ main "${@}"
+fi
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/check_ssl_cert.1 b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/check_ssl_cert.1
new file mode 100644
index 0000000..0a593be
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/check_ssl_cert.1
@@ -0,0 +1,222 @@
+.\" Process this file with
+.\" groff -man -Tascii foo.1
+.\"
+.TH "check_ssl_cert" 1 "February, 2019" "1.82.0" "USER COMMANDS"
+.SH NAME
+check_ssl_cert \- checks the validity of X.509 certificates
+.SH SYNOPSIS
+.BR "check_ssl_cert " "-H host [OPTIONS]"
+.SH DESCRIPTION
+.B check_ssl_cert
+A Nagios plugin to check an X.509 certificate:
+ - checks if the server is running and delivers a valid certificate
+ - checks if the CA matches a given pattern
+ - checks the validity
+.SH ARGUMENTS
+.TP
+.BR "-H,--host" " host"
+server
+.SH OPTIONS
+.TP
+.BR "-A,--noauth"
+ignore authority warnings (expiration only)
+.TP
+.BR " --altnames"
+matches the pattern specified in -n with alternate names too
+.TP
+.BR "-C,--clientcert" " path"
+use client certificate to authenticate
+.TP
+.BR " --clientpass" " phrase"
+set passphrase for client certificate.
+.TP
+.BR "-c,--critical" " days"
+minimum number of days a certificate has to be valid to issue a critical status
+.TP
+.BR " --curl-bin" " path"
+path of the curl binary to be used"
+.TP
+.BR "-d,--debug"
+produces debugging output
+.TP
+.BR " --ecdsa"
+cipher selection: force ECDSA authentication
+.TP
+.BR "-e,--email" " address"
+pattern to match the email address contained in the certificate
+.TP
+.BR "-f,--file" " file"
+local file path (works with -H localhost only) with -f you can not only pass a x509 certificate file but also a certificate revocation list (CRL) to check the validity period
+.TP
+.BR " --file-bin" " path"
+path of the file binary to be used
+.TP
+.BR " --fingerprint" " SHA1"
+pattern to match the SHA1-Fingerprint
+.TP
+.BR " --force-perl-date"
+force the usage of Perl for date computations
+.TP
+.BR " --format" " FORMAT"
+custom output format (e.g. "%SHORTNAME% OK %CN% from '%CA_ISSUER_MATCHED%'")
+.TP
+.BR "-h,--help,-?"
+this help message
+.TP
+.BR " --ignore-exp"
+ignore expiration date
+.TP
+.BR " --ignore-ocsp"
+do not check revocation with OCSP
+.TP
+.BR " --ignore-sig-alg"
+do not check if the certificate was signed with SHA1 or MD5
+.TP
+.BR " --ignore-ssl-labs-cache"
+Forces a new check by SSL Labs (see -L)
+.TP
+.BR " --issuer-cert-cache" " dir"
+directory where to store issuer certificates cache
+.TP
+.BR "-i,--issuer" " issuer"
+pattern to match the issuer of the certificate
+.TP
+.BR "-K,--clientkey" " path"
+use client certificate key to authenticate
+.TP
+.BR "-L,--check-ssl-labs grade"
+SSL Labs assestment (please check https://www.ssllabs.com/about/terms.html)
+.TP
+.BR " --check-ssl-warn-labs grade"
+SSL Labs grade on which to warn
+.TP
+.BR " --long-output" " list"
+append the specified comma separated (no spaces) list of attributes to the plugin output on additional lines.
+Valid attributes are: enddate, startdate, subject, issuer, modulus, serial, hash, email, ocsp_uri and fingerprint. 'all' will include all the available attributes.
+.TP
+.BR "-n,--cn" " name"
+pattern to match the CN of the certificate (can be specified multiple times)
+.TP
+.BR " --no_ssl2"
+disable SSL version 2
+.TP
+.BR " --no_ssl3"
+disable SSL version 3
+.TP
+.BR " --no_tls1"
+disable TLS version 1
+.TP
+.BR " --no_tls1_1"
+disable TLS version 1.1
+.TP
+.BR " --no_tls1_2"
+disable TLS version 1.2
+.TP
+.BR "-N,--host-cn"
+match CN with the host name
+.TP
+.BR "-o,--org" " org"
+pattern to match the organization of the certificate
+.TP
+.BR " --openssl" " path"
+path of the openssl binary to be used
+.TP
+.BR "-p,--port" " port"
+TCP port
+.TP
+.BR "-P,--protocol" " protocol"
+use the specific protocol: http (default), irc or smtp,pop3,imap,ftp,ldap (switch to TLS)
+.TP
+.BR "-s,--selfsigned"
+allows self-signed certificates
+.TP
+.BR " --serial serialnum"
+pattern to match the serial number
+.TP
+.BR " --sni name"
+sets the TLS SNI (Server Name Indication) extension in the ClientHello message to 'name'
+.TP
+.BR " --ssl2"
+force SSL version 2
+.TP
+.BR " --ssl3"
+force SSL version 3
+.TP
+.BR " --require-ocsp-stapling"
+require OCSP stapling
+.TP
+.BR " --require-san"
+require the presence of a Subject Alternative Name extension
+.TP
+.BR "-r,--rootcert" " cert"
+root certificate or directory to be used for certificate validation (passed to openssl's -CAfile or -CApath)
+.TP
+.BR " --rootcert-dir" " dir"
+root directory to be used for certificate validation (passed to openssl's -CApath)
+overrides option -r,--rootcert
+.TP
+.BR " --rootcert-file" " cert"
+root certificate to be used for certificate validation (passed to openssl's -CAfile)
+overrides option -r,--rootcert
+.TP
+.BR " --rsa"
+cipher selection: force RSA authentication
+.TP
+.BR " --temp" " dir"
+directory where to store the temporary files
+.TP
+.BR " --terse"
+terse output (also see --verbose)
+.TP
+.BR "-t,--timeout"
+seconds timeout after the specified time (defaults to 15 seconds)
+.TP
+.BR " --tls1"
+force TLS version 1
+.TP
+.BR " --tls1_1"
+force TLS version 1.1
+.TP
+.BR " --tls1_2"
+force TLS version 1.2
+.TP
+.BR " --tls1_3"
+force TLS version 1.3
+.TP
+.BR "-v,--verbose"
+verbose output (also see --terse)
+.TP
+.BR "-V,--version"
+version
+.TP
+.BR "-w,--warning" " days"
+minimum number of days a certificate has to be valid to issue a warning status
+.TP
+.BR " --xmpphost" " name"
+specifies the host for the "to" attribute of the stream element
+.SH DEPRECATED OPTIONS
+.TP
+.BR "-d,--days" " days"
+minimum number of days a certificate has to be valid (see --critical and --warning)
+.TP
+.BR " --ocsp"
+check revocation via OCSP
+.TP
+.BR "-S,--ssl" " version"
+force SSL version (2,3) (see: --ssl2 or --ssl3)
+
+.SH MULTIPLE CERTIFICATES
+If the host has multiple certificates and the installed openssl version supports the -servername option it is possible to specify the TLS SNI (Server Name Idetificator) with the -N (or --host-cn) option.
+
+.SH "SEE ALSO"
+x509(1), openssl(1), expect(1), timeout(1)
+.SH "EXIT STATUS"
+check_ssl_cert returns a zero exist status if it finds no errors, 1 for warnings, 2 for a critical errors and 3 for unknown problems
+.SH BUGS
+Please report bugs to:
+
+https://github.com/matteocorti/check_ssl_cert/issues
+.SH AUTHOR
+Matteo Corti (matteo (at) corti.li )
+See the AUTHORS file for the complete list of contributors
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/check_ssl_cert.spec b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/check_ssl_cert.spec
new file mode 100644
index 0000000..df50f58
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/check_ssl_cert.spec
@@ -0,0 +1,395 @@
+%define version 1.82.0
+%define release 0
+%define sourcename check_ssl_cert
+%define packagename nagios-plugins-check_ssl_cert
+%define nagiospluginsdir %{_libdir}/nagios/plugins
+
+# No binaries in this package
+%define debug_package %{nil}
+
+Summary: A Nagios plugin to check X.509 certificates
+Name: %{packagename}
+Version: %{version}
+Obsoletes: check_ssl_cert
+Release: %{release}%{?dist}
+License: GPLv3+
+Packager: Matteo Corti <matteo@corti.li>
+Group: Applications/System
+BuildRoot: %{_tmppath}/%{packagename}-%{version}-%{release}-root-%(%{__id_u} -n)
+URL: https://github.com/matteocorti/check_ssl_cert
+Source: https://github.com/matteocorti/check_ssl_cert/releases/download/v%{version}/check_ssl_cert-%{version}.tar.gz
+
+Requires: nagios-plugins expect perl(Date::Parse)
+
+%description
+Checks an X.509 certificate:
+ - checks if the server is running and delivers a valid certificate
+ - checks if the CA matches a given pattern
+ - checks the validity
+
+%prep
+%setup -q -n %{sourcename}-%{version}
+
+%build
+
+%install
+make DESTDIR=${RPM_BUILD_ROOT}%{nagiospluginsdir} MANDIR=${RPM_BUILD_ROOT}%{_mandir} install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog NEWS README.md TODO COPYING VERSION COPYRIGHT
+%attr(0755, root, root) %{nagiospluginsdir}/check_ssl_cert
+%{_mandir}/man1/%{sourcename}.1*
+
+%changelog
+* Fri Feb 8 2019 Matteo Corti <matteo@corti.li> - 1.82.0-0
+- Updated to 1.82.0
+
+* Fri Feb 2 2019 Matteo Corti <matteo@corti.li> - 1.81.0-0
+- Updated to 1.81.0
+
+* Wed Jan 16 2019 Matteo Corti <matteo@corti.li> - 1.80.1-0
+- Updated to 1.80.1
+
+* Mon Dec 24 2018 Matteo Corti <matteo@corti.li> - 1.80.0-0
+- Updated to 1.80.0
+
+* Tue Dec 11 2018 Matteo Corti <matteo@corti.li> - 1.79.0-0
+- Updated to 1.79.0
+
+* Thu Nov 7 2018 Matteo Corti <matteo@corti.li> - 1.78.0-0
+- Updated to 1.78.0
+
+* Thu Nov 5 2018 Matteo Corti <matteo@corti.li> - 1.77.0-0
+- Updated to 1.77.0
+
+* Thu Oct 19 2018 Matteo Corti <matteo@corti.li> - 1.76.0-0
+- Updated to 1.76.0
+
+* Thu Oct 18 2018 Matteo Corti <matteo@corti.li> - 1.75.0-0
+- Updated to 1.75.0
+
+* Mon Oct 15 2018 Matteo Corti <matteo@corti.li> - 1.74.0-0
+- Updated to 1.74.0
+
+* Mon Sep 10 2018 Matteo Corti <matteo@corti.li> - 1.73.0-0
+- Updated to 1.73.0
+
+* Sun Jul 30 2018 Matteo Corti <matteo@corti.li> - 1.72.0-0
+- Updated to 1.72.0
+
+* Sun Jul 30 2018 Matteo Corti <matteo@corti.li> - 1.71.0-0
+- Updated to 1.71.0
+
+* Mon Jun 28 2018 Matteo Corti <matteo@corti.li> - 1.70.0-0
+- Updated to 1.70.0
+
+* Mon Jun 25 2018 Matteo Corti <matteo@corti.li> - 1.69.0-0
+- Updated to 1.69.0
+
+* Sun Apr 29 2018 Matteo Corti <matteo@corti.li> - 1.68.0-0
+- Updated to 1.68.0
+
+* Tue Apr 17 2018 Matteo Corti <matteo@corti.li> - 1.67.0-0
+- Updated to 1.67.0
+
+* Fri Apr 6 2018 Matteo Corti <matteo@corti.li> - 1.66.0-0
+- Updated to 1.66.0
+
+* Thu Mar 29 2018 Matteo Corti <matteo@corti.li> - 1.65.0-0
+- Updated to 1.65.0
+
+* Wed Mar 28 2018 Matteo Corti <matteo@corti.li> - 1.64.0-0
+- Updated to 1.64.0
+
+* Sat Mar 17 2018 Matteo Corti <matteo@corti.li> - 1.63.0-0
+- Updated to 1.63.0
+
+* Tue Mar 6 2018 Matteo Corti <matteo@corti.li> - 1.62.0-0
+- Updated to 1.62.0
+
+* Fri Jan 19 2018 Matteo Corti <matteo@corti.li> - 1.61.0-0
+- Updated to 1.61.0
+
+* Fri Dec 15 2017 Matteo Corti <matteo@corti.li> - 1.60.0-0
+- Updated to 1.60.0
+
+* Thu Dec 14 2017 Matteo Corti <matteo@corti.li> - 1.59.0-0
+- Updated to 1.59.0
+
+* Wed Nov 29 2017 Matteo Corti <matteo@corti.li> - 1.58.0-0
+- Updated to 1.58.0
+
+* Tue Nov 28 2017 Matteo Corti <matteo@corti.li> - 1.57.0-0
+- Updated to 1.57.0
+
+* Fri Nov 17 2017 Matteo Corti <matteo@corti.li> - 1.56.0-0
+- Updated to 1.56.0
+
+* Thu Nov 16 2017 Matteo Corti <matteo@corti.li> - 1.55.0-0
+- Updated to 1.55.0
+
+* Tue Sep 19 2017 Matteo Corti <matteo@corti.li> - 1.54.0-0
+- Updated to 1.54.0
+
+* Sun Sep 10 2017 Matteo Corti <matteo@corti.li> - 1.53.0-0
+- Updated to 1.53.0
+
+* Sat Sep 9 2017 Matteo Corti <matteo@corti.li> - 1.52.0-0
+- Updated to 1.52.0
+
+* Fri Jul 28 2017 Matteo Corti <matteo@corti.li> - 1.51.0-0
+- Updated to 1.51.0
+
+* Mon Jul 24 2017 Matteo Corti <matteo@corti.li> - 1.50.0-0
+- Updated to 1.50.0
+
+* Mon Jul 17 2017 Matteo Corti <matteo@corti.li> - 1.49.0-0
+- Updated to 1.49.0
+
+* Fri Jun 23 2017 Matteo Corti <matteo@corti.li> - 1.48.0-0
+- Updated to 1.48.0
+
+* Thu Jun 15 2017 Matteo Corti <matteo@corti.li> - 1.47.0-0
+- Updated to 1.47.0
+
+* Mon May 15 2017 Matteo Corti <matteo@corti.li> - 1.46.0-0
+- Updated to 1.46.0
+
+* Tue May 2 2017 Matteo Corti <matteo@corti.li> - 1.45.0-0
+- Updated to 1.45.0
+
+* Fri Apr 28 2017 Matteo Corti <matteo@corti.li> - 1.44.0-0
+- Updated to 1.44.0
+
+* Thu Mar 7 2017 Matteo Corti <matteo@corti.li> - 1.43.0-0
+- Updated to 1.43.0
+
+* Thu Feb 16 2017 Matteo Corti <matteo@corti.li> - 1.42.0-0
+- Updated to 1.42.0
+
+* Wed Feb 10 2017 Matteo Corti <matteo@corti.li> - 1.41.0-0
+- Updated to 1.41.0
+
+* Wed Feb 8 2017 Matteo Corti <matteo@corti.li> - 1.40.0-0
+- Updated to 1.40.0
+
+* Thu Feb 2 2017 Matteo Corti <matteo@corti.li> - 1.39.0-0
+- Updated to 1.39.0
+
+* Thu Feb 2 2017 Matteo Corti <matteo@corti.li> - 1.38.2-0
+- Updated to 1.38.2
+
+* Sun Jan 29 2017 Matteo Corti <matteo@corti.li> - 1.38.1-0
+- Updated to 1.38.1
+
+* Sat Jan 28 2017 Matteo Corti <matteo@corti.li> - 1.38.0-0
+- Updated to 1.38.0
+
+* Fri Dec 23 2016 Matteo Corti <matteo@corti.li> - 1.37.0-0
+- Updated to 1.37.0
+
+* Tue Dec 13 2016 Matteo Corti <matteo@corti.li> - 1.36.2-0
+- Updated to 1.36.2
+
+* Tue Dec 06 2016 Matteo Corti <matteo@corti.li> - 1.36.1-0
+- Updated to 1.36.1
+
+* Sun Dec 04 2016 Matteo Corti <matteo@corti.li> - 1.36.0-0
+- Updated to 1.36.0
+
+* Tue Oct 18 2016 Matteo Corti <matteo@corti.li> - 1.35.0-0
+- Updated to 1.35.0
+
+* Mon Sep 19 2016 Matteo Corti <matteo@corti.li> - 1.34.0-0
+- Updated to 1.34.0
+
+* Thu Aug 4 2016 Matteo Corti <matteo@corti.li> - 1.33.0-0
+- Updated to 1.33.0
+
+* Fri Jul 29 2016 Matteo Corti <matteo@corti.li> - 1.32.0-0
+- Updated to 1.32.0
+
+* Tue Jul 12 2016 Matteo Corti <matteo@corti.li> - 1.31.0-0
+- Updated to 1.31.0
+
+* Thu Jun 30 2016 Matteo Corti <matteo@corti.li> - 1.30.0-0
+- Updated to 1.30.0
+
+* Wed Jun 15 2016 Matteo Corti <matteo@corti.li> - 1.29.0-0
+- Updated to 1.29.0
+
+* Wed Jun 01 2016 Matteo Corti <matteo@corti.li> - 1.28.0-0
+- Updated to 1.28.0
+
+* Wed Apr 27 2016 Matteo Corti <matteo@corti.li> - 1.27.0-0
+- Updated to 1.27.0
+
+* Tue Mar 29 2016 Matteo Corti <matteo@corti.li> - 1.26.0-0
+- Updated to 1.26.0
+
+* Mon Mar 21 2016 Matteo Corti <matteo@corti.li> - 1.25.0-0
+- Updated to 1.25.0
+
+* Wed Mar 9 2016 Matteo Corti <matteo@corti.li> - 1.24.0-0
+- Updated to 1.24.0
+
+* Mon Mar 7 2016 Matteo Corti <matteo@corti.li> - 1.23.0-0
+- Updated to 1.23.0
+
+* Thu Mar 3 2016 Matteo Corti <matteo@corti.li> - 1.22.0-0
+- Updated to 1.22.0
+
+* Tue Mar 1 2016 Matteo Corti <matteo@corti.li> - 1.21.0-0
+- Updated to 1.21.0
+
+* Fri Feb 26 2016 Matteo Corti <matteo@corti.li> - 1.20.0-0
+- Updated to 1.20.0
+
+* Thu Feb 25 2016 Matteo Corti <matteo@corti.li> - 1.19.0-0
+- Updated to 1.19.0
+
+* Sat Oct 31 2015 Matteo Corti <matteo@corti.li> - 1.18.0-0
+- Updated to 1.18.0
+
+* Tue Oct 20 2015 Matteo Corti <matteo@corti.li> - 1.17.2-0
+- Updated to 1.17.2
+
+* Tue Apr 7 2015 Matteo Corti <matteo@corti.li> - 1.17.1-0
+- Updated to 1.17.1
+
+* Tue Oct 21 2014 Matteo Corti <matteo@corti.li> - 1.17.0-0
+- Updated to 1.17.0
+
+* Fri Jun 6 2014 Matteo Corti <matteo.corti@id.ethz.ch> - 1.16.2-0
+- updated to 1.16.2
+
+* Thu May 22 2014 Andreas Dijkman <andreas.dijkman@cygnis.nl> - 1.16.1-1
+- Added noarch as buildarch
+- Added expect and perl(Date::Parse) dependency
+
+* Fri Feb 28 2014 Matteo Corti <matteo.corti@id.ethz.ch> - 1.16.1-0
+- Updated to 1.16.1 (rpm make target)
+
+* Mon Dec 23 2013 Matteo Corti <matteo.corti@id.ethz.ch> - 1.16.0-0
+- Udated to 1.16.0 (force TLS)
+
+* Mon Jul 29 2013 Matteo Corti <matteo.corti@id.ethz.ch> - 1.15.0-0
+- Updated to 1.15.0 (force SSL version)
+
+* Sun May 12 2013 Matteo Corti <matteo.corti@id.ethz.ch> - 1.14.6-0
+- Updated to 1.16.6 (timeout and XMPP support)
+
+* Sat Mar 2 2013 Matteo Corti <matteo.corti@id.ethz.ch> - 1.14.5-0
+- Updated to 1.14.5 (TLS and multiple names fix)
+
+* Fri Dec 7 2012 Matteo Corti <matteo.corti@id.ethz.ch> - 1.14.4-0
+- Updated to 1.14.4 (bug fix release)
+
+* Wed Sep 19 2012 Matteo Corti <matteo.corti@id.ethz.ch> - 1.14.3-0
+- Updated to 1.14.3
+
+* Fri Jul 13 2012 Matteo Corti <matteo.corti@id.ethz.ch> - 1.14.2-0
+- Updated to 1.14.2
+
+* Wed Jul 11 2012 Matteo Corti <matteo.corti@id.ethz.ch> - 1.14.1-0
+- Updated to 1.14.1
+
+* Fri Jul 6 2012 Matteo Corti <matteo.corti@id.ethz.ch> - 1.14.0-0
+- updated to 1.14.0
+
+* Thu Apr 5 2012 Matteo Corti <matteo.corti@id.ethz.ch> - 1.13.0-0
+- updated to 1.13.0
+
+* Wed Apr 4 2012 Matteo Corti <matteo.corti@id.ethz.ch> - 1.12.0-0
+- updated to 1.12.0 (bug fix release)
+
+* Sat Oct 22 2011 Matteo Corti <matteo.corti@id.ethz.ch> - 1.11.0-0
+- ipdated to 1.10.1 (--altnames option)
+
+* Thu Sep 1 2011 Matteo Corti <matteo.corti@id.ethz.ch> - 1.10.0-0
+- apllied patch from Sven Nierlein for client certificate authentication
+
+* Thu Mar 10 2011 Matteo Corti <matteo.corti@id.ethz.ch> - 1.9.1-0
+- updated to 1.9.1: allows http as protocol and fixes -N with wildcards
+
+* Mon Jan 24 2011 Matteo Corti <matteo.corti@id.ethz.ch> - 1.9.0-0
+- updated to 1.9.0: --openssl option
+
+* Thu Dec 16 2010 Dan Wallis - 1.8.1-0
+- Fixed bugs with environment bleeding & shell globbing
+
+* Thu Dec 9 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.8.0-0
+- added support for TLS servername extension
+
+* Thu Oct 28 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.7.7-0
+- Fixed a bug in the signal specification
+
+* Thu Oct 28 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.7.6-0
+- better temporary file clean up
+
+* Thu Oct 14 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.7.5-0
+- updated to 1.7.5 (fixed the check order)
+
+* Fri Oct 1 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.7.4-0
+- added -A command line option
+
+* Wed Sep 15 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.7.3-0
+- Fixed a bug in the command line options processing
+
+* Thu Aug 26 2010 Dan Wallis - 1.7.2-0
+- updated to 1.7.2 (cat and expect fixes)
+
+* Thu Aug 26 2010 Dan Wallis - 1.7.1-0
+- updated to 1.7.1 ("-verify 6" revert)
+
+* Thu Aug 26 2010 Dan Wallis - 1.7.0-0
+
+* Wed Jul 21 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.6.1-0
+- updated to 1.6.0 (--temp option)
+
+* Fri Jul 9 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.6.0-0
+- updated to version 1.6.0 (long options, --critical and --warning, man page)
+
+* Wed Jul 7 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.5.2-0
+- updated to version 1.5.2 (Wolfgang Schricker patch, see ChangeLog)
+
+* Thu Jul 1 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.5.1-0
+- updated to version 1.5.1 (Yannick Gravel patch, see ChangeLog)
+
+* Tue Jun 8 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.5.0-0
+- updated to version 1.5.0 (-s option to allow self signed certificates)
+
+* Thu Mar 11 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.4.4-0
+- updated to 1.4.4 (bug fix release)
+
+* Tue Mar 9 2010 Matteo Corti <matteo.corti@id.ethz.ch> - 1.4.3-0
+- updated to 1.4.3 (-n and -N options)
+
+* Wed Dec 2 2009 Matteo Corti <matteo.corti@id.ethz.ch> - 1.4.2-0
+- updated to 1.4.2
+
+* Mon Nov 30 2009 Matteo Corti <matteo.corti@id.ethz.ch> - 1.4.1-0
+- updated to 1.4.1 (-r option)
+
+* Mon Nov 30 2009 Matteo Corti <matteo.corti@id.ethz.ch> - 1.4.0-0
+- Updated to 1.4.0: verify the certificate chain
+
+* Mon Mar 30 2009 Matteo Corti <matteo.corti@id.ethz.ch> - 1.3.0-0
+- Tuomas Haarala patch: -P option
+
+* Tue May 13 2008 Matteo Corti <matteo.corti@id.ethz.ch> - 1.2.2-0
+- Dan Wallis patch to include the CN in the messages
+
+* Mon Feb 25 2008 Matteo Corti <matteo.corti@id.ethz.ch> - 1.2.1-0
+- Dan Wallis patches (error checking, see ChangeLog)
+
+* Mon Feb 25 2008 Matteo Corti <matteo.corti@id.ethz.ch> - 1.2.0-0
+- Dan Wallis patches (see the ChangeLog)
+
+* Mon Sep 24 2007 Matteo Corti <matteo.corti@id.ethz.ch> - 1.1.0-0
+- first RPM package
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/test/cabundle.crt b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/test/cabundle.crt
new file mode 100644
index 0000000..abf6c01
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/test/cabundle.crt
@@ -0,0 +1,3893 @@
+##
+## Bundle of CA Root Certificates
+##
+## Certificate data from Mozilla as of: Fri Nov 13 17:03:01 2015
+##
+## This is a bundle of X.509 certificates of public Certificate Authorities
+## (CA). These were automatically extracted from Mozilla's root certificates
+## file (certdata.txt). This file can be found in the mozilla source tree:
+## http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
+##
+## It contains the certificates in PEM format and therefore
+## can be directly used with curl / libcurl / php_curl, or with
+## an Apache+mod_ssl webserver for SSL client authentication.
+## Just configure this file as the SSLCACertificateFile.
+##
+## Conversion done with mk-ca-bundle.pl version 1.25.
+## SHA1: 0ab47e2f41518f8d223eab517cb799e5b071231e
+##
+
+
+GlobalSign Root CA
+==================
+-----BEGIN CERTIFICATE-----
+MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx
+GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds
+b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV
+BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD
+VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa
+DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc
+THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb
+Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP
+c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX
+gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV
+HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF
+AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj
+Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG
+j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH
+hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC
+X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
+-----END CERTIFICATE-----
+
+GlobalSign Root CA - R2
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv
+YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
+bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT
+aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln
+bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6
+ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp
+s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN
+S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL
+TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C
+ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E
+FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i
+YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN
+BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp
+9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu
+01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7
+9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
+TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
+-----END CERTIFICATE-----
+
+Verisign Class 3 Public Primary Certification Authority - G3
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
+dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1
+EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc
+cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw
+EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj
+055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
+ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f
+j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
+/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0
+xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa
+t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
+-----END CERTIFICATE-----
+
+Entrust.net Premium 2048 Secure Server CA
+=========================================
+-----BEGIN CERTIFICATE-----
+MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u
+ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp
+bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV
+BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx
+NzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3
+d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl
+MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u
+ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL
+Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr
+hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW
+nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi
+VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8E
+BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJ
+KoZIhvcNAQEFBQADggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPy
+T/4xmf3IDExoU8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf
+zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKT
+J1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e
+nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE=
+-----END CERTIFICATE-----
+
+Baltimore CyberTrust Root
+=========================
+-----BEGIN CERTIFICATE-----
+MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE
+ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li
+ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC
+SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs
+dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME
+uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB
+UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C
+G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9
+XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr
+l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI
+VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB
+BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh
+cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5
+hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa
+Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H
+RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
+-----END CERTIFICATE-----
+
+AddTrust Low-Value Services Root
+================================
+-----BEGIN CERTIFICATE-----
+MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
+QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRU
+cnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMwMTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQsw
+CQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBO
+ZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwggEiMA0GCSqGSIb3DQEB
+AQUAA4IBDwAwggEKAoIBAQCWltQhSWDia+hBBwzexODcEyPNwTXH+9ZOEQpnXvUGW2ulCDtbKRY6
+54eyNAbFvAWlA3yCyykQruGIgb3WntP+LVbBFc7jJp0VLhD7Bo8wBN6ntGO0/7Gcrjyvd7ZWxbWr
+oulpOj0OM3kyP3CCkplhbY0wCI9xP6ZIVxn4JdxLZlyldI+Yrsj5wAYi56xz36Uu+1LcsRVlIPo1
+Zmne3yzxbrww2ywkEtvrNTVokMsAsJchPXQhI2U0K7t4WaPW4XY5mqRJjox0r26kmqPZm9I4XJui
+GMx1I4S+6+JNM3GOGvDC+Mcdoq0Dlyz4zyXG9rgkMbFjXZJ/Y/AlyVMuH79NAgMBAAGjgdIwgc8w
+HQYDVR0OBBYEFJWxtPCUtr3H2tERCSG+wa9J/RB7MAsGA1UdDwQEAwIBBjAPBgNVHRMBAf8EBTAD
+AQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBlMQswCQYDVQQGEwJT
+RTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEw
+HwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxt
+ZBsfzQ3duQH6lmM0MkhHma6X7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0Ph
+iVYrqW9yTkkz43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY
+eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJlpz/+0WatC7xr
+mYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOAWiFeIc9TVPC6b4nbqKqVz4vj
+ccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk=
+-----END CERTIFICATE-----
+
+AddTrust External Root
+======================
+-----BEGIN CERTIFICATE-----
+MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
+QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD
+VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw
+NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU
+cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg
+Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821
++iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw
+Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo
+aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy
+2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7
+7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P
+BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL
+VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk
+VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB
+IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl
+j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
+6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355
+e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u
+G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
+-----END CERTIFICATE-----
+
+AddTrust Public Services Root
+=============================
+-----BEGIN CERTIFICATE-----
+MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
+QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSAwHgYDVQQDExdBZGRU
+cnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAxMDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJ
+BgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5l
+dHdvcmsxIDAeBgNVBAMTF0FkZFRydXN0IFB1YmxpYyBDQSBSb290MIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEA6Rowj4OIFMEg2Dybjxt+A3S72mnTRqX4jsIMEZBRpS9mVEBV6tsfSlbu
+nyNu9DnLoblv8n75XYcmYZ4c+OLspoH4IcUkzBEMP9smcnrHAZcHF/nXGCwwfQ56HmIexkvA/X1i
+d9NEHif2P0tEs7c42TkfYNVRknMDtABp4/MUTu7R3AnPdzRGULD4EfL+OHn3Bzn+UZKXC1sIXzSG
+Aa2Il+tmzV7R/9x98oTaunet3IAIx6eH1lWfl2royBFkuucZKT8Rs3iQhCBSWxHveNCD9tVIkNAw
+HM+A+WD+eeSI8t0A65RF62WUaUC6wNW0uLp9BBGo6zEFlpROWCGOn9Bg/QIDAQABo4HRMIHOMB0G
+A1UdDgQWBBSBPjfYkrAfd59ctKtzquf2NGAv+jALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB
+/zCBjgYDVR0jBIGGMIGDgBSBPjfYkrAfd59ctKtzquf2NGAv+qFopGYwZDELMAkGA1UEBhMCU0Ux
+FDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29yazEgMB4G
+A1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4
+JNojVhaTdt02KLmuG7jD8WS6IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL
++YPoRNWyQSW/iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao
+GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh4SINhwBk/ox9
+Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQmXiLsks3/QppEIW1cxeMiHV9H
+EufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
+-----END CERTIFICATE-----
+
+AddTrust Qualified Certificates Root
+====================================
+-----BEGIN CERTIFICATE-----
+MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
+QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSMwIQYDVQQDExpBZGRU
+cnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcx
+CzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQ
+IE5ldHdvcmsxIzAhBgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG
+9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwqxBb/4Oxx
+64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G87B4pfYOQnrjfxvM0PC3
+KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i2O+tCBGaKZnhqkRFmhJePp1tUvznoD1o
+L/BLcHwTOK28FSXx1s6rosAx1i+f4P8UWfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GR
+wVY18BTcZTYJbqukB8c10cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HU
+MIHRMB0GA1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/
+BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6FrpGkwZzELMAkGA1UE
+BhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29y
+azEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlmaWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQAD
+ggEBABmrder4i2VhlRO6aQTvhsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxG
+GuoYQ992zPlmhpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X
+dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3P6CxB9bpT9ze
+RXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9YiQBCYz95OdBEsIJuQRno3eDB
+iFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5noxqE=
+-----END CERTIFICATE-----
+
+Entrust Root Certification Authority
+====================================
+-----BEGIN CERTIFICATE-----
+MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV
+BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw
+b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG
+A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0
+MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu
+MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu
+Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v
+dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz
+A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww
+Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68
+j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN
+rziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw
+DwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1
+MzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH
+hmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA
+A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM
+Y/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa
+v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS
+W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0
+tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8
+-----END CERTIFICATE-----
+
+RSA Security 2048 v3
+====================
+-----BEGIN CERTIFICATE-----
+MIIDYTCCAkmgAwIBAgIQCgEBAQAAAnwAAAAKAAAAAjANBgkqhkiG9w0BAQUFADA6MRkwFwYDVQQK
+ExBSU0EgU2VjdXJpdHkgSW5jMR0wGwYDVQQLExRSU0EgU2VjdXJpdHkgMjA0OCBWMzAeFw0wMTAy
+MjIyMDM5MjNaFw0yNjAyMjIyMDM5MjNaMDoxGTAXBgNVBAoTEFJTQSBTZWN1cml0eSBJbmMxHTAb
+BgNVBAsTFFJTQSBTZWN1cml0eSAyMDQ4IFYzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEAt49VcdKA3XtpeafwGFAyPGJn9gqVB93mG/Oe2dJBVGutn3y+Gc37RqtBaB4Y6lXIL5F4iSj7
+Jylg/9+PjDvJSZu1pJTOAeo+tWN7fyb9Gd3AIb2E0S1PRsNO3Ng3OTsor8udGuorryGlwSMiuLgb
+WhOHV4PR8CDn6E8jQrAApX2J6elhc5SYcSa8LWrg903w8bYqODGBDSnhAMFRD0xS+ARaqn1y07iH
+KrtjEAMqs6FPDVpeRrc9DvV07Jmf+T0kgYim3WBU6JU2PcYJk5qjEoAAVZkZR73QpXzDuvsf9/UP
++Ky5tfQ3mBMY3oVbtwyCO4dvlTlYMNpuAWgXIszACwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/
+MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQHw1EwpKrpRa41JPr/JCwz0LGdjDAdBgNVHQ4E
+FgQUB8NRMKSq6UWuNST6/yQsM9CxnYwwDQYJKoZIhvcNAQEFBQADggEBAF8+hnZuuDU8TjYcHnmY
+v/3VEhF5Ug7uMYm83X/50cYVIeiKAVQNOvtUudZj1LGqlk2iQk3UUx+LEN5/Zb5gEydxiKRz44Rj
+0aRV4VCT5hsOedBnvEbIvz8XDZXmxpBp3ue0L96VfdASPz0+f00/FGj1EVDVwfSQpQgdMWD/YIwj
+VAqv/qFuxdF6Kmh4zx6CCiC0H63lhbJqaHVOrSU3lIW+vaHU6rcMSzyd6BIA8F+sDeGscGNz9395
+nzIlQnQFgCi/vcEkllgVsRch6YlL2weIZ/QVrXA+L02FO8K32/6YaCOJ4XQP3vTFhGMpG8zLB8kA
+pKnXwiJPZ9d37CAFYd4=
+-----END CERTIFICATE-----
+
+GeoTrust Global CA
+==================
+-----BEGIN CERTIFICATE-----
+MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
+Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMDIwNTIxMDQw
+MDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j
+LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo
+BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet
+8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc
+T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU
+vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD
+AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk
+DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q
+zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4
+d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2
+mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p
+XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm
+Mw==
+-----END CERTIFICATE-----
+
+GeoTrust Global CA 2
+====================
+-----BEGIN CERTIFICATE-----
+MIIDZjCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
+R2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFsIENBIDIwHhcNMDQwMzA0MDUw
+MDAwWhcNMTkwMzA0MDUwMDAwWjBEMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j
+LjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFsIENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQDvPE1APRDfO1MA4Wf+lGAVPoWI8YkNkMgoI5kF6CsgncbzYEbYwbLVjDHZ3CB5JIG/
+NTL8Y2nbsSpr7iFY8gjpeMtvy/wWUsiRxP89c96xPqfCfWbB9X5SJBri1WeR0IIQ13hLTytCOb1k
+LUCgsBDTOEhGiKEMuzozKmKY+wCdE1l/bztyqu6mD4b5BWHqZ38MN5aL5mkWRxHCJ1kDs6ZgwiFA
+Vvqgx306E+PsV8ez1q6diYD3Aecs9pYrEw15LNnA5IZ7S4wMcoKK+xfNAGw6EzywhIdLFnopsk/b
+HdQL82Y3vdj2V7teJHq4PIu5+pIaGoSe2HSPqht/XvT+RSIhAgMBAAGjYzBhMA8GA1UdEwEB/wQF
+MAMBAf8wHQYDVR0OBBYEFHE4NvICMVNHK266ZUapEBVYIAUJMB8GA1UdIwQYMBaAFHE4NvICMVNH
+K266ZUapEBVYIAUJMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQUFAAOCAQEAA/e1K6tdEPx7
+srJerJsOflN4WT5CBP51o62sgU7XAotexC3IUnbHLB/8gTKY0UvGkpMzNTEv/NgdRN3ggX+d6Yvh
+ZJFiCzkIjKx0nVnZellSlxG5FntvRdOW2TF9AjYPnDtuzywNA0ZF66D0f0hExghAzN4bcLUprbqL
+OzRldRtxIR0sFAqwlpW41uryZfspuk/qkZN0abby/+Ea0AzRdoXLiiW9l14sbxWZJue2Kf8i7MkC
+x1YAzUm5s2x7UwQa4qjJqhIFI8LO57sEAszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqF
+H4z1Ir+rzoPz4iIprn2DQKi6bA==
+-----END CERTIFICATE-----
+
+GeoTrust Universal CA
+=====================
+-----BEGIN CERTIFICATE-----
+MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
+R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1
+MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu
+Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
+ADCCAgoCggIBAKYVVaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9t
+JPi8cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTTQjOgNB0e
+RXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFhF7em6fgemdtzbvQKoiFs
+7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2vc7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d
+8Lsrlh/eezJS/R27tQahsiFepdaVaH/wmZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7V
+qnJNk22CDtucvc+081xdVHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3Cga
+Rr0BHdCXteGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZf9hB
+Z3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfReBi9Fi1jUIxaS5BZu
+KGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+nhutxx9z3SxPGWX9f5NAEC7S8O08
+ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0
+XG0D08DYj3rWMB8GA1UdIwQYMBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIB
+hjANBgkqhkiG9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc
+aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fXIwjhmF7DWgh2
+qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzynANXH/KttgCJwpQzgXQQpAvvL
+oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK
+xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF
+KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2
+DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK
+xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU
+p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI
+P/rmMuGNG2+k5o7Y+SlIis5z/iw=
+-----END CERTIFICATE-----
+
+GeoTrust Universal CA 2
+=======================
+-----BEGIN CERTIFICATE-----
+MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
+R2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwHhcNMDQwMzA0
+MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3Qg
+SW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUA
+A4ICDwAwggIKAoICAQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0
+DE81WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUGFF+3Qs17
+j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdqXbboW0W63MOhBW9Wjo8Q
+JqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxLse4YuU6W3Nx2/zu+z18DwPw76L5GG//a
+QMJS9/7jOvdqdzXQ2o3rXhhqMcceujwbKNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2
+WP0+GfPtDCapkzj4T8FdIgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP
+20gaXT73y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz2ZRthAAn
+ZqzwcEAJQpKtT5MNYQlRJNiS1QuUYbKHsu3/mjX/hVTK7URDrBs8FmtISgocQIgfksILAAX/8sgC
+SqSqqcyZlpwvWOB94b67B9xfBHJcMTTD7F8t4D1kkCLm0ey4Lt1ZrtmhN79UNdxzMk+MBB4zsslG
+8dhcyFVQyWi9qLo2CQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR281Xh+qQ2
++/CfXGJx7Tz0RzgQKzAfBgNVHSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8E
+BAMCAYYwDQYJKoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z
+dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQL1EuxBRa3ugZ
+4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgrFg5fNuH8KrUwJM/gYwx7WBr+
+mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSoag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpq
+A1Ihn0CoZ1Dy81of398j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpg
+Y+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP
+pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d
+FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp
+gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm
+X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
+-----END CERTIFICATE-----
+
+Visa eCommerce Root
+===================
+-----BEGIN CERTIFICATE-----
+MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBrMQswCQYDVQQG
+EwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2Ug
+QXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1lcmNlIFJvb3QwHhcNMDIwNjI2MDIxODM2
+WhcNMjIwNjI0MDAxNjEyWjBrMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMm
+VmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNv
+bW1lcmNlIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvV95WHm6h2mCxlCfL
+F9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4ElpF7sDPwsRROEW+1QK8b
+RaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdVZqW1LS7YgFmypw23RuwhY/81q6UCzyr0
+TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI
+/k4+oKsGGelT84ATB+0tvz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzs
+GHxBvfaLdXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEG
+MB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUFAAOCAQEAX/FBfXxc
+CLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcRzCSs00Rsca4BIGsDoo8Ytyk6feUW
+YFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pz
+zkWKsKZJ/0x9nXGIxHYdkFsd7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBu
+YQa7FkKMcPcw++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt
+398znM/jra6O1I7mT1GvFpLgXPYHDw==
+-----END CERTIFICATE-----
+
+Certum Root CA
+==============
+-----BEGIN CERTIFICATE-----
+MIIDDDCCAfSgAwIBAgIDAQAgMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQK
+ExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBDQTAeFw0wMjA2MTExMDQ2Mzla
+Fw0yNzA2MTExMDQ2MzlaMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8u
+by4xEjAQBgNVBAMTCUNlcnR1bSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6x
+wS7TT3zNJc4YPk/EjG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdL
+kKWoePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GIULdtlkIJ
+89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapuOb7kky/ZR6By6/qmW6/K
+Uz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUgAKpoC6EahQGcxEZjgoi2IrHu/qpGWX7P
+NSzVttpd90gzFFS269lvzs2I1qsb2pY7HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkq
+hkiG9w0BAQUFAAOCAQEAuI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+
+GXYkHAQaTOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTgxSvg
+GrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1qCjqTE5s7FCMTY5w/
+0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5xO/fIR/RpbxXyEV6DHpx8Uq79AtoS
+qFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs6GAqm4VKQPNriiTsBhYscw==
+-----END CERTIFICATE-----
+
+Comodo AAA Services root
+========================
+-----BEGIN CERTIFICATE-----
+MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
+R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg
+TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw
+MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl
+c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV
+BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG
+C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs
+i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW
+Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH
+Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK
+Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f
+BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl
+cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz
+LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm
+7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
+Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z
+8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C
+12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
+-----END CERTIFICATE-----
+
+Comodo Secure Services root
+===========================
+-----BEGIN CERTIFICATE-----
+MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
+R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg
+TGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAw
+MDAwMFoXDTI4MTIzMTIzNTk1OVowfjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFu
+Y2hlc3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxJDAi
+BgNVBAMMG1NlY3VyZSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBAMBxM4KK0HDrc4eCQNUd5MvJDkKQ+d40uaG6EfQlhfPMcm3ye5drswfxdySRXyWP
+9nQ95IDC+DwN879A6vfIUtFyb+/Iq0G4bi4XKpVpDM3SHpR7LZQdqnXXs5jLrLxkU0C8j6ysNstc
+rbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rC
+oznl2yY4rYsK7hljxxwk3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3V
+p6ea5EQz6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNVHQ4E
+FgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w
+gYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1NlY3VyZUNlcnRpZmlj
+YXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRwOi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlm
+aWNhdGVTZXJ2aWNlcy5jcmwwDQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm
+4J4oqF7Tt/Q05qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj
+Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtIgKvcnDe4IRRL
+DXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJaD61JlfutuC23bkpgHl9j6Pw
+pCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDlizeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1H
+RR3B7Hzs/Sk=
+-----END CERTIFICATE-----
+
+Comodo Trusted Services root
+============================
+-----BEGIN CERTIFICATE-----
+MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
+R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg
+TGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEw
+MDAwMDBaFw0yODEyMzEyMzU5NTlaMH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1h
+bmNoZXN0ZXIxEDAOBgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUw
+IwYDVQQDDBxUcnVzdGVkIENlcnRpZmljYXRlIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEA33FvNlhTWvI2VFeAxHQIIO0Yfyod5jWaHiWsnOWWfnJSoBVC21ndZHoa0Lh7
+3TkVvFVIxO06AOoxEbrycXQaZ7jPM8yoMa+j49d/vzMtTGo87IvDktJTdyR0nAducPy9C1t2ul/y
+/9c3S0pgePfw+spwtOpZqqPOSC+pw7ILfhdyFgymBwwbOM/JYrc/oJOlh0Hyt3BAd9i+FHzjqMB6
+juljatEPmsbS9Is6FARW1O24zG71++IsWL1/T2sr92AkWCTOJu80kTrV44HQsvAEAtdbtz6SrGsS
+ivnkBbA7kUlcsutT6vifR4buv5XAwAaf0lteERv0xwQ1KdJVXOTt6wIDAQABo4HJMIHGMB0GA1Ud
+DgQWBBTFe1i97doladL3WRaoszLAeydb9DAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB
+/zCBgwYDVR0fBHwwejA8oDqgOIY2aHR0cDovL2NybC5jb21vZG9jYS5jb20vVHJ1c3RlZENlcnRp
+ZmljYXRlU2VydmljZXMuY3JsMDqgOKA2hjRodHRwOi8vY3JsLmNvbW9kby5uZXQvVHJ1c3RlZENl
+cnRpZmljYXRlU2VydmljZXMuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8Ntw
+uleGFTQQuS9/HrCoiWChisJ3DFBKmwCL2Iv0QeLQg4pKHBQGsKNoBXAxMKdTmw7pSqBYaWcOrp32
+pSxBvzwGa+RZzG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxISjBc/lDb+XbDA
+BHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+xqFx7D+gIIxmOom0jtTYsU0l
+R+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/AtyjcndBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O
+9y5Xt5hwXsjEeLBi
+-----END CERTIFICATE-----
+
+QuoVadis Root CA
+================
+-----BEGIN CERTIFICATE-----
+MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJCTTEZMBcGA1UE
+ChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
+eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAz
+MTkxODMzMzNaFw0yMTAzMTcxODMzMzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRp
+cyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQD
+EyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Ypli4kVEAkOPcahdxYTMuk
+J0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2DrOpm2RgbaIr1VxqYuvXtdj182d6UajtL
+F8HVj71lODqV0D1VNk7feVcxKh7YWWVJWCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeL
+YzcS19Dsw3sgQUSj7cugF+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWen
+AScOospUxbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCCAk4w
+PQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVvdmFkaXNvZmZzaG9y
+ZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREwggENMIIBCQYJKwYBBAG+WAABMIH7
+MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNlIG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmlj
+YXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJs
+ZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh
+Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYIKwYBBQUHAgEW
+Fmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3TKbkGGew5Oanwl4Rqy+/fMIGu
+BgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rqy+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkw
+FwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0
+aG9yaXR5MS4wLAYDVQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6
+tlCLMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSkfnIYj9lo
+fFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf87C9TqnN7Az10buYWnuul
+LsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2x
+gI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi
+5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi
+5nrQNiOKSnQ2+Q==
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 2
+==================
+-----BEGIN CERTIFICATE-----
+MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT
+EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx
+ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM
+aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC
+DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6
+XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk
+lvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB
+lDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy
+lZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt
+66/3FsvbzSUr5R/7mp/iUcw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1Jdxn
+wQ5hYIizPtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og/zOh
+D7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UHoycR7hYQe7xFSkyy
+BNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuIyV77zGHcizN300QyNQliBJIWENie
+J0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1Ud
+DgQWBBQahGK8SEwzJQTU7tD2A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGU
+a6FJpEcwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT
+ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2fBluornFdLwUv
+Z+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzng/iN/Ae42l9NLmeyhP3ZRPx3
+UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2BlfF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodm
+VjB3pjd4M1IQWK4/YY7yarHvGH5KWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK
++JDSV6IZUaUtl0HaB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW
+IozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1
+WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X
+f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II
+4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8
+VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 3
+==================
+-----BEGIN CERTIFICATE-----
+MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT
+EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx
+OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM
+aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC
+DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg
+DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij
+KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K
+DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv
+BNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp
+p5ijJUMv7/FfJuGITfhebtfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8
+nT8KKdjcT5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDtWAEX
+MJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZc6tsgLjoC2SToJyM
+Gf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A4iLItLRkT9a6fUg+qGkM17uGcclz
+uD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYDVR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHT
+BgkrBgEEAb5YAAMwgcUwgZMGCCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmlj
+YXRlIGNvbnN0aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0
+aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVudC4wLQYIKwYB
+BQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2NwczALBgNVHQ8EBAMCAQYwHQYD
+VR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4GA1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4
+ywLQoUmkRzBFMQswCQYDVQQGEwJCTTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UE
+AxMSUXVvVmFkaXMgUm9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZV
+qyM07ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSemd1o417+s
+hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z
+POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2
+Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp
+8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC
+bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu
+g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p
+vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr
+qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto=
+-----END CERTIFICATE-----
+
+Security Communication Root CA
+==============================
+-----BEGIN CERTIFICATE-----
+MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
+U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
+HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
+U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw
+8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM
+DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX
+5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd
+DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2
+JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw
+DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g
+0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a
+mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ
+s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ
+6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi
+FL39vmwLAw==
+-----END CERTIFICATE-----
+
+Sonera Class 2 Root CA
+======================
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG
+U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw
+NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh
+IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3
+/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT
+dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG
+f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P
+tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH
+nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT
+XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt
+0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI
+cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph
+Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx
+EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH
+llpwrN9M
+-----END CERTIFICATE-----
+
+Staat der Nederlanden Root CA
+=============================
+-----BEGIN CERTIFICATE-----
+MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJOTDEeMBwGA1UE
+ChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFhdCBkZXIgTmVkZXJsYW5kZW4g
+Um9vdCBDQTAeFw0wMjEyMTcwOTIzNDlaFw0xNTEyMTYwOTE1MzhaMFUxCzAJBgNVBAYTAk5MMR4w
+HAYDVQQKExVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xJjAkBgNVBAMTHVN0YWF0IGRlciBOZWRlcmxh
+bmRlbiBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmNK1URF6gaYUmHFt
+vsznExvWJw56s2oYHLZhWtVhCb/ekBPHZ+7d89rFDBKeNVU+LCeIQGv33N0iYfXCxw719tV2U02P
+jLwYdjeFnejKScfST5gTCaI+Ioicf9byEGW07l8Y1Rfj+MX94p2i71MOhXeiD+EwR+4A5zN9RGca
+C1Hoi6CeUJhoNFIfLm0B8mBF8jHrqTFoKbt6QZ7GGX+UtFE5A3+y3qcym7RHjm+0Sq7lr7HcsBth
+vJly3uSJt3omXdozSVtSnA71iq3DuD3oBmrC1SoLbHuEvVYFy4ZlkuxEK7COudxwC0barbxjiDn6
+22r+I/q85Ej0ZytqERAhSQIDAQABo4GRMIGOMAwGA1UdEwQFMAMBAf8wTwYDVR0gBEgwRjBEBgRV
+HSAAMDwwOgYIKwYBBQUHAgEWLmh0dHA6Ly93d3cucGtpb3ZlcmhlaWQubmwvcG9saWNpZXMvcm9v
+dC1wb2xpY3kwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSofeu8Y6R0E3QA7Jbg0zTBLL9s+DAN
+BgkqhkiG9w0BAQUFAAOCAQEABYSHVXQ2YcG70dTGFagTtJ+k/rvuFbQvBgwp8qiSpGEN/KtcCFtR
+EytNwiphyPgJWPwtArI5fZlmgb9uXJVFIGzmeafR2Bwp/MIgJ1HI8XxdNGdphREwxgDS1/PTfLbw
+MVcoEoJz6TMvplW0C5GUR5z6u3pCMuiufi3IvKwUv9kP2Vv8wfl6leF9fpb8cbDCTMjfRTTJzg3y
+nGQI0DvDKcWy7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR
+iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw==
+-----END CERTIFICATE-----
+
+UTN USERFirst Hardware Root CA
+==============================
+-----BEGIN CERTIFICATE-----
+MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UE
+BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl
+IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAd
+BgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgx
+OTIyWjCBlzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0
+eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVz
+ZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwggEiMA0GCSqGSIb3
+DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlI
+wrthdBKWHTxqctU8EGc6Oe0rE81m65UJM6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFd
+tqdt++BxF2uiiPsA3/4aMXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8
+i4fDidNdoI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqIDsjf
+Pe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9KsyoUhbAgMBAAGjgbkw
+gbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFKFyXyYbKJhDlV0HN9WF
+lp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNF
+UkZpcnN0LUhhcmR3YXJlLmNybDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUF
+BwMGBggrBgEFBQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM
+//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28GpgoiskliCE7/yMgUsogW
+XecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gECJChicsZUN/KHAG8HQQZexB2
+lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kn
+iCrVWFCVH/A7HFe7fRQ5YiuayZSSKqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67
+nfhmqA==
+-----END CERTIFICATE-----
+
+Camerfirma Chambers of Commerce Root
+====================================
+-----BEGIN CERTIFICATE-----
+MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe
+QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i
+ZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAx
+NjEzNDNaFw0zNzA5MzAxNjEzNDRaMH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZp
+cm1hIFNBIENJRiBBODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3Jn
+MSIwIAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0BAQEFAAOC
+AQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtbunXF/KGIJPov7coISjlU
+xFF6tdpg6jg8gbLL8bvZkSM/SAFwdakFKq0fcfPJVD0dBmpAPrMMhe5cG3nCYsS4No41XQEMIwRH
+NaqbYE6gZj3LJgqcQKH0XZi/caulAGgq7YN6D6IUtdQis4CwPAxaUWktWBiP7Zme8a7ileb2R6jW
+DA+wWFjbw2Y3npuRVDM30pQcakjJyfKl2qUMI/cjDpwyVV5xnIQFUZot/eZOKjRa3spAN2cMVCFV
+d9oKDMyXroDclDZK9D7ONhMeU+SsTjoF7Nuucpw4i9A5O4kKPnf+dQIBA6OCAUQwggFAMBIGA1Ud
+EwEB/wQIMAYBAf8CAQwwPAYDVR0fBDUwMzAxoC+gLYYraHR0cDovL2NybC5jaGFtYmVyc2lnbi5v
+cmcvY2hhbWJlcnNyb290LmNybDAdBgNVHQ4EFgQU45T1sU3p26EpW1eLTXYGduHRooowDgYDVR0P
+AQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzAnBgNVHREEIDAegRxjaGFtYmVyc3Jvb3RAY2hh
+bWJlcnNpZ24ub3JnMCcGA1UdEgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYD
+VR0gBFEwTzBNBgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz
+aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEBAAxBl8IahsAi
+fJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZdp0AJPaxJRUXcLo0waLIJuvvD
+L8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wN
+UPf6s+xCX6ndbcj0dc97wXImsQEcXCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/n
+ADydb47kMgkdTXg0eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1
+erfutGWaIZDgqtCYvDi1czyL+Nw=
+-----END CERTIFICATE-----
+
+Camerfirma Global Chambersign Root
+==================================
+-----BEGIN CERTIFICATE-----
+MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe
+QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i
+ZXJzaWduLm9yZzEgMB4GA1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwHhcNMDMwOTMwMTYx
+NDE4WhcNMzcwOTMwMTYxNDE4WjB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMeQUMgQ2FtZXJmaXJt
+YSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEg
+MB4GA1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwggEgMA0GCSqGSIb3DQEBAQUAA4IBDQAw
+ggEIAoIBAQCicKLQn0KuWxfH2H3PFIP8T8mhtxOviteePgQKkotgVvq0Mi+ITaFgCPS3CU6gSS9J
+1tPfnZdan5QEcOw/Wdm3zGaLmFIoCQLfxS+EjXqXd7/sQJ0lcqu1PzKY+7e3/HKE5TWH+VX6ox8O
+by4o3Wmg2UIQxvi1RMLQQ3/bvOSiPGpVeAp3qdjqGTK3L/5cPxvusZjsyq16aUXjlg9V9ubtdepl
+6DJWk0aJqCWKZQbua795B9Dxt6/tLE2Su8CoX6dnfQTyFQhwrJLWfQTSM/tMtgsL+xrJxI0DqX5c
+8lCrEqWhz0hQpe/SyBoT+rB/sYIcd2oPX9wLlY/vQ37mRQklAgEDo4IBUDCCAUwwEgYDVR0TAQH/
+BAgwBgEB/wIBDDA/BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vY3JsLmNoYW1iZXJzaWduLm9yZy9j
+aGFtYmVyc2lnbnJvb3QuY3JsMB0GA1UdDgQWBBRDnDafsJ4wTcbOX60Qq+UDpfqpFDAOBgNVHQ8B
+Af8EBAMCAQYwEQYJYIZIAYb4QgEBBAQDAgAHMCoGA1UdEQQjMCGBH2NoYW1iZXJzaWducm9vdEBj
+aGFtYmVyc2lnbi5vcmcwKgYDVR0SBCMwIYEfY2hhbWJlcnNpZ25yb290QGNoYW1iZXJzaWduLm9y
+ZzBbBgNVHSAEVDBSMFAGCysGAQQBgYcuCgEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly9jcHMuY2hh
+bWJlcnNpZ24ub3JnL2Nwcy9jaGFtYmVyc2lnbnJvb3QuaHRtbDANBgkqhkiG9w0BAQUFAAOCAQEA
+PDtwkfkEVCeR4e3t/mh/YV3lQWVPMvEYBZRqHN4fcNs+ezICNLUMbKGKfKX0j//U2K0X1S0E0T9Y
+gOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXiryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJ
+PJ7oKXqJ1/6v/2j1pReQvayZzKWGVwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4
+IBHNfTIzSJRUTN3cecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREes
+t2d/AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A==
+-----END CERTIFICATE-----
+
+NetLock Notary (Class A) Root
+=============================
+-----BEGIN CERTIFICATE-----
+MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQI
+EwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6
+dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9j
+ayBLb3pqZWd5em9pIChDbGFzcyBBKSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oX
+DTE5MDIxOTIzMTQ0N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQH
+EwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYD
+VQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFz
+cyBBKSBUYW51c2l0dmFueWtpYWRvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvHSM
+D7tM9DceqQWC2ObhbHDqeLVu0ThEDaiDzl3S1tWBxdRL51uUcCbbO51qTGL3cfNk1mE7PetzozfZ
+z+qMkjvN9wfcZnSX9EUi3fRc4L9t875lM+QVOr/bmJBVOMTtplVjC7B4BPTjbsE/jvxReB+SnoPC
+/tmwqcm8WgD/qaiYdPv2LD4VOQ22BFWoDpggQrOxJa1+mm9dU7GrDPzr4PN6s6iz/0b2Y6LYOph7
+tqyF/7AlT3Rj5xMHpQqPBffAZG9+pyeAlt7ULoZgx2srXnN7F+eRP2QM2EsiNCubMvJIH5+hCoR6
+4sKtlz2O1cH5VqNQ6ca0+pii7pXmKgOM3wIDAQABo4ICnzCCApswDgYDVR0PAQH/BAQDAgAGMBIG
+A1UdEwEB/wQIMAYBAf8CAQQwEQYJYIZIAYb4QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaC
+Ak1GSUdZRUxFTSEgRXplbiB0YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFub3MgU3pv
+bGdhbHRhdGFzaSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBhbGFwamFuIGtlc3p1bHQu
+IEEgaGl0ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExvY2sgS2Z0LiB0ZXJtZWtmZWxlbG9zc2Vn
+LWJpenRvc2l0YXNhIHZlZGkuIEEgZGlnaXRhbGlzIGFsYWlyYXMgZWxmb2dhZGFzYW5hayBmZWx0
+ZXRlbGUgYXogZWxvaXJ0IGVsbGVub3J6ZXNpIGVsamFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFz
+IGxlaXJhc2EgbWVndGFsYWxoYXRvIGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGphbiBh
+IGh0dHBzOi8vd3d3Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVu
+b3J6ZXNAbmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1YW5jZSBh
+bmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sg
+Q1BTIGF2YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFp
+bCBhdCBjcHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4IBAQBIJEb3ulZv+sgoA0BO5TE5
+ayZrU3/b39/zcT0mwBQOxmd7I6gMc90Bu8bKbjc5VdXHjFYgDigKDtIqpLBJUsY4B/6+CgmM0ZjP
+ytoUMaFP0jn8DxEsQ8Pdq5PHVT5HfBgaANzze9jyf1JsIPQLX2lS9O74silg6+NJMSEN1rUQQeJB
+CWziGppWS3cC9qCbmieH6FUpccKQn0V4GuEVZD3QDtigdp+uxdAu6tYPVuxkf1qbFFgBJ34TUMdr
+KuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK8CtmdWOMovsEPoMOmzbwGOQmIMOM
+8CgHrTwXZoi1/baI
+-----END CERTIFICATE-----
+
+XRamp Global CA Root
+====================
+-----BEGIN CERTIFICATE-----
+MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE
+BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj
+dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB
+dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx
+HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg
+U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu
+IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx
+foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE
+zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs
+AxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvry
+xS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
+EwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6Ap
+oCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMC
+AQEwDQYJKoZIhvcNAQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc
+/Kh4ZzXxHfARvbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt
+qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8n
+nxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz
+8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw=
+-----END CERTIFICATE-----
+
+Go Daddy Class 2 CA
+===================
+-----BEGIN CERTIFICATE-----
+MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMY
+VGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkG
+A1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g
+RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQAD
+ggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCAPVYYYwhv
+2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6wwdhFJ2+qN1j3hybX2C32
+qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXiEqITLdiOr18SPaAIBQi2XKVlOARFmR6j
+YGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmY
+vLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O
+BBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o
+atTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu
+MTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG
+A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim
+PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt
+I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
+HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI
+Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b
+vZ8=
+-----END CERTIFICATE-----
+
+Starfield Class 2 CA
+====================
+-----BEGIN CERTIFICATE-----
+MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc
+U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo
+MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG
+A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG
+SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY
+bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ
+JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm
+epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN
+F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF
+MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f
+hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo
+bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g
+QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs
+afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM
+PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
+xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD
+KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3
+QBFGmh95DmK/D5fs4C8fF5Q=
+-----END CERTIFICATE-----
+
+StartCom Certification Authority
+================================
+-----BEGIN CERTIFICATE-----
+MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN
+U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu
+ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0
+NjM2WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk
+LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMg
+U3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw
+ggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZkpMyONvg45iPwbm2xPN1y
+o4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rfOQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/
+Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/CJi/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/d
+eMotHweXMAEtcnn6RtYTKqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt
+2PZE4XNiHzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMMAv+Z
+6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w+2OqqGwaVLRcJXrJ
+osmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/
+untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVc
+UjyJthkqcwEKDwOzEmDyei+B26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT
+37uMdBNSSwIDAQABo4ICUjCCAk4wDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAa4wHQYDVR0OBBYE
+FE4L7xqkQFulF2mHMMo0aEPQQa7yMGQGA1UdHwRdMFswLKAqoCiGJmh0dHA6Ly9jZXJ0LnN0YXJ0
+Y29tLm9yZy9zZnNjYS1jcmwuY3JsMCugKaAnhiVodHRwOi8vY3JsLnN0YXJ0Y29tLm9yZy9zZnNj
+YS1jcmwuY3JsMIIBXQYDVR0gBIIBVDCCAVAwggFMBgsrBgEEAYG1NwEBATCCATswLwYIKwYBBQUH
+AgEWI2h0dHA6Ly9jZXJ0LnN0YXJ0Y29tLm9yZy9wb2xpY3kucGRmMDUGCCsGAQUFBwIBFilodHRw
+Oi8vY2VydC5zdGFydGNvbS5vcmcvaW50ZXJtZWRpYXRlLnBkZjCB0AYIKwYBBQUHAgIwgcMwJxYg
+U3RhcnQgQ29tbWVyY2lhbCAoU3RhcnRDb20pIEx0ZC4wAwIBARqBl0xpbWl0ZWQgTGlhYmlsaXR5
+LCByZWFkIHRoZSBzZWN0aW9uICpMZWdhbCBMaW1pdGF0aW9ucyogb2YgdGhlIFN0YXJ0Q29tIENl
+cnRpZmljYXRpb24gQXV0aG9yaXR5IFBvbGljeSBhdmFpbGFibGUgYXQgaHR0cDovL2NlcnQuc3Rh
+cnRjb20ub3JnL3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilT
+dGFydENvbSBGcmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOC
+AgEAFmyZ9GYMNPXQhV59CuzaEE44HF7fpiUFS5Eyweg78T3dRAlbB0mKKctmArexmvclmAk8jhvh
+3TaHK0u7aNM5Zj2gJsfyOZEdUauCe37Vzlrk4gNXcGmXCPleWKYK34wGmkUWFjgKXlf2Ysd6AgXm
+vB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJzewT4F+irsfMuXGRuczE6Eri8sxHk
+fY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3
+fsNrarnDy0RLrHiQi+fHLB5LEUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZ
+EoalHmdkrQYuL6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq
+yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuCO3NJo2pXh5Tl
+1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6Vum0ABj6y6koQOdjQK/W/7HW/
+lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkyShNOsF/5oirpt9P/FlUQqmMGqz9IgcgA38coro
+g14=
+-----END CERTIFICATE-----
+
+Taiwan GRCA
+===========
+-----BEGIN CERTIFICATE-----
+MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG
+EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X
+DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv
+dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD
+ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN
+w8XRIePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1qgQdW8or5
+BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKyyhwOeYHWtXBiCAEuTk8O
+1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAtsF/tnyMKtsc2AtJfcdgEWFelq16TheEfO
+htX7MfP6Mb40qij7cEwdScevLJ1tZqa2jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wov
+J5pGfaENda1UhhXcSTvxls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7
+Q3hub/FCVGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHKYS1t
+B6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoHEgKXTiCQ8P8NHuJB
+O9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThNXo+EHWbNxWCWtFJaBYmOlXqYwZE8
+lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1UdDgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNV
+HRMEBTADAQH/MDkGBGcqBwAEMTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg2
+09yewDL7MTqKUWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ
+TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyfqzvS/3WXy6Tj
+Zwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaKZEk9GhiHkASfQlK3T8v+R0F2
+Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFEJPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlU
+D7gsL0u8qV1bYH+Mh6XgUmMqvtg7hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6Qz
+DxARvBMB1uUO07+1EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+Hbk
+Z6MmnD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WXudpVBrkk
+7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44VbnzssQwmSNOXfJIoRIM3BKQ
+CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy
++fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS
+-----END CERTIFICATE-----
+
+Swisscom Root CA 1
+==================
+-----BEGIN CERTIFICATE-----
+MIIF2TCCA8GgAwIBAgIQXAuFXAvnWUHfV8w/f52oNjANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQG
+EwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0YWwgQ2VydGlmaWNhdGUgU2Vy
+dmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3QgQ0EgMTAeFw0wNTA4MTgxMjA2MjBaFw0yNTA4
+MTgyMjA2MjBaMGQxCzAJBgNVBAYTAmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGln
+aXRhbCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAxMIIC
+IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0LmwqAzZuz8h+BvVM5OAFmUgdbI9m2BtRsiM
+MW8Xw/qabFbtPMWRV8PNq5ZJkCoZSx6jbVfd8StiKHVFXqrWW/oLJdihFvkcxC7mlSpnzNApbjyF
+NDhhSbEAn9Y6cV9Nbc5fuankiX9qUvrKm/LcqfmdmUc/TilftKaNXXsLmREDA/7n29uj/x2lzZAe
+AR81sH8A25Bvxn570e56eqeqDFdvpG3FEzuwpdntMhy0XmeLVNxzh+XTF3xmUHJd1BpYwdnP2IkC
+b6dJtDZd0KTeByy2dbcokdaXvij1mB7qWybJvbCXc9qukSbraMH5ORXWZ0sKbU/Lz7DkQnGMU3nn
+7uHbHaBuHYwadzVcFh4rUx80i9Fs/PJnB3r1re3WmquhsUvhzDdf/X/NTa64H5xD+SpYVUNFvJbN
+cA78yeNmuk6NO4HLFWR7uZToXTNShXEuT46iBhFRyePLoW4xCGQMwtI89Tbo19AOeCMgkckkKmUp
+WyL3Ic6DXqTz3kvTaI9GdVyDCW4pa8RwjPWd1yAv/0bSKzjCL3UcPX7ape8eYIVpQtPM+GP+HkM5
+haa2Y0EQs3MevNP6yn0WR+Kn1dCjigoIlmJWbjTb2QK5MHXjBNLnj8KwEUAKrNVxAmKLMb7dxiNY
+MUJDLXT5xp6mig/p/r+D5kNXJLrvRjSq1xIBOO0CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYw
+HQYDVR0hBBYwFDASBgdghXQBUwABBgdghXQBUwABMBIGA1UdEwEB/wQIMAYBAf8CAQcwHwYDVR0j
+BBgwFoAUAyUv3m+CATpcLNwroWm1Z9SM0/0wHQYDVR0OBBYEFAMlL95vggE6XCzcK6FptWfUjNP9
+MA0GCSqGSIb3DQEBBQUAA4ICAQA1EMvspgQNDQ/NwNurqPKIlwzfky9NfEBWMXrrpA9gzXrzvsMn
+jgM+pN0S734edAY8PzHyHHuRMSG08NBsl9Tpl7IkVh5WwzW9iAUPWxAaZOHHgjD5Mq2eUCzneAXQ
+MbFamIp1TpBcahQq4FJHgmDmHtqBsfsUC1rxn9KVuj7QG9YVHaO+htXbD8BJZLsuUBlL0iT43R4H
+VtA4oJVwIHaM190e3p9xxCPvgxNcoyQVTSlAPGrEqdi3pkSlDfTgnXceQHAm/NrZNuR55LU/vJtl
+vrsRls/bxig5OgjOR1tTWsWZ/l2p3e9M1MalrQLmjAcSHm8D0W+go/MpvRLHUKKwf4ipmXeascCl
+OS5cfGniLLDqN2qk4Vrh9VDlg++luyqI54zb/W1elxmofmZ1a3Hqv7HHb6D0jqTsNFFbjCYDcKF3
+1QESVwA12yPeDooomf2xEG9L/zgtYE4snOtnta1J7ksfrK/7DZBaZmBwXarNeNQk7shBoJMBkpxq
+nvy5JMWzFYJ+vq6VK+uxwNrjAWALXmmshFZhvnEX/h0TD/7Gh0Xp/jKgGg0TpJRVcaUWi7rKibCy
+x/yP2FS1k2Kdzs9Z+z0YzirLNRWCXf9UIltxUvu3yf5gmwBBZPCqKuy2QkPOiWaByIufOVQDJdMW
+NY6E0F/6MBr1mmz0DlP5OlvRHA==
+-----END CERTIFICATE-----
+
+DigiCert Assured ID Root CA
+===========================
+-----BEGIN CERTIFICATE-----
+MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw
+IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx
+MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL
+ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO
+9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy
+UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW
+/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy
+oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf
+GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF
+66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq
+hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc
+EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn
+SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i
+8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe
++o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
+-----END CERTIFICATE-----
+
+DigiCert Global Root CA
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw
+HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw
+MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3
+dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn
+TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5
+BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H
+4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y
+7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB
+o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm
+8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF
+BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr
+EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt
+tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886
+UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
+CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
+-----END CERTIFICATE-----
+
+DigiCert High Assurance EV Root CA
+==================================
+-----BEGIN CERTIFICATE-----
+MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw
+KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw
+MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ
+MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu
+Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t
+Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS
+OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3
+MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ
+NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe
+h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB
+Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY
+JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ
+V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp
+myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK
+mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
+vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K
+-----END CERTIFICATE-----
+
+Certplus Class 2 Primary CA
+===========================
+-----BEGIN CERTIFICATE-----
+MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAwPTELMAkGA1UE
+BhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFzcyAyIFByaW1hcnkgQ0EwHhcN
+OTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2Vy
+dHBsdXMxGzAZBgNVBAMTEkNsYXNzIDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBANxQltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR
+5aiRVhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyLkcAbmXuZ
+Vg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCdEgETjdyAYveVqUSISnFO
+YFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yasH7WLO7dDWWuwJKZtkIvEcupdM5i3y95e
+e++U8Rs+yskhwcWYAqqi9lt3m/V+llU0HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRME
+CDAGAQH/AgEKMAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJ
+YIZIAYb4QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMuY29t
+L0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/AN9WM2K191EBkOvD
+P9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8yfFC82x/xXp8HVGIutIKPidd3i1R
+TtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMRFcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+
+7UCmnYR0ObncHoUW2ikbhiMAybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW
+//1IMwrh3KWBkJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7
+l7+ijrRU
+-----END CERTIFICATE-----
+
+DST Root CA X3
+==============
+-----BEGIN CERTIFICATE-----
+MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/MSQwIgYDVQQK
+ExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMTDkRTVCBSb290IENBIFgzMB4X
+DTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVowPzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1
+cmUgVHJ1c3QgQ28uMRcwFQYDVQQDEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmT
+rE4Orz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEqOLl5CjH9
+UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9bxiqKqy69cK3FCxolkHRy
+xXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40d
+utolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0T
+AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQ
+MA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikug
+dB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjE
+GB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bw
+RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS
+fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
+-----END CERTIFICATE-----
+
+DST ACES CA X6
+==============
+-----BEGIN CERTIFICATE-----
+MIIECTCCAvGgAwIBAgIQDV6ZCtadt3js2AdWO4YV2TANBgkqhkiG9w0BAQUFADBbMQswCQYDVQQG
+EwJVUzEgMB4GA1UEChMXRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QxETAPBgNVBAsTCERTVCBBQ0VT
+MRcwFQYDVQQDEw5EU1QgQUNFUyBDQSBYNjAeFw0wMzExMjAyMTE5NThaFw0xNzExMjAyMTE5NTha
+MFsxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdDERMA8GA1UE
+CxMIRFNUIEFDRVMxFzAVBgNVBAMTDkRTVCBBQ0VTIENBIFg2MIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEAuT31LMmU3HWKlV1j6IR3dma5WZFcRt2SPp/5DgO0PWGSvSMmtWPuktKe1jzI
+DZBfZIGxqAgNTNj50wUoUrQBJcWVHAx+PhCEdc/BGZFjz+iokYi5Q1K7gLFViYsx+tC3dr5BPTCa
+pCIlF3PoHuLTrCq9Wzgh1SpL11V94zpVvddtawJXa+ZHfAjIgrrep4c9oW24MFbCswKBXy314pow
+GCi4ZtPLAZZv6opFVdbgnf9nKxcCpk4aahELfrd755jWjHZvwTvbUJN+5dCOHze4vbrGn2zpfDPy
+MjwmR/onJALJfh1biEITajV8fTXpLmaRcpPVMibEdPVTo7NdmvYJywIDAQABo4HIMIHFMA8GA1Ud
+EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgHGMB8GA1UdEQQYMBaBFHBraS1vcHNAdHJ1c3Rkc3Qu
+Y29tMGIGA1UdIARbMFkwVwYKYIZIAWUDAgEBATBJMEcGCCsGAQUFBwIBFjtodHRwOi8vd3d3LnRy
+dXN0ZHN0LmNvbS9jZXJ0aWZpY2F0ZXMvcG9saWN5L0FDRVMtaW5kZXguaHRtbDAdBgNVHQ4EFgQU
+CXIGThhDD+XWzMNqizF7eI+og7gwDQYJKoZIhvcNAQEFBQADggEBAKPYjtay284F5zLNAdMEA+V2
+5FYrnJmQ6AgwbN99Pe7lv7UkQIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6t
+Fr8hlxCBPeP/h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq
+nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpRrscL9yuwNwXs
+vFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf29w4LTJxoeHtxMcfrHuBnQfO3
+oKfN5XozNmr6mis=
+-----END CERTIFICATE-----
+
+SwissSign Gold CA - G2
+======================
+-----BEGIN CERTIFICATE-----
+MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw
+EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN
+MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp
+c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq
+t2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C
+jCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQpg
+vd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqEemA8atufK+ze3gE/bk3lUIbLtK/tREDF
+ylqM2tIrfKjuvqblCqoOpd8FUrdVxyJdMmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvR
+AiTysybUa9oEVeXBCsdtMDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuend
+jIj3o02yMszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69yFGkO
+peUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPiaG59je883WX0XaxR
+7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxMgI93e2CaHt+28kgeDrpOVG2Y4OGi
+GqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw
+AwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64
+OfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov
+L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm
+5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr
+44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf
+Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m
+Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp
+mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk
+vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf
+KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br
+NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj
+viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
+-----END CERTIFICATE-----
+
+SwissSign Silver CA - G2
+========================
+-----BEGIN CERTIFICATE-----
+MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT
+BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X
+DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3
+aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG
+9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644
+N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm
++/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH
+6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu
+MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h
+qAaEuSh6XzjZG6k4sIN/c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5
+FZGkECwJMoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRHHTBs
+ROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTfjNFusB3hB48IHpmc
+celM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb65i/4z3GcRm25xBWNOHkDRUjvxF3X
+CO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/
+BAUwAwEB/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB
+tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0
+cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P
+4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F
+kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L
+3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx
+/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa
+DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP
+e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu
+WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ
+DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub
+DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
+-----END CERTIFICATE-----
+
+GeoTrust Primary Certification Authority
+========================================
+-----BEGIN CERTIFICATE-----
+MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG
+EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMoR2VvVHJ1c3QgUHJpbWFyeSBD
+ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgx
+CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQ
+cmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9AWbK7hWN
+b6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjAZIVcFU2Ix7e64HXprQU9
+nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE07e9GceBrAqg1cmuXm2bgyxx5X9gaBGge
+RwLmnWDiNpcB3841kt++Z8dtd1k7j53WkBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGt
+tm/81w7a4DSwDRp35+MImO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJKoZI
+hvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ16CePbJC/kRYkRj5K
+Ts4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl4b7UVXGYNTq+k+qurUKykG/g/CFN
+NWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6KoKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHa
+Floxt/m0cYASSJlyc1pZU8FjUjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG
+1riR/aYNKxoUAT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk=
+-----END CERTIFICATE-----
+
+thawte Primary Root CA
+======================
+-----BEGIN CERTIFICATE-----
+MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCBqTELMAkGA1UE
+BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2
+aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3
+MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwg
+SW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMv
+KGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMT
+FnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCs
+oPD7gFnUnMekz52hWXMJEEUMDSxuaPFsW0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ
+1CRfBsDMRJSUjQJib+ta3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGc
+q/gcfomk6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6Sk/K
+aAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94JNqR32HuHUETVPm4p
+afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD
+VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF
+AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE
+uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
+xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89
+jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH
+z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA==
+-----END CERTIFICATE-----
+
+VeriSign Class 3 Public Primary Certification Authority - G5
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE
+BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
+ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
+IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB
+yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln
+biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh
+dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz
+j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD
+Y2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/
+Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNHiDxpg8v+R70r
+fk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/
+BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2Uv
+Z2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
+aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG
+SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+
+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE
+KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC
+Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE
+ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
+-----END CERTIFICATE-----
+
+SecureTrust CA
+==============
+-----BEGIN CERTIFICATE-----
+MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG
+EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy
+dXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe
+BgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC
+ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX
+OZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t
+DWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH
+GFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b
+01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH
+ursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/
+BAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj
+aHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ
+KoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu
+SceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf
+mbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ
+nMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR
+3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE=
+-----END CERTIFICATE-----
+
+Secure Global CA
+================
+-----BEGIN CERTIFICATE-----
+MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG
+EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBH
+bG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkxMjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEg
+MB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwg
+Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jx
+YDiJiQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa/FHtaMbQ
+bqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJjnIFHovdRIWCQtBJwB1g
+8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV
+HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi
+0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
+EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn
+oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA
+MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+
+OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn
+CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5
+3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc
+f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW
+-----END CERTIFICATE-----
+
+COMODO Certification Authority
+==============================
+-----BEGIN CERTIFICATE-----
+MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE
+BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
+A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1
+dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb
+MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD
+T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH
++7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww
+xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV
+4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA
+1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI
+rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E
+BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k
+b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC
+AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP
+OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
+RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc
+IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN
++8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
+-----END CERTIFICATE-----
+
+Network Solutions Certificate Authority
+=======================================
+-----BEGIN CERTIFICATE-----
+MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG
+EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr
+IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx
+MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
+MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G
+CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx
+jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT
+aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT
+crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc
+/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB
+AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP
+BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv
+bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA
+A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q
+4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/
+GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
+wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD
+ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
+-----END CERTIFICATE-----
+
+WellsSecure Public Root Certificate Authority
+=============================================
+-----BEGIN CERTIFICATE-----
+MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoM
+F1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYw
+NAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN
+MDcxMjEzMTcwNzU0WhcNMjIxMjE0MDAwNzU0WjCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dl
+bGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYD
+VQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G
+CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDub7S9eeKPCCGeOARBJe+rWxxTkqxtnt3CxC5FlAM1
+iGd0V+PfjLindo8796jE2yljDpFoNoqXjopxaAkH5OjUDk/41itMpBb570OYj7OeUt9tkTmPOL13
+i0Nj67eT/DBMHAGTthP796EfvyXhdDcsHqRePGj4S78NuR4uNuip5Kf4D8uCdXw1LSLWwr8L87T8
+bJVhHlfXBIEyg1J55oNjz7fLY4sR4r1e6/aN7ZVyKLSsEmLpSjPmgzKuBXWVvYSV2ypcm44uDLiB
+K0HmOFafSZtsdvqKXfcBeYF8wYNABf5x/Qw/zE5gCQ5lRxAvAcAFP4/4s0HvWkJ+We/SlwxlAgMB
+AAGjggE0MIIBMDAPBgNVHRMBAf8EBTADAQH/MDkGA1UdHwQyMDAwLqAsoCqGKGh0dHA6Ly9jcmwu
+cGtpLndlbGxzZmFyZ28uY29tL3dzcHJjYS5jcmwwDgYDVR0PAQH/BAQDAgHGMB0GA1UdDgQWBBQm
+lRkQ2eihl5H/3BnZtQQ+0nMKajCBsgYDVR0jBIGqMIGngBQmlRkQ2eihl5H/3BnZtQQ+0nMKaqGB
+i6SBiDCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRww
+GgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMg
+Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHmCAQEwDQYJKoZIhvcNAQEFBQADggEBALkVsUSRzCPI
+K0134/iaeycNzXK7mQDKfGYZUMbVmO2rvwNa5U3lHshPcZeG1eMd/ZDJPHV3V3p9+N701NX3leZ0
+bh08rnyd2wIDBSxxSyU+B+NemvVmFymIGjifz6pBA4SXa5M4esowRBskRDPQ5NHcKDj0E0M1NSlj
+qHyita04pO2t/caaH/+Xc/77szWnk4bGdpEA5qxRFsQnMlzbc9qlk1eOPm01JghZ1edE13YgY+es
+E2fDbbFwRnzVlhE9iW9dqKHrjQrawx0zbKPqZxmamX9LPYNRKh3KL4YMon4QLSvUFpULB6ouFJJJ
+tylv2G0xffX8oRAHh84vWdw+WNs=
+-----END CERTIFICATE-----
+
+COMODO ECC Certification Authority
+==================================
+-----BEGIN CERTIFICATE-----
+MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC
+R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE
+ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB
+dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix
+GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
+Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo
+b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X
+4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni
+wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E
+BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG
+FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA
+U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
+-----END CERTIFICATE-----
+
+IGC/A
+=====
+-----BEGIN CERTIFICATE-----
+MIIEAjCCAuqgAwIBAgIFORFFEJQwDQYJKoZIhvcNAQEFBQAwgYUxCzAJBgNVBAYTAkZSMQ8wDQYD
+VQQIEwZGcmFuY2UxDjAMBgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQTS9TR0ROMQ4wDAYDVQQLEwVE
+Q1NTSTEOMAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2LmZy
+MB4XDTAyMTIxMzE0MjkyM1oXDTIwMTAxNzE0MjkyMlowgYUxCzAJBgNVBAYTAkZSMQ8wDQYDVQQI
+EwZGcmFuY2UxDjAMBgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQTS9TR0ROMQ4wDAYDVQQLEwVEQ1NT
+STEOMAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2LmZyMIIB
+IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsh/R0GLFMzvABIaIs9z4iPf930Pfeo2aSVz2
+TqrMHLmh6yeJ8kbpO0px1R2OLc/mratjUMdUC24SyZA2xtgv2pGqaMVy/hcKshd+ebUyiHDKcMCW
+So7kVc0dJ5S/znIq7Fz5cyD+vfcuiWe4u0dzEvfRNWk68gq5rv9GQkaiv6GFGvm/5P9JhfejcIYy
+HF2fYPepraX/z9E0+X1bF8bc1g4oa8Ld8fUzaJ1O/Id8NhLWo4DoQw1VYZTqZDdH6nfK0LJYBcNd
+frGoRpAxVs5wKpayMLh35nnAvSk7/ZR3TL0gzUEl4C7HG7vupARB0l2tEmqKm0f7yd1GQOGdPDPQ
+tQIDAQABo3cwdTAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBRjAVBgNVHSAEDjAMMAoGCCqB
+egF5AQEBMB0GA1UdDgQWBBSjBS8YYFDCiQrdKyFP/45OqDAxNjAfBgNVHSMEGDAWgBSjBS8YYFDC
+iQrdKyFP/45OqDAxNjANBgkqhkiG9w0BAQUFAAOCAQEABdwm2Pp3FURo/C9mOnTgXeQp/wYHE4RK
+q89toB9RlPhJy3Q2FLwV3duJL92PoF189RLrn544pEfMs5bZvpwlqwN+Mw+VgQ39FuCIvjfwbF3Q
+MZsyK10XZZOYYLxuj7GoPB7ZHPOpJkL5ZB3C55L29B5aqhlSXa/oovdgoPaN8In1buAKBQGVyYsg
+Crpa/JosPL3Dt8ldeCUFP1YUmwza+zpI/pdpXsoQhvdOlgQITeywvl3cO45Pwf2aNjSaTFR+FwNI
+lQgRHAdvhQh+XU3Endv7rs6y0bO4g2wdsrN58dhwmX7wEwLOXt1R0982gaEbeC9xs/FZTEYYKKuF
+0mBWWg==
+-----END CERTIFICATE-----
+
+Security Communication EV RootCA1
+=================================
+-----BEGIN CERTIFICATE-----
+MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDElMCMGA1UEChMc
+U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEqMCgGA1UECxMhU2VjdXJpdHkgQ29tbXVuaWNh
+dGlvbiBFViBSb290Q0ExMB4XDTA3MDYwNjAyMTIzMloXDTM3MDYwNjAyMTIzMlowYDELMAkGA1UE
+BhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKjAoBgNVBAsTIVNl
+Y3VyaXR5IENvbW11bmljYXRpb24gRVYgUm9vdENBMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
+AQoCggEBALx/7FebJOD+nLpCeamIivqA4PUHKUPqjgo0No0c+qe1OXj/l3X3L+SqawSERMqm4miO
+/VVQYg+kcQ7OBzgtQoVQrTyWb4vVog7P3kmJPdZkLjjlHmy1V4qe70gOzXppFodEtZDkBp2uoQSX
+WHnvIEqCa4wiv+wfD+mEce3xDuS4GBPMVjZd0ZoeUWs5bmB2iDQL87PRsJ3KYeJkHcFGB7hj3R4z
+ZbOOCVVSPbW9/wfrrWFVGCypaZhKqkDFMxRldAD5kd6vA0jFQFTcD4SQaCDFkpbcLuUCRarAX1T4
+bepJz11sS6/vmsJWXMY1VkJqMF/Cq/biPT+zyRGPMUzXn0kCAwEAAaNCMEAwHQYDVR0OBBYEFDVK
+9U2vP9eCOKyrcWUXdYydVZPmMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqG
+SIb3DQEBBQUAA4IBAQCoh+ns+EBnXcPBZsdAS5f8hxOQWsTvoMpfi7ent/HWtWS3irO4G8za+6xm
+iEHO6Pzk2x6Ipu0nUBsCMCRGef4Eh3CXQHPRwMFXGZpppSeZq51ihPZRwSzJIxXYKLerJRO1RuGG
+Av8mjMSIkh1W/hln8lXkgKNrnKt34VFxDSDbEJrbvXZ5B3eZKK2aXtqxT0QsNY6llsf9g/BYxnnW
+mHyojf6GPgcWkuF75x3sM3Z+Qi5KhfmRiWiEA4Glm5q+4zfFVKtWOxgtQaQM+ELbmaDgcm+7XeEW
+T1MKZPlO9L9OVL14bIjqv5wTJMJwaaJ/D8g8rQjJsJhAoyrniIPtd490
+-----END CERTIFICATE-----
+
+OISTE WISeKey Global Root GA CA
+===============================
+-----BEGIN CERTIFICATE-----
+MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE
+BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG
+A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH
+bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD
+VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw
+IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5
+IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9
+Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg
+Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD
+d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ
+/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R
+LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw
+AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ
+KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm
+MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4
++vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa
+hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY
+okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0=
+-----END CERTIFICATE-----
+
+Microsec e-Szigno Root CA
+=========================
+-----BEGIN CERTIFICATE-----
+MIIHqDCCBpCgAwIBAgIRAMy4579OKRr9otxmpRwsDxEwDQYJKoZIhvcNAQEFBQAwcjELMAkGA1UE
+BhMCSFUxETAPBgNVBAcTCEJ1ZGFwZXN0MRYwFAYDVQQKEw1NaWNyb3NlYyBMdGQuMRQwEgYDVQQL
+EwtlLVN6aWdubyBDQTEiMCAGA1UEAxMZTWljcm9zZWMgZS1Temlnbm8gUm9vdCBDQTAeFw0wNTA0
+MDYxMjI4NDRaFw0xNzA0MDYxMjI4NDRaMHIxCzAJBgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVz
+dDEWMBQGA1UEChMNTWljcm9zZWMgTHRkLjEUMBIGA1UECxMLZS1Temlnbm8gQ0ExIjAgBgNVBAMT
+GU1pY3Jvc2VjIGUtU3ppZ25vIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
+AQDtyADVgXvNOABHzNuEwSFpLHSQDCHZU4ftPkNEU6+r+ICbPHiN1I2uuO/TEdyB5s87lozWbxXG
+d36hL+BfkrYn13aaHUM86tnsL+4582pnS4uCzyL4ZVX+LMsvfUh6PXX5qqAnu3jCBspRwn5mS6/N
+oqdNAoI/gqyFxuEPkEeZlApxcpMqyabAvjxWTHOSJ/FrtfX9/DAFYJLG65Z+AZHCabEeHXtTRbjc
+QR/Ji3HWVBTji1R4P770Yjtb9aPs1ZJ04nQw7wHb4dSrmZsqa/i9phyGI0Jf7Enemotb9HI6QMVJ
+PqW+jqpx62z69Rrkav17fVVA71hu5tnVvCSrwe+3AgMBAAGjggQ3MIIEMzBnBggrBgEFBQcBAQRb
+MFkwKAYIKwYBBQUHMAGGHGh0dHBzOi8vcmNhLmUtc3ppZ25vLmh1L29jc3AwLQYIKwYBBQUHMAKG
+IWh0dHA6Ly93d3cuZS1zemlnbm8uaHUvUm9vdENBLmNydDAPBgNVHRMBAf8EBTADAQH/MIIBcwYD
+VR0gBIIBajCCAWYwggFiBgwrBgEEAYGoGAIBAQEwggFQMCgGCCsGAQUFBwIBFhxodHRwOi8vd3d3
+LmUtc3ppZ25vLmh1L1NaU1ovMIIBIgYIKwYBBQUHAgIwggEUHoIBEABBACAAdABhAG4A+gBzAO0A
+dAB2AOEAbgB5ACAA6QByAHQAZQBsAG0AZQB6AOkAcwDpAGgAZQB6ACAA6QBzACAAZQBsAGYAbwBn
+AGEAZADhAHMA4QBoAG8AegAgAGEAIABTAHoAbwBsAGcA4QBsAHQAYQB0APMAIABTAHoAbwBsAGcA
+4QBsAHQAYQB0AOEAcwBpACAAUwB6AGEAYgDhAGwAeQB6AGEAdABhACAAcwB6AGUAcgBpAG4AdAAg
+AGsAZQBsAGwAIABlAGwAagDhAHIAbgBpADoAIABoAHQAdABwADoALwAvAHcAdwB3AC4AZQAtAHMA
+egBpAGcAbgBvAC4AaAB1AC8AUwBaAFMAWgAvMIHIBgNVHR8EgcAwgb0wgbqggbeggbSGIWh0dHA6
+Ly93d3cuZS1zemlnbm8uaHUvUm9vdENBLmNybIaBjmxkYXA6Ly9sZGFwLmUtc3ppZ25vLmh1L0NO
+PU1pY3Jvc2VjJTIwZS1Temlnbm8lMjBSb290JTIwQ0EsT1U9ZS1Temlnbm8lMjBDQSxPPU1pY3Jv
+c2VjJTIwTHRkLixMPUJ1ZGFwZXN0LEM9SFU/Y2VydGlmaWNhdGVSZXZvY2F0aW9uTGlzdDtiaW5h
+cnkwDgYDVR0PAQH/BAQDAgEGMIGWBgNVHREEgY4wgYuBEGluZm9AZS1zemlnbm8uaHWkdzB1MSMw
+IQYDVQQDDBpNaWNyb3NlYyBlLVN6aWduw7MgUm9vdCBDQTEWMBQGA1UECwwNZS1TemlnbsOzIEhT
+WjEWMBQGA1UEChMNTWljcm9zZWMgS2Z0LjERMA8GA1UEBxMIQnVkYXBlc3QxCzAJBgNVBAYTAkhV
+MIGsBgNVHSMEgaQwgaGAFMegSXUWYYTbMUuE0vE3QJDvTtz3oXakdDByMQswCQYDVQQGEwJIVTER
+MA8GA1UEBxMIQnVkYXBlc3QxFjAUBgNVBAoTDU1pY3Jvc2VjIEx0ZC4xFDASBgNVBAsTC2UtU3pp
+Z25vIENBMSIwIAYDVQQDExlNaWNyb3NlYyBlLVN6aWdubyBSb290IENBghEAzLjnv04pGv2i3Gal
+HCwPETAdBgNVHQ4EFgQUx6BJdRZhhNsxS4TS8TdAkO9O3PcwDQYJKoZIhvcNAQEFBQADggEBANMT
+nGZjWS7KXHAM/IO8VbH0jgdsZifOwTsgqRy7RlRw7lrMoHfqaEQn6/Ip3Xep1fvj1KcExJW4C+FE
+aGAHQzAxQmHl7tnlJNUb3+FKG6qfx1/4ehHqE5MAyopYse7tDk2016g2JnzgOsHVV4Lxdbb9iV/a
+86g4nzUGCM4ilb7N1fy+W955a9x6qWVmvrElWl/tftOsRm1M9DKHtCAE4Gx4sHfRhUZLphK3dehK
+yVZs15KrnfVJONJPU+NVkBHbmJbGSfI+9J8b4PeI3CVimUTYc78/MPMMNz7UwiiAc7EBt51alhQB
+S6kRnSlqLtBdgcDPsiBDxwPgN05dCtxZICU=
+-----END CERTIFICATE-----
+
+Certigna
+========
+-----BEGIN CERTIFICATE-----
+MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw
+EAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3
+MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI
+Q2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q
+XOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH
+GxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p
+ogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg
+DncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf
+Irjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ
+tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ
+BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J
+SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA
+hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+
+ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu
+PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY
+1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
+WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
+-----END CERTIFICATE-----
+
+Deutsche Telekom Root CA 2
+==========================
+-----BEGIN CERTIFICATE-----
+MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMT
+RGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEG
+A1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENBIDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5
+MjM1OTAwWjBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0G
+A1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBS
+b290IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEUha88EOQ5
+bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhCQN/Po7qCWWqSG6wcmtoI
+KyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1MjwrrFDa1sPeg5TKqAyZMg4ISFZbavva4VhY
+AUlfckE8FQYBjl2tqriTtM2e66foai1SNNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aK
+Se5TBY8ZTNXeWHmb0mocQqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTV
+jlsB9WoHtxa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAPBgNV
+HRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAlGRZrTlk5ynr
+E/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756AbrsptJh6sTtU6zkXR34ajgv8HzFZMQSy
+zhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpaIzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8
+rZ7/gFnkm0W09juwzTkZmDLl6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4G
+dyd1Lx+4ivn+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU
+Cm26OWMohpLzGITY+9HPBVZkVw==
+-----END CERTIFICATE-----
+
+Cybertrust Global Root
+======================
+-----BEGIN CERTIFICATE-----
+MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYGA1UEChMPQ3li
+ZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBSb290MB4XDTA2MTIxNTA4
+MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQD
+ExZDeWJlcnRydXN0IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
++Mi8vRRQZhP/8NN57CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW
+0ozSJ8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2yHLtgwEZL
+AfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iPt3sMpTjr3kfb1V05/Iin
+89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNzFtApD0mpSPCzqrdsxacwOUBdrsTiXSZT
+8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAYXSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAP
+BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2
+MDSgMqAwhi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3JsMB8G
+A1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUAA4IBAQBW7wojoFRO
+lZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi
+5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2
+hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T
+X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
+WL1WMRJOEcgh4LMRkWXbtKaIOM5V
+-----END CERTIFICATE-----
+
+ePKI Root Certification Authority
+=================================
+-----BEGIN CERTIFICATE-----
+MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG
+EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg
+Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx
+MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq
+MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs
+IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi
+lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv
+qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX
+12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O
+WQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uUWH1+
+ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLSnT0IFaUQAS2zMnao
+lQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pHdmX2Os+PYhcZewoozRrSgx4hxyy/
+vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJipNiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXi
+Zo1jDiVN1Rmy5nk3pyKdVDECAwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/Qkqi
+MAwGA1UdEwQFMAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH
+ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGBuvl2ICO1J2B0
+1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq
+KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV
+xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP
+NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r
+GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE
+xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx
+gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy
+sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD
+BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw=
+-----END CERTIFICATE-----
+
+T\xc3\x9c\x42\xC4\xB0TAK UEKAE K\xC3\xB6k Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 - S\xC3\xBCr\xC3\xBCm 3
+=============================================================================================================================
+-----BEGIN CERTIFICATE-----
+MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRSMRgwFgYDVQQH
+DA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJpbGltc2VsIHZlIFRla25vbG9q
+aWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSwVEFLMUgwRgYDVQQLDD9VbHVzYWwgRWxla3Ry
+b25payB2ZSBLcmlwdG9sb2ppIEFyYcWfdMSxcm1hIEVuc3RpdMO8c8O8IC0gVUVLQUUxIzAhBgNV
+BAsMGkthbXUgU2VydGlmaWthc3lvbiBNZXJrZXppMUowSAYDVQQDDEFUw5xCxLBUQUsgVUVLQUUg
+S8O2ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSAtIFPDvHLDvG0gMzAeFw0wNzA4
+MjQxMTM3MDdaFw0xNzA4MjExMTM3MDdaMIIBKzELMAkGA1UEBhMCVFIxGDAWBgNVBAcMD0dlYnpl
+IC0gS29jYWVsaTFHMEUGA1UECgw+VMO8cmtpeWUgQmlsaW1zZWwgdmUgVGVrbm9sb2ppayBBcmHF
+n3TEsXJtYSBLdXJ1bXUgLSBUw5xCxLBUQUsxSDBGBgNVBAsMP1VsdXNhbCBFbGVrdHJvbmlrIHZl
+IEtyaXB0b2xvamkgQXJhxZ90xLFybWEgRW5zdGl0w7xzw7wgLSBVRUtBRTEjMCEGA1UECwwaS2Ft
+dSBTZXJ0aWZpa2FzeW9uIE1lcmtlemkxSjBIBgNVBAMMQVTDnELEsFRBSyBVRUtBRSBLw7ZrIFNl
+cnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIC0gU8O8csO8bSAzMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAim1L/xCIOsP2fpTo6iBkcK4hgb46ezzb8R1Sf1n68yJMlaCQvEhO
+Eav7t7WNeoMojCZG2E6VQIdhn8WebYGHV2yKO7Rm6sxA/OOqbLLLAdsyv9Lrhc+hDVXDWzhXcLh1
+xnnRFDDtG1hba+818qEhTsXOfJlfbLm4IpNQp81McGq+agV/E5wrHur+R84EpW+sky58K5+eeROR
+6Oqeyjh1jmKwlZMq5d/pXpduIF9fhHpEORlAHLpVK/swsoHvhOPc7Jg4OQOFCKlUAwUp8MmPi+oL
+hmUZEdPpCSPeaJMDyTYcIW7OjGbxmTDY17PDHfiBLqi9ggtm/oLL4eAagsNAgQIDAQABo0IwQDAd
+BgNVHQ4EFgQUvYiHyY/2pAoLquvF/pEjnatKijIwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
+MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAB18+kmPNOm3JpIWmgV050vQbTlswyb2zrgxvMTfvCr4
+N5EY3ATIZJkrGG2AA1nJrvhY0D7twyOfaTyGOBye79oneNGEN3GKPEs5z35FBtYt2IpNeBLWrcLT
+y9LQQfMmNkqblWwM7uXRQydmwYj3erMgbOqwaSvHIOgMA8RBBZniP+Rr+KCGgceExh/VS4ESshYh
+LBOhgLJeDEoTniDYYkCrkOpkSi+sDQESeUWoL4cZaMjihccwsnX5OD+ywJO0a+IDRM5noN+J1q2M
+dqMTw5RhK2vZbMEHCiIHhWyFJEapvj+LeISCfiQMnf2BN+MlqO02TpUsyZyQ2uypQjyttgI=
+-----END CERTIFICATE-----
+
+Buypass Class 2 CA 1
+====================
+-----BEGIN CERTIFICATE-----
+MIIDUzCCAjugAwIBAgIBATANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
+QnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3MgQ2xhc3MgMiBDQSAxMB4XDTA2
+MTAxMzEwMjUwOVoXDTE2MTAxMzEwMjUwOVowSzELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBh
+c3MgQVMtOTgzMTYzMzI3MR0wGwYDVQQDDBRCdXlwYXNzIENsYXNzIDIgQ0EgMTCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBAIs8B0XY9t/mx8q6jUPFR42wWsE425KEHK8T1A9vNkYgxC7M
+cXA0ojTTNy7Y3Tp3L8DrKehc0rWpkTSHIln+zNvnma+WwajHQN2lFYxuyHyXA8vmIPLXl18xoS83
+0r7uvqmtqEyeIWZDO6i88wmjONVZJMHCR3axiFyCO7srpgTXjAePzdVBHfCuuCkslFJgNJQ72uA4
+0Z0zPhX0kzLFANq1KWYOOngPIVJfAuWSeyXTkh4vFZ2B5J2O6O+JzhRMVB0cgRJNcKi+EAUXfh/R
+uFdV7c27UsKwHnjCTTZoy1YmwVLBvXb3WNVyfh9EdrsAiR0WnVE1703CVu9r4Iw7DekCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUP42aWYv8e3uco684sDntkHGA1sgwDgYDVR0P
+AQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQAVGn4TirnoB6NLJzKyQJHyIdFkhb5jatLPgcIV
+1Xp+DCmsNx4cfHZSldq1fyOhKXdlyTKdqC5Wq2B2zha0jX94wNWZUYN/Xtm+DKhQ7SLHrQVMdvvt
+7h5HZPb3J31cKA9FxVxiXqaakZG3Uxcu3K1gnZZkOb1naLKuBctN518fV4bVIJwo+28TOPX2EZL2
+fZleHwzoq0QkKXJAPTZSr4xYkHPB7GEseaHsh7U/2k3ZIQAw3pDaDtMaSKk+hQsUi4y8QZ5q9w5w
+wDX3OaJdZtB7WZ+oRxKaJyOkLY4ng5IgodcVf/EuGO70SH8vf/GhGLWhC5SgYiAynB321O+/TIho
+-----END CERTIFICATE-----
+
+EBG Elektronik Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1
+==========================================================================
+-----BEGIN CERTIFICATE-----
+MIIF5zCCA8+gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNVBAMML0VCRyBF
+bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMTcwNQYDVQQKDC5FQkcg
+QmlsacWfaW0gVGVrbm9sb2ppbGVyaSB2ZSBIaXptZXRsZXJpIEEuxZ4uMQswCQYDVQQGEwJUUjAe
+Fw0wNjA4MTcwMDIxMDlaFw0xNjA4MTQwMDMxMDlaMIGAMTgwNgYDVQQDDC9FQkcgRWxla3Ryb25p
+ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTE3MDUGA1UECgwuRUJHIEJpbGnFn2lt
+IFRla25vbG9qaWxlcmkgdmUgSGl6bWV0bGVyaSBBLsWeLjELMAkGA1UEBhMCVFIwggIiMA0GCSqG
+SIb3DQEBAQUAA4ICDwAwggIKAoICAQDuoIRh0DpqZhAy2DE4f6en5f2h4fuXd7hxlugTlkaDT7by
+X3JWbhNgpQGR4lvFzVcfd2NR/y8927k/qqk153nQ9dAktiHq6yOU/im/+4mRDGSaBUorzAzu8T2b
+gmmkTPiab+ci2hC6X5L8GCcKqKpE+i4stPtGmggDg3KriORqcsnlZR9uKg+ds+g75AxuetpX/dfr
+eYteIAbTdgtsApWjluTLdlHRKJ2hGvxEok3MenaoDT2/F08iiFD9rrbskFBKW5+VQarKD7JK/oCZ
+TqNGFav4c0JqwmZ2sQomFd2TkuzbqV9UIlKRcF0T6kjsbgNs2d1s/OsNA/+mgxKb8amTD8UmTDGy
+Y5lhcucqZJnSuOl14nypqZoaqsNW2xCaPINStnuWt6yHd6i58mcLlEOzrz5z+kI2sSXFCjEmN1Zn
+uqMLfdb3ic1nobc6HmZP9qBVFCVMLDMNpkGMvQQxahByCp0OLna9XvNRiYuoP1Vzv9s6xiQFlpJI
+qkuNKgPlV5EQ9GooFW5Hd4RcUXSfGenmHmMWOeMRFeNYGkS9y8RsZteEBt8w9DeiQyJ50hBs37vm
+ExH8nYQKE3vwO9D8owrXieqWfo1IhR5kX9tUoqzVegJ5a9KK8GfaZXINFHDk6Y54jzJ0fFfy1tb0
+Nokb+Clsi7n2l9GkLqq+CxnCRelwXQIDAJ3Zo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB
+/wQEAwIBBjAdBgNVHQ4EFgQU587GT/wWZ5b6SqMHwQSny2re2kcwHwYDVR0jBBgwFoAU587GT/wW
+Z5b6SqMHwQSny2re2kcwDQYJKoZIhvcNAQEFBQADggIBAJuYml2+8ygjdsZs93/mQJ7ANtyVDR2t
+FcU22NU57/IeIl6zgrRdu0waypIN30ckHrMk2pGI6YNw3ZPX6bqz3xZaPt7gyPvT/Wwp+BVGoGgm
+zJNSroIBk5DKd8pNSe/iWtkqvTDOTLKBtjDOWU/aWR1qeqRFsIImgYZ29fUQALjuswnoT4cCB64k
+XPBfrAowzIpAoHMEwfuJJPaaHFy3PApnNgUIMbOv2AFoKuB4j3TeuFGkjGwgPaL7s9QJ/XvCgKqT
+bCmYIai7FvOpEl90tYeY8pUm3zTvilORiF0alKM/fCL414i6poyWqD1SNGKfAB5UVUJnxk1Gj7sU
+RT0KlhaOEKGXmdXTMIXM3rRyt7yKPBgpaP3ccQfuJDlq+u2lrDgv+R4QDgZxGhBM/nV+/x5XOULK
+1+EVoVZVWRvRo68R2E7DpSvvkL/A7IITW43WciyTTo9qKd+FPNMN4KIYEsxVL0e3p5sC/kH2iExt
+2qkBR4NkJ2IQgtYSe14DHzSpyZH+r11thie3I6p1GMog57AP14kOpmciY/SDQSsGS7tY1dHXt7kQ
+Y9iJSrSq3RZj9W6+YKH47ejWkE8axsWgKdOnIaj1Wjz3x0miIZpKlVIglnKaZsv30oZDfCK+lvm9
+AahH3eU7QPl1K5srRmSGjR70j/sHd9DqSaIcjVIUpgqT
+-----END CERTIFICATE-----
+
+certSIGN ROOT CA
+================
+-----BEGIN CERTIFICATE-----
+MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD
+VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa
+Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE
+CxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I
+JUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH
+rfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2
+ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQOA7+j0xbm0bqQfWwCHTD
+0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwvJoIQ4uNllAoEwF73XVv4EOLQunpL+943
+AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B
+Af8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB
+AQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8
+SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0
+x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt
+vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz
+TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD
+-----END CERTIFICATE-----
+
+CNNIC ROOT
+==========
+-----BEGIN CERTIFICATE-----
+MIIDVTCCAj2gAwIBAgIESTMAATANBgkqhkiG9w0BAQUFADAyMQswCQYDVQQGEwJDTjEOMAwGA1UE
+ChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1QwHhcNMDcwNDE2MDcwOTE0WhcNMjcwNDE2MDcw
+OTE0WjAyMQswCQYDVQQGEwJDTjEOMAwGA1UEChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1Qw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDTNfc/c3et6FtzF8LRb+1VvG7q6KR5smzD
+o+/hn7E7SIX1mlwhIhAsxYLO2uOabjfhhyzcuQxauohV3/2q2x8x6gHx3zkBwRP9SFIhxFXf2tiz
+VHa6dLG3fdfA6PZZxU3Iva0fFNrfWEQlMhkqx35+jq44sDB7R3IJMfAw28Mbdim7aXZOV/kbZKKT
+VrdvmW7bCgScEeOAH8tjlBAKqeFkgjH5jCftppkA9nCTGPihNIaj3XrCGHn2emU1z5DrvTOTn1Or
+czvmmzQgLx3vqR1jGqCA2wMv+SYahtKNu6m+UjqHZ0gNv7Sg2Ca+I19zN38m5pIEo3/PIKe38zrK
+y5nLAgMBAAGjczBxMBEGCWCGSAGG+EIBAQQEAwIABzAfBgNVHSMEGDAWgBRl8jGtKvf33VKWCscC
+wQ7vptU7ETAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIB/jAdBgNVHQ4EFgQUZfIxrSr3991S
+lgrHAsEO76bVOxEwDQYJKoZIhvcNAQEFBQADggEBAEs17szkrr/Dbq2flTtLP1se31cpolnKOOK5
+Gv+e5m4y3R6u6jW39ZORTtpC4cMXYFDy0VwmuYK36m3knITnA3kXr5g9lNvHugDnuL8BV8F3RTIM
+O/G0HAiw/VGgod2aHRM2mm23xzy54cXZF/qD1T0VoDy7HgviyJA/qIYM/PmLXoXLT1tLYhFHxUV8
+BS9BsZ4QaRuZluBVeftOhpm4lNqGOGqTo+fLbuXf6iFViZx9fX+Y9QCJ7uOEwFyWtcVG6kbghVW2
+G8kS1sHNzYDzAgE8yGnLRUhj2JTQ7IUOO04RZfSCjKY9ri4ilAnIXOo8gV0WKgOXFlUJ24pBgp5m
+mxE=
+-----END CERTIFICATE-----
+
+ApplicationCA - Japanese Government
+===================================
+-----BEGIN CERTIFICATE-----
+MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEcMBoGA1UEChMT
+SmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRpb25DQTAeFw0wNzEyMTIxNTAw
+MDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYTAkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zl
+cm5tZW50MRYwFAYDVQQLEw1BcHBsaWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEAp23gdE6Hj6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4
+fl+Kf5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55IrmTwcrN
+wVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cwFO5cjFW6WY2H/CPek9AE
+jP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDihtQWEjdnjDuGWk81quzMKq2edY3rZ+nYVu
+nyoKb58DKTCXKB28t89UKU5RMfkntigm/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRU
+WssmP3HMlEYNllPqa0jQk/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNV
+BAYTAkpQMRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOCseOD
+vOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADlqRHZ3ODrs
+o2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJhyzjVOGjprIIC8CFqMjSnHH2HZ9g
+/DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYD
+io+nEhEMy/0/ecGc/WLuo89UDNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmW
+dupwX3kSa+SjB1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL
+rosot4LKGAfmt1t06SAZf7IbiVQ=
+-----END CERTIFICATE-----
+
+GeoTrust Primary Certification Authority - G3
+=============================================
+-----BEGIN CERTIFICATE-----
+MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE
+BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0
+IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFy
+eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIz
+NTk1OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAo
+YykgMjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMT
+LUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5j
+K/BGvESyiaHAKAxJcCGVn2TAppMSAmUmhsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdE
+c5IiaacDiGydY8hS2pgn5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3C
+IShwiP/WJmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exALDmKu
+dlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZChuOl1UcCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMR5yo6hTgMdHNxr
+2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IBAQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9
+cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE
+Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
+AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s
+t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt
+-----END CERTIFICATE-----
+
+thawte Primary Root CA - G2
+===========================
+-----BEGIN CERTIFICATE-----
+MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC
+VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu
+IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg
+Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV
+MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG
+b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt
+IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS
+LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5
+8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU
+mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN
+G4k8VIZ3KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41oxXZ3K
+rr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg==
+-----END CERTIFICATE-----
+
+thawte Primary Root CA - G3
+===========================
+-----BEGIN CERTIFICATE-----
+MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UE
+BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2
+aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0w
+ODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh
+d3RlLCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYD
+VQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIG
+A1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEAsr8nLPvb2FvdeHsbnndmgcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2At
+P0LMqmsywCPLLEHd5N/8YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC
++BsUa0Lfb1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS99irY
+7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2SzhkGcuYMXDhpxwTW
+vGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUkOQIDAQABo0IwQDAPBgNVHRMBAf8E
+BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJ
+KoZIhvcNAQELBQADggEBABpA2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweK
+A3rD6z8KLFIWoCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu
+t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC
+8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm
+er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A=
+-----END CERTIFICATE-----
+
+GeoTrust Primary Certification Authority - G2
+=============================================
+-----BEGIN CERTIFICATE-----
+MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC
+VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu
+Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD
+ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1
+OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg
+MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl
+b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG
+BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc
+KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD
+VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+
+EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m
+ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2
+npaqBA+K
+-----END CERTIFICATE-----
+
+VeriSign Universal Root Certification Authority
+===============================================
+-----BEGIN CERTIFICATE-----
+MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE
+BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
+ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
+IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u
+IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0
+aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj
+1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP
+MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72
+9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I
+AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR
+tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G
+CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O
+a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud
+DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3
+Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx
+Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx
+P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P
+wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4
+mJO37M2CYfE45k+XmCpajQ==
+-----END CERTIFICATE-----
+
+VeriSign Class 3 Public Primary Certification Authority - G4
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC
+VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3
+b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz
+ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj
+YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL
+MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU
+cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo
+b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5
+IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8
+Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz
+rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB
+/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw
+HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u
+Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD
+A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx
+AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
+-----END CERTIFICATE-----
+
+NetLock Arany (Class Gold) Főtanúsítvány
+============================================
+-----BEGIN CERTIFICATE-----
+MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G
+A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610
+dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB
+cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx
+MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO
+ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv
+biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6
+c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu
+0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw
+/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk
+H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw
+fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1
+neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB
+BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW
+qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta
+YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC
+bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna
+NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu
+dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=
+-----END CERTIFICATE-----
+
+Staat der Nederlanden Root CA - G2
+==================================
+-----BEGIN CERTIFICATE-----
+MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE
+CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
+Um9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oXDTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMC
+TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l
+ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ
+5291qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8SpuOUfiUtn
+vWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPUZ5uW6M7XxgpT0GtJlvOj
+CwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvEpMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiil
+e7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCR
+OME4HYYEhLoaJXhena/MUGDWE4dS7WMfbWV9whUYdMrhfmQpjHLYFhN9C0lK8SgbIHRrxT3dsKpI
+CT0ugpTNGmXZK4iambwYfp/ufWZ8Pr2UuIHOzZgweMFvZ9C+X+Bo7d7iscksWXiSqt8rYGPy5V65
+48r6f1CGPqI0GAwJaCgRHOThuVw+R7oyPxjMW4T182t0xHJ04eOLoEq9jWYv6q012iDTiIJh8BIi
+trzQ1aTsr1SIJSQ8p22xcik/Plemf1WvbibG/ufMQFxRRIEKeN5KzlW/HdXZt1bv8Hb/C3m1r737
+qWmRRpdogBQ2HbN/uymYNqUg+oJgYjOk7Na6B6duxc8UpufWkjTYgfX8HV2qXB72o007uPc5AgMB
+AAGjgZcwgZQwDwYDVR0TAQH/BAUwAwEB/zBSBgNVHSAESzBJMEcGBFUdIAAwPzA9BggrBgEFBQcC
+ARYxaHR0cDovL3d3dy5wa2lvdmVyaGVpZC5ubC9wb2xpY2llcy9yb290LXBvbGljeS1HMjAOBgNV
+HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJFoMocVHYnitfGsNig0jQt8YojrMA0GCSqGSIb3DQEBCwUA
+A4ICAQCoQUpnKpKBglBu4dfYszk78wIVCVBR7y29JHuIhjv5tLySCZa59sCrI2AGeYwRTlHSeYAz
++51IvuxBQ4EffkdAHOV6CMqqi3WtFMTC6GY8ggen5ieCWxjmD27ZUD6KQhgpxrRW/FYQoAUXvQwj
+f/ST7ZwaUb7dRUG/kSS0H4zpX897IZmflZ85OkYcbPnNe5yQzSipx6lVu6xiNGI1E0sUOlWDuYaN
+kqbG9AclVMwWVxJKgnjIFNkXgiYtXSAfea7+1HAWFpWD2DU5/1JddRwWxRNVz0fMdWVSSt7wsKfk
+CpYL+63C4iWEst3kvX5ZbJvw8NjnyvLplzh+ib7M+zkXYT9y2zqR2GUBGR2tUKRXCnxLvJxxcypF
+URmFzI79R6d0lR2o0a9OF7FpJsKqeFdbxU2n5Z4FF5TKsl+gSRiNNOkmbEgeqmiSBeGCc1qb3Adb
+CG19ndeNIdn8FCCqwkXfP+cAslHkwvgFuXkajDTznlvkN1trSt8sV4pAWja63XVECDdCcAz+3F4h
+oKOKwJCcaNpQ5kUQR3i2TtJlycM33+FCY7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk+T8VyJoV
+IPVVYpbtbZNQvOSqeK3Zywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm
+66+KAQ==
+-----END CERTIFICATE-----
+
+CA Disig
+========
+-----BEGIN CERTIFICATE-----
+MIIEDzCCAvegAwIBAgIBATANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQGEwJTSzETMBEGA1UEBxMK
+QnJhdGlzbGF2YTETMBEGA1UEChMKRGlzaWcgYS5zLjERMA8GA1UEAxMIQ0EgRGlzaWcwHhcNMDYw
+MzIyMDEzOTM0WhcNMTYwMzIyMDEzOTM0WjBKMQswCQYDVQQGEwJTSzETMBEGA1UEBxMKQnJhdGlz
+bGF2YTETMBEGA1UEChMKRGlzaWcgYS5zLjERMA8GA1UEAxMIQ0EgRGlzaWcwggEiMA0GCSqGSIb3
+DQEBAQUAA4IBDwAwggEKAoIBAQCS9jHBfYj9mQGp2HvycXXxMcbzdWb6UShGhJd4NLxs/LxFWYgm
+GErENx+hSkS943EE9UQX4j/8SFhvXJ56CbpRNyIjZkMhsDxkovhqFQ4/61HhVKndBpnXmjxUizkD
+Pw/Fzsbrg3ICqB9x8y34dQjbYkzo+s7552oftms1grrijxaSfQUMbEYDXcDtab86wYqg6I7ZuUUo
+hwjstMoVvoLdtUSLLa2GDGhibYVW8qwUYzrG0ZmsNHhWS8+2rT+MitcE5eN4TPWGqvWP+j1scaMt
+ymfraHtuM6kMgiioTGohQBUgDCZbg8KpFhXAJIJdKxatymP2dACw30PEEGBWZ2NFAgMBAAGjgf8w
+gfwwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUjbJJaJ1yCCW5wCf1UJNWSEZx+Y8wDgYDVR0P
+AQH/BAQDAgEGMDYGA1UdEQQvMC2BE2Nhb3BlcmF0b3JAZGlzaWcuc2uGFmh0dHA6Ly93d3cuZGlz
+aWcuc2svY2EwZgYDVR0fBF8wXTAtoCugKYYnaHR0cDovL3d3dy5kaXNpZy5zay9jYS9jcmwvY2Ff
+ZGlzaWcuY3JsMCygKqAohiZodHRwOi8vY2EuZGlzaWcuc2svY2EvY3JsL2NhX2Rpc2lnLmNybDAa
+BgNVHSAEEzARMA8GDSuBHpGT5goAAAABAQEwDQYJKoZIhvcNAQEFBQADggEBAF00dGFMrzvY/59t
+WDYcPQuBDRIrRhCA/ec8J9B6yKm2fnQwM6M6int0wHl5QpNt/7EpFIKrIYwvF/k/Ji/1WcbvgAa3
+mkkp7M5+cTxqEEHA9tOasnxakZzArFvITV734VP/Q3f8nktnbNfzg9Gg4H8l37iYC5oyOGwwoPP/
+CBUz91BKez6jPiCp3C9WgArtQVCwyfTssuMmRAAOb54GvCKWU3BlxFAKRmukLyeBEicTXxChds6K
+ezfqwzlhA5WYOudsiCUI/HloDYd9Yvi0X/vF2Ey9WLw/Q1vUHgFNPGO+I++MzVpQuGhU+QqZMxEA
+4Z7CRneC9VkGjCFMhwnN5ag=
+-----END CERTIFICATE-----
+
+Juur-SK
+=======
+-----BEGIN CERTIFICATE-----
+MIIE5jCCA86gAwIBAgIEO45L/DANBgkqhkiG9w0BAQUFADBdMRgwFgYJKoZIhvcNAQkBFglwa2lA
+c2suZWUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKExlBUyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMRAw
+DgYDVQQDEwdKdXVyLVNLMB4XDTAxMDgzMDE0MjMwMVoXDTE2MDgyNjE0MjMwMVowXTEYMBYGCSqG
+SIb3DQEJARYJcGtpQHNrLmVlMQswCQYDVQQGEwJFRTEiMCAGA1UEChMZQVMgU2VydGlmaXRzZWVy
+aW1pc2tlc2t1czEQMA4GA1UEAxMHSnV1ci1TSzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAIFxNj4zB9bjMI0TfncyRsvPGbJgMUaXhvSYRqTCZUXP00B841oiqBB4M8yIsdOBSvZiF3tf
+TQou0M+LI+5PAk676w7KvRhj6IAcjeEcjT3g/1tf6mTll+g/mX8MCgkzABpTpyHhOEvWgxutr2TC
++Rx6jGZITWYfGAriPrsfB2WThbkasLnE+w0R9vXW+RvHLCu3GFH+4Hv2qEivbDtPL+/40UceJlfw
+UR0zlv/vWT3aTdEVNMfqPxZIe5EcgEMPPbgFPtGzlc3Yyg/CQ2fbt5PgIoIuvvVoKIO5wTtpeyDa
+Tpxt4brNj3pssAki14sL2xzVWiZbDcDq5WDQn/413z8CAwEAAaOCAawwggGoMA8GA1UdEwEB/wQF
+MAMBAf8wggEWBgNVHSAEggENMIIBCTCCAQUGCisGAQQBzh8BAQEwgfYwgdAGCCsGAQUFBwICMIHD
+HoHAAFMAZQBlACAAcwBlAHIAdABpAGYAaQBrAGEAYQB0ACAAbwBuACAAdgDkAGwAagBhAHMAdABh
+AHQAdQBkACAAQQBTAC0AaQBzACAAUwBlAHIAdABpAGYAaQB0AHMAZQBlAHIAaQBtAGkAcwBrAGUA
+cwBrAHUAcwAgAGEAbABhAG0ALQBTAEsAIABzAGUAcgB0AGkAZgBpAGsAYQBhAHQAaQBkAGUAIABr
+AGkAbgBuAGkAdABhAG0AaQBzAGUAawBzMCEGCCsGAQUFBwIBFhVodHRwOi8vd3d3LnNrLmVlL2Nw
+cy8wKwYDVR0fBCQwIjAgoB6gHIYaaHR0cDovL3d3dy5zay5lZS9qdXVyL2NybC8wHQYDVR0OBBYE
+FASqekej5ImvGs8KQKcYP2/v6X2+MB8GA1UdIwQYMBaAFASqekej5ImvGs8KQKcYP2/v6X2+MA4G
+A1UdDwEB/wQEAwIB5jANBgkqhkiG9w0BAQUFAAOCAQEAe8EYlFOiCfP+JmeaUOTDBS8rNXiRTHyo
+ERF5TElZrMj3hWVcRrs7EKACr81Ptcw2Kuxd/u+gkcm2k298gFTsxwhwDY77guwqYHhpNjbRxZyL
+abVAyJRld/JXIWY7zoVAtjNjGr95HvxcHdMdkxuLDF2FvZkwMhgJkVLpfKG6/2SSmuz+Ne6ML678
+IIbsSt4beDI3poHSna9aEhbKmVv8b20OxaAehsmR0FyYgl9jDIpaq9iVpszLita/ZEuOyoqysOkh
+Mp6qqIWYNIE5ITuoOlIyPfZrN4YGWhWY3PARZv40ILcD9EEQfTmEeZZyY7aWAuVrua0ZTbvGRNs2
+yyqcjg==
+-----END CERTIFICATE-----
+
+Hongkong Post Root CA 1
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT
+DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx
+NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n
+IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1
+ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr
+auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh
+qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY
+V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV
+HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i
+h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio
+l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei
+IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps
+T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT
+c4afU9hDDl3WY4JxHYB0yvbiAmvZWg==
+-----END CERTIFICATE-----
+
+SecureSign RootCA11
+===================
+-----BEGIN CERTIFICATE-----
+MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi
+SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS
+b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw
+KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1
+cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL
+TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO
+wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq
+g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP
+O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA
+bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX
+t94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh
+OBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r
+bnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQ
+Oh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01
+y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061
+lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I=
+-----END CERTIFICATE-----
+
+ACEDICOM Root
+=============
+-----BEGIN CERTIFICATE-----
+MIIFtTCCA52gAwIBAgIIYY3HhjsBggUwDQYJKoZIhvcNAQEFBQAwRDEWMBQGA1UEAwwNQUNFRElD
+T00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00xCzAJBgNVBAYTAkVTMB4XDTA4
+MDQxODE2MjQyMloXDTI4MDQxMzE2MjQyMlowRDEWMBQGA1UEAwwNQUNFRElDT00gUm9vdDEMMAoG
+A1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00xCzAJBgNVBAYTAkVTMIICIjANBgkqhkiG9w0BAQEF
+AAOCAg8AMIICCgKCAgEA/5KV4WgGdrQsyFhIyv2AVClVYyT/kGWbEHV7w2rbYgIB8hiGtXxaOLHk
+WLn709gtn70yN78sFW2+tfQh0hOR2QetAQXW8713zl9CgQr5auODAKgrLlUTY4HKRxx7XBZXehuD
+YAQ6PmXDzQHe3qTWDLqO3tkE7hdWIpuPY/1NFgu3e3eM+SW10W2ZEi5PGrjm6gSSrj0RuVFCPYew
+MYWveVqc/udOXpJPQ/yrOq2lEiZmueIM15jO1FillUAKt0SdE3QrwqXrIhWYENiLxQSfHY9g5QYb
+m8+5eaA9oiM/Qj9r+hwDezCNzmzAv+YbX79nuIQZ1RXve8uQNjFiybwCq0Zfm/4aaJQ0PZCOrfbk
+HQl/Sog4P75n/TSW9R28MHTLOO7VbKvU/PQAtwBbhTIWdjPp2KOZnQUAqhbm84F9b32qhm2tFXTT
+xKJxqvQUfecyuB+81fFOvW8XAjnXDpVCOscAPukmYxHqC9FK/xidstd7LzrZlvvoHpKuE1XI2Sf2
+3EgbsCTBheN3nZqk8wwRHQ3ItBTutYJXCb8gWH8vIiPYcMt5bMlL8qkqyPyHK9caUPgn6C9D4zq9
+2Fdx/c6mUlv53U3t5fZvie27k5x2IXXwkkwp9y+cAS7+UEaeZAwUswdbxcJzbPEHXEUkFDWug/Fq
+TYl6+rPYLWbwNof1K1MCAwEAAaOBqjCBpzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKaz
+4SsrSbbXc6GqlPUB53NlTKxQMA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUprPhKytJttdzoaqU
+9QHnc2VMrFAwRAYDVR0gBD0wOzA5BgRVHSAAMDEwLwYIKwYBBQUHAgEWI2h0dHA6Ly9hY2VkaWNv
+bS5lZGljb21ncm91cC5jb20vZG9jMA0GCSqGSIb3DQEBBQUAA4ICAQDOLAtSUWImfQwng4/F9tqg
+aHtPkl7qpHMyEVNEskTLnewPeUKzEKbHDZ3Ltvo/Onzqv4hTGzz3gvoFNTPhNahXwOf9jU8/kzJP
+eGYDdwdY6ZXIfj7QeQCM8htRM5u8lOk6e25SLTKeI6RF+7YuE7CLGLHdztUdp0J/Vb77W7tH1Pwk
+zQSulgUV1qzOMPPKC8W64iLgpq0i5ALudBF/TP94HTXa5gI06xgSYXcGCRZj6hitoocf8seACQl1
+ThCojz2GuHURwCRiipZ7SkXp7FnFvmuD5uHorLUwHv4FB4D54SMNUI8FmP8sX+g7tq3PgbUhh8oI
+KiMnMCArz+2UW6yyetLHKKGKC5tNSixthT8Jcjxn4tncB7rrZXtaAWPWkFtPF2Y9fwsZo5NjEFIq
+nxQWWOLcpfShFosOkYuByptZ+thrkQdlVV9SH686+5DdaaVbnG0OLLb6zqylfDJKZ0DcMDQj3dcE
+I2bw/FWAp/tmGYI1Z2JwOV5vx+qQQEQIHriy1tvuWacNGHk0vFQYXlPKNFHtRQrmjseCNj6nOGOp
+MCwXEGCSn1WHElkQwg9naRHMTh5+Spqtr0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3o
+tkYNbn5XOmeUwssfnHdKZ05phkOTOPu220+DkdRgfks+KzgHVZhepA==
+-----END CERTIFICATE-----
+
+Microsec e-Szigno Root CA 2009
+==============================
+-----BEGIN CERTIFICATE-----
+MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER
+MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv
+c2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o
+dTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE
+BwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUt
+U3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTCCASIw
+DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvPkd6mJviZpWNwrZuuyjNA
+fW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tccbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG
+0IMZfcChEhyVbUr02MelTTMuhTlAdX4UfIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKA
+pxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm
+1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC
+AwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf
+QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE
+FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o
+lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX
+I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775
+tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02
+yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi
+LXpUq3DDfSJlgnCW
+-----END CERTIFICATE-----
+
+GlobalSign Root CA - R3
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv
+YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
+bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT
+aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln
+bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt
+iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ
+0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3
+rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl
+OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2
+xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
+FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7
+lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8
+EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E
+bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18
+YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r
+kpeDMdmztcpHWD9f
+-----END CERTIFICATE-----
+
+Autoridad de Certificacion Firmaprofesional CIF A62634068
+=========================================================
+-----BEGIN CERTIFICATE-----
+MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA
+BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
+MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw
+QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB
+NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD
+Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P
+B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY
+7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH
+ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI
+plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX
+MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX
+LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK
+bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU
+vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1Ud
+EwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNH
+DhpkLzCBpgYDVR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp
+cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAA
+bABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx
+ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx
+51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk
+R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP
+T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f
+Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl
+osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR
+crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR
+saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD
+KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi
+6Et8Vcad+qMUu2WFbm5PEn4KPJ2V
+-----END CERTIFICATE-----
+
+Izenpe.com
+==========
+-----BEGIN CERTIFICATE-----
+MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG
+EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz
+MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu
+QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ
+03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAK
+ClaOxdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6HLmYRY2xU
++zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFXuaOKmMPsOzTFlUFpfnXC
+PCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQDyCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxT
+OTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbK
+F7jJeodWLBoBHmy+E60QrLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK
+0GqfvEyNBjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8Lhij+
+0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIBQFqNeb+Lz0vPqhbB
+leStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+HMh3/1uaD7euBUbl8agW7EekFwID
+AQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2luZm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+
+SVpFTlBFIFMuQS4gLSBDSUYgQTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBG
+NjIgUzgxQzBBBgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx
+MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O
+BBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUAA4ICAQB4pgwWSp9MiDrAyw6l
+Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga
+kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q
+hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs
+g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5
+aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5
+nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC
+ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo
+Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z
+WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==
+-----END CERTIFICATE-----
+
+Chambers of Commerce Root - 2008
+================================
+-----BEGIN CERTIFICATE-----
+MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD
+MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
+bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
+QS4xKTAnBgNVBAMTIENoYW1iZXJzIG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEy
+Mjk1MFoXDTM4MDczMTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNl
+ZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQF
+EwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJl
+cnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
+AQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW928sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKA
+XuFixrYp4YFs8r/lfTJqVKAyGVn+H4vXPWCGhSRv4xGzdz4gljUha7MI2XAuZPeEklPWDrCQiorj
+h40G072QDuKZoRuGDtqaCrsLYVAGUvGef3bsyw/QHg3PmTA9HMRFEFis1tPo1+XqxQEHd9ZR5gN/
+ikilTWh1uem8nk4ZcfUyS5xtYBkL+8ydddy/Js2Pk3g5eXNeJQ7KXOt3EgfLZEFHcpOrUMPrCXZk
+NNI5t3YRCQ12RcSprj1qr7V9ZS+UWBDsXHyvfuK2GNnQm05aSd+pZgvMPMZ4fKecHePOjlO+Bd5g
+D2vlGts/4+EhySnB8esHnFIbAURRPHsl18TlUlRdJQfKFiC4reRB7noI/plvg6aRArBsNlVq5331
+lubKgdaX8ZSD6e2wsWsSaR6s+12pxZjptFtYer49okQ6Y1nUCyXeG0+95QGezdIp1Z8XGQpvvwyQ
+0wlf2eOKNcx5Wk0ZN5K3xMGtr/R5JJqyAQuxr1yW84Ay+1w9mPGgP0revq+ULtlVmhduYJ1jbLhj
+ya6BXBg14JC7vjxPNyK5fuvPnnchpj04gftI2jE9K+OJ9dC1vX7gUMQSibMjmhAxhduub+84Mxh2
+EQIDAQABo4IBbDCCAWgwEgYDVR0TAQH/BAgwBgEB/wIBDDAdBgNVHQ4EFgQU+SSsD7K1+HnA+mCI
+G8TZTQKeFxkwgeMGA1UdIwSB2zCB2IAU+SSsD7K1+HnA+mCIG8TZTQKeFxmhgbSkgbEwga4xCzAJ
+BgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNlZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNh
+bWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENh
+bWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDiC
+CQCj2kJ+pLGu2jAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUH
+AgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAJASryI1
+wqM58C7e6bXpeHxIvj99RZJe6dqxGfwWPJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH
+3qLPaYRgM+gQDROpI9CF5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbU
+RWpGqOt1glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaHFoI6
+M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2pSB7+R5KBWIBpih1
+YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MDxvbxrN8y8NmBGuScvfaAFPDRLLmF
+9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QGtjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcK
+zBIKinmwPQN/aUv0NCB9szTqjktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG
+nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg
+OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ
+-----END CERTIFICATE-----
+
+Global Chambersign Root - 2008
+==============================
+-----BEGIN CERTIFICATE-----
+MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD
+MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
+bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
+QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx
+NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg
+Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ
+QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD
+aGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDf
+VtPkOpt2RbQT2//BthmLN0EYlVJH6xedKYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXf
+XjaOcNFccUMd2drvXNL7G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0
+ZJJ0YPP2zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4ddPB
+/gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyGHoiMvvKRhI9lNNgA
+TH23MRdaKXoKGCQwoze1eqkBfSbW+Q6OWfH9GzO1KTsXO0G2Id3UwD2ln58fQ1DJu7xsepeY7s2M
+H/ucUa6LcL0nn3HAa6x9kGbo1106DbDVwo3VyJ2dwW3Q0L9R5OP4wzg2rtandeavhENdk5IMagfe
+Ox2YItaswTXbo6Al/3K1dh3ebeksZixShNBFks4c5eUzHdwHU1SjqoI7mjcv3N2gZOnm3b2u/GSF
+HTynyQbehP9r6GsaPMWis0L7iwk+XwhSx2LE1AVxv8Rk5Pihg+g+EpuoHtQ2TS9x9o0o9oOpE9Jh
+wZG7SMA0j0GMS0zbaRL/UJScIINZc+18ofLx/d33SdNDWKBWY8o9PeU1VlnpDsogzCtLkykPAgMB
+AAGjggFqMIIBZjASBgNVHRMBAf8ECDAGAQH/AgEMMB0GA1UdDgQWBBS5CcqcHtvTbDprru1U8VuT
+BjUuXjCB4QYDVR0jBIHZMIHWgBS5CcqcHtvTbDprru1U8VuTBjUuXqGBsqSBrzCBrDELMAkGA1UE
+BhMCRVUxQzBBBgNVBAcTOk1hZHJpZCAoc2VlIGN1cnJlbnQgYWRkcmVzcyBhdCB3d3cuY2FtZXJm
+aXJtYS5jb20vYWRkcmVzcykxEjAQBgNVBAUTCUE4Mjc0MzI4NzEbMBkGA1UEChMSQUMgQ2FtZXJm
+aXJtYSBTLkEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiCCQDJzdPp
+1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEWHGh0
+dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAICIf3DekijZBZRG
+/5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZUohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6
+ReAJ3spED8IXDneRRXozX1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/s
+dZ7LoR/xfxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg
+9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH
+foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du
+qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr
+P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq
+c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
+09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
+-----END CERTIFICATE-----
+
+Go Daddy Root Certificate Authority - G2
+========================================
+-----BEGIN CERTIFICATE-----
+MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
+B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu
+MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
+MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6
+b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G
+A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq
+9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD
++qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd
+fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl
+NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9
+BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac
+vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r
+5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV
+N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
+LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1
+-----END CERTIFICATE-----
+
+Starfield Root Certificate Authority - G2
+=========================================
+-----BEGIN CERTIFICATE-----
+MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
+B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
+b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0
+eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw
+DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg
+VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB
+dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv
+W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs
+bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk
+N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf
+ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU
+JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol
+TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx
+4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw
+F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K
+pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ
+c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
+-----END CERTIFICATE-----
+
+Starfield Services Root Certificate Authority - G2
+==================================================
+-----BEGIN CERTIFICATE-----
+MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
+B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
+b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl
+IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV
+BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT
+dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg
+Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
+AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2
+h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa
+hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP
+LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB
+rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
+AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG
+SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP
+E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy
+xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
+iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza
+YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6
+-----END CERTIFICATE-----
+
+AffirmTrust Commercial
+======================
+-----BEGIN CERTIFICATE-----
+MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS
+BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw
+MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly
+bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb
+DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV
+C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6
+BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww
+MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV
+HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG
+hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi
+qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv
+0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh
+sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
+-----END CERTIFICATE-----
+
+AffirmTrust Networking
+======================
+-----BEGIN CERTIFICATE-----
+MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS
+BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw
+MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly
+bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE
+Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI
+dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24
+/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb
+h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV
+HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu
+UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6
+12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23
+WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9
+/ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s=
+-----END CERTIFICATE-----
+
+AffirmTrust Premium
+===================
+-----BEGIN CERTIFICATE-----
+MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS
+BgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy
+OTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy
+dXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
+MIICCgKCAgEAxBLfqV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtn
+BKAQJG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ+jjeRFcV
+5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrSs8PhaJyJ+HoAVt70VZVs
++7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmd
+GPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d770O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5R
+p9EixAqnOEhss/n/fauGV+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NI
+S+LI+H+SqHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S5u04
+6uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4IaC1nEWTJ3s7xgaVY5
+/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TXOwF0lkLgAOIua+rF7nKsu7/+6qqo
++Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYEFJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB
+/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByv
+MiPIs0laUZx2KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg
+Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B8OWycvpEgjNC
+6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S
+L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK
++4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV
+BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg
+IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60
+g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb
+zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw==
+-----END CERTIFICATE-----
+
+AffirmTrust Premium ECC
+=======================
+-----BEGIN CERTIFICATE-----
+MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV
+BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx
+MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U
+cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA
+IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ
+N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW
+BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK
+BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X
+57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM
+eQ==
+-----END CERTIFICATE-----
+
+Certum Trusted Network CA
+=========================
+-----BEGIN CERTIFICATE-----
+MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK
+ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy
+MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU
+ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
+MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC
+l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J
+J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4
+fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0
+cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB
+Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw
+DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj
+jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1
+mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj
+Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
+03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
+-----END CERTIFICATE-----
+
+Certinomis - Autorité Racine
+=============================
+-----BEGIN CERTIFICATE-----
+MIIFnDCCA4SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJGUjETMBEGA1UEChMK
+Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxJjAkBgNVBAMMHUNlcnRpbm9taXMg
+LSBBdXRvcml0w6kgUmFjaW5lMB4XDTA4MDkxNzA4Mjg1OVoXDTI4MDkxNzA4Mjg1OVowYzELMAkG
+A1UEBhMCRlIxEzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMSYw
+JAYDVQQDDB1DZXJ0aW5vbWlzIC0gQXV0b3JpdMOpIFJhY2luZTCCAiIwDQYJKoZIhvcNAQEBBQAD
+ggIPADCCAgoCggIBAJ2Fn4bT46/HsmtuM+Cet0I0VZ35gb5j2CN2DpdUzZlMGvE5x4jYF1AMnmHa
+wE5V3udauHpOd4cN5bjr+p5eex7Ezyh0x5P1FMYiKAT5kcOrJ3NqDi5N8y4oH3DfVS9O7cdxbwly
+Lu3VMpfQ8Vh30WC8Tl7bmoT2R2FFK/ZQpn9qcSdIhDWerP5pqZ56XjUl+rSnSTV3lqc2W+HN3yNw
+2F1MpQiD8aYkOBOo7C+ooWfHpi2GR+6K/OybDnT0K0kCe5B1jPyZOQE51kqJ5Z52qz6WKDgmi92N
+jMD2AR5vpTESOH2VwnHu7XSu5DaiQ3XV8QCb4uTXzEIDS3h65X27uK4uIJPT5GHfceF2Z5c/tt9q
+c1pkIuVC28+BA5PY9OMQ4HL2AHCs8MF6DwV/zzRpRbWT5BnbUhYjBYkOjUjkJW+zeL9i9Qf6lSTC
+lrLooyPCXQP8w9PlfMl1I9f09bze5N/NgL+RiH2nE7Q5uiy6vdFrzPOlKO1Enn1So2+WLhl+HPNb
+xxaOu2B9d2ZHVIIAEWBsMsGoOBvrbpgT1u449fCfDu/+MYHB0iSVL1N6aaLwD4ZFjliCK0wi1F6g
+530mJ0jfJUaNSih8hp75mxpZuWW/Bd22Ql095gBIgl4g9xGC3srYn+Y3RyYe63j3YcNBZFgCQfna
+4NH4+ej9Uji29YnfAgMBAAGjWzBZMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G
+A1UdDgQWBBQNjLZh2kS40RR9w759XkjwzspqsDAXBgNVHSAEEDAOMAwGCiqBegFWAgIAAQEwDQYJ
+KoZIhvcNAQEFBQADggIBACQ+YAZ+He86PtvqrxyaLAEL9MW12Ukx9F1BjYkMTv9sov3/4gbIOZ/x
+WqndIlgVqIrTseYyCYIDbNc/CMf4uboAbbnW/FIyXaR/pDGUu7ZMOH8oMDX/nyNTt7buFHAAQCva
+R6s0fl6nVjBhK4tDrP22iCj1a7Y+YEq6QpA0Z43q619FVDsXrIvkxmUP7tCMXWY5zjKn2BCXwH40
+nJ+U8/aGH88bc62UeYdocMMzpXDn2NU4lG9jeeu/Cg4I58UvD0KgKxRA/yHgBcUn4YQRE7rWhh1B
+CxMjidPJC+iKunqjo3M3NYB9Ergzd0A4wPpeMNLytqOx1qKVl4GbUu1pTP+A5FPbVFsDbVRfsbjv
+JL1vnxHDx2TCDyhihWZeGnuyt++uNckZM6i4J9szVb9o4XVIRFb7zdNIu0eJOqxp9YDG5ERQL1TE
+qkPFMTFYvZbF6nVsmnWxTfj3l/+WFvKXTej28xH5On2KOG4Ey+HTRRWqpdEdnV1j6CTmNhTih60b
+WfVEm/vXd3wfAXBioSAaosUaKPQhA+4u2cGA6rnZgtZbdsLLO7XSAPCjDuGtbkD326C00EauFddE
+wk01+dIL8hf2rGbVJLJP0RyZwG71fet0BLj5TXcJ17TPBzAJ8bgAVtkXFhYKK4bfjwEZGuW7gmP/
+vgt2Fl43N+bYdJeimUV5
+-----END CERTIFICATE-----
+
+Root CA Generalitat Valenciana
+==============================
+-----BEGIN CERTIFICATE-----
+MIIGizCCBXOgAwIBAgIEO0XlaDANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJFUzEfMB0GA1UE
+ChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJR1ZBMScwJQYDVQQDEx5Sb290
+IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwHhcNMDEwNzA2MTYyMjQ3WhcNMjEwNzAxMTUyMjQ3
+WjBoMQswCQYDVQQGEwJFUzEfMB0GA1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UE
+CxMGUEtJR1ZBMScwJQYDVQQDEx5Sb290IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwggEiMA0G
+CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGKqtXETcvIorKA3Qdyu0togu8M1JAJke+WmmmO3I2
+F0zo37i7L3bhQEZ0ZQKQUgi0/6iMweDHiVYQOTPvaLRfX9ptI6GJXiKjSgbwJ/BXufjpTjJ3Cj9B
+ZPPrZe52/lSqfR0grvPXdMIKX/UIKFIIzFVd0g/bmoGlu6GzwZTNVOAydTGRGmKy3nXiz0+J2ZGQ
+D0EbtFpKd71ng+CT516nDOeB0/RSrFOyA8dEJvt55cs0YFAQexvba9dHq198aMpunUEDEO5rmXte
+JajCq+TA81yc477OMUxkHl6AovWDfgzWyoxVjr7gvkkHD6MkQXpYHYTqWBLI4bft75PelAgxAgMB
+AAGjggM7MIIDNzAyBggrBgEFBQcBAQQmMCQwIgYIKwYBBQUHMAGGFmh0dHA6Ly9vY3NwLnBraS5n
+dmEuZXMwEgYDVR0TAQH/BAgwBgEB/wIBAjCCAjQGA1UdIASCAiswggInMIICIwYKKwYBBAG/VQIB
+ADCCAhMwggHoBggrBgEFBQcCAjCCAdoeggHWAEEAdQB0AG8AcgBpAGQAYQBkACAAZABlACAAQwBl
+AHIAdABpAGYAaQBjAGEAYwBpAPMAbgAgAFIAYQDtAHoAIABkAGUAIABsAGEAIABHAGUAbgBlAHIA
+YQBsAGkAdABhAHQAIABWAGEAbABlAG4AYwBpAGEAbgBhAC4ADQAKAEwAYQAgAEQAZQBjAGwAYQBy
+AGEAYwBpAPMAbgAgAGQAZQAgAFAAcgDhAGMAdABpAGMAYQBzACAAZABlACAAQwBlAHIAdABpAGYA
+aQBjAGEAYwBpAPMAbgAgAHEAdQBlACAAcgBpAGcAZQAgAGUAbAAgAGYAdQBuAGMAaQBvAG4AYQBt
+AGkAZQBuAHQAbwAgAGQAZQAgAGwAYQAgAHAAcgBlAHMAZQBuAHQAZQAgAEEAdQB0AG8AcgBpAGQA
+YQBkACAAZABlACAAQwBlAHIAdABpAGYAaQBjAGEAYwBpAPMAbgAgAHMAZQAgAGUAbgBjAHUAZQBu
+AHQAcgBhACAAZQBuACAAbABhACAAZABpAHIAZQBjAGMAaQDzAG4AIAB3AGUAYgAgAGgAdAB0AHAA
+OgAvAC8AdwB3AHcALgBwAGsAaQAuAGcAdgBhAC4AZQBzAC8AYwBwAHMwJQYIKwYBBQUHAgEWGWh0
+dHA6Ly93d3cucGtpLmd2YS5lcy9jcHMwHQYDVR0OBBYEFHs100DSHHgZZu90ECjcPk+yeAT8MIGV
+BgNVHSMEgY0wgYqAFHs100DSHHgZZu90ECjcPk+yeAT8oWykajBoMQswCQYDVQQGEwJFUzEfMB0G
+A1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJR1ZBMScwJQYDVQQDEx5S
+b290IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmGCBDtF5WgwDQYJKoZIhvcNAQEFBQADggEBACRh
+TvW1yEICKrNcda3FbcrnlD+laJWIwVTAEGmiEi8YPyVQqHxK6sYJ2fR1xkDar1CdPaUWu20xxsdz
+Ckj+IHLtb8zog2EWRpABlUt9jppSCS/2bxzkoXHPjCpaF3ODR00PNvsETUlR4hTJZGH71BTg9J63
+NI8KJr2XXPR5OkowGcytT6CYirQxlyric21+eLj4iIlPsSKRZEv1UN4D2+XFducTZnV+ZfsBn5OH
+iJ35Rld8TWCvmHMTI6QgkYH60GFmuH3Rr9ZvHmw96RH9qfmCIoaZM3Fa6hlXPZHNqcCjbgcTpsnt
++GijnsNacgmHKNHEc8RzGF9QdRYxn7fofMM=
+-----END CERTIFICATE-----
+
+TWCA Root Certification Authority
+=================================
+-----BEGIN CERTIFICATE-----
+MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ
+VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG
+EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB
+IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
+AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx
+QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC
+oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP
+4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r
+y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB
+BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG
+9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC
+mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW
+QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY
+T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny
+Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
+-----END CERTIFICATE-----
+
+Security Communication RootCA2
+==============================
+-----BEGIN CERTIFICATE-----
+MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc
+U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh
+dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC
+SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy
+aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++
++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R
+3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV
+spHEfbmwhRkGeC7bYRr6hfVKkaHnFtWOojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1K
+EOtOghY6rCcMU/Gt1SSwawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8
+QIH4D5csOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB
+CwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpFcoJxDjrSzG+ntKEj
+u/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXcokgfGT+Ok+vx+hfuzU7jBBJV1uXk
+3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6q
+tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29
+mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03
+-----END CERTIFICATE-----
+
+EC-ACC
+======
+-----BEGIN CERTIFICATE-----
+MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB8zELMAkGA1UE
+BhMCRVMxOzA5BgNVBAoTMkFnZW5jaWEgQ2F0YWxhbmEgZGUgQ2VydGlmaWNhY2lvIChOSUYgUS0w
+ODAxMTc2LUkpMSgwJgYDVQQLEx9TZXJ2ZWlzIFB1YmxpY3MgZGUgQ2VydGlmaWNhY2lvMTUwMwYD
+VQQLEyxWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAoYykwMzE1MDMGA1UE
+CxMsSmVyYXJxdWlhIEVudGl0YXRzIGRlIENlcnRpZmljYWNpbyBDYXRhbGFuZXMxDzANBgNVBAMT
+BkVDLUFDQzAeFw0wMzAxMDcyMzAwMDBaFw0zMTAxMDcyMjU5NTlaMIHzMQswCQYDVQQGEwJFUzE7
+MDkGA1UEChMyQWdlbmNpYSBDYXRhbGFuYSBkZSBDZXJ0aWZpY2FjaW8gKE5JRiBRLTA4MDExNzYt
+SSkxKDAmBgNVBAsTH1NlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8xNTAzBgNVBAsTLFZl
+Z2V1IGh0dHBzOi8vd3d3LmNhdGNlcnQubmV0L3ZlcmFycmVsIChjKTAzMTUwMwYDVQQLEyxKZXJh
+cnF1aWEgRW50aXRhdHMgZGUgQ2VydGlmaWNhY2lvIENhdGFsYW5lczEPMA0GA1UEAxMGRUMtQUND
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsyLHT+KXQpWIR4NA9h0X84NzJB5R85iK
+w5K4/0CQBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm4CgPukLjbo73FCeT
+ae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaVHMf5NLWUhdWZXqBIoH7nF2W4onW4
+HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a
+E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw
+0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E
+BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD
+VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0
+Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l
+dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ
+lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa
+Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe
+l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2
+E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D
+5EI=
+-----END CERTIFICATE-----
+
+Hellenic Academic and Research Institutions RootCA 2011
+=======================================================
+-----BEGIN CERTIFICATE-----
+MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1IxRDBCBgNVBAoT
+O0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9y
+aXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z
+IFJvb3RDQSAyMDExMB4XDTExMTIwNjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYT
+AkdSMUQwQgYDVQQKEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z
+IENlcnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNo
+IEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+AKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPzdYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI
+1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJfel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa
+71HFK9+WXesyHgLacEnsbgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u
+8yBRQlqD75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSPFEDH
+3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNVHRMBAf8EBTADAQH/
+MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp5dgTBCPuQSUwRwYDVR0eBEAwPqA8
+MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQub3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQu
+b3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVt
+XdMiKahsog2p6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8
+TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7dIsXRSZMFpGD
+/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8AcysNnq/onN694/BtZqhFLKPM58N
+7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXIl7WdmplNsDz4SgCbZN2fOUvRJ9e4
+-----END CERTIFICATE-----
+
+Actalis Authentication Root CA
+==============================
+-----BEGIN CERTIFICATE-----
+MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM
+BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE
+AwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDky
+MjExMjIwMlowazELMAkGA1UEBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlz
+IFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290
+IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNvUTufClrJ
+wkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX4ay8IMKx4INRimlNAJZa
+by/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9KK3giq0itFZljoZUj5NDKd45RnijMCO6
+zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1f
+YVEiVRvjRuPjPdA1YprbrxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2
+oxgkg4YQ51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2Fbe8l
+EfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxeKF+w6D9Fz8+vm2/7
+hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4Fv6MGn8i1zeQf1xcGDXqVdFUNaBr8
+EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbnfpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5
+jF66CyCU3nuDuP/jVo23Eek7jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLY
+iDrIn3hm7YnzezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt
+ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQALe3KHwGCmSUyI
+WOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70jsNjLiNmsGe+b7bAEzlgqqI0
+JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDzWochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKx
+K3JCaKygvU5a2hi/a5iB0P2avl4VSM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+
+Xlff1ANATIGk0k9jpwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC
+4yyXX04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+OkfcvHlXHo
+2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz
+lefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem
+OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9
+vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg==
+-----END CERTIFICATE-----
+
+Trustis FPS Root CA
+===================
+-----BEGIN CERTIFICATE-----
+MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQG
+EwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQLExNUcnVzdGlzIEZQUyBSb290
+IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTExMzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNV
+BAoTD1RydXN0aXMgTGltaXRlZDEcMBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJ
+KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQ
+RUN+AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihHiTHcDnlk
+H5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjjvSkCqPoc4Vu5g6hBSLwa
+cY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zt
+o3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlBOrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEA
+AaNTMFEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAd
+BgNVHQ4EFgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01GX2c
+GE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmWzaD+vkAMXBJV+JOC
+yinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP41BIy+Q7DsdwyhEQsb8tGD+pmQQ9P
+8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZEf1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHV
+l/9D7S3B2l0pKoU/rGXuhg8FjZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYl
+iB6XzCGcKQENZetX2fNXlrtIzYE=
+-----END CERTIFICATE-----
+
+StartCom Certification Authority
+================================
+-----BEGIN CERTIFICATE-----
+MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN
+U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu
+ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0
+NjM3WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk
+LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMg
+U3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw
+ggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZkpMyONvg45iPwbm2xPN1y
+o4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rfOQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/
+Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/CJi/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/d
+eMotHweXMAEtcnn6RtYTKqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt
+2PZE4XNiHzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMMAv+Z
+6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w+2OqqGwaVLRcJXrJ
+osmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/
+untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVc
+UjyJthkqcwEKDwOzEmDyei+B26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT
+37uMdBNSSwIDAQABo4ICEDCCAgwwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYD
+VR0OBBYEFE4L7xqkQFulF2mHMMo0aEPQQa7yMB8GA1UdIwQYMBaAFE4L7xqkQFulF2mHMMo0aEPQ
+Qa7yMIIBWgYDVR0gBIIBUTCCAU0wggFJBgsrBgEEAYG1NwEBATCCATgwLgYIKwYBBQUHAgEWImh0
+dHA6Ly93d3cuc3RhcnRzc2wuY29tL3BvbGljeS5wZGYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cu
+c3RhcnRzc2wuY29tL2ludGVybWVkaWF0ZS5wZGYwgc8GCCsGAQUFBwICMIHCMCcWIFN0YXJ0IENv
+bW1lcmNpYWwgKFN0YXJ0Q29tKSBMdGQuMAMCAQEagZZMaW1pdGVkIExpYWJpbGl0eSwgcmVhZCB0
+aGUgc2VjdGlvbiAqTGVnYWwgTGltaXRhdGlvbnMqIG9mIHRoZSBTdGFydENvbSBDZXJ0aWZpY2F0
+aW9uIEF1dGhvcml0eSBQb2xpY3kgYXZhaWxhYmxlIGF0IGh0dHA6Ly93d3cuc3RhcnRzc2wuY29t
+L3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilTdGFydENvbSBG
+cmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQsFAAOCAgEAjo/n3JR5
+fPGFf59Jb2vKXfuM/gTFwWLRfUKKvFO3lANmMD+x5wqnUCBVJX92ehQN6wQOQOY+2IirByeDqXWm
+N3PH/UvSTa0XQMhGvjt/UfzDtgUx3M2FIk5xt/JxXrAaxrqTi3iSSoX4eA+D/i+tLPfkpLst0OcN
+Org+zvZ49q5HJMqjNTbOx8aHmNrs++myziebiMMEofYLWWivydsQD032ZGNcpRJvkrKTlMeIFw6T
+tn5ii5B/q06f/ON1FE8qMt9bDeD1e5MNq6HPh+GlBEXoPBKlCcWw0bdT82AUuoVpaiF8H3VhFyAX
+e2w7QSlc4axa0c2Mm+tgHRns9+Ww2vl5GKVFP0lDV9LdJNUso/2RjSe15esUBppMeyG7Oq0wBhjA
+2MFrLH9ZXF2RsXAiV+uKa0hK1Q8p7MZAwC+ITGgBF3f0JBlPvfrhsiAhS90a2Cl9qrjeVOwhVYBs
+HvUwyKMQ5bLmKhQxw4UtjJixhlpPiVktucf3HMiKf8CdBUrmQk9io20ppB+Fq9vlgcitKj1MXVuE
+JnHEhV5xJMqlG2zYYdMa4FTbzrqpMrUi9nNBCV24F10OD5mQ1kfabwo6YigUZ4LZ8dCAWZvLMdib
+D4x3TrVoivJs9iQOLWxwxXPR3hTQcY+203sC9uO41Alua551hDnmfyWl8kgAwKQB2j8=
+-----END CERTIFICATE-----
+
+StartCom Certification Authority G2
+===================================
+-----BEGIN CERTIFICATE-----
+MIIFYzCCA0ugAwIBAgIBOzANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJJTDEWMBQGA1UEChMN
+U3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+RzIwHhcNMTAwMTAxMDEwMDAxWhcNMzkxMjMxMjM1OTAxWjBTMQswCQYDVQQGEwJJTDEWMBQGA1UE
+ChMNU3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgRzIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2iTZbB7cgNr2Cu+EWIAOVeq8O
+o1XJJZlKxdBWQYeQTSFgpBSHO839sj60ZwNq7eEPS8CRhXBF4EKe3ikj1AENoBB5uNsDvfOpL9HG
+4A/LnooUCri99lZi8cVytjIl2bLzvWXFDSxu1ZJvGIsAQRSCb0AgJnooD/Uefyf3lLE3PbfHkffi
+Aez9lInhzG7TNtYKGXmu1zSCZf98Qru23QumNK9LYP5/Q0kGi4xDuFby2X8hQxfqp0iVAXV16iul
+Q5XqFYSdCI0mblWbq9zSOdIxHWDirMxWRST1HFSr7obdljKF+ExP6JV2tgXdNiNnvP8V4so75qbs
+O+wmETRIjfaAKxojAuuKHDp2KntWFhxyKrOq42ClAJ8Em+JvHhRYW6Vsi1g8w7pOOlz34ZYrPu8H
+vKTlXcxNnw3h3Kq74W4a7I/htkxNeXJdFzULHdfBR9qWJODQcqhaX2YtENwvKhOuJv4KHBnM0D4L
+nMgJLvlblnpHnOl68wVQdJVznjAJ85eCXuaPOQgeWeU1FEIT/wCc976qUM/iUUjXuG+v+E5+M5iS
+FGI6dWPPe/regjupuznixL0sAA7IF6wT700ljtizkC+p2il9Ha90OrInwMEePnWjFqmveiJdnxMa
+z6eg6+OGCtP95paV1yPIN93EfKo2rJgaErHgTuixO/XWb/Ew1wIDAQABo0IwQDAPBgNVHRMBAf8E
+BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUS8W0QGutHLOlHGVuRjaJhwUMDrYwDQYJ
+KoZIhvcNAQELBQADggIBAHNXPyzVlTJ+N9uWkusZXn5T50HsEbZH77Xe7XRcxfGOSeD8bpkTzZ+K
+2s06Ctg6Wgk/XzTQLwPSZh0avZyQN8gMjgdalEVGKua+etqhqaRpEpKwfTbURIfXUfEpY9Z1zRbk
+J4kd+MIySP3bmdCPX1R0zKxnNBFi2QwKN4fRoxdIjtIXHfbX/dtl6/2o1PXWT6RbdejF0mCy2wl+
+JYt7ulKSnj7oxXehPOBKc2thz4bcQ///If4jXSRK9dNtD2IEBVeC2m6kMyV5Sy5UGYvMLD0w6dEG
+/+gyRr61M3Z3qAFdlsHB1b6uJcDJHgoJIIihDsnzb02CVAAgp9KP5DlUFy6NHrgbuxu9mk47EDTc
+nIhT76IxW1hPkWLIwpqazRVdOKnWvvgTtZ8SafJQYqz7Fzf07rh1Z2AQ+4NQ+US1dZxAF7L+/Xld
+blhYXzD8AK6vM8EOTmy6p6ahfzLbOOCxchcKK5HsamMm7YnUeMx0HgX4a/6ManY5Ka5lIxKVCCIc
+l85bBu4M4ru8H0ST9tg4RQUh7eStqxK2A6RCLi3ECToDZ2mEmuFZkIoohdVddLHRDiBYmxOlsGOm
+7XtH/UVVMKTumtTm4ofvmMkyghEpIrwACjFeLQ/Ajulrso8uBtjRkcfGEvRM/TAXw8HaOFvjqerm
+obp573PYtlNXLfbQ4ddI
+-----END CERTIFICATE-----
+
+Buypass Class 2 Root CA
+=======================
+-----BEGIN CERTIFICATE-----
+MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
+QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X
+DTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1
+eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIw
+DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1
+g1Lr6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPVL4O2fuPn
+9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC911K2GScuVr1QGbNgGE41b
+/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHxMlAQTn/0hpPshNOOvEu/XAFOBz3cFIqU
+CqTqc/sLUegTBxj6DvEr0VQVfTzh97QZQmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeff
+awrbD02TTqigzXsu8lkBarcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgI
+zRFo1clrUs3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLiFRhn
+Bkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRSP/TizPJhk9H9Z2vX
+Uq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN9SG9dKpN6nIDSdvHXx1iY8f93ZHs
+M+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxPAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
+VR0OBBYEFMmAd+BikoL1RpzzuvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF
+AAOCAgEAU18h9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s
+A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3tOluwlN5E40EI
+osHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S
+aq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd
+DnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD
+LfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0
+oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC
+wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS
+CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN
+rJgWVqA=
+-----END CERTIFICATE-----
+
+Buypass Class 3 Root CA
+=======================
+-----BEGIN CERTIFICATE-----
+MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
+QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X
+DTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1
+eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIw
+DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRH
+sJ8YZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3EN3coTRiR
+5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9tznDDgFHmV0ST9tD+leh
+7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX0DJq1l1sDPGzbjniazEuOQAnFN44wOwZ
+ZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH
+2xc519woe2v1n/MuwU8XKhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV
+/afmiSTYzIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvSO1UQ
+RwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D34xFMFbG02SrZvPA
+Xpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgPK9Dx2hzLabjKSWJtyNBjYt1gD1iq
+j6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
+VR0OBBYEFEe4zf/lb+74suwvTg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF
+AAOCAgEAACAjQTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV
+cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXSIGrs/CIBKM+G
+uIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2HJLw5QY33KbmkJs4j1xrG0aG
+Q0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsaO5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8
+ZORK15FTAaggiG6cX0S5y2CBNOxv033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2
+KSb12tjE8nVhz36udmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz
+6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug
+UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe
+eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi
+Cp/HuZc=
+-----END CERTIFICATE-----
+
+T-TeleSec GlobalRoot Class 3
+============================
+-----BEGIN CERTIFICATE-----
+MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM
+IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU
+cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx
+MDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz
+dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD
+ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3
+DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK
+9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU
+NpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF
+iP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W
+0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA
+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr
+AyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb
+fsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT
+ucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h
+P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml
+e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw==
+-----END CERTIFICATE-----
+
+EE Certification Centre Root CA
+===============================
+-----BEGIN CERTIFICATE-----
+MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG
+EwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEoMCYGA1UEAwwfRUUgQ2Vy
+dGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIw
+MTAxMDMwMTAxMDMwWhgPMjAzMDEyMTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlB
+UyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRy
+ZSBSb290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEBAQUAA4IB
+DwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUyeuuOF0+W2Ap7kaJjbMeM
+TC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvObntl8jixwKIy72KyaOBhU8E2lf/slLo2
+rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIwWFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw
+93X2PaRka9ZP585ArQ/dMtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtN
+P2MbRMNE1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYDVR0T
+AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/zQas8fElyalL1BSZ
+MEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEF
+BQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEFBQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+Rj
+xY6hUFaTlrg4wCQiZrxTFGGVv9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqM
+lIpPnTX/dqQGE5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u
+uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU
+3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/vGVCJYMzpJJUPwssd8m92kMfM
+dcGWxZ0=
+-----END CERTIFICATE-----
+
+TURKTRUST Certificate Services Provider Root 2007
+=================================================
+-----BEGIN CERTIFICATE-----
+MIIEPTCCAyWgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvzE/MD0GA1UEAww2VMOcUktUUlVTVCBF
+bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEP
+MA0GA1UEBwwGQW5rYXJhMV4wXAYDVQQKDFVUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUg
+QmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgQXJhbMSxayAyMDA3MB4X
+DTA3MTIyNTE4MzcxOVoXDTE3MTIyMjE4MzcxOVowgb8xPzA9BgNVBAMMNlTDnFJLVFJVU1QgRWxl
+a3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTELMAkGA1UEBhMCVFIxDzAN
+BgNVBAcMBkFua2FyYTFeMFwGA1UECgxVVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp
+bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4gKGMpIEFyYWzEsWsgMjAwNzCCASIw
+DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKu3PgqMyKVYFeaK7yc9SrToJdPNM8Ig3BnuiD9N
+YvDdE3ePYakqtdTyuTFYKTsvP2qcb3N2Je40IIDu6rfwxArNK4aUyeNgsURSsloptJGXg9i3phQv
+KUmi8wUG+7RP2qFsmmaf8EMJyupyj+sA1zU511YXRxcw9L6/P8JorzZAwan0qafoEGsIiveGHtya
+KhUG9qPw9ODHFNRRf8+0222vR5YXm3dx2KdxnSQM9pQ/hTEST7ruToK4uT6PIzdezKKqdfcYbwnT
+rqdUKDT74eA7YH2gvnmJhsifLfkKS8RQouf9eRbHegsYz85M733WB2+Y8a+xwXrXgTW4qhe04MsC
+AwEAAaNCMEAwHQYDVR0OBBYEFCnFkKslrxHkYb+j/4hhkeYO/pyBMA4GA1UdDwEB/wQEAwIBBjAP
+BgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAQDdr4Ouwo0RSVgrESLFF6QSU2TJ/s
+Px+EnWVUXKgWAkD6bho3hO9ynYYKVZ1WKKxmLNA6VpM0ByWtCLCPyA8JWcqdmBzlVPi5RX9ql2+I
+aE1KBiY3iAIOtsbWcpnOa3faYjGkVh+uX4132l32iPwa2Z61gfAyuOOI0JzzaqC5mxRZNTZPz/OO
+Xl0XrRWV2N2y1RVuAE6zS89mlOTgzbUF2mNXi+WzqtvALhyQRNsaXRik7r4EW5nVcV9VZWRi1aKb
+BFmGyGJ353yCRWo9F7/snXUMrqNvWtMvmDb08PUZqxFdyKbjKlhqQgnDvZImZjINXQhVdP+MmNAK
+poRq0Tl9
+-----END CERTIFICATE-----
+
+D-TRUST Root Class 3 CA 2 2009
+==============================
+-----BEGIN CERTIFICATE-----
+MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK
+DAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTAe
+Fw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NThaME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxE
+LVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIw
+DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOAD
+ER03UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42tSHKXzlA
+BF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9RySPocq60vFYJfxLLHLGv
+KZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsMlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7z
+p+hnUquVH+BGPtikw8paxTGA6Eian5Rp/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUC
+AwEAAaOCARowggEWMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ
+4PGEMA4GA1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVjdG9y
+eS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUyMENBJTIwMiUyMDIw
+MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwQ6BBoD+G
+PWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAw
+OS5jcmwwDQYJKoZIhvcNAQELBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm
+2H6NMLVwMeniacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0
+o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV
+dT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph
+X5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I=
+-----END CERTIFICATE-----
+
+D-TRUST Root Class 3 CA 2 EV 2009
+=================================
+-----BEGIN CERTIFICATE-----
+MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK
+DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw
+OTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK
+DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw
+OTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfS
+egpnljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM03TP1YtHh
+zRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6ZqQTMFexgaDbtCHu39b+T
+7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lRp75mpoo6Kr3HGrHhFPC+Oh25z1uxav60
+sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure35
+11H3a6UCAwEAAaOCASQwggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyv
+cop9NteaHNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFwOi8v
+ZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xhc3MlMjAzJTIwQ0El
+MjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1ERT9jZXJ0aWZpY2F0ZXJldm9jYXRp
+b25saXN0MEagRKBChkBodHRwOi8vd3d3LmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xh
+c3NfM19jYV8yX2V2XzIwMDkuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+
+PPoeUSbrh/Yp3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05
+nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNFCSuGdXzfX2lX
+ANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7naxpeG0ILD5EJt/rDiZE4OJudA
+NCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv
+w9y4AyHqnxbxLFS1
+-----END CERTIFICATE-----
+
+PSCProcert
+==========
+-----BEGIN CERTIFICATE-----
+MIIJhjCCB26gAwIBAgIBCzANBgkqhkiG9w0BAQsFADCCAR4xPjA8BgNVBAMTNUF1dG9yaWRhZCBk
+ZSBDZXJ0aWZpY2FjaW9uIFJhaXogZGVsIEVzdGFkbyBWZW5lem9sYW5vMQswCQYDVQQGEwJWRTEQ
+MA4GA1UEBxMHQ2FyYWNhczEZMBcGA1UECBMQRGlzdHJpdG8gQ2FwaXRhbDE2MDQGA1UEChMtU2lz
+dGVtYSBOYWNpb25hbCBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9uaWNhMUMwQQYDVQQLEzpTdXBl
+cmludGVuZGVuY2lhIGRlIFNlcnZpY2lvcyBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9uaWNhMSUw
+IwYJKoZIhvcNAQkBFhZhY3JhaXpAc3VzY2VydGUuZ29iLnZlMB4XDTEwMTIyODE2NTEwMFoXDTIw
+MTIyNTIzNTk1OVowgdExJjAkBgkqhkiG9w0BCQEWF2NvbnRhY3RvQHByb2NlcnQubmV0LnZlMQ8w
+DQYDVQQHEwZDaGFjYW8xEDAOBgNVBAgTB01pcmFuZGExKjAoBgNVBAsTIVByb3ZlZWRvciBkZSBD
+ZXJ0aWZpY2Fkb3MgUFJPQ0VSVDE2MDQGA1UEChMtU2lzdGVtYSBOYWNpb25hbCBkZSBDZXJ0aWZp
+Y2FjaW9uIEVsZWN0cm9uaWNhMQswCQYDVQQGEwJWRTETMBEGA1UEAxMKUFNDUHJvY2VydDCCAiIw
+DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANW39KOUM6FGqVVhSQ2oh3NekS1wwQYalNo97BVC
+wfWMrmoX8Yqt/ICV6oNEolt6Vc5Pp6XVurgfoCfAUFM+jbnADrgV3NZs+J74BCXfgI8Qhd19L3uA
+3VcAZCP4bsm+lU/hdezgfl6VzbHvvnpC2Mks0+saGiKLt38GieU89RLAu9MLmV+QfI4tL3czkkoh
+RqipCKzx9hEC2ZUWno0vluYC3XXCFCpa1sl9JcLB/KpnheLsvtF8PPqv1W7/U0HU9TI4seJfxPmO
+EO8GqQKJ/+MMbpfg353bIdD0PghpbNjU5Db4g7ayNo+c7zo3Fn2/omnXO1ty0K+qP1xmk6wKImG2
+0qCZyFSTXai20b1dCl53lKItwIKOvMoDKjSuc/HUtQy9vmebVOvh+qBa7Dh+PsHMosdEMXXqP+UH
+0quhJZb25uSgXTcYOWEAM11G1ADEtMo88aKjPvM6/2kwLkDd9p+cJsmWN63nOaK/6mnbVSKVUyqU
+td+tFjiBdWbjxywbk5yqjKPK2Ww8F22c3HxT4CAnQzb5EuE8XL1mv6JpIzi4mWCZDlZTOpx+FIyw
+Bm/xhnaQr/2v/pDGj59/i5IjnOcVdo/Vi5QTcmn7K2FjiO/mpF7moxdqWEfLcU8UC17IAggmosvp
+r2uKGcfLFFb14dq12fy/czja+eevbqQ34gcnAgMBAAGjggMXMIIDEzASBgNVHRMBAf8ECDAGAQH/
+AgEBMDcGA1UdEgQwMC6CD3N1c2NlcnRlLmdvYi52ZaAbBgVghl4CAqASDBBSSUYtRy0yMDAwNDAz
+Ni0wMB0GA1UdDgQWBBRBDxk4qpl/Qguk1yeYVKIXTC1RVDCCAVAGA1UdIwSCAUcwggFDgBStuyId
+xuDSAaj9dlBSk+2YwU2u06GCASakggEiMIIBHjE+MDwGA1UEAxM1QXV0b3JpZGFkIGRlIENlcnRp
+ZmljYWNpb24gUmFpeiBkZWwgRXN0YWRvIFZlbmV6b2xhbm8xCzAJBgNVBAYTAlZFMRAwDgYDVQQH
+EwdDYXJhY2FzMRkwFwYDVQQIExBEaXN0cml0byBDYXBpdGFsMTYwNAYDVQQKEy1TaXN0ZW1hIE5h
+Y2lvbmFsIGRlIENlcnRpZmljYWNpb24gRWxlY3Ryb25pY2ExQzBBBgNVBAsTOlN1cGVyaW50ZW5k
+ZW5jaWEgZGUgU2VydmljaW9zIGRlIENlcnRpZmljYWNpb24gRWxlY3Ryb25pY2ExJTAjBgkqhkiG
+9w0BCQEWFmFjcmFpekBzdXNjZXJ0ZS5nb2IudmWCAQowDgYDVR0PAQH/BAQDAgEGME0GA1UdEQRG
+MESCDnByb2NlcnQubmV0LnZloBUGBWCGXgIBoAwMClBTQy0wMDAwMDKgGwYFYIZeAgKgEgwQUklG
+LUotMzE2MzUzNzMtNzB2BgNVHR8EbzBtMEagRKBChkBodHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52
+ZS9sY3IvQ0VSVElGSUNBRE8tUkFJWi1TSEEzODRDUkxERVIuY3JsMCOgIaAfhh1sZGFwOi8vYWNy
+YWl6LnN1c2NlcnRlLmdvYi52ZTA3BggrBgEFBQcBAQQrMCkwJwYIKwYBBQUHMAGGG2h0dHA6Ly9v
+Y3NwLnN1c2NlcnRlLmdvYi52ZTBBBgNVHSAEOjA4MDYGBmCGXgMBAjAsMCoGCCsGAQUFBwIBFh5o
+dHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52ZS9kcGMwDQYJKoZIhvcNAQELBQADggIBACtZ6yKZu4Sq
+T96QxtGGcSOeSwORR3C7wJJg7ODU523G0+1ng3dS1fLld6c2suNUvtm7CpsR72H0xpkzmfWvADmN
+g7+mvTV+LFwxNG9s2/NkAZiqlCxB3RWGymspThbASfzXg0gTB1GEMVKIu4YXx2sviiCtxQuPcD4q
+uxtxj7mkoP3YldmvWb8lK5jpY5MvYB7Eqvh39YtsL+1+LrVPQA3uvFd359m21D+VJzog1eWuq2w1
+n8GhHVnchIHuTQfiSLaeS5UtQbHh6N5+LwUeaO6/u5BlOsju6rEYNxxik6SgMexxbJHmpHmJWhSn
+FFAFTKQAVzAswbVhltw+HoSvOULP5dAssSS830DD7X9jSr3hTxJkhpXzsOfIt+FTvZLm8wyWuevo
+5pLtp4EJFAv8lXrPj9Y0TzYS3F7RNHXGRoAvlQSMx4bEqCaJqD8Zm4G7UaRKhqsLEQ+xrmNTbSjq
+3TNWOByyrYDT13K9mmyZY+gAu0F2BbdbmRiKw7gSXFbPVgx96OLP7bx0R/vu0xdOIk9W/1DzLuY5
+poLWccret9W6aAjtmcz9opLLabid+Qqkpj5PkygqYWwHJgD/ll9ohri4zspV4KuxPX+Y1zMOWj3Y
+eMLEYC/HYvBhkdI4sPaeVdtAgAUSM84dkpvRabP/v/GSCmE1P93+hvS84Bpxs2Km
+-----END CERTIFICATE-----
+
+China Internet Network Information Center EV Certificates Root
+==============================================================
+-----BEGIN CERTIFICATE-----
+MIID9zCCAt+gAwIBAgIESJ8AATANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMCQ04xMjAwBgNV
+BAoMKUNoaW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24gQ2VudGVyMUcwRQYDVQQDDD5D
+aGluYSBJbnRlcm5ldCBOZXR3b3JrIEluZm9ybWF0aW9uIENlbnRlciBFViBDZXJ0aWZpY2F0ZXMg
+Um9vdDAeFw0xMDA4MzEwNzExMjVaFw0zMDA4MzEwNzExMjVaMIGKMQswCQYDVQQGEwJDTjEyMDAG
+A1UECgwpQ2hpbmEgSW50ZXJuZXQgTmV0d29yayBJbmZvcm1hdGlvbiBDZW50ZXIxRzBFBgNVBAMM
+PkNoaW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24gQ2VudGVyIEVWIENlcnRpZmljYXRl
+cyBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm35z7r07eKpkQ0H1UN+U8i6y
+jUqORlTSIRLIOTJCBumD1Z9S7eVnAztUwYyZmczpwA//DdmEEbK40ctb3B75aDFk4Zv6dOtouSCV
+98YPjUesWgbdYavi7NifFy2cyjw1l1VxzUOFsUcW9SxTgHbP0wBkvUCZ3czY28Sf1hNfQYOL+Q2H
+klY0bBoQCxfVWhyXWIQ8hBouXJE0bhlffxdpxWXvayHG1VA6v2G5BY3vbzQ6sm8UY78WO5upKv23
+KzhmBsUs4qpnHkWnjQRmQvaPK++IIGmPMowUc9orhpFjIpryp9vOiYurXccUwVswah+xt54ugQEC
+7c+WXmPbqOY4twIDAQABo2MwYTAfBgNVHSMEGDAWgBR8cks5x8DbYqVPm6oYNJKiyoOCWTAPBgNV
+HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUfHJLOcfA22KlT5uqGDSSosqD
+glkwDQYJKoZIhvcNAQEFBQADggEBACrDx0M3j92tpLIM7twUbY8opJhJywyA6vPtI2Z1fcXTIWd5
+0XPFtQO3WKwMVC/GVhMPMdoG52U7HW8228gd+f2ABsqjPWYWqJ1MFn3AlUa1UeTiH9fqBk1jjZaM
+7+czV0I664zBechNdn3e9rG3geCg+aF4RhcaVpjwTj2rHO3sOdwHSPdj/gauwqRcalsyiMXHM4Ws
+ZkJHwlgkmeHlPuV1LI5D1l08eB6olYIpUNHRFrrvwb562bTYzB5MRuF3sTGrvSrIzo9uoV1/A3U0
+5K2JRVRevq4opbs/eHnrc7MKDf2+yfdWrPa37S+bISnHOLaVxATywy39FCqQmbkHzJ8=
+-----END CERTIFICATE-----
+
+Swisscom Root CA 2
+==================
+-----BEGIN CERTIFICATE-----
+MIIF2TCCA8GgAwIBAgIQHp4o6Ejy5e/DfEoeWhhntjANBgkqhkiG9w0BAQsFADBkMQswCQYDVQQG
+EwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0YWwgQ2VydGlmaWNhdGUgU2Vy
+dmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3QgQ0EgMjAeFw0xMTA2MjQwODM4MTRaFw0zMTA2
+MjUwNzM4MTRaMGQxCzAJBgNVBAYTAmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGln
+aXRhbCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAyMIIC
+IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAlUJOhJ1R5tMJ6HJaI2nbeHCOFvErjw0DzpPM
+LgAIe6szjPTpQOYXTKueuEcUMncy3SgM3hhLX3af+Dk7/E6J2HzFZ++r0rk0X2s682Q2zsKwzxNo
+ysjL67XiPS4h3+os1OD5cJZM/2pYmLcX5BtS5X4HAB1f2uY+lQS3aYg5oUFgJWFLlTloYhyxCwWJ
+wDaCFCE/rtuh/bxvHGCGtlOUSbkrRsVPACu/obvLP+DHVxxX6NZp+MEkUp2IVd3Chy50I9AU/SpH
+Wrumnf2U5NGKpV+GY3aFy6//SSj8gO1MedK75MDvAe5QQQg1I3ArqRa0jG6F6bYRzzHdUyYb3y1a
+SgJA/MTAtukxGggo5WDDH8SQjhBiYEQN7Aq+VRhxLKX0srwVYv8c474d2h5Xszx+zYIdkeNL6yxS
+NLCK/RJOlrDrcH+eOfdmQrGrrFLadkBXeyq96G4DsguAhYidDMfCd7Camlf0uPoTXGiTOmekl9Ab
+mbeGMktg2M7v0Ax/lZ9vh0+Hio5fCHyqW/xavqGRn1V9TrALacywlKinh/LTSlDcX3KwFnUey7QY
+Ypqwpzmqm59m2I2mbJYV4+by+PGDYmy7Velhk6M99bFXi08jsJvllGov34zflVEpYKELKeRcVVi3
+qPyZ7iVNTA6z00yPhOgpD/0QVAKFyPnlw4vP5w8CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYw
+HQYDVR0hBBYwFDASBgdghXQBUwIBBgdghXQBUwIBMBIGA1UdEwEB/wQIMAYBAf8CAQcwHQYDVR0O
+BBYEFE0mICKJS9PVpAqhb97iEoHF8TwuMB8GA1UdIwQYMBaAFE0mICKJS9PVpAqhb97iEoHF8Twu
+MA0GCSqGSIb3DQEBCwUAA4ICAQAyCrKkG8t9voJXiblqf/P0wS4RfbgZPnm3qKhyN2abGu2sEzsO
+v2LwnN+ee6FTSA5BesogpxcbtnjsQJHzQq0Qw1zv/2BZf82Fo4s9SBwlAjxnffUy6S8w5X2lejjQ
+82YqZh6NM4OKb3xuqFp1mrjX2lhIREeoTPpMSQpKwhI3qEAMw8jh0FcNlzKVxzqfl9NX+Ave5XLz
+o9v/tdhZsnPdTSpxsrpJ9csc1fV5yJmz/MFMdOO0vSk3FQQoHt5FRnDsr7p4DooqzgB53MBfGWcs
+a0vvaGgLQ+OswWIJ76bdZWGgr4RVSJFSHMYlkSrQwSIjYVmvRRGFHQEkNI/Ps/8XciATwoCqISxx
+OQ7Qj1zB09GOInJGTB2Wrk9xseEFKZZZ9LuedT3PDTcNYtsmjGOpI99nBjx8Oto0QuFmtEYE3saW
+mA9LSHokMnWRn6z3aOkquVVlzl1h0ydw2Df+n7mvoC5Wt6NlUe07qxS/TFED6F+KBZvuim6c779o
++sjaC+NCydAXFJy3SuCvkychVSa1ZC+N8f+mQAWFBVzKBxlcCxMoTFh/wqXvRdpg065lYZ1Tg3TC
+rvJcwhbtkj6EPnNgiLx29CzP0H1907he0ZESEOnN3col49XtmS++dYFLJPlFRpTJKSFTnCZFqhMX
+5OfNeOI5wSsSnqaeG8XmDtkx2Q==
+-----END CERTIFICATE-----
+
+Swisscom Root EV CA 2
+=====================
+-----BEGIN CERTIFICATE-----
+MIIF4DCCA8igAwIBAgIRAPL6ZOJ0Y9ON/RAdBB92ylgwDQYJKoZIhvcNAQELBQAwZzELMAkGA1UE
+BhMCY2gxETAPBgNVBAoTCFN3aXNzY29tMSUwIwYDVQQLExxEaWdpdGFsIENlcnRpZmljYXRlIFNl
+cnZpY2VzMR4wHAYDVQQDExVTd2lzc2NvbSBSb290IEVWIENBIDIwHhcNMTEwNjI0MDk0NTA4WhcN
+MzEwNjI1MDg0NTA4WjBnMQswCQYDVQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsT
+HERpZ2l0YWwgQ2VydGlmaWNhdGUgU2VydmljZXMxHjAcBgNVBAMTFVN3aXNzY29tIFJvb3QgRVYg
+Q0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMT3HS9X6lds93BdY7BxUglgRCgz
+o3pOCvrY6myLURYaVa5UJsTMRQdBTxB5f3HSek4/OE6zAMaVylvNwSqD1ycfMQ4jFrclyxy0uYAy
+Xhqdk/HoPGAsp15XGVhRXrwsVgu42O+LgrQ8uMIkqBPHoCE2G3pXKSinLr9xJZDzRINpUKTk4Rti
+GZQJo/PDvO/0vezbE53PnUgJUmfANykRHvvSEaeFGHR55E+FFOtSN+KxRdjMDUN/rhPSays/p8Li
+qG12W0OfvrSdsyaGOx9/5fLoZigWJdBLlzin5M8J0TbDC77aO0RYjb7xnglrPvMyxyuHxuxenPaH
+Za0zKcQvidm5y8kDnftslFGXEBuGCxobP/YCfnvUxVFkKJ3106yDgYjTdLRZncHrYTNaRdHLOdAG
+alNgHa/2+2m8atwBz735j9m9W8E6X47aD0upm50qKGsaCnw8qyIL5XctcfaCNYGu+HuB5ur+rPQa
+m3Rc6I8k9l2dRsQs0h4rIWqDJ2dVSqTjyDKXZpBy2uPUZC5f46Fq9mDU5zXNysRojddxyNMkM3Ox
+bPlq4SjbX8Y96L5V5jcb7STZDxmPX2MYWFCBUWVv8p9+agTnNCRxunZLWB4ZvRVgRaoMEkABnRDi
+xzgHcgplwLa7JSnaFp6LNYth7eVxV4O1PHGf40+/fh6Bn0GXAgMBAAGjgYYwgYMwDgYDVR0PAQH/
+BAQDAgGGMB0GA1UdIQQWMBQwEgYHYIV0AVMCAgYHYIV0AVMCAjASBgNVHRMBAf8ECDAGAQH/AgED
+MB0GA1UdDgQWBBRF2aWBbj2ITY1x0kbBbkUe88SAnTAfBgNVHSMEGDAWgBRF2aWBbj2ITY1x0kbB
+bkUe88SAnTANBgkqhkiG9w0BAQsFAAOCAgEAlDpzBp9SSzBc1P6xXCX5145v9Ydkn+0UjrgEjihL
+j6p7jjm02Vj2e6E1CqGdivdj5eu9OYLU43otb98TPLr+flaYC/NUn81ETm484T4VvwYmneTwkLbU
+wp4wLh/vx3rEUMfqe9pQy3omywC0Wqu1kx+AiYQElY2NfwmTv9SoqORjbdlk5LgpWgi/UOGED1V7
+XwgiG/W9mR4U9s70WBCCswo9GcG/W6uqmdjyMb3lOGbcWAXH7WMaLgqXfIeTK7KK4/HsGOV1timH
+59yLGn602MnTihdsfSlEvoqq9X46Lmgxk7lq2prg2+kupYTNHAq4Sgj5nPFhJpiTt3tm7JFe3VE/
+23MPrQRYCd0EApUKPtN236YQHoA96M2kZNEzx5LH4k5E4wnJTsJdhw4Snr8PyQUQ3nqjsTzyP6Wq
+J3mtMX0f/fwZacXduT98zca0wjAefm6S139hdlqP65VNvBFuIXxZN5nQBrz5Bm0yFqXZaajh3DyA
+HmBR3NdUIR7KYndP+tiPsys6DXhyyWhBWkdKwqPrGtcKqzwyVcgKEZzfdNbwQBUdyLmPtTbFr/gi
+uMod89a2GQ+fYWVq6nTIfI/DT11lgh/ZDYnadXL77/FHZxOzyNEZiCcmmpl5fx7kLD977vHeTYuW
+l8PVP3wbI+2ksx0WckNLIOFZfsLorSa/ovc=
+-----END CERTIFICATE-----
+
+CA Disig Root R1
+================
+-----BEGIN CERTIFICATE-----
+MIIFaTCCA1GgAwIBAgIJAMMDmu5QkG4oMA0GCSqGSIb3DQEBBQUAMFIxCzAJBgNVBAYTAlNLMRMw
+EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp
+ZyBSb290IFIxMB4XDTEyMDcxOTA5MDY1NloXDTQyMDcxOTA5MDY1NlowUjELMAkGA1UEBhMCU0sx
+EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp
+c2lnIFJvb3QgUjEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCqw3j33Jijp1pedxiy
+3QRkD2P9m5YJgNXoqqXinCaUOuiZc4yd39ffg/N4T0Dhf9Kn0uXKE5Pn7cZ3Xza1lK/oOI7bm+V8
+u8yN63Vz4STN5qctGS7Y1oprFOsIYgrY3LMATcMjfF9DCCMyEtztDK3AfQ+lekLZWnDZv6fXARz2
+m6uOt0qGeKAeVjGu74IKgEH3G8muqzIm1Cxr7X1r5OJeIgpFy4QxTaz+29FHuvlglzmxZcfe+5nk
+CiKxLU3lSCZpq+Kq8/v8kiky6bM+TR8noc2OuRf7JT7JbvN32g0S9l3HuzYQ1VTW8+DiR0jm3hTa
+YVKvJrT1cU/J19IG32PK/yHoWQbgCNWEFVP3Q+V8xaCJmGtzxmjOZd69fwX3se72V6FglcXM6pM6
+vpmumwKjrckWtc7dXpl4fho5frLABaTAgqWjR56M6ly2vGfb5ipN0gTco65F97yLnByn1tUD3AjL
+LhbKXEAz6GfDLuemROoRRRw1ZS0eRWEkG4IupZ0zXWX4Qfkuy5Q/H6MMMSRE7cderVC6xkGbrPAX
+ZcD4XW9boAo0PO7X6oifmPmvTiT6l7Jkdtqr9O3jw2Dv1fkCyC2fg69naQanMVXVz0tv/wQFx1is
+XxYb5dKj6zHbHzMVTdDypVP1y+E9Tmgt2BLdqvLmTZtJ5cUoobqwWsagtQIDAQABo0IwQDAPBgNV
+HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUiQq0OJMa5qvum5EY+fU8PjXQ
+04IwDQYJKoZIhvcNAQEFBQADggIBADKL9p1Kyb4U5YysOMo6CdQbzoaz3evUuii+Eq5FLAR0rBNR
+xVgYZk2C2tXck8An4b58n1KeElb21Zyp9HWc+jcSjxyT7Ff+Bw+r1RL3D65hXlaASfX8MPWbTx9B
+LxyE04nH4toCdu0Jz2zBuByDHBb6lM19oMgY0sidbvW9adRtPTXoHqJPYNcHKfyyo6SdbhWSVhlM
+CrDpfNIZTUJG7L399ldb3Zh+pE3McgODWF3vkzpBemOqfDqo9ayk0d2iLbYq/J8BjuIQscTK5Gfb
+VSUZP/3oNn6z4eGBrxEWi1CXYBmCAMBrTXO40RMHPuq2MU/wQppt4hF05ZSsjYSVPCGvxdpHyN85
+YmLLW1AL14FABZyb7bq2ix4Eb5YgOe2kfSnbSM6C3NQCjR0EMVrHS/BsYVLXtFHCgWzN4funodKS
+ds+xDzdYpPJScWc/DIh4gInByLUfkmO+p3qKViwaqKactV2zY9ATIKHrkWzQjX2v3wvkF7mGnjix
+lAxYjOBVqjtjbZqJYLhkKpLGN/R+Q0O3c+gB53+XD9fyexn9GtePyfqFa3qdnom2piiZk4hA9z7N
+UaPK6u95RyG1/jLix8NRb76AdPCkwzryT+lf3xkK8jsTQ6wxpLPn6/wY1gGp8yqPNg7rtLG8t0zJ
+a7+h89n07eLw4+1knj0vllJPgFOL
+-----END CERTIFICATE-----
+
+CA Disig Root R2
+================
+-----BEGIN CERTIFICATE-----
+MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAlNLMRMw
+EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp
+ZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQyMDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sx
+EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp
+c2lnIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbC
+w3OeNcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNHPWSb6Wia
+xswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3Ix2ymrdMxp7zo5eFm1tL7
+A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbeQTg06ov80egEFGEtQX6sx3dOy1FU+16S
+GBsEWmjGycT6txOgmLcRK7fWV8x8nhfRyyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqV
+g8NTEQxzHQuyRpDRQjrOQG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa
+5Beny912H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJQfYE
+koopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUDi/ZnWejBBhG93c+A
+Ak9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORsnLMOPReisjQS1n6yqEm70XooQL6i
+Fh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNV
+HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5u
+Qu0wDQYJKoZIhvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM
+tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqfGopTpti72TVV
+sRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkblvdhuDvEK7Z4bLQjb/D907Je
+dR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W8
+1k/BfDxujRNt+3vrMNDcTa/F1balTFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjx
+mHHEt38OFdAlab0inSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01
+utI3gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18DrG5gPcFw0
+sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3OszMOl6W8KjptlwlCFtaOg
+UxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8xL4ysEr3vQCj8KWefshNPZiTEUxnpHikV
+7+ZtsH8tZ/3zbBt1RqPlShfppNcL
+-----END CERTIFICATE-----
+
+ACCVRAIZ1
+=========
+-----BEGIN CERTIFICATE-----
+MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UEAwwJQUNDVlJB
+SVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQswCQYDVQQGEwJFUzAeFw0xMTA1
+MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQBgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwH
+UEtJQUNDVjENMAsGA1UECgwEQUNDVjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4IC
+DwAwggIKAoICAQCbqau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gM
+jmoYHtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWoG2ioPej0
+RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpAlHPrzg5XPAOBOp0KoVdD
+aaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhrIA8wKFSVf+DuzgpmndFALW4ir50awQUZ
+0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDG
+WuzndN9wrqODJerWx5eHk6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs7
+8yM2x/474KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMOm3WR
+5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpacXpkatcnYGMN285J
+9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPluUsXQA+xtrn13k/c4LOsOxFwYIRK
+Q26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYIKwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRw
+Oi8vd3d3LmFjY3YuZXMvZmlsZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEu
+Y3J0MB8GCCsGAQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2
+VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeTVfZW6oHlNsyM
+Hj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIGCCsGAQUFBwICMIIBFB6CARAA
+QQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUAcgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBh
+AO0AegAgAGQAZQAgAGwAYQAgAEEAQwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUA
+YwBuAG8AbABvAGcA7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBj
+AHQAcgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAAQwBQAFMA
+IABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUAczAwBggrBgEFBQcCARYk
+aHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2MuaHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0
+dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRtaW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2
+MV9kZXIuY3JsMA4GA1UdDwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZI
+hvcNAQEFBQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdpD70E
+R9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gUJyCpZET/LtZ1qmxN
+YEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+mAM/EKXMRNt6GGT6d7hmKG9Ww7Y49
+nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepDvV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJ
+TS+xJlsndQAJxGJ3KQhfnlmstn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3
+sCPdK6jT2iWH7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h
+I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szAh1xA2syVP1Xg
+Nce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xFd3+YJ5oyXSrjhO7FmGYvliAd
+3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2HpPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3p
+EfbRD0tVNEYqi4Y7
+-----END CERTIFICATE-----
+
+TWCA Global Root CA
+===================
+-----BEGIN CERTIFICATE-----
+MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcxEjAQBgNVBAoT
+CVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMTVFdDQSBHbG9iYWwgUm9vdCBD
+QTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQK
+EwlUQUlXQU4tQ0ExEDAOBgNVBAsTB1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3Qg
+Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2C
+nJfF10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz0ALfUPZV
+r2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfChMBwqoJimFb3u/Rk28OKR
+Q4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbHzIh1HrtsBv+baz4X7GGqcXzGHaL3SekV
+tTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1W
+KKD+u4ZqyPpcC1jcxkt2yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99
+sy2sbZCilaLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYPoA/p
+yJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQABDzfuBSO6N+pjWxn
+kjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcEqYSjMq+u7msXi7Kx/mzhkIyIqJdI
+zshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMC
+AQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6g
+cFGn90xHNcgL1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn
+LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WFH6vPNOw/KP4M
+8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNoRI2T9GRwoD2dKAXDOXC4Ynsg
+/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlg
+lPx4mI88k1HtQJAH32RjJMtOcQWh15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryP
+A9gK8kxkRr05YuWW6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3m
+i4TWnsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5jwa19hAM8
+EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWzaGHQRiapIVJpLesux+t3
+zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmyKwbQBM0=
+-----END CERTIFICATE-----
+
+TeliaSonera Root CA v1
+======================
+-----BEGIN CERTIFICATE-----
+MIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAwNzEUMBIGA1UE
+CgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJvb3QgQ0EgdjEwHhcNMDcxMDE4
+MTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwW
+VGVsaWFTb25lcmEgUm9vdCBDQSB2MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+
+6yfwIaPzaSZVfp3FVRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA
+3GV17CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+XZ75Ljo1k
+B1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+/jXh7VB7qTCNGdMJjmhn
+Xb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxH
+oLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkmdtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3
+F0fUTPHSiXk+TT2YqGHeOh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJ
+oWjiUIMusDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4pgd7
+gUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fsslESl1MpWtTwEhDc
+TwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQarMCpgKIv7NHfirZ1fpoeDVNAgMB
+AAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qW
+DNXr+nuqF+gTEjANBgkqhkiG9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNm
+zqjMDfz1mgbldxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx
+0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1TjTQpgcmLNkQfW
+pb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBedY2gea+zDTYa4EzAvXUYNR0PV
+G6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpc
+c41teyWRyu5FrgZLAMzTsVlQ2jqIOylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOT
+JsjrDNYmiLbAJM+7vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2
+qReWt88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcnHL/EVlP6
+Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems
+WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY=
+-----END CERTIFICATE-----
+
+E-Tugra Certification Authority
+===============================
+-----BEGIN CERTIFICATE-----
+MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w
+DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls
+ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN
+ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMw
+NTEyMDk0OFoXDTIzMDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmEx
+QDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxl
+cmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQD
+DB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
+MIICCgKCAgEA4vU/kwVRHoViVF56C/UYB4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vd
+hQd2h8y/L5VMzH2nPbxHD5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5K
+CKpbknSFQ9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEoq1+g
+ElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3Dk14opz8n8Y4e0ypQ
+BaNV2cvnOVPAmJ6MVGKLJrD3fY185MaeZkJVgkfnsliNZvcHfC425lAcP9tDJMW/hkd5s3kc91r0
+E+xs+D/iWR+V7kI+ua2oMoVJl0b+SzGPWsutdEcf6ZG33ygEIqDUD13ieU/qbIWGvaimzuT6w+Gz
+rt48Ue7LE3wBf4QOXVGUnhMMti6lTPk5cDZvlsouDERVxcr6XQKj39ZkjFqzAQqptQpHF//vkUAq
+jqFGOjGY5RH8zLtJVor8udBhmm9lbObDyz51Sf6Pp+KJxWfXnUYTTjF2OySznhFlhqt/7x3U+Lzn
+rFpct1pHXFXOVbQicVtbC/DP3KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUXU8u3Zg5mTPj5
+dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6Jyr+zE7S6E5UMA8GA1UdEwEB
+/wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEG
+MA0GCSqGSIb3DQEBCwUAA4ICAQAFNzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAK
+kEh47U6YA5n+KGCRHTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jO
+XKqYGwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c77NCR807
+VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3+GbHeJAAFS6LrVE1Uweo
+a2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WKvJUawSg5TB9D0pH0clmKuVb8P7Sd2nCc
+dlqMQ1DujjByTd//SffGqWfZbawCEeI6FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEV
+KV0jq9BgoRJP3vQXzTLlyb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gT
+Dx4JnW2PAJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpDy4Q0
+8ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8dNL/+I5c30jn6PQ0G
+C7TbO6Orb1wdtn7os4I07QZcJA==
+-----END CERTIFICATE-----
+
+T-TeleSec GlobalRoot Class 2
+============================
+-----BEGIN CERTIFICATE-----
+MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM
+IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU
+cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgx
+MDAxMTA0MDE0WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz
+dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD
+ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0GCSqGSIb3
+DQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUdAqSzm1nzHoqvNK38DcLZ
+SBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiCFoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/F
+vudocP05l03Sx5iRUKrERLMjfTlH6VJi1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx970
+2cu+fjOlbpSD8DT6IavqjnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGV
+WOHAD3bZwI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGjQjBA
+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/WSA2AHmgoCJrjNXy
+YdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhyNsZt+U2e+iKo4YFWz827n+qrkRk4
+r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPACuvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNf
+vNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR
+3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN
+9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg==
+-----END CERTIFICATE-----
+
+Atos TrustedRoot 2011
+=====================
+-----BEGIN CERTIFICATE-----
+MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU
+cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4
+MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG
+A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV
+hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr
+54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+
+DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320
+HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR
+z3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R
+l+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ
+bNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB
+CwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8jvZfza1zv7v1Apt+h
+k6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kPDpFrdRbhIfzYJsdHt6bPWHJxfrrh
+TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9
+61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G
+3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 1 G3
+=====================
+-----BEGIN CERTIFICATE-----
+MIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQELBQAwSDELMAkG
+A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv
+b3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJN
+MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEg
+RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakE
+PBtVwedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWerNrwU8lm
+PNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF34168Xfuw6cwI2H44g4hWf6
+Pser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh4Pw5qlPafX7PGglTvF0FBM+hSo+LdoIN
+ofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXpUhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/l
+g6AnhF4EwfWQvTA9xO+oabw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV
+7qJZjqlc3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/GKubX
+9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSthfbZxbGL0eUQMk1f
+iyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KOTk0k+17kBL5yG6YnLUlamXrXXAkg
+t3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOtzCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZI
+hvcNAQELBQADggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOC
+MTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2cDMT/uFPpiN3
+GPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUNqXsCHKnQO18LwIE6PWThv6ct
+Tr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP
++V04ikkwj+3x6xn0dxoxGE1nVGwvb2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh
+3jRJjehZrJ3ydlo28hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fa
+wx/kNSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNjZgKAvQU6
+O0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0
+FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOV
+hMJKzRwuJIczYOXD
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 2 G3
+=====================
+-----BEGIN CERTIFICATE-----
+MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkG
+A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv
+b3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJN
+MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIg
+RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFh
+ZiFfqq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduY
+NM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ymc5GQYaYDFCDy54ejiK2t
+oIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+o
+MiwMzAkd056OXbxMmO7FGmh77FOm6RQ1o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+l
+V0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZo
+L1NesNKqIcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQ
+sSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43ehvNURG3YBZwjgQQvD
+6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxh
+lRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALGcC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZI
+hvcNAQELBQADggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66
+AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RCroijQ1h5fq7K
+pVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9
+x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4nlv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgz
+dWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6X
+U/IyAgkwo1jwDQHVcsaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+Nw
+mNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNgKCLjsZWD
+zYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKN
+JeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4WSr2Rz0ZiC3oheGe7IUIarFsNMkd7Egr
+O3jtZsSOeWmD3n+M
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 3 G3
+=====================
+-----BEGIN CERTIFICATE-----
+MIIFYDCCA0igAwIBAgIULvWbAiin23r/1aOp7r0DoM8Sah0wDQYJKoZIhvcNAQELBQAwSDELMAkG
+A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv
+b3QgQ0EgMyBHMzAeFw0xMjAxMTIyMDI2MzJaFw00MjAxMTIyMDI2MzJaMEgxCzAJBgNVBAYTAkJN
+MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDMg
+RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCzyw4QZ47qFJenMioKVjZ/aEzHs286
+IxSR/xl/pcqs7rN2nXrpixurazHb+gtTTK/FpRp5PIpM/6zfJd5O2YIyC0TeytuMrKNuFoM7pmRL
+Mon7FhY4futD4tN0SsJiCnMK3UmzV9KwCoWdcTzeo8vAMvMBOSBDGzXRU7Ox7sWTaYI+FrUoRqHe
+6okJ7UO4BUaKhvVZR74bbwEhELn9qdIoyhA5CcoTNs+cra1AdHkrAj80//ogaX3T7mH1urPnMNA3
+I4ZyYUUpSFlob3emLoG+B01vr87ERRORFHAGjx+f+IdpsQ7vw4kZ6+ocYfx6bIrc1gMLnia6Et3U
+VDmrJqMz6nWB2i3ND0/kA9HvFZcba5DFApCTZgIhsUfei5pKgLlVj7WiL8DWM2fafsSntARE60f7
+5li59wzweyuxwHApw0BiLTtIadwjPEjrewl5qW3aqDCYz4ByA4imW0aucnl8CAMhZa634RylsSqi
+Md5mBPfAdOhx3v89WcyWJhKLhZVXGqtrdQtEPREoPHtht+KPZ0/l7DxMYIBpVzgeAVuNVejH38DM
+dyM0SXV89pgR6y3e7UEuFAUCf+D+IOs15xGsIs5XPd7JMG0QA4XN8f+MFrXBsj6IbGB/kE+V9/Yt
+rQE5BwT6dYB9v0lQ7e/JxHwc64B+27bQ3RP+ydOc17KXqQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZI
+hvcNAQELBQADggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px
+KGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnIFUBhynLWcKzS
+t/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5WvvoxXqA/4Ti2Tk08HS6IT7SdEQ
+TXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFgu/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9Du
+DcpmvJRPpq3t/O5jrFc/ZSXPsoaP0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGib
+Ih6BJpsQBJFxwAYf3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmD
+hPbl8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+DhcI00iX
+0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW
+dSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2
+PpxxVJkES/1Y+Zj0
+-----END CERTIFICATE-----
+
+DigiCert Assured ID Root G2
+===========================
+-----BEGIN CERTIFICATE-----
+MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw
+IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw
+MTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL
+ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH
+35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq
+bFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw
+VWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP
+YLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn
+lTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTO
+w0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPIQW5pJ6d1Ee88hjZv
+0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I0jJmwYrA8y8678Dj1JGG0VDjA9tz
+d29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4GnilmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAW
+hsI6yLETcDbYz+70CjTVW0z9B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0M
+jomZmWzwPDCvON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo
+IhNzbM8m9Yop5w==
+-----END CERTIFICATE-----
+
+DigiCert Assured ID Root G3
+===========================
+-----BEGIN CERTIFICATE-----
+MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV
+UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYD
+VQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1
+MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
+d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQ
+BgcqhkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJfZn4f5dwb
+RXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17QRSAPWXYQ1qAk8C3eNvJs
+KTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgF
+UaFNN6KDec6NHSrkhDAKBggqhkjOPQQDAwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5Fy
+YZ5eEJJZVrmDxxDnOOlYJjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy
+1vUhZscv6pZjamVFkpUBtA==
+-----END CERTIFICATE-----
+
+DigiCert Global Root G2
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw
+HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx
+MjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3
+dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ
+kTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO
+3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV
+BJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM
+UNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB
+o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu
+5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr
+F9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U
+WTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH
+QRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/
+iyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl
+MrY=
+-----END CERTIFICATE-----
+
+DigiCert Global Root G3
+=======================
+-----BEGIN CERTIFICATE-----
+MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV
+UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD
+VQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw
+MDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k
+aWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C
+AQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O
+YwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP
+BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp
+Yim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y
+3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34
+VOKa5Vt8sycX
+-----END CERTIFICATE-----
+
+DigiCert Trusted Root G4
+========================
+-----BEGIN CERTIFICATE-----
+MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEw
+HwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1
+MTIwMDAwWjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
+d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0G
+CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEp
+pz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllVcq9o
+k3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT+CFhmzTrBcZe7Fsa
+vOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGY
+QJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6
+MUSaM0C/CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtm
+mnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7
+f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJUKSWJbOUOUlFH
+dL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8
+oR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
+DwEB/wQEAwIBhjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD
+ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2SV1EY+CtnJYY
+ZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd+SeuMIW59mdNOj6PWTkiU0Tr
+yF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWcfFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy
+7zBZLq7gcfJW5GqXb5JQbZaNaHqasjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iah
+ixTXTBmyUEFxPT9NcCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN
+5r5N0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie4u1Ki7wb
+/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mIr/OSmbaz5mEP0oUA51Aa
+5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tK
+G48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP
+82Z+
+-----END CERTIFICATE-----
+
+WoSign
+======
+-----BEGIN CERTIFICATE-----
+MIIFdjCCA16gAwIBAgIQXmjWEXGUY1BWAGjzPsnFkTANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQG
+EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxKjAoBgNVBAMTIUNlcnRpZmljYXRpb24g
+QXV0aG9yaXR5IG9mIFdvU2lnbjAeFw0wOTA4MDgwMTAwMDFaFw0zOTA4MDgwMTAwMDFaMFUxCzAJ
+BgNVBAYTAkNOMRowGAYDVQQKExFXb1NpZ24gQ0EgTGltaXRlZDEqMCgGA1UEAxMhQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkgb2YgV29TaWduMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
+vcqNrLiRFVaXe2tcesLea9mhsMMQI/qnobLMMfo+2aYpbxY94Gv4uEBf2zmoAHqLoE1UfcIiePyO
+CbiohdfMlZdLdNiefvAA5A6JrkkoRBoQmTIPJYhTpA2zDxIIFgsDcSccf+Hb0v1naMQFXQoOXXDX
+2JegvFNBmpGN9J42Znp+VsGQX+axaCA2pIwkLCxHC1l2ZjC1vt7tj/id07sBMOby8w7gLJKA84X5
+KIq0VC6a7fd2/BVoFutKbOsuEo/Uz/4Mx1wdC34FMr5esAkqQtXJTpCzWQ27en7N1QhatH/YHGkR
++ScPewavVIMYe+HdVHpRaG53/Ma/UkpmRqGyZxq7o093oL5d//xWC0Nyd5DKnvnyOfUNqfTq1+ez
+EC8wQjchzDBwyYaYD8xYTYO7feUapTeNtqwylwA6Y3EkHp43xP901DfA4v6IRmAR3Qg/UDaruHqk
+lWJqbrDKaiFaafPz+x1wOZXzp26mgYmhiMU7ccqjUu6Du/2gd/Tkb+dC221KmYo0SLwX3OSACCK2
+8jHAPwQ+658geda4BmRkAjHXqc1S+4RFaQkAKtxVi8QGRkvASh0JWzko/amrzgD5LkhLJuYwTKVY
+yrREgk/nkR4zw7CT/xH8gdLKH3Ep3XZPkiWvHYG3Dy+MwwbMLyejSuQOmbp8HkUff6oZRZb9/D0C
+AwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOFmzw7R
+8bNLtwYgFP6HEtX2/vs+MA0GCSqGSIb3DQEBBQUAA4ICAQCoy3JAsnbBfnv8rWTjMnvMPLZdRtP1
+LOJwXcgu2AZ9mNELIaCJWSQBnfmvCX0KI4I01fx8cpm5o9dU9OpScA7F9dY74ToJMuYhOZO9sxXq
+T2r09Ys/L3yNWC7F4TmgPsc9SnOeQHrAK2GpZ8nzJLmzbVUsWh2eJXLOC62qx1ViC777Y7NhRCOj
+y+EaDveaBk3e1CNOIZZbOVtXHS9dCF4Jef98l7VNg64N1uajeeAz0JmWAjCnPv/So0M/BVoG6kQC
+2nz4SNAzqfkHx5Xh9T71XXG68pWpdIhhWeO/yloTunK0jF02h+mmxTwTv97QRCbut+wucPrXnbes
+5cVAWubXbHssw1abR80LzvobtCHXt2a49CUwi1wNuepnsvRtrtWhnk/Yn+knArAdBtaP4/tIEp9/
+EaEQPkxROpaw0RPxx9gmrjrKkcRpnd8BKWRRb2jaFOwIQZeQjdCygPLPwj2/kWjFgGcexGATVdVh
+mVd8upUPYUk6ynW8yQqTP2cOEvIo4jEbwFcW3wh8GcF+Dx+FHgo2fFt+J7x6v+Db9NpSvd4MVHAx
+kUOVyLzwPt0JfjBkUO1/AaQzZ01oT74V77D2AhGiGxMlOtzCWfHjXEa7ZywCRuoeSKbmW9m1vFGi
+kpbbqsY3Iqb+zCB0oy2pLmvLwIIRIbWTee5Ehr7XHuQe+w==
+-----END CERTIFICATE-----
+
+WoSign China
+============
+-----BEGIN CERTIFICATE-----
+MIIFWDCCA0CgAwIBAgIQUHBrzdgT/BtOOzNy0hFIjTANBgkqhkiG9w0BAQsFADBGMQswCQYDVQQG
+EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxGzAZBgNVBAMMEkNBIOayg+mAmuagueiv
+geS5pjAeFw0wOTA4MDgwMTAwMDFaFw0zOTA4MDgwMTAwMDFaMEYxCzAJBgNVBAYTAkNOMRowGAYD
+VQQKExFXb1NpZ24gQ0EgTGltaXRlZDEbMBkGA1UEAwwSQ0Eg5rKD6YCa5qC56K+B5LmmMIICIjAN
+BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0EkhHiX8h8EqwqzbdoYGTufQdDTc7WU1/FDWiD+k
+8H/rD195L4mx/bxjWDeTmzj4t1up+thxx7S8gJeNbEvxUNUqKaqoGXqW5pWOdO2XCld19AXbbQs5
+uQF/qvbW2mzmBeCkTVL829B0txGMe41P/4eDrv8FAxNXUDf+jJZSEExfv5RxadmWPgxDT74wwJ85
+dE8GRV2j1lY5aAfMh09Qd5Nx2UQIsYo06Yms25tO4dnkUkWMLhQfkWsZHWgpLFbE4h4TV2TwYeO5
+Ed+w4VegG63XX9Gv2ystP9Bojg/qnw+LNVgbExz03jWhCl3W6t8Sb8D7aQdGctyB9gQjF+BNdeFy
+b7Ao65vh4YOhn0pdr8yb+gIgthhid5E7o9Vlrdx8kHccREGkSovrlXLp9glk3Kgtn3R46MGiCWOc
+76DbT52VqyBPt7D3h1ymoOQ3OMdc4zUPLK2jgKLsLl3Az+2LBcLmc272idX10kaO6m1jGx6KyX2m
++Jzr5dVjhU1zZmkR/sgO9MHHZklTfuQZa/HpelmjbX7FF+Ynxu8b22/8DU0GAbQOXDBGVWCvOGU6
+yke6rCzMRh+yRpY/8+0mBe53oWprfi1tWFxK1I5nuPHa1UaKJ/kR8slC/k7e3x9cxKSGhxYzoacX
+GKUN5AXlK8IrC6KVkLn9YDxOiT7nnO4fuwECAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1Ud
+EwEB/wQFMAMBAf8wHQYDVR0OBBYEFOBNv9ybQV0T6GTwp+kVpOGBwboxMA0GCSqGSIb3DQEBCwUA
+A4ICAQBqinA4WbbaixjIvirTthnVZil6Xc1bL3McJk6jfW+rtylNpumlEYOnOXOvEESS5iVdT2H6
+yAa+Tkvv/vMx/sZ8cApBWNromUuWyXi8mHwCKe0JgOYKOoICKuLJL8hWGSbueBwj/feTZU7n85iY
+r83d2Z5AiDEoOqsuC7CsDCT6eiaY8xJhEPRdF/d+4niXVOKM6Cm6jBAyvd0zaziGfjk9DgNyp115
+j0WKWa5bIW4xRtVZjc8VX90xJc/bYNaBRHIpAlf2ltTW/+op2znFuCyKGo3Oy+dCMYYFaA6eFN0A
+kLppRQjbbpCBhqcqBT/mhDn4t/lXX0ykeVoQDF7Va/81XwVRHmyjdanPUIPTfPRm94KNPQx96N97
+qA4bLJyuQHCH2u2nFoJavjVsIE4iYdm8UXrNemHcSxH5/mc0zy4EZmFcV5cjjPOGG0jfKq+nwf/Y
+jj4Du9gqsPoUJbJRa4ZDhS4HIxaAjUz7tGM7zMN07RujHv41D198HRaG9Q7DlfEvr10lO1Hm13ZB
+ONFLAzkopR6RctR9q5czxNM+4Gm2KHmgCY0c0f9BckgG/Jou5yD5m6Leie2uPAmvylezkolwQOQv
+T8Jwg0DXJCxr5wkf09XHwQj02w47HAcLQxGEIYbpgNR12KvxAmLBsX5VYc8T1yaw15zLKYs4SgsO
+kI26oQ==
+-----END CERTIFICATE-----
+
+COMODO RSA Certification Authority
+==================================
+-----BEGIN CERTIFICATE-----
+MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCBhTELMAkGA1UE
+BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
+A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkwHhcNMTAwMTE5MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMC
+R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE
+ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBB
+dXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR6FSS0gpWsawNJN3Fz0Rn
+dJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8Xpz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZ
+FGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+
+5eNu/Nio5JIk2kNrYrhV/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pG
+x8cgoLEfZd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z+pUX
+2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7wqP/0uK3pN/u6uPQL
+OvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZahSL0896+1DSJMwBGB7FY79tOi4lu3
+sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVICu9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+C
+GCe01a60y1Dma/RMhnEw6abfFobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5
+WdYgGq/yapiqcrxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E
+FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w
+DQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvlwFTPoCWOAvn9sKIN9SCYPBMt
+rFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+
+nq6PK7o9mfjYcwlYRm6mnPTXJ9OV2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSg
+tZx8jb8uk2IntznaFxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwW
+sRqZCuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp
+pC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA
+zMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq
+ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52
+7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I
+LaZRfyHBNVOFBkpdn627G190
+-----END CERTIFICATE-----
+
+USERTrust RSA Certification Authority
+=====================================
+-----BEGIN CERTIFICATE-----
+MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE
+BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK
+ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE
+BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK
+ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz
+0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j
+Y0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn
+RghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O
++T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT79uq
+/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6c0Plfg6lZrEpfDKE
+Y1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmTYo61Zs8liM2EuLE/pDkP2QKe6xJM
+lXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97lc6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8
+yexDJtC/QV9AqURE9JnnV4eeUB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+
+eLf8ZxXhyVeEHg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd
+BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
+MAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPFUp/L+M+ZBn8b2kMVn54CVVeW
+FPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KOVWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ
+7l8wXEskEVX/JJpuXior7gtNn3/3ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQ
+Eg9zKC7F4iRO/Fjs8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM
+8WcRiQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYzeSf7dNXGi
+FSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZXHlKYC6SQK5MNyosycdi
+yA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9c
+J2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRBVXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGw
+sAvgnEzDHNb842m1R0aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx
+Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9
+-----END CERTIFICATE-----
+
+USERTrust ECC Certification Authority
+=====================================
+-----BEGIN CERTIFICATE-----
+MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC
+VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
+aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC
+VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
+aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2
+0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez
+nPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV
+HQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB
+HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu
+9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg=
+-----END CERTIFICATE-----
+
+GlobalSign ECC Root CA - R4
+===========================
+-----BEGIN CERTIFICATE-----
+MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEkMCIGA1UECxMb
+R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
+EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb
+R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
+EwpHbG9iYWxTaWduMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprl
+OQcJFspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAwDgYDVR0P
+AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61FuOJAf/sKbvu+M8k8o4TV
+MAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGXkPoUVy0D7O48027KqGx2vKLeuwIgJ6iF
+JzWbVsaj8kfSt24bAgAXqmemFZHe+pTsewv4n4Q=
+-----END CERTIFICATE-----
+
+GlobalSign ECC Root CA - R5
+===========================
+-----BEGIN CERTIFICATE-----
+MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb
+R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
+EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb
+R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
+EwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6
+SFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS
+h5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd
+BgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx
+uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7
+yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3
+-----END CERTIFICATE-----
+
+Staat der Nederlanden Root CA - G3
+==================================
+-----BEGIN CERTIFICATE-----
+MIIFdDCCA1ygAwIBAgIEAJiiOTANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE
+CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
+Um9vdCBDQSAtIEczMB4XDTEzMTExNDExMjg0MloXDTI4MTExMzIzMDAwMFowWjELMAkGA1UEBhMC
+TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l
+ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAL4y
+olQPcPssXFnrbMSkUeiFKrPMSjTysF/zDsccPVMeiAho2G89rcKezIJnByeHaHE6n3WWIkYFsO2t
+x1ueKt6c/DrGlaf1F2cY5y9JCAxcz+bMNO14+1Cx3Gsy8KL+tjzk7FqXxz8ecAgwoNzFs21v0IJy
+EavSgWhZghe3eJJg+szeP4TrjTgzkApyI/o1zCZxMdFyKJLZWyNtZrVtB0LrpjPOktvA9mxjeM3K
+Tj215VKb8b475lRgsGYeCasH/lSJEULR9yS6YHgamPfJEf0WwTUaVHXvQ9Plrk7O53vDxk5hUUur
+mkVLoR9BvUhTFXFkC4az5S6+zqQbwSmEorXLCCN2QyIkHxcE1G6cxvx/K2Ya7Irl1s9N9WMJtxU5
+1nus6+N86U78dULI7ViVDAZCopz35HCz33JvWjdAidiFpNfxC95DGdRKWCyMijmev4SH8RY7Ngzp
+07TKbBlBUgmhHbBqv4LvcFEhMtwFdozL92TkA1CvjJFnq8Xy7ljY3r735zHPbMk7ccHViLVlvMDo
+FxcHErVc0qsgk7TmgoNwNsXNo42ti+yjwUOH5kPiNL6VizXtBznaqB16nzaeErAMZRKQFWDZJkBE
+41ZgpRDUajz9QdwOWke275dhdU/Z/seyHdTtXUmzqWrLZoQT1Vyg3N9udwbRcXXIV2+vD3dbAgMB
+AAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRUrfrHkleu
+yjWcLhL75LpdINyUVzANBgkqhkiG9w0BAQsFAAOCAgEAMJmdBTLIXg47mAE6iqTnB/d6+Oea31BD
+U5cqPco8R5gu4RV78ZLzYdqQJRZlwJ9UXQ4DO1t3ApyEtg2YXzTdO2PCwyiBwpwpLiniyMMB8jPq
+KqrMCQj3ZWfGzd/TtiunvczRDnBfuCPRy5FOCvTIeuXZYzbB1N/8Ipf3YF3qKS9Ysr1YvY2WTxB1
+v0h7PVGHoTx0IsL8B3+A3MSs/mrBcDCw6Y5p4ixpgZQJut3+TcCDjJRYwEYgr5wfAvg1VUkvRtTA
+8KCWAg8zxXHzniN9lLf9OtMJgwYh/WA9rjLA0u6NpvDntIJ8CsxwyXmA+P5M9zWEGYox+wrZ13+b
+8KKaa8MFSu1BYBQw0aoRQm7TIwIEC8Zl3d1Sd9qBa7Ko+gE4uZbqKmxnl4mUnrzhVNXkanjvSr0r
+mj1AfsbAddJu+2gw7OyLnflJNZoaLNmzlTnVHpL3prllL+U9bTpITAjc5CgSKL59NVzq4BZ+Extq
+1z7XnvwtdbLBFNUjA9tbbws+eC8N3jONFrdI54OagQ97wUNNVQQXOEpR1VmiiXTTn74eS9fGbbeI
+JG9gkaSChVtWQbzQRKtqE77RLFi3EjNYsjdj3BP1lB0/QFH1T/U67cjF68IeHRaVesd+QnGTbksV
+tzDfqu1XhUisHWrdOWnk4Xl4vs4Fv6EM94B7IWcnMFk=
+-----END CERTIFICATE-----
+
+Staat der Nederlanden EV Root CA
+================================
+-----BEGIN CERTIFICATE-----
+MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE
+CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
+RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M
+MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl
+cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk
+SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW
+O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r
+0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8
+Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gV
+XJrm0w912fxBmJc+qiXbj5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/UhbJCONVrJ0yPr
+08C+eKxCKFhmpUZtcALXEPlLVPxdhkqHz3/KRawRWrUgUY0viEeXOcDPusBCAUCZSCELa6fS/ZbV
+0b5GnUngC6agIk440ME8MLxwjyx1zNDFjFE7PZQIZCZhfbnDZY8UnCHQqv0XcgOPvZuM5l5Tnrmd
+74K74bzickFbIZTTRTeU0d8JOV3nI6qaHcptqAqGhYqCvkIH1vI4gnPah1vlPNOePqc7nvQDs/nx
+fRN0Av+7oeX6AHkcpmZBiFxgV6YuCcS6/ZrPpx9Aw7vMWgpVSzs4dlG4Y4uElBbmVvMCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFP6rAJCYniT8qcwa
+ivsnuL8wbqg7MA0GCSqGSIb3DQEBCwUAA4ICAQDPdyxuVr5Os7aEAJSrR8kN0nbHhp8dB9O2tLsI
+eK9p0gtJ3jPFrK3CiAJ9Brc1AsFgyb/E6JTe1NOpEyVa/m6irn0F3H3zbPB+po3u2dfOWBfoqSmu
+c0iH55vKbimhZF8ZE/euBhD/UcabTVUlT5OZEAFTdfETzsemQUHSv4ilf0X8rLiltTMMgsT7B/Zq
+5SWEXwbKwYY5EdtYzXc7LMJMD16a4/CrPmEbUCTCwPTxGfARKbalGAKb12NMcIxHowNDXLldRqAN
+b/9Zjr7dn3LDWyvfjFvO5QxGbJKyCqNMVEIYFRIYvdr8unRu/8G2oGTYqV9Vrp9canaW2HNnh/tN
+f1zuacpzEPuKqf2evTY4SUmH9A4U8OmHuD+nT3pajnnUk+S7aFKErGzp85hwVXIy+TSrK0m1zSBi
+5Dp6Z2Orltxtrpfs/J92VoguZs9btsmksNcFuuEnL5O7Jiqik7Ab846+HUCjuTaPPoIaGl6I6lD4
+WeKDRikL40Rc4ZW2aZCaFG+XroHPaO+Zmr615+F/+PoTRxZMzG0IQOeLeG9QgkRQP2YGiqtDhFZK
+DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy
+eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg==
+-----END CERTIFICATE-----
+
+IdenTrust Commercial Root CA 1
+==============================
+-----BEGIN CERTIFICATE-----
+MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG
+EwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS
+b290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES
+MBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB
+IDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld
+hNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/
+mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi
+1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C
+XZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl
+3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy
+NeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV
+WYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHTc+XvvqDtMwt0viAg
+xGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hvl7yTmvmcEpB4eoCHFddydJxVdHix
+uuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5NiGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC
+AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZI
+hvcNAQELBQADggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH
+6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwtLRvM7Kqas6pg
+ghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93nAbowacYXVKV7cndJZ5t+qnt
+ozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3+wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmV
+YjzlVYA211QC//G5Xc7UI2/YRYRKW2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUX
+feu+h1sXIFRRk0pTAwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/ro
+kTLql1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG4iZZRHUe
+2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZmUlO+KWA2yUPHGNiiskz
+Z2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7R
+cGzM7vRX+Bi6hG6H
+-----END CERTIFICATE-----
+
+IdenTrust Public Sector Root CA 1
+=================================
+-----BEGIN CERTIFICATE-----
+MIIFZjCCA06gAwIBAgIQCgFCgAAAAUUjz0Z8AAAAAjANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQG
+EwJVUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3Rv
+ciBSb290IENBIDEwHhcNMTQwMTE2MTc1MzMyWhcNMzQwMTE2MTc1MzMyWjBNMQswCQYDVQQGEwJV
+UzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3RvciBS
+b290IENBIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2IpT8pEiv6EdrCvsnduTy
+P4o7ekosMSqMjbCpwzFrqHd2hCa2rIFCDQjrVVi7evi8ZX3yoG2LqEfpYnYeEe4IFNGyRBb06tD6
+Hi9e28tzQa68ALBKK0CyrOE7S8ItneShm+waOh7wCLPQ5CQ1B5+ctMlSbdsHyo+1W/CD80/HLaXI
+rcuVIKQxKFdYWuSNG5qrng0M8gozOSI5Cpcu81N3uURF/YTLNiCBWS2ab21ISGHKTN9T0a9SvESf
+qy9rg3LvdYDaBjMbXcjaY8ZNzaxmMc3R3j6HEDbhuaR672BQssvKplbgN6+rNBM5Jeg5ZuSYeqoS
+mJxZZoY+rfGwyj4GD3vwEUs3oERte8uojHH01bWRNszwFcYr3lEXsZdMUD2xlVl8BX0tIdUAvwFn
+ol57plzy9yLxkA2T26pEUWbMfXYD62qoKjgZl3YNa4ph+bz27nb9cCvdKTz4Ch5bQhyLVi9VGxyh
+LrXHFub4qjySjmm2AcG1hp2JDws4lFTo6tyePSW8Uybt1as5qsVATFSrsrTZ2fjXctscvG29ZV/v
+iDUqZi/u9rNl8DONfJhBaUYPQxxp+pu10GFqzcpL2UyQRqsVWaFHVCkugyhfHMKiq3IXAAaOReyL
+4jM9f9oZRORicsPfIsbyVtTdX5Vy7W1f90gDW/3FKqD2cyOEEBsB5wIDAQABo0IwQDAOBgNVHQ8B
+Af8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw
+DQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj
+t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A
+mgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt
+GtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt
+m6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx
+NRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4
+Mhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI
+ajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC
+ZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ
+3Wl9af0AVqW3rLatt8o+Ae+c
+-----END CERTIFICATE-----
+
+Entrust Root Certification Authority - G2
+=========================================
+-----BEGIN CERTIFICATE-----
+MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV
+BAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy
+bXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug
+b25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIw
+HhcNMDkwNzA3MTcyNTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoT
+DUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMx
+OTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25s
+eTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwggEi
+MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP
+/vaCeb9zYQYKpSfYs1/TRU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXz
+HHfV1IWNcCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hWwcKU
+s/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1U1+cPvQXLOZprE4y
+TGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0jaWvYkxN4FisZDQSA/i2jZRjJKRx
+AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ6
+0B7vfec7aVHUbI2fkBJmqzANBgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5Z
+iXMRrEPR9RP/jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ
+Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v1fN2D807iDgi
+nWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+
+vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO
+e4pIb4tF9g==
+-----END CERTIFICATE-----
+
+Entrust Root Certification Authority - EC1
+==========================================
+-----BEGIN CERTIFICATE-----
+MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx
+FjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn
+YWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl
+ZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
+IC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw
+FAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs
+LXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg
+dXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt
+IEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy
+AsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef
+9eNi1KlHBz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
+FLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVCR98crlOZF7ZvHH3h
+vxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nXhTcGtXsI/esni0qU+eH6p44mCOh8
+kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G
+-----END CERTIFICATE-----
+
+CFCA EV ROOT
+============
+-----BEGIN CERTIFICATE-----
+MIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEwMC4GA1UE
+CgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNB
+IEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkxMjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEw
+MC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQD
+DAxDRkNBIEVWIFJPT1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnV
+BU03sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpLTIpTUnrD
+7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5/ZOkVIBMUtRSqy5J35DN
+uF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp7hZZLDRJGqgG16iI0gNyejLi6mhNbiyW
+ZXvKWfry4t3uMCz7zEasxGPrb382KzRzEpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7
+xzbh72fROdOXW3NiGUgthxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9f
+py25IGvPa931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqotaK8K
+gWU6cMGbrU1tVMoqLUuFG7OA5nBFDWteNfB/O7ic5ARwiRIlk9oKmSJgamNgTnYGmE69g60dWIol
+hdLHZR4tjsbftsbhf4oEIRUpdPA+nJCdDC7xij5aqgwJHsfVPKPtl8MeNPo4+QgO48BdK4PRVmrJ
+tqhUUy54Mmc9gn900PvhtgVguXDbjgv5E1hvcWAQUhC5wUEJ73IfZzF4/5YFjQIDAQABo2MwYTAf
+BgNVHSMEGDAWgBTj/i39KNALtbq2osS/BqoFjJP7LzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB
+/wQEAwIBBjAdBgNVHQ4EFgQU4/4t/SjQC7W6tqLEvwaqBYyT+y8wDQYJKoZIhvcNAQELBQADggIB
+ACXGumvrh8vegjmWPfBEp2uEcwPenStPuiB/vHiyz5ewG5zz13ku9Ui20vsXiObTej/tUxPQ4i9q
+ecsAIyjmHjdXNYmEwnZPNDatZ8POQQaIxffu2Bq41gt/UP+TqhdLjOztUmCypAbqTuv0axn96/Ua
+4CUqmtzHQTb3yHQFhDmVOdYLO6Qn+gjYXB74BGBSESgoA//vU2YApUo0FmZ8/Qmkrp5nGm9BC2sG
+E5uPhnEFtC+NiWYzKXZUmhH4J/qyP5Hgzg0b8zAarb8iXRvTvyUFTeGSGn+ZnzxEk8rUQElsgIfX
+BDrDMlI1Dlb4pd19xIsNER9Tyx6yF7Zod1rg1MvIB671Oi6ON7fQAUtDKXeMOZePglr4UeWJoBjn
+aH9dCi77o0cOPaYjesYBx4/IXr9tgFa+iiS6M+qf4TIRnvHST4D2G0CvOJ4RUHlzEhLN5mydLIhy
+PDCBBpEi6lmt2hkuIsKNuYyH4Ga8cyNfIWRjgEj1oDwYPZTISEEdQLpe/v5WOaHIz16eGWRGENoX
+kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C
+ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su
+-----END CERTIFICATE-----
+
+TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
+=========================================================
+-----BEGIN CERTIFICATE-----
+MIIEJzCCAw+gAwIBAgIHAI4X/iQggTANBgkqhkiG9w0BAQsFADCBsTELMAkGA1UEBhMCVFIxDzAN
+BgNVBAcMBkFua2FyYTFNMEsGA1UECgxEVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp
+bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4xQjBABgNVBAMMOVTDnFJLVFJVU1Qg
+RWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSBINTAeFw0xMzA0MzAw
+ODA3MDFaFw0yMzA0MjgwODA3MDFaMIGxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMU0w
+SwYDVQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnE
+n2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBFbGVrdHJvbmlrIFNlcnRp
+ZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEApCUZ4WWe60ghUEoI5RHwWrom/4NZzkQqL/7hzmAD/I0Dpe3/a6i6zDQGn1k19uwsu537
+jVJp45wnEFPzpALFp/kRGml1bsMdi9GYjZOHp3GXDSHHmflS0yxjXVW86B8BSLlg/kJK9siArs1m
+ep5Fimh34khon6La8eHBEJ/rPCmBp+EyCNSgBbGM+42WAA4+Jd9ThiI7/PS98wl+d+yG6w8z5UNP
+9FR1bSmZLmZaQ9/LXMrI5Tjxfjs1nQ/0xVqhzPMggCTTV+wVunUlm+hkS7M0hO8EuPbJbKoCPrZV
+4jI3X/xml1/N1p7HIL9Nxqw/dV8c7TKcfGkAaZHjIxhT6QIDAQABo0IwQDAdBgNVHQ4EFgQUVpkH
+HtOsDGlktAxQR95DLL4gwPswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI
+hvcNAQELBQADggEBAJ5FdnsXSDLyOIspve6WSk6BGLFRRyDN0GSxDsnZAdkJzsiZ3GglE9Rc8qPo
+BP5yCccLqh0lVX6Wmle3usURehnmp349hQ71+S4pL+f5bFgWV1Al9j4uPqrtd3GqqpmWRgqujuwq
+URawXs3qZwQcWDD1YIq9pr1N5Za0/EKJAWv2cMhQOQwt1WbZyNKzMrcbGW3LM/nfpeYVhDfwwvJl
+lpKQd/Ct9JDpEXjXk4nAPQu6KfTomZ1yju2dL+6SfaHx/126M2CFYv4HAqGEVka+lgqaE9chTLd8
+B59OTj+RdPsnnRHM3eaxynFNExc5JsUpISuTKWqW+qtB4Uu2NQvAmxU=
+-----END CERTIFICATE-----
+
+TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H6
+=========================================================
+-----BEGIN CERTIFICATE-----
+MIIEJjCCAw6gAwIBAgIGfaHyZeyKMA0GCSqGSIb3DQEBCwUAMIGxMQswCQYDVQQGEwJUUjEPMA0G
+A1UEBwwGQW5rYXJhMU0wSwYDVQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmls
+acWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBF
+bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg2MB4XDTEzMTIxODA5
+MDQxMFoXDTIzMTIxNjA5MDQxMFowgbExCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmExTTBL
+BgNVBAoMRFTDnFJLVFJVU1QgQmlsZ2kgxLBsZXRpxZ9pbSB2ZSBCaWxpxZ9pbSBHw7x2ZW5sacSf
+aSBIaXptZXRsZXJpIEEuxZ4uMUIwQAYDVQQDDDlUw5xSS1RSVVNUIEVsZWt0cm9uaWsgU2VydGlm
+aWthIEhpem1ldCBTYcSfbGF5xLFjxLFzxLEgSDYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
+AoIBAQCdsGjW6L0UlqMACprx9MfMkU1xeHe59yEmFXNRFpQJRwXiM/VomjX/3EsvMsew7eKC5W/a
+2uqsxgbPJQ1BgfbBOCK9+bGlprMBvD9QFyv26WZV1DOzXPhDIHiTVRZwGTLmiddk671IUP320EED
+wnS3/faAz1vFq6TWlRKb55cTMgPp1KtDWxbtMyJkKbbSk60vbNg9tvYdDjTu0n2pVQ8g9P0pu5Fb
+HH3GQjhtQiht1AH7zYiXSX6484P4tZgvsycLSF5W506jM7NE1qXyGJTtHB6plVxiSvgNZ1GpryHV
++DKdeboaX+UEVU0TRv/yz3THGmNtwx8XEsMeED5gCLMxAgMBAAGjQjBAMB0GA1UdDgQWBBTdVRcT
+9qzoSCHK77Wv0QAy7Z6MtTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
+9w0BAQsFAAOCAQEAb1gNl0OqFlQ+v6nfkkU/hQu7VtMMUszIv3ZnXuaqs6fvuay0EBQNdH49ba3R
+fdCaqaXKGDsCQC4qnFAUi/5XfldcEQlLNkVS9z2sFP1E34uXI9TDwe7UU5X+LEr+DXCqu4svLcsy
+o4LyVN/Y8t3XSHLuSqMplsNEzm61kod2pLv0kmzOLBQJZo6NrRa1xxsJYTvjIKIDgI6tflEATseW
+hvtDmHd9KMeP2Cpu54Rvl0EpABZeTeIT6lnAY2c6RPuY/ATTMHKm9ocJV612ph1jmv3XZch4gyt1
+O6VbuA1df74jrlZVlFjvH4GMKrLN5ptjnhi85WsGtAuYSyher4hYyw==
+-----END CERTIFICATE-----
+
+Certinomis - Root CA
+====================
+-----BEGIN CERTIFICATE-----
+MIIFkjCCA3qgAwIBAgIBATANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJGUjETMBEGA1UEChMK
+Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxHTAbBgNVBAMTFENlcnRpbm9taXMg
+LSBSb290IENBMB4XDTEzMTAyMTA5MTcxOFoXDTMzMTAyMTA5MTcxOFowWjELMAkGA1UEBhMCRlIx
+EzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMR0wGwYDVQQDExRD
+ZXJ0aW5vbWlzIC0gUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANTMCQos
+P5L2fxSeC5yaah1AMGT9qt8OHgZbn1CF6s2Nq0Nn3rD6foCWnoR4kkjW4znuzuRZWJflLieY6pOo
+d5tK8O90gC3rMB+12ceAnGInkYjwSond3IjmFPnVAy//ldu9n+ws+hQVWZUKxkd8aRi5pwP5ynap
+z8dvtF4F/u7BUrJ1Mofs7SlmO/NKFoL21prbcpjp3vDFTKWrteoB4owuZH9kb/2jJZOLyKIOSY00
+8B/sWEUuNKqEUL3nskoTuLAPrjhdsKkb5nPJWqHZZkCqqU2mNAKthH6yI8H7KsZn9DS2sJVqM09x
+RLWtwHkziOC/7aOgFLScCbAK42C++PhmiM1b8XcF4LVzbsF9Ri6OSyemzTUK/eVNfaoqoynHWmgE
+6OXWk6RiwsXm9E/G+Z8ajYJJGYrKWUM66A0ywfRMEwNvbqY/kXPLynNvEiCL7sCCeN5LLsJJwx3t
+FvYk9CcbXFcx3FXuqB5vbKziRcxXV4p1VxngtViZSTYxPDMBbRZKzbgqg4SGm/lg0h9tkQPTYKbV
+PZrdd5A9NaSfD171UkRpucC63M9933zZxKyGIjK8e2uR73r4F2iw4lNVYC2vPsKD2NkJK/DAZNuH
+i5HMkesE/Xa0lZrmFAYb1TQdvtj/dBxThZngWVJKYe2InmtJiUZ+IFrZ50rlau7SZRFDAgMBAAGj
+YzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTvkUz1pcMw6C8I
+6tNxIqSSaHh02TAfBgNVHSMEGDAWgBTvkUz1pcMw6C8I6tNxIqSSaHh02TANBgkqhkiG9w0BAQsF
+AAOCAgEAfj1U2iJdGlg+O1QnurrMyOMaauo++RLrVl89UM7g6kgmJs95Vn6RHJk/0KGRHCwPT5iV
+WVO90CLYiF2cN/z7ZMF4jIuaYAnq1fohX9B0ZedQxb8uuQsLrbWwF6YSjNRieOpWauwK0kDDPAUw
+Pk2Ut59KA9N9J0u2/kTO+hkzGm2kQtHdzMjI1xZSg081lLMSVX3l4kLr5JyTCcBMWwerx20RoFAX
+lCOotQqSD7J6wWAsOMwaplv/8gzjqh8c3LigkyfeY+N/IZ865Z764BNqdeuWXGKRlI5nU7aJ+BIJ
+y29SWwNyhlCVCNSNh4YVH5Uk2KRvms6knZtt0rJ2BobGVgjF6wnaNsIbW0G+YSrjcOa4pvi2WsS9
+Iff/ql+hbHY5ZtbqTFXhADObE5hjyW/QASAJN1LnDE8+zbz1X5YnpyACleAu6AdBBR8Vbtaw5Bng
+DwKTACdyxYvRVB9dSsNAl35VpnzBMwQUAR1JIGkLGZOdblgi90AMRgwjY/M50n92Uaf0yKHxDHYi
+I0ZSKS3io0EHVmmY0gUJvGnHWmHNj4FgFU2A3ZDifcRQ8ow7bkrHxuaAKzyBvBGAFhAn1/DNP3nM
+cyrDflOR1m749fPH0FFNjkulW+YZFzvWgQncItzujrnEj1PhZ7szuIgVRs/taTX/dQ1G885x4cVr
+hkIGuUE=
+-----END CERTIFICATE-----
+
+OISTE WISeKey Global Root GB CA
+===============================
+-----BEGIN CERTIFICATE-----
+MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG
+EwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl
+ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAw
+MzJaFw0zOTEyMDExNTEwMzFaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYD
+VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEds
+b2JhbCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3HEokKtaX
+scriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGxWuR51jIjK+FTzJlFXHtP
+rby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk
+9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNku7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4o
+Qnc/nSMbsrY9gBQHTC5P99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvg
+GUpuuy9rM2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB
+/zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZI
+hvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrghcViXfa43FK8+5/ea4n32cZiZBKpD
+dHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0
+VQreUGdNZtGn//3ZwLWoo4rOZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEui
+HZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic
+Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM=
+-----END CERTIFICATE-----
+
+Certification Authority of WoSign G2
+====================================
+-----BEGIN CERTIFICATE-----
+MIIDfDCCAmSgAwIBAgIQayXaioidfLwPBbOxemFFRDANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQG
+EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxLTArBgNVBAMTJENlcnRpZmljYXRpb24g
+QXV0aG9yaXR5IG9mIFdvU2lnbiBHMjAeFw0xNDExMDgwMDU4NThaFw00NDExMDgwMDU4NThaMFgx
+CzAJBgNVBAYTAkNOMRowGAYDVQQKExFXb1NpZ24gQ0EgTGltaXRlZDEtMCsGA1UEAxMkQ2VydGlm
+aWNhdGlvbiBBdXRob3JpdHkgb2YgV29TaWduIEcyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEAvsXEoCKASU+/2YcRxlPhuw+9YH+v9oIOH9ywjj2X4FA8jzrvZjtFB5sg+OPXJYY1kBai
+XW8wGQiHC38Gsp1ij96vkqVg1CuAmlI/9ZqD6TRay9nVYlzmDuDfBpgOgHzKtB0TiGsOqCR3A9Du
+W/PKaZE1OVbFbeP3PU9ekzgkyhjpJMuSA93MHD0JcOQg5PGurLtzaaNjOg9FD6FKmsLRY6zLEPg9
+5k4ot+vElbGs/V6r+kHLXZ1L3PR8du9nfwB6jdKgGlxNIuG12t12s9R23164i5jIFFTMaxeSt+BK
+v0mUYQs4kI9dJGwlezt52eJ+na2fmKEG/HgUYFf47oB3sQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC
+AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU+mCp62XF3RYUCE4MD42b4Pdkr2cwDQYJKoZI
+hvcNAQELBQADggEBAFfDejaCnI2Y4qtAqkePx6db7XznPWZaOzG73/MWM5H8fHulwqZm46qwtyeY
+P0nXYGdnPzZPSsvxFPpahygc7Y9BMsaV+X3avXtbwrAh449G3CE4Q3RM+zD4F3LBMvzIkRfEzFg3
+TgvMWvchNSiDbGAtROtSjFA9tWwS1/oJu2yySrHFieT801LYYRf+epSEj3m2M1m6D8QL4nCgS3gu
++sif/a+RZQp4OBXllxcU3fngLDT4ONCEIgDAFFEYKwLcMFrw6AF8NTojrwjkr6qOKEJJLvD1mTS+
+7Q9LGOHSJDy7XUe3IfKN0QqZjuNuPq1w4I+5ysxugTH2e5x6eeRncRg=
+-----END CERTIFICATE-----
+
+CA WoSign ECC Root
+==================
+-----BEGIN CERTIFICATE-----
+MIICCTCCAY+gAwIBAgIQaEpYcIBr8I8C+vbe6LCQkDAKBggqhkjOPQQDAzBGMQswCQYDVQQGEwJD
+TjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxGzAZBgNVBAMTEkNBIFdvU2lnbiBFQ0MgUm9v
+dDAeFw0xNDExMDgwMDU4NThaFw00NDExMDgwMDU4NThaMEYxCzAJBgNVBAYTAkNOMRowGAYDVQQK
+ExFXb1NpZ24gQ0EgTGltaXRlZDEbMBkGA1UEAxMSQ0EgV29TaWduIEVDQyBSb290MHYwEAYHKoZI
+zj0CAQYFK4EEACIDYgAE4f2OuEMkq5Z7hcK6C62N4DrjJLnSsb6IOsq/Srj57ywvr1FQPEd1bPiU
+t5v8KB7FVMxjnRZLU8HnIKvNrCXSf4/CwVqCXjCLelTOA7WRf6qU0NGKSMyCBSah1VES1ns2o0Iw
+QDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUqv3VWqP2h4syhf3R
+MluARZPzA7gwCgYIKoZIzj0EAwMDaAAwZQIxAOSkhLCB1T2wdKyUpOgOPQB0TKGXa/kNUTyh2Tv0
+Daupn75OcsqF1NnstTJFGG+rrQIwfcf3aWMvoeGY7xMQ0Xk/0f7qO3/eVvSQsRUR2LIiFdAvwyYu
+a/GRspBl9JrmkO5K
+-----END CERTIFICATE-----
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/test/cacert.crt b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/test/cacert.crt
new file mode 100644
index 0000000..087ca0e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/test/cacert.crt
@@ -0,0 +1,42 @@
+-----BEGIN CERTIFICATE-----
+MIIHWTCCBUGgAwIBAgIDCkGKMA0GCSqGSIb3DQEBCwUAMHkxEDAOBgNVBAoTB1Jv
+b3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEiMCAGA1UEAxMZ
+Q0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJARYSc3VwcG9y
+dEBjYWNlcnQub3JnMB4XDTExMDUyMzE3NDgwMloXDTIxMDUyMDE3NDgwMlowVDEU
+MBIGA1UEChMLQ0FjZXJ0IEluYy4xHjAcBgNVBAsTFWh0dHA6Ly93d3cuQ0FjZXJ0
+Lm9yZzEcMBoGA1UEAxMTQ0FjZXJ0IENsYXNzIDMgUm9vdDCCAiIwDQYJKoZIhvcN
+AQEBBQADggIPADCCAgoCggIBAKtJNRFIfNImflOUz0Op3SjXQiqL84d4GVh8D57a
+iX3h++tykA10oZZkq5+gJJlz2uJVdscXe/UErEa4w75/ZI0QbCTzYZzA8pD6Ueb1
+aQFjww9W4kpCz+JEjCUoqMV5CX1GuYrz6fM0KQhF5Byfy5QEHIGoFLOYZcRD7E6C
+jQnRvapbjZLQ7N6QxX8KwuPr5jFaXnQ+lzNZ6MMDPWAzv/fRb0fEze5ig1JuLgia
+pNkVGJGmhZJHsK5I6223IeyFGmhyNav/8BBdwPSUp2rVO5J+TJAFfpPBLIukjmJ0
+FXFuC3ED6q8VOJrU0gVyb4z5K+taciX5OUbjchs+BMNkJyIQKopPWKcDrb60LhPt
+XapI19V91Cp7XPpGBFDkzA5CW4zt2/LP/JaT4NsRNlRiNDiPDGCbO5dWOK3z0luL
+oFvqTpa4fNfVoIZwQNORKbeiPK31jLvPGpKK5DR7wNhsX+kKwsOnIJpa3yxdUly6
+R9Wb7yQocDggL9V/KcCyQQNokszgnMyXS0XvOhAKq3A6mJVwrTWx6oUrpByAITGp
+rmB6gCZIALgBwJNjVSKRPFbnr9s6JfOPMVTqJouBWfmh0VMRxXudA/Z0EeBtsSw/
+LIaRmXGapneLNGDRFLQsrJ2vjBDTn8Rq+G8T/HNZ92ZCdB6K4/jc0m+YnMtHmJVA
+BfvpAgMBAAGjggINMIICCTAdBgNVHQ4EFgQUdahxYEyIE/B42Yl3tW3Fid+8sXow
+gaMGA1UdIwSBmzCBmIAUFrUyG9TH8+DmjvO90rA67rI5GNGhfaR7MHkxEDAOBgNV
+BAoTB1Jvb3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEiMCAG
+A1UEAxMZQ0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJARYS
+c3VwcG9ydEBjYWNlcnQub3JnggEAMA8GA1UdEwEB/wQFMAMBAf8wXQYIKwYBBQUH
+AQEEUTBPMCMGCCsGAQUFBzABhhdodHRwOi8vb2NzcC5DQWNlcnQub3JnLzAoBggr
+BgEFBQcwAoYcaHR0cDovL3d3dy5DQWNlcnQub3JnL2NhLmNydDBKBgNVHSAEQzBB
+MD8GCCsGAQQBgZBKMDMwMQYIKwYBBQUHAgEWJWh0dHA6Ly93d3cuQ0FjZXJ0Lm9y
+Zy9pbmRleC5waHA/aWQ9MTAwNAYJYIZIAYb4QgEIBCcWJWh0dHA6Ly93d3cuQ0Fj
+ZXJ0Lm9yZy9pbmRleC5waHA/aWQ9MTAwUAYJYIZIAYb4QgENBEMWQVRvIGdldCB5
+b3VyIG93biBjZXJ0aWZpY2F0ZSBmb3IgRlJFRSwgZ28gdG8gaHR0cDovL3d3dy5D
+QWNlcnQub3JnMA0GCSqGSIb3DQEBCwUAA4ICAQApKIWuRKm5r6R5E/CooyuXYPNc
+7uMvwfbiZqARrjY3OnYVBFPqQvX56sAV2KaC2eRhrnILKVyQQ+hBsuF32wITRHhH
+Va9Y/MyY9kW50SD42CEH/m2qc9SzxgfpCYXMO/K2viwcJdVxjDm1Luq+GIG6sJO4
+D+Pm1yaMMVpyA4RS5qb1MyJFCsgLDYq4Nm+QCaGrvdfVTi5xotSu+qdUK+s1jVq3
+VIgv7nSf7UgWyg1I0JTTrKSi9iTfkuO960NAkW4cGI5WtIIS86mTn9S8nK2cde5a
+lxuV53QtHA+wLJef+6kzOXrnAzqSjiL2jA3k2X4Ndhj3AfnvlpaiVXPAPHG0HRpW
+Q7fDCo1y/OIQCQtBzoyUoPkD/XFzS4pXM+WOdH4VAQDmzEoc53+VGS3FpQyLu7Xt
+hbNc09+4ufLKxw0BFKxwWMWMjTPUnWajGlCVI/xI4AZDEtnNp4Y5LzZyo4AQ5OHz
+0ctbGsDkgJp8E3MGT9ujayQKurMcvEp4u+XjdTilSKeiHq921F73OIZWWonO1sOn
+ebJSoMbxhbQljPI/lrMQ2Y1sVzufb4Y6GIIiNsiwkTjbKqGTqoQ/9SdlrnPVyNXT
+d+pLncdBu8fA46A/5H2kjXPmEkvfoXNzczqA6NXLji/L6hOn1kGLrPo8idck9U60
+4GGSt/M3mMS+lqO3ig==
+-----END CERTIFICATE-----
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/test/unit_tests.sh b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/test/unit_tests.sh
new file mode 100755
index 0000000..d0c26d6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/check_ssl_cert-1.83.0/test/unit_tests.sh
@@ -0,0 +1,417 @@
+#!/bin/sh
+
+if [ -z "${SHUNIT2}" ] ; then
+ cat <<EOF
+To be able to run the unit test you need a copy of shUnit2
+You can download it from https://github.com/kward/shunit2
+
+Once downloaded please set the SHUNIT2 variable with the location
+of the 'shunit2' script
+EOF
+ exit 1
+fi
+
+if [ ! -x "${SHUNIT2}" ] ; then
+ echo "Error: the specified shUnit2 script (${SHUNIT2}) is not an executable file"
+ exit 1
+fi
+
+SCRIPT=../check_ssl_cert
+if [ ! -r "${SCRIPT}" ] ; then
+ echo "Error: the script to test (${SCRIPT}) is not a readable file"
+fi
+
+# constants
+
+NAGIOS_OK=0
+NAGIOS_WARNING=1
+NAGIOS_CRITICAL=2
+NAGIOS_UNKNOWN=3
+
+testDependencies() {
+ check_required_prog openssl
+ assertNotNull 'openssl not found' "${PROG}"
+}
+
+testUsage() {
+ ${SCRIPT} > /dev/null 2>&1
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_UNKNOWN} "${EXIT_CODE}"
+}
+
+testETHZ() {
+ ${SCRIPT} -H www.ethz.ch --cn www.ethz.ch --rootcert cabundle.crt
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+testLetsEncrypt() {
+ ${SCRIPT} -H helloworld.letsencrypt.org --rootcert cabundle.crt
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+testGoDaddy() {
+ ${SCRIPT} -H www.godaddy.com --cn www.godaddy.com --rootcert cabundle.crt
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+testETHZCaseInsensitive() {
+ # debugging: to be removed
+ ${SCRIPT} -H www.ethz.ch --cn WWW.ETHZ.CH --rootcert cabundle.crt
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+testETHZWildCard() {
+ ${SCRIPT} -H sherlock.sp.ethz.ch --cn sp.ethz.ch --rootcert cabundle.crt
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+testETHZWildCardCaseInsensitive() {
+ ${SCRIPT} -H sherlock.sp.ethz.ch --cn SP.ETHZ.CH --rootcert cabundle.crt
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+testETHZWildCardSub() {
+ ${SCRIPT} -H sherlock.sp.ethz.ch --cn sub.sp.ethz.ch --rootcert cabundle.crt
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+testETHZWildCardSubCaseInsensitive() {
+ ${SCRIPT} -H sherlock.sp.ethz.ch --cn SUB.SP.ETHZ.CH --rootcert cabundle.crt
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+testRootIssuer() {
+ ${SCRIPT} --rootcert cabundle.crt -H google.com --issuer GlobalSign
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+testValidity() {
+ # Tests bug #8
+ ${SCRIPT} --rootcert cabundle.crt -H www.ethz.ch -w 1000
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_WARNING} "${EXIT_CODE}"
+}
+
+testValidityWithPerl() {
+ ${SCRIPT} --rootcert cabundle.crt -H www.ethz.ch -w 1000 --force-perl-date
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_WARNING} "${EXIT_CODE}"
+}
+
+testAltNames() {
+ ${SCRIPT} -H www.inf.ethz.ch --cn www.inf.ethz.ch --rootcert cabundle.crt --altnames
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+#Do not require to match Alternative Name if CN already matched
+testWildcardAltNames1() {
+ ${SCRIPT} -H sherlock.sp.ethz.ch --rootcert cabundle.crt --altnames --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+#Check for wildcard support in Alternative Names
+testWildcardAltNames2() {
+ ${SCRIPT} -H sherlock.sp.ethz.ch \
+ --cn somehost.spapps.ethz.ch \
+ --cn otherhost.sPaPPs.ethz.ch \
+ --cn spapps.ethz.ch \
+ --rootcert cabundle.crt --altnames
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+testAltNamesCaseInsensitve() {
+ ${SCRIPT} -H www.inf.ethz.ch --cn WWW.INF.ETHZ.CH --rootcert cabundle.crt --altnames
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+testMultipleAltNamesOK() {
+ # Test with multiple CN's
+ ${SCRIPT} -H inf.ethz.ch -n www.ethz.ch -n ethz.ch --rootcert cabundle.crt --altnames
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+}
+
+testMultipleAltNamesFailOne() {
+ # Test with wiltiple CN's but last one is wrong
+ ${SCRIPT} -H inf.ethz.ch -n www.ethz.ch -n wrong.ch --rootcert cabundle.crt --altnames
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_CRITICAL} "${EXIT_CODE}"
+}
+
+testMultipleAltNamesFailTwo() {
+ # Test with multiple CN's but first one is wrong
+ ${SCRIPT} -H inf.ethz.ch -n wrong.ch -n www.ethz.ch --rootcert cabundle.crt --altnames
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_CRITICAL} "${EXIT_CODE}"
+}
+
+testXMPPHost() {
+ if [ -z "${TRAVIS+x}" ] ; then
+ out=$(${SCRIPT} -H prosody.xmpp.is --port 5222 --protocol xmpp --xmpphost xmpp.is)
+ EXIT_CODE=$?
+ if echo "${out}" | grep -q "s_client' does not support '-xmpphost'" ; then
+ assertEquals "wrong exit code" ${NAGIOS_UNKNOWN} "${EXIT_CODE}"
+ else
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+ fi
+ else
+ echo "Skipping XMPP tests on Travis CI"
+ fi
+}
+
+# SSL Labs
+
+testETHZWithSSLLabs() {
+ # we assume www.ethz.ch gets at least a C
+ ${SCRIPT} -H www.ethz.ch --cn www.ethz.ch --check-ssl-labs A --rootcert cabundle.crt
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+}
+
+testTimeOut() {
+ ${SCRIPT} --rootcert cabundle.crt -H gmail.com --protocol imap --port 993 --timeout 1
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_CRITICAL}" "${EXIT_CODE}"
+}
+
+testIMAP() {
+ if [ -z "${TRAVIS+x}" ] ; then
+ ${SCRIPT} --rootcert cabundle.crt -H imap.gmx.com --port 143 --timeout 30 --protocol imap
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+ else
+ echo "Skipping IMAP tests on Travis CI"
+ fi
+}
+
+testIMAPS() {
+ if [ -z "${TRAVIS+x}" ] ; then
+ ${SCRIPT} --rootcert cabundle.crt -H imap.gmail.com --port 993 --timeout 30 --protocol imaps
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+ else
+ echo "Skipping IMAP tests on Travis CI"
+ fi
+}
+
+testPOP3S() {
+ if [ -z "${TRAVIS+x}" ] ; then
+ ${SCRIPT} --rootcert cabundle.crt -H pop.gmail.com --port 993 --timeout 30 --protocol pop3s
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+ else
+ echo "Skipping POP3S tests on Travis CI"
+ fi
+}
+
+
+testSMTP() {
+ if [ -z "${TRAVIS+x}" ] ; then
+ ${SCRIPT} --rootcert cabundle.crt -H smtp.gmail.com --protocol smtp --port 25 --timeout 60
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+ else
+ echo "Skipping SMTP tests on Travis CI"
+ fi
+}
+
+################################################################################
+# From https://badssl.com
+
+testBadSSLExpired() {
+ ${SCRIPT} -H expired.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_CRITICAL}" "${EXIT_CODE}"
+}
+
+testBadSSLWrongHost() {
+ ${SCRIPT} -H wrong.host.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_CRITICAL}" "${EXIT_CODE}"
+}
+
+testBadSSLSelfSigned() {
+ ${SCRIPT} -H self-signed.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_CRITICAL}" "${EXIT_CODE}"
+}
+
+testBadSSLUntrustedRoot() {
+ ${SCRIPT} -H untrusted-root.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_CRITICAL}" "${EXIT_CODE}"
+}
+
+testBadSSLRevoked() {
+ ${SCRIPT} -H revoked.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_CRITICAL}" "${EXIT_CODE}"
+}
+
+testGRCRevoked() {
+ ${SCRIPT} -H revoked.grc.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_CRITICAL}" "${EXIT_CODE}"
+}
+
+testBadSSLIncompleteChain() {
+ ${SCRIPT} -H incomplete-chain.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_CRITICAL}" "${EXIT_CODE}"
+}
+
+testBadSSLSHA256() {
+ if [ -z "${TRAVIS+x}" ] ; then
+ ${SCRIPT} -H sha256.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+ else
+ echo "Skipping SHA 256 with badssl.com on Travis CI"
+ fi
+}
+
+# exired on Feb 17 2019
+#testBadSSL1000SANs() {
+# if [ -z "${TRAVIS+x}" ] ; then
+# ${SCRIPT} -H 1000-sans.badssl.com --host-cn
+# EXIT_CODE=$?
+# assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+# else
+# echo "Skipping 1000 subject alternative names with badssl.com on Travis CI"
+# fi
+#}
+
+# Disabled as OpenSSL does not seem to handle it
+#testBadSSL10000SANs() {
+# ${SCRIPT} -H 10000-sans.badssl.com --host-cn
+# EXIT_CODE=$?
+# assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+#}
+
+testBadSSLEcc256() {
+ if [ -z "${TRAVIS+x}" ] ; then
+ ${SCRIPT} -H ecc256.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+ else
+ echo "Skipping ECC 256 with badssl.com on Travis CI"
+ fi
+}
+
+testBadSSLEcc384() {
+ if [ -z "${TRAVIS+x}" ] ; then
+ ${SCRIPT} -H ecc384.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+ else
+ echo "Skipping ECC 384 with badssl.com on Travis CI"
+ fi
+}
+
+testBadSSLRSA8192() {
+ if [ -z "${TRAVIS+x}" ] ; then
+ ${SCRIPT} -H rsa8192.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+ else
+ echo "Skipping RSA8192 with badssl.com on Travis CI"
+ fi
+}
+
+testBadSSLLongSubdomainWithDashes() {
+ if [ -z "${TRAVIS+x}" ] ; then
+ ${SCRIPT} -H long-extended-subdomain-name-containing-many-letters-and-dashes.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+ else
+ echo "Skipping long subdomain with dashes with badssl.com on Travis CI"
+ fi
+}
+
+testBadSSLLongSubdomain() {
+ if [ -z "${TRAVIS+x}" ] ; then
+ ${SCRIPT} -H longextendedsubdomainnamewithoutdashesinordertotestwordwrapping.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+ else
+ echo "Skipping long subdomain with badssl.com on Travis CI"
+ fi
+}
+
+testBadSSLSHA12016() {
+ ${SCRIPT} -H sha1-2016.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_CRITICAL}" "${EXIT_CODE}"
+}
+
+testBadSSLSHA12017() {
+ ${SCRIPT} -H sha1-2017.badssl.com --host-cn
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_CRITICAL}" "${EXIT_CODE}"
+}
+
+testMultipleOCSPHosts() {
+ ${SCRIPT} -H netlock.hu --rootcert cabundle.crt
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+}
+
+testRequireOCSP() {
+ ${SCRIPT} -H videolan.org --rootcert cabundle.crt --require-ocsp-stapling
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+}
+
+#testIPv4() {
+# ${SCRIPT} -H 129.132.19.216 --sni www.ethz.ch
+# EXIT_CODE=$?
+# assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+#}
+
+#testIPv6() {
+# ${SCRIPT} -H 2001:67c:10ec:4380::216 --sni www.ethz.ch
+# EXIT_CODE=$?
+# assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
+#}
+
+testFormatShort() {
+ OUTPUT=$( ${SCRIPT} -H www.ethz.ch --cn www.ethz.ch --rootcert cabundle.crt --format "%SHORTNAME% OK %CN% from '%CA_ISSUER_MATCHED%'" | cut '-d|' -f 1 )
+ EXIT_CODE=$?
+ assertEquals "wrong exit code" ${NAGIOS_OK} "${EXIT_CODE}"
+ assertEquals "wrong output" "SSL_CERT OK www.ethz.ch from 'QuoVadis Global SSL ICA G2'" "${OUTPUT}"
+}
+
+# the script will exit without executing main
+export SOURCE_ONLY='test'
+
+# source the script.
+. ${SCRIPT}
+
+unset SOURCE_ONLY
+
+# run shUnit: it will execute all the tests in this file
+# (e.g., functions beginning with 'test'
+#
+# We clone to output to pass it to grep as shunit does always return 0
+# We parse the output to check if a test failed
+#
+
+. "${SHUNIT2}"
+
+#if ! . "${SHUNIT2}" | tee /dev/tty | grep -q 'tests\ passed:\ *[0-9]*\ 100%' ; then
+# # at least one of the tests failed
+# exit 1
+#fi
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/control
new file mode 100644
index 0000000..695395c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/control
@@ -0,0 +1,8 @@
+Uploaders: Jan Wagner <waja@cyconet.org>
+Recommends: curl, file, openssl
+Suggests: expect
+Version: 1.83.0
+Homepage: https://github.com/matteocorti/check_ssl_cert
+Watch: https://github.com/matteocorti/check_ssl_cert/releases check_ssl_cert-([0-9.]+)\.tar\.gz
+Description: plugin to check the CA and validity of an
+ X.509 certificate
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/copyright
new file mode 100644
index 0000000..4f4c8a8
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/copyright
@@ -0,0 +1,19 @@
+Copyright (c) 2007-2011 ETH Zurich
+
+Authors:
+
+ Dan Wallis
+ Lawren Quigley-Jones
+ Marc Fournier
+ Marcus Rejås
+ Matteo Corti
+ Matthias Fuhrmeister
+ Raphael Thoma
+ Scott Worthington
+ Sven Nierlein
+ Tuomas Haarala
+ Wolfgang Schricker
+ Yannick Gravel
+
+This module is free software; you can redistribute it and/or modify it
+under the terms of GNU general public license (gpl) version 3.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/src b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/src
new file mode 120000
index 0000000..6ae96c7
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/src
@@ -0,0 +1 @@
+check_ssl_cert-1.83.0/ \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/ssl_cert.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/ssl_cert.cfg
new file mode 100644
index 0000000..f86eeb6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/ssl_cert.cfg
@@ -0,0 +1,5 @@
+# 'check_ssl_cert' command definition
+define command{
+ command_name check_ssl_cert
+ command_line /usr/lib/nagios/plugins/check_ssl_cert -H $HOSTADDRESS$ '$ARG1$'
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/tests b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/tests
new file mode 100644
index 0000000..5417af1
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_ssl_cert/tests
@@ -0,0 +1,2 @@
+Depends: openssl, curl, file
+Test-Command: /usr/lib/nagios/plugins/check_ssl_cert -H www.debian.org
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/Makefile
new file mode 100644
index 0000000..6f9b905
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/Makefile
@@ -0,0 +1,4 @@
+PLUGIN := check_uptime
+
+include ../common.mk
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/check_uptime b/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/check_uptime
new file mode 100644
index 0000000..e1e5b99
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/check_uptime
@@ -0,0 +1,722 @@
+#!/usr/bin/perl -w
+#
+# ============================== SUMMARY =====================================
+#
+# Program : check_uptime.pl
+# Version : 0.521
+# Date : Oct 4, 2012
+# Authors : William Leibzon - william@leibzon.org
+# Licence : GPL - summary below, full text at http://www.fsf.org/licenses/gpl.txt
+#
+# =========================== PROGRAM LICENSE =================================
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ===================== INFORMATION ABOUT THIS PLUGIN =========================
+#
+# This plugin returns uptime of the system returning data in text (readable)
+# format as well as in minutes for performance graphing. The plugin can either
+# run on local system unix system (that supports standard 'uptime' command
+# or check remote system by SNMP. The plugin can report one CRITICAL or
+# WARNING alert if system has been rebooted since last check.
+#
+# ====================== SETUP AND PLUGIN USE NOTES =========================
+#
+# The plugin can either retrieve information from local system (when you
+# run it through check_nrpe for example) or by SNMP from remote system.
+#
+# On local system it will execute standard unix 'uptime' and 'uname -a'.
+#
+# On a remote system it'll retrieve data from sysSystem for system type
+# and use that to decide if further data should be retrieved from
+# sysUptime (OID 1.3.6.1.2.1.1.3.0) for windows or
+# hostUptime (OID 1.3.6.1.2.1.25.1.1.0) for unix system or
+# snmpEngineTime (OID 1.3.6.1.6.3.10.2.1.3) for cisco switches
+#
+# For information on available options please execute it with --help i.e:
+# check_uptime.pl --help
+#
+# As I dont have time for extensive documentation below is all very brief:
+#
+# 1. You can also specify warning and critical thresholds which will
+# give warning or critical alert if system has been up for lees then
+# specified number of minutes. Example:
+# check_uptime.pl -w 5
+# Will give warning alert if system has been up for less then 5 minutes
+#
+# 2. For performance data results you can use '-f' option which will give
+# total number of minutes the system has been up.
+#
+# 3. A special case is use of performance to feed data from previous run
+# back into the plugin. This is used to cache results about what type
+# of system it is (you can also directly specify this with -T option)
+# and also means -w and -c threshold values are ignored and instead
+# plugin will issue ONE alert (warning or critical) if system uptime
+# changes from highier value to lower
+#
+# ============================ EXAMPLES =======================================
+#
+# 1. Local server (use with NRPE or on nagios host), warning on < 5 minutes:
+#
+# define command {
+# command_name check_uptime
+# command_line $USER1$/check_uptime.pl -f -w 5
+# }
+#
+# 2. Local server (use with NRPE or on nagios host),
+# one critical alert on reboot:
+#
+# define command {
+# command_name check_uptime
+# command_line $USER1$/check_uptime.pl -f -c -P "SERVICEPERFDATA$"
+# }
+#
+# 3. Remote server SNMP v2, one warning alert on reboot,
+# autodetect and cache type of server:
+#
+# define command {
+# command_name check_snmp_uptime_v2
+# command_line $USER1$/check_uptime.pl -2 -f -w -H $HOSTADDRESS$ -C $_HOSTSNMP_COMMUNITY$ -P "$SERVICEPERFDATA$"
+# }
+#
+# 4. Remote server SNMP v3, rest as above
+#
+#define command {
+# command_name check_snmp_uptime_v3
+# command_line $USER1$/check_uptime.pl -f -w -H $HOSTADDRESS$ -l $_HOSTSNMP_V3_USER$ -x $_HOSTSNMP_V3_AUTH$ -X $_HOSTSNMP_V3_PRIV$ -L sha,aes -P "$SERVICEPERFDATA$"
+# }
+#
+# 5. Example of service definition using above
+#
+# define service{
+# use std-service
+# hostgroup_name all_snmp_hosts
+# service_description SNMP Uptime
+# max_check_attempts 1
+# check_command check_snmp_uptime
+# }
+#
+# 6. And this is optional dependency definition for above which makes
+# every SNMP service (service beloning to SNMP servicegroup) on
+# same host dependent on this SNMP Uptime check. Then if SNMP
+# daemon goes down you only receive one alert
+#
+# define servicedependency{
+# service_description SNMP Uptime
+# dependent_servicegroup_name snmp
+# }
+#
+# ============================= VERSION HISTORY ==============================
+#
+# 0.1 - sometime 2006 : Simple script for tracking local system uptime
+# 0.2 - sometime 2008 : Update to get uptime by SNMP, its now alike my other plugins
+# 0.3 - Nov 14, 2009 : Added getting system info line and using that to decide
+# format of uptime line and how to process it. Added support
+# for getting uptime with SNMP from windows systems.
+# Added documentation header alike my other plugins.
+# Planned to release it to public, but forgot.
+# 0.4 - Dec 19, 2011 : Update to support SNMP v3, released to public
+# 0.41 - Jan 13, 2012 : Added bug fix by Rom_UA posted as comment on Nagios Exchange
+# Added version history you're reading right now.
+# 0.42 - Feb 13, 2012 : Bug fix to not report WARNING if uptime is not correct output
+# 0.5 - Feb 29, 2012 : Added support for "netswitch" engine type that retrieves
+# snmpEngineTime. Added proper support for sysUpTime interpreting
+# it as 1/100s of a second and converting to days,hours,minutes
+# Changed internal processing structure, now reported uptime
+# info text is based on uptime_minutes and not separate.
+# 0.51 - Jun 05, 2012 : Bug fixed for case when when snmp system info is < 3 words.
+# 0.52 - Jun 19, 2012 : For switches if snmpEngineTime OID is not available,
+# the plugin will revert back to checking hostUptime and
+# then sysUptime. Entire logic has in fact been changed
+# to support trying more than just two OIDs. Also added
+# support to specify filename to '-v' option for debug
+# output to go to instead of console and for '--debug'
+# option as an alias to '--verbose'.
+# 0.521 - Oct 4, 2012 : Small bug in one of regex, see issue #11 on github
+#
+# TODO:
+# 0) Add '--extra-opts' to allow to read options from a file as specified
+# at http://nagiosplugins.org/extra-opts. This is TODO for all my plugins
+# 1) Add support for ">", "<" and other threshold qualifiers
+# as done in check_snmp_temperature.pl or check_mysqld.pl
+# 2) Support for more types, in particular network equipment such as cisco: [DONE]
+# sysUpTime is a 32-bit counter in 1/100 of a second, it rolls over after 496 days
+# snmpEngineTime (.1.3.6.1.6.3.10.2.1.3) returns the uptime in seconds and will not
+# roll over, however some cisco switches (29xx) are buggy and it gets reset too.
+# Routers running 12.0(3)T or higher can use the snmpEngineTime object from
+# the SNMP-FRAMEWORK-MIB. This keeps track of seconds since SNMP engine started.
+# 3) Add threshold into perfout as ';warn;crit'
+#
+# ========================== START OF PROGRAM CODE ===========================
+
+use strict;
+use Getopt::Long;
+
+# Nagios specific
+our $TIMEOUT;
+our %ERRORS;
+eval 'use utils qw(%ERRORS $TIMEOUT)';
+if ($@) {
+ $TIMEOUT = 10;
+ %ERRORS = ('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
+}
+
+our $no_snmp=0;
+eval 'use Net::SNMP';
+if ($@) {
+ $no_snmp=1;
+}
+
+# Version
+my $Version='0.52';
+
+# SNMP OID
+my $oid_sysSystem = '1.3.6.1.2.1.1.1.0'; # windows and some unix
+my $oid_hostUptime = '1.3.6.1.2.1.25.1.1.0'; # hostUptime, usually unix systems
+my $oid_sysUptime = '1.3.6.1.2.1.1.3.0'; # sysUpTime, windows
+my $oid_engineTime = '1.3.6.1.6.3.10.2.1.3'; # SNMP-FRAMEWORK-MIB
+
+my @oid_uptime_types = ( ['', '', ''], # type 0 is reserved
+ [ 'local', '', ''], # type 1 is local
+ [ 'win', 'sysUpTime', $oid_sysUptime ], # type 2 is windows
+ [ 'unix-host', 'hostUpTime', $oid_hostUptime ], # type 3 is unix-host
+ [ 'unix-sys', 'sysUpTime', $oid_sysUptime ], # type 4 is unix-sys
+ [ 'net', 'engineTime', $oid_engineTime ]); # type 5 is netswitch
+
+# Not used, but perhaps later
+my $oid_hrLoad = '1.3.6.1.2.1.25.3.3.1.2.1';
+my $oid_sysLoadInt1 = '1.3.6.1.4.1.2021.10.1.5.1';
+my $oid_sysLoadInt5 = '1.3.6.1.4.1.2021.10.1.5.2';
+my $oid_sysLoadInt15 = '1.3.6.1.4.1.2021.10.1.5.3';
+
+# Standard options
+my $o_host = undef; # hostname
+my $o_timeout= undef; # Timeout (Default 10)
+my $o_help= undef; # wan't some help ?
+my $o_verb= undef; # verbose mode
+my $o_version= undef; # print version
+my $o_label= undef; # change label instead of printing uptime
+my $o_perf= undef; # Output performance data (uptime in minutes)
+my $o_prevperf= undef; # performance data given with $SERVICEPERFDATA$ macro
+my $o_warn= undef; # WARNING alert if system has been up for < specified number of minutes
+my $o_crit= undef; # CRITICAL alert if system has been up for < specified number of minutes
+my $o_type= undef; # type of check (local, auto, unix, win)
+
+# Login and other options specific to SNMP
+my $o_port = 161; # SNMP port
+my $o_community = undef; # community
+my $o_version2 = undef; # use snmp v2c
+my $o_login= undef; # Login for snmpv3
+my $o_passwd= undef; # Pass for snmpv3
+my $v3protocols= undef; # V3 protocol list.
+my $o_authproto= 'md5'; # Auth protocol
+my $o_privproto= 'des'; # Priv protocol
+my $o_privpass= undef; # priv password
+
+## Additional global variables
+my %prev_perf= (); # array that is populated with previous performance data
+my $check_type = 0;
+
+sub p_version { print "check_uptime version : $Version\n"; }
+
+sub print_usage {
+ print "Usage: $0 [-v [debugfilename]] [-T local|unix-host|unix-sys|win|net] [-H <host> (-C <snmp_community>) [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>) [-p <port>]] [-w <warn minutes> -s <crit minutes>] [-f] [-P <previous perf data from nagios \$SERVICEPERFDATA\$>] [-t <timeout>] | [-V] [--label <string>]\n";
+}
+
+sub isnnum { # Return true if arg is not a number
+ my $num = shift;
+ if ( $num =~ /^(\d+\.?\d*)|(^\.\d+)$/ ) { return 0 ;}
+ return 1;
+}
+
+sub div_mod { return int( $_[0]/$_[1]) , ($_[0] % $_[1]); }
+
+sub help {
+ print "\nUptime Plugin for Nagios (check_uptime) v. ",$Version,"\n";
+ print "GPL licence, (c) 2008-2012 William Leibzon\n\n";
+ print_usage();
+ print <<EOT;
+
+Debug & Console Options:
+ -v, --verbose[=FILENAME], --debug[=FILENAME]
+ print extra debugging information.
+ if filename is specified instead of STDOUT the debug data is written to that file
+ -h, --help
+ print this help message
+ -V, --version
+ prints version number
+
+Standard Options:
+ -T, --type=auto|local|unix-host|unis-sys|windows|netswitch
+ Type of system:
+ local : localhost (executes 'uptime' command), default if no -C or -l
+ unix-host : SNMP check from hostUptime ($oid_hostUptime) OID
+ unix-sys : SNMP check from sysUptime ($oid_sysUptime) OID
+ win | windows : SNMP check from sysUptime ($oid_sysUptime) OID
+ net | netswitch : SNMP check from snmpEngineTime ($oid_engineTime) OID
+ auto : Autodetect what system by checking sysSystem OID first, default
+ -w, --warning[=minutes]
+ Report nagios WARNING alert if system has been up for less then specified
+ number of minutes. If no minutes are specified but previous preformance
+ data is fed back with -P option then alert is sent ONLY ONCE when
+ uptime changes from greater value to smaller
+ -c, --critical[=minutes]
+ Report nagios CRITICAL alert if system has been up for less then
+ specified number of minutes or ONE ALERT if -P option is used and
+ system's previous uptime is larger then current on
+ -f, --perfparse
+ Perfparse compatible output
+ -P, --prev_perfdata
+ Previous performance data (normally put '-P \$SERVICEPERFDATA\$' in
+ nagios command definition). This is recommended if you dont specify
+ type of system with -T so that previously checked type of system info
+ is reused. This is also used to decide on warning/critical condition
+ if number of seconds is not specified with -w or -c.
+ --label=[string]
+ Optional custom label before results prefixed to results
+ -t, --timeout=INTEGER
+ timeout for SNMP in seconds (Default: 15)
+
+SNMP Access Options:
+ -H, --hostname=HOST
+ name or IP address of host to check (if not localhost)
+ -C, --community=COMMUNITY NAME
+ community name for the SNMP agent (used with v1 or v2c protocols)
+ -2, --v2c
+ use snmp v2c (can not be used with -l, -x)
+ -l, --login=LOGIN ; -x, --passwd=PASSWD
+ Login and auth password for snmpv3 authentication
+ If no priv password exists, implies AuthNoPriv
+ -X, --privpass=PASSWD
+ Priv password for snmpv3 (AuthPriv protocol)
+ -L, --protocols=<authproto>,<privproto>
+ <authproto> : Authentication protocol (md5|sha : default md5)
+ <privproto> : Priv protocols (des|aes : default des)
+ -p, --port=PORT
+ SNMP port (Default 161)
+EOT
+}
+
+# For verbose output (updated 06/06/12 to write to debug file if specified)
+sub verb {
+ my $t=shift;
+ if (defined($o_verb)) {
+ if ($o_verb eq "") {
+ print $t,"\n";
+ }
+ else {
+ if (!open(DEBUGFILE, ">>$o_verb")) {
+ print $t, "\n";
+ }
+ else {
+ print DEBUGFILE $t,"\n";
+ close DEBUGFILE;
+ }
+ }
+ }
+}
+
+# load previous performance data
+sub process_perf {
+ my %pdh;
+ my ($nm,$dt);
+ foreach (split(' ',$_[0])) {
+ if (/(.*)=(.*)/) {
+ ($nm,$dt)=($1,$2);
+ verb("prev_perf: $nm = $dt");
+ # in some of my plugins time_ is to profile how long execution takes for some part of plugin
+ # $pdh{$nm}=$dt if $nm !~ /^time_/;
+ $pdh{$nm}=$dt;
+ }
+ }
+ return %pdh;
+}
+
+sub type_from_name {
+ my $type=shift;
+ for(my $i=1; $i<scalar(@oid_uptime_types); $i++) {
+ if ($oid_uptime_types[$i][0] eq $type) {
+ return $i;
+ }
+ }
+ return -1;
+}
+
+
+sub check_options {
+ Getopt::Long::Configure ("bundling");
+ GetOptions(
+ 'v:s' => \$o_verb, 'verbose:s' => \$o_verb, "debug:s" => \$o_verb,
+ 'h' => \$o_help, 'help' => \$o_help,
+ 'H:s' => \$o_host, 'hostname:s' => \$o_host,
+ 'p:i' => \$o_port, 'port:i' => \$o_port,
+ 'C:s' => \$o_community, 'community:s' => \$o_community,
+ '2' => \$o_version2, 'v2c' => \$o_version2,
+ 'l:s' => \$o_login, 'login:s' => \$o_login,
+ 'x:s' => \$o_passwd, 'passwd:s' => \$o_passwd,
+ 'X:s' => \$o_privpass, 'privpass:s' => \$o_privpass,
+ 'L:s' => \$v3protocols, 'protocols:s' => \$v3protocols,
+ 't:i' => \$o_timeout, 'timeout:i' => \$o_timeout,
+ 'V' => \$o_version, 'version' => \$o_version,
+ 'f' => \$o_perf, 'perfparse' => \$o_perf,
+ 'w:i' => \$o_warn, 'warning:i' => \$o_warn,
+ 'c:i' => \$o_crit, 'critical:i' => \$o_crit,
+ 'label:s' => \$o_label,
+ 'P:s' => \$o_prevperf, 'prev_perfdata:s' => \$o_prevperf,
+ 'T:s' => \$o_type, 'type:s' => \$o_type,
+ );
+ if (defined ($o_help) ) { help(); exit $ERRORS{"UNKNOWN"}};
+ if (defined($o_version)) { p_version(); exit $ERRORS{"UNKNOWN"}};
+
+ $o_type = "win" if defined($o_type) && $o_type eq 'windows';
+ $o_type = "net" if defined($o_type) && $o_type eq 'netswitch';
+ if (defined($o_type) && $o_type ne 'auto' && type_from_name($o_type)==-1) {
+ print "Invalid system type specified\n"; print_usage(); exit $ERRORS{"UNNKNOWN"};
+ }
+
+ if (!defined($o_community) && (!defined($o_login) || !defined($o_passwd)) ) {
+ $o_type='local' if !defined($o_type) || $o_type eq 'auto';
+ if ($o_type ne 'local') {
+ print "Put snmp login info!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}
+ }
+ if (defined($o_host)) {
+ print "Why are you specifying hostname without SNMP parameters?\n"; print_usage(); exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ else {
+ $o_type='auto' if !defined($o_type);
+ if ($o_type eq 'local' ) {
+ print "Why are you specifying SNMP login for local system???\n"; print_usage(); exit $ERRORS{"UNKNOWN"}
+ }
+ if (!defined($o_host)) {
+ print "Hostname required for SNMP check.\n"; print_usage(); exit $ERRORS{"UNKNOWN"};
+ }
+ if ($no_snmp) {
+ print "Can't locate Net/SNMP.pm\n"; print_usage(); exit $ERRORS{"UNKNOWN"};
+ }
+ }
+
+ # check snmp information
+ if ((defined($o_login) || defined($o_passwd)) && (defined($o_community) || defined($o_version2)) )
+ { print "Can't mix snmp v1,2c,3 protocols!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}}
+ if (defined ($v3protocols)) {
+ if (!defined($o_login)) { print "Put snmp V3 login info with protocols!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}}
+ my @v3proto=split(/,/,$v3protocols);
+ if ((defined ($v3proto[0])) && ($v3proto[0] ne "")) {$o_authproto=$v3proto[0]; } # Auth protocol
+ if (defined ($v3proto[1])) {$o_privproto=$v3proto[1]; } # Priv protocol
+ if ((defined ($v3proto[1])) && (!defined($o_privpass)))
+ { print "Put snmp V3 priv login info with priv protocols!\n"; print_usage(); exit $ERRORS{"UNKNOWN"}}
+ }
+
+ if (defined($o_timeout) && (isnnum($o_timeout) || ($o_timeout < 2) || ($o_timeout > 60)))
+ { print "Timeout must be >1 and <60 !\n"; print_usage(); exit $ERRORS{"UNKNOWN"}}
+ if (!defined($o_timeout)) {$o_timeout=$TIMEOUT+5;}
+
+ if (defined($o_prevperf)) {
+ if (defined($o_perf)) {
+ %prev_perf=process_perf($o_prevperf);
+ $check_type = $prev_perf{type} if $o_type eq 'auto' && exists($prev_perf{tye}) && exists($oid_uptime_types[$prev_perf{type}][0]);
+ }
+ else {
+ print "need -f option first \n"; print_usage(); exit $ERRORS{"UNKNOWN"};
+ }
+ }
+
+ if ($o_type eq 'auto') {
+ $check_type=0;
+ }
+ else {
+ $check_type = type_from_name($o_type);
+ }
+}
+
+sub create_snmp_session {
+ my ($session,$error);
+
+ if ( defined($o_login) && defined($o_passwd)) {
+ # SNMPv3 login
+ if (!defined ($o_privpass)) {
+ verb("SNMPv3 AuthNoPriv login : $o_login, $o_authproto");
+ ($session, $error) = Net::SNMP->session(
+ -hostname => $o_host,
+ -version => '3',
+ -port => $o_port,
+ -username => $o_login,
+ -authpassword => $o_passwd,
+ -authprotocol => $o_authproto,
+ -timeout => $o_timeout
+ );
+ } else {
+ verb("SNMPv3 AuthPriv login : $o_login, $o_authproto, $o_privproto");
+ ($session, $error) = Net::SNMP->session(
+ -hostname => $o_host,
+ -version => '3',
+ -username => $o_login,
+ -port => $o_port,
+ -authpassword => $o_passwd,
+ -authprotocol => $o_authproto,
+ -privpassword => $o_privpass,
+ -privprotocol => $o_privproto,
+ -timeout => $o_timeout
+ );
+ }
+ } else {
+ if (defined ($o_version2)) {
+ # SNMPv2c Login
+ verb("SNMP v2c login");
+ ($session, $error) = Net::SNMP->session(
+ -hostname => $o_host,
+ -version => 2,
+ -community => $o_community,
+ -port => $o_port,
+ -timeout => $o_timeout
+ );
+ } else {
+ # SNMPV1 login
+ verb("SNMP v1 login");
+ ($session, $error) = Net::SNMP->session(
+ -hostname => $o_host,
+ -community => $o_community,
+ -port => $o_port,
+ -timeout => $o_timeout
+ );
+ }
+ }
+ if (!defined($session)) {
+ printf("ERROR opening session: %s.\n", $error);
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ return $session;
+}
+
+$SIG{'ALRM'} = sub {
+ print "Alarm timeout\n";
+ exit $ERRORS{"UNKNOWN"};
+};
+
+########## MAIN #######
+my $system_info="";
+my $uptime_info=undef;
+my $uptime_minutes=undef;
+my $perf_out="";
+my $status=0;
+my $uptime_output;
+my ($days, $hrs, $mins);
+
+check_options();
+
+# Check gobal timeout if snmp screws up
+if (defined($o_timeout)) {
+ verb("Alarm at $o_timeout + 5");
+ alarm($o_timeout+5);
+}
+
+if ($check_type==1) { # local
+ # Process unix uptime command output
+ $uptime_output=`uptime`;
+ verb("Local Uptime Result is: $uptime_output");
+ if ($uptime_output =~ /(\d+)\s+days?,\s+(\d+)\:(\d+)/) {
+ ($days, $hrs, $mins) = ($1, $2, $3);
+ }
+ elsif ($uptime_output =~ /up\s+(\d+)\shours?\s+(\d+)/) {
+ ($days, $hrs, $mins) = (0, $1, $2);
+ }
+ elsif ($uptime_output =~ /up\s+(\d+)\:(\d+)/) {
+ ($days, $hrs, $mins) = (0, $1, $2);
+ }
+ elsif ($uptime_output =~ /up\s+(\d+)\s+min/) {
+ ($days, $hrs, $mins) = (0,0,$1);
+ }
+ elsif ($uptime_output =~ /up\s+(\d+)s+days?,s+(\d+)s+min/) {
+ ($days, $hrs, $mins) = ($1,0,$2);
+ }
+ else {
+ $uptime_info = "up ".$uptime_output;
+ }
+ if (defined($days) && defined($hrs) && defined($mins)) {
+ $uptime_minutes = $days*24*60+$hrs*60+$mins;
+ }
+ my @temp=split(' ',`uname -a`);
+ if (scalar(@temp)<3) {
+ $system_info=`uname -a`;
+ }
+ else {
+ $system_info=join(' ',$temp[0],$temp[1],$temp[2]);
+ }
+}
+else {
+ # SNMP connection
+ my $session=create_snmp_session();
+ my $result=undef;
+ my $oid="";
+ my $guessed_check_type=0;
+
+ if ($check_type==0){
+ $result = $session->get_request(-varbindlist=>[$oid_sysSystem]);
+ if (!defined($result)) {
+ printf("ERROR: Can not retrieve $oid_sysSystem table: %s.\n", $session->error);
+ $session->close;
+ exit $ERRORS{"UNKNOWN"};
+ }
+ verb("$o_host SysInfo Result from OID $oid_sysSystem: $result->{$oid_sysSystem}");
+ if ($result->{$oid_sysSystem} =~ /Windows/) {
+ $guessed_check_type=2;
+ verb('Guessing Type: 2 = windows');
+ }
+ if ($result->{$oid_sysSystem} =~ /Cisco/) {
+ $guessed_check_type=5;
+ verb('Guessing Type: 5 = netswitch');
+ }
+ if ($guessed_check_type==0) {
+ $guessed_check_type=3; # will try hostUptime first
+ }
+ $oid=$oid_uptime_types[$guessed_check_type][2];
+ }
+ else {
+ $oid=$oid_uptime_types[$check_type][2];
+ }
+
+ do {
+ $result = $session->get_request(-varbindlist=>[$oid,$oid_sysSystem]);
+ if (!defined($result)) {
+ if ($check_type!=0) {
+ printf("ERROR: Can not retrieve uptime OID table $oid: %s.\n", $session->error);
+ $session->close;
+ exit $ERRORS{"UNKNOWN"};
+ }
+ else {
+ if ($session->error =~ /noSuchName/) {
+ if ($guessed_check_type==4) {
+ verb("Received noSuchName error for sysUpTime OID $oid. Giving up.");
+ $guessed_check_type=0;
+ }
+ if ($guessed_check_type==3) {
+ verb("Received noSuchName error for hostUpTime OID $oid, will now try sysUpTime");
+ $guessed_check_type=4;
+ }
+ else {
+ verb("Received noSuchName error for OID $oid, will now try hostUpTime");
+ $guessed_check_type=3;
+ }
+ if ($guessed_check_type!=0) {
+ $oid=$oid_uptime_types[$guessed_check_type][2];
+ }
+ }
+ else {
+ printf("ERROR: Can not retrieve uptime OID table $oid: %s.\n", $session->error);
+ $session->close;
+ exit $ERRORS{"UNKNOWN"};
+ }
+ }
+ }
+ else {
+ if ($check_type==0) {
+ $check_type=$guessed_check_type;
+ }
+ }
+ }
+ while (!defined($result) && $guessed_check_type!=0);
+
+ $session->close;
+ if ($check_type==0 && $guessed_check_type==0) {
+ printf("ERROR: Can not autodetermine proper uptime OID table. Giving up.\n");
+ exit $ERRORS{"UNKNOWN"};
+ }
+
+ my ($days, $hrs, $mins);
+ $uptime_output=$result->{$oid};
+ verb("$o_host Uptime Result from OID $oid: $uptime_output");
+
+ if ($uptime_output =~ /(\d+)\s+days?,\s+(\d+)\:(\d+)/) {
+ ($days, $hrs, $mins) = ($1, $2, $3);
+ }
+ elsif ($uptime_output =~ /(\d+)\s+hours?,\s+(\d+)\:(\d+)/) {
+ ($days, $hrs, $mins) = (0, $1, $2);
+ }
+ elsif ($uptime_output =~ /(\d+)\s+min/) {
+ ($days, $hrs, $mins) = (0, 0, $1);
+ }
+ if (defined($days) && defined($hrs) && defined($mins)) {
+ $uptime_minutes = $days*24*60+$hrs*60+$mins;
+ }
+ elsif ($uptime_output =~ /^(\d+)$/) {
+ my $upnum = $1;
+ if ($oid eq $oid_sysUptime) {
+ $uptime_minutes = $upnum/100/60;
+ }
+ elsif ($oid eq $oid_engineTime) {
+ $uptime_minutes = $upnum/60;
+ }
+ }
+ else {
+ $uptime_info = "up ".$uptime_output;
+ }
+ my @temp=split(' ',$result->{$oid_sysSystem});
+ if (scalar(@temp)<3) {
+ $system_info=$result->{$oid_sysSystem};
+ }
+ else {
+ $system_info=join(' ',$temp[0],$temp[1],$temp[2]);
+ }
+}
+
+if (defined($uptime_minutes) && !defined($uptime_info)) {
+ ($hrs,$mins) = div_mod($uptime_minutes,60);
+ ($days,$hrs) = div_mod($hrs,24);
+ $uptime_info = "up ";
+ $uptime_info .= "$days days " if $days>0;
+ $uptime_info .= "$hrs hours " if $hrs>0;
+ $uptime_info .= "$mins minutes";
+}
+
+verb("System Type: $check_type (".$oid_uptime_types[$check_type][0].")");
+verb("System Info: $system_info") if $system_info;
+verb("Uptime Text: $uptime_info") if defined($uptime_info);
+verb("Uptime Minutes: $uptime_minutes") if defined($uptime_minutes);
+
+if (!defined($uptime_info)) {
+ $uptime_info = "Can not determine uptime";
+ $status = 3;
+}
+
+if (defined($o_perf)) {
+ $perf_out = "type=$check_type";
+ $perf_out .= " uptime_minutes=$uptime_minutes" if defined($uptime_minutes);
+}
+
+if (defined($uptime_minutes)) {
+ if (defined($o_prevperf)) {
+ $status = 1 if defined($o_warn) && exists($prev_perf{uptime_minutes}) && $prev_perf{uptime_minutes} > $uptime_minutes;
+ $status = 2 if defined($o_crit) && exists($prev_perf{uptime_minutes}) && $prev_perf{uptime_minutes} > $uptime_minutes;
+ }
+ else {
+ $status = 1 if defined($o_warn) && !isnnum($o_warn) && $o_warn >= $uptime_minutes;
+ $status = 2 if defined($o_crit) && !isnnum($o_crit) && $o_crit >= $uptime_minutes;
+ }
+}
+alarm(0);
+
+my $exit_status="UNKNOWN";
+$exit_status="OK" if $status==0;
+$exit_status="WARNING" if $status==1;
+$exit_status="CRITICAL" if $status==2;
+$exit_status="UNKNOWN" if $status==3;
+$exit_status="$o_label $exit_status" if defined($o_label);
+print "$exit_status: $system_info";
+print " - $uptime_info";
+print " | ",$perf_out if $perf_out;
+print "\n";
+exit $status;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/check_uptime.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/check_uptime.cfg
new file mode 100644
index 0000000..962e8ad
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/check_uptime.cfg
@@ -0,0 +1,15 @@
+define command {
+ command_name check_uptime
+ command_line $USER1$/check_uptime -f -w $ARG1$ -c $ARG2$
+}
+
+define command {
+ command_name check_snmp_uptime_v2
+ command_line $USER1$/check_uptime -2 -f -w $ARG1$ -c $ARG2$ -H $HOSTADDRESS$ -C $_HOSTSNMP_COMMUNITY$
+}
+
+define command {
+ command_name check_snmp_uptime_v3
+ command_line $USER1$/check_uptime -f -w $ARG1$ -c $ARG2$ -H $HOSTADDRESS$ -l $_HOSTSNMP_V3_USER$ -x $_HOSTSNMP_V3_AUTH$ -X $_HOSTSNMP_V3_PRIV$ -L sha,aes
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/control
new file mode 100644
index 0000000..4ec1353
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/control
@@ -0,0 +1,10 @@
+Homepage: https://github.com/willixix/WL-NagiosPlugins
+Watch: https://raw.githubusercontent.com/willixix/WL-NagiosPlugins/master/check_uptime.pl Version[ :]+([0-9.]+)
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: check_uptime returns uptime of a system
+ in text (readable) format as well as in minutes for performance graphing.
+ The plugin can either run on a local unix system (using 'uptime' command)
+ or check remote system by SNMP. Also it is able to report one CRITICAL
+ or WARNING alert if system has been rebooted since last check.
+Recommends: libnet-snmp-perl
+Version: 0.521
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/copyright
new file mode 100644
index 0000000..3508649
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/copyright
@@ -0,0 +1,19 @@
+Authors : William Leibzon - william@leibzon.org
+Licence : GPL - summary below, full text at http://www.fsf.org/licenses/gpl.txt
+
+=========================== PROGRAM LICENSE =================================
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software Foundation,
+Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/tests b/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/tests
new file mode 100644
index 0000000..ffbfcb2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_uptime/tests
@@ -0,0 +1,2 @@
+Depends: libmonitoring-plugin-perl | libnagios-plugin-perl
+Test-Command: /usr/lib/nagios/plugins/check_uptime -f
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/Makefile
new file mode 100644
index 0000000..55e4f68
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/Makefile
@@ -0,0 +1,6 @@
+#/usr/bin/make -f
+
+PLUGIN = check_v46
+
+include ../common.mk
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/check_v46 b/nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/check_v46
new file mode 100755
index 0000000..2990b74
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/check_v46
@@ -0,0 +1,318 @@
+#!/usr/bin/perl
+#
+# check_v46
+# Nagios plugin wrapper for running the actual plugin for both / either of
+# IPv6 and/or IPv4. The worst result of the actual plugin runs will be
+# the wrapper return value, that is, result will be OK only if all checks
+# returned OK. Compatible with any plugin with standard command line options
+# -6/-4.
+#
+# 2012-02, 2012-03 Ville.Mattila@csc.fi
+# Copyright (C) 2012-2013 CSC - IT Center for Science Ltd.
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 3 of the License, or (at your option) any later
+# version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, see <http://www.gnu.org/licenses/>.
+
+use strict;
+use warnings FATAL => qw(all);
+use File::Basename;
+use Getopt::Long;
+use Socket; # AF_INET, AF_INET6
+use Socket6; # getaddrinfo(), getnameinfo()
+
+my %ERRORS = (
+ 'OK' => 0,
+ 'WARNING' => 1,
+ 'CRITICAL' => 2,
+ 'UNKNOWN' => 3,
+);
+
+my %ERRSTR = reverse %ERRORS;
+
+$SIG{__DIE__} = sub { die( basename($0) . ": Error: " . $_[0] ); };
+$SIG{__WARN__} = sub { print STDERR basename($0) . ": Warning: " . $_[0]; };
+
+Getopt::Long::Configure('bundling');
+Getopt::Long::Configure('pass_through');
+my %opts;
+GetOptions( \%opts,
+ "debug-wrapper",
+ "help|h",
+ "hostname|H=s",
+ "IP-address|I=s", # support 'check_http -I'
+ "use-ipv4|4",
+ "use-ipv6|6",
+ "ipv4-address|a=s",
+ "ipv6-address|A=s",
+ ) or die "Problems parsing command line: $!\n";
+
+if ( $opts{help} ) {
+ usage();
+ exit 0;
+}
+
+# Sanity checks for command line options
+if (!scalar @ARGV) {
+ die("Nothing to do. Try '".basename($0)." -h'.\n");
+}
+if (!defined($opts{hostname}) && !defined($opts{'IP-address'}) &&
+ !(defined($opts{'ipv4-address'}) ||
+ defined($opts{'ipv6-address'}))) {
+ die("No host/address specified. Try '".basename($0)." -h'.\n");
+}
+if ( $opts{'use-ipv4'} && $opts{'use-ipv6'} ) {
+ die("Please specify either or none of --use-ipv4 or --use-ipv6, not both.\n");
+}
+
+my $plugin_prog = shift(@ARGV);
+
+# Do both IPv4 and IPv6 checks by default, skipping
+# IPv6 in case -4 was specified skipping IPv4 in case
+# of -6.
+my @protocols = ();
+if ( $opts{'use-ipv6'} ) {
+ push @protocols, "IPv6";
+}
+elsif ( $opts{'use-ipv4'} ) {
+ push @protocols, "IPv4";
+}
+else {
+ # No address family selected.
+ push @protocols, qw(IPv6 IPv4);
+}
+
+my $out;
+my $rv;
+my @checked;
+foreach my $p (@protocols) {
+
+ # Use the address specified as --ipv6-address or --ipv4-address argument
+ # or, in case addresses were not specified, resolve --IP-address or
+ # --hostname instead.
+
+ # Resolve.
+ my @addresses = ();
+ my $addr_optname = '--hostname';
+ my $optname;
+ my $af;
+ if ( $p eq 'IPv6' ) {
+ $optname = 'ipv6-address';
+ $af = AF_INET6;
+ }
+ elsif ( $p eq 'IPv4' ) {
+ $optname = 'ipv4-address';
+ $af = AF_INET;
+ }
+ else {
+ die "Protocol '$p' is not supported.\n";
+ }
+
+ if ( defined($opts{$optname}) ) {
+
+ # --ipvX-address was specified on command line.
+ push @addresses, split( ',', $opts{$optname} );
+ }
+ elsif ( defined($opts{'IP-address'}) && resolve_address( $opts{'IP-address'} , $af ) ) {
+ # $opts{'IP-address'} has an $af address. Pass it to plugin.
+ @addresses = ( $opts{'IP-address'} );
+ $addr_optname = '--IP-address';
+ }
+ elsif ( resolve_address( $opts{hostname}, $af ) ) {
+
+ # $opts{hostname} has an $af address. Pass it to plugin.
+ @addresses = ( $opts{hostname} );
+ }
+ else {
+
+ # Neither $opts{'IP-address'} nor $opts{hostname} resolve for $af.
+ next;
+ }
+
+ my @plugin_args = @ARGV;
+
+ # Insert -6 or -4 as first arg for plugin command.
+ unshift(@plugin_args, ( $p eq "IPv6" ) ? "-6" : "-4");
+
+ # Pass through --hostname option as-is if --IP-address was also specified.
+ if (defined($opts{'IP-address'}) && defined($opts{hostname})) {
+ push(@plugin_args, '--hostname', $opts{hostname});
+ }
+
+ my $an = 1;
+ foreach my $a (@addresses) {
+ my @addr_args = ( $addr_optname, $a );
+ debug(
+ "Running '$plugin_prog " . join( " ", @plugin_args, @addr_args ) );
+ open( PLUGIN, "-|", $plugin_prog, @plugin_args, @addr_args )
+ or die "Problems executing plugin.\n";
+ push(@checked, $a);
+
+ my $first = <PLUGIN>;
+ chomp($first);
+ debug( "Plugin output 1st line: '" . $first . "'" );
+
+ # Strip off performance data from the $first line of plugin
+ # output.
+ $first =~ s/^([^\|]+)\|(.*)/$1/;
+ $out->{$p}->{$a}->{first} = $first;
+
+ # Add lc($p) as prefix to performance data labels, e.g.
+ # 'loss' becomes 'ipv6_loss' etc.
+ my $perfdata = $2;
+ if ( defined($perfdata) ) {
+ my $label_prefix = lc($p);
+ $label_prefix .= "_a" . $an if ( @addresses );
+ $perfdata =~ s/(^|\s+)([^=]+)/$1${label_prefix}_$2/g;
+ debug( "Reformatted performance data: '" . $perfdata . "'" );
+ $out->{$p}->{$a}->{perfdata} = $perfdata;
+ }
+
+ # Store the rest of plugin output lines.
+ while (<PLUGIN>) {
+ chomp;
+ push(@{ $out->{$p}->{$a}->{multiline} }, $_);
+ debug( "Plugin multiline output: '" . $_ . "'" );
+ }
+
+ close(PLUGIN);
+
+ # Store plugin command return value.
+ my $plugin_rv = ( $? >> 8 );
+ $rv->{$p}->{$a} = $plugin_rv;
+ debug("Plugin result: ".$plugin_rv." (".$ERRSTR{$plugin_rv}.")");
+
+ $an++;
+ }
+}
+
+if ( !@checked ) {
+ print "UNKNOWN: No " . join( ", ", @protocols ) . " address to check.\n";
+ exit $ERRORS{UNKNOWN};
+}
+
+my @status_summary = ();
+my @status_details = ();
+my @perfdata = ();
+my $worst_rv = undef;
+foreach my $p ( sort { $b cmp $a } keys %$rv ) {
+ foreach my $a ( sort keys %{ $rv->{$p} } ) {
+ if ( !defined $worst_rv || $worst_rv < $rv->{$p}->{$a} ) {
+ $worst_rv = $rv->{$p}->{$a};
+ }
+ push(@status_summary, "$p/$a " . $ERRSTR{ $rv->{$p}->{$a} });
+ push(@perfdata, $out->{$p}->{$a}->{perfdata})
+ if ( defined $out->{$p}->{$a}->{perfdata} );
+ push(@status_details, "$p/$a:");
+ push(@status_details, $out->{$p}->{$a}->{first});
+ push(@status_details, @{ $out->{$p}->{$a}->{multiline} })
+ if ( defined $out->{$p}->{$a}->{multiline} );
+ }
+}
+
+print $ERRSTR{$worst_rv} . ": " . join( ", ", @status_summary );
+print " | " . join( " ", @perfdata ) if ( @perfdata );
+print "\n";
+print "Status details:\n";
+print $_. "\n" foreach (@status_details);
+
+exit $worst_rv;
+
+sub resolve_address {
+ my ( $hostname, @address_families ) = @_;
+ if (!defined($hostname)) {
+ return ();
+ }
+
+ $hostname = lc($hostname);
+
+ @address_families = ( AF_INET6, AF_INET )
+ unless ( scalar @address_families );
+
+ my @addrs = ();
+ foreach my $af (@address_families) {
+ my @res = getaddrinfo( $hostname, 'daytime', $af, SOCK_STREAM );
+ while ( scalar(@res) >= 5 ) {
+ my ( $family, $socktype, $proto, $saddr, $canonname ) =
+ @res[ 0 .. 4 ];
+ @res = @res[ 5 .. ($#res) ];
+ my ( $address, $port ) =
+ getnameinfo( $saddr, NI_NUMERICHOST | NI_NUMERICSERV );
+ push @addrs, $address;
+ }
+ }
+ return @addrs; # NB: unsorted!
+}
+
+sub usage {
+ my $ME = basename($0);
+ print <<"AMEN";
+Usage: $ME -H <host> [--use-ipv4|--use-ipv6] [<other options>] \
+ <plugin> [<other plugin args>]
+Options:
+ -H, --hostname <host|address>
+ Hostname or IPv6/IPv4 address to connect to.
+ -I, --IP-address <host|address>
+ IPv6 or IPv4 address or hostname, preferred over --hostname.
+ Use this with the check_http plugin if you need to specify
+ both --IP-address and --hostname for it.
+ -4, --use-ipv4
+ Check IPv4 only.
+ -6, --use-ipv6
+ Check IPv6 only.
+ -a, --ipv4-address=a.b.c.d,e.f.g.h
+ Check IPv4 using addresses a.b.c.d and e.f.g.h;
+ plugin will be run with the address as --hostname
+ option argument (replacing the original argument of
+ --hostname).
+ -A, --ipv6-address=A::B,C::D
+ Check IPv6 using addresses A::B and C::D; see -a above
+ for notes on plugin --hostname option handling.
+ <plugin>
+ Path to the actual plugin program to run.
+ <other plugin args>
+ Any command line arguments besides -H, -4, -6, -a and -A
+ will be passed as-is to the <plugin>.
+
+ The order of options is not relevant, e.g.
+ '$ME -H <host> <plugin>' is effectively the same as
+ '$ME <plugin> -H <host>'.
+
+Examples:
+ $ME check_ssh -H host.example.org
+ - "Automatic dual stack test": Run check_ssh for IPv6 only if
+ the system resolver returns an IPv6 address and likewise for
+ IPv4.
+ $ME check_ssh -H host.example.org -4
+ - Run IPv4 check only.
+ $ME check_ssh -H host.example.org -6
+ - Run IPv6 check only.
+ $ME check_ssh -H host.example.org -a a.b.c.d
+ - Pass "--hostname a.b.c.d" to check_ssh when checking IPv4
+ and have IPv6 checks run automatically as in the first example.
+ $ME check_ssh -H host.example.org -6 -A A::B
+ - IPv6 checking only, skip resolving host.example.org and
+ just pass "--hostname A::B" to check_ssh.
+ $ME check_http -I vhost.example.org -H lb-01.example.org
+ - Check the HTTP virtual host vhost.example at load balancer node
+ lb-01.
+AMEN
+}
+
+sub debug {
+ my ($msg) = @_;
+
+ return unless ( $opts{'debug-wrapper'} );
+
+ chomp $msg;
+ print STDERR "debug: " . $msg . "\n";
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/control
new file mode 100644
index 0000000..3261a18
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/control
@@ -0,0 +1,10 @@
+Watch: https://gitorious.org/nagios-monitoring-tools/nagios-monitoring-tools.git/?p=nagios-monitoring-tools:nagios-monitoring-tools.git;a=atom <updated>([^>]+)</updated>
+Version: 2013-08-26T07:33:11Z
+Homepage: https://gitorious.org/nagios-monitoring-tools/nagios-monitoring-tools/
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: ipv4/ipv6 Nagios plugin wrapper
+ Nagios plugin wrapper for running the actual plugin for both / either of
+ IPv6 and/or IPv4. The worst result of the actual plugin runs will be
+ the wrapper return value, that is, result will be OK only if all checks
+ returned OK. Compatible with any plugin with standard command line options
+ -6/-4.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/copyright
new file mode 100644
index 0000000..15d76b8
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_v46/copyright
@@ -0,0 +1,16 @@
+2012-02, 2012-03 Ville.Mattila@csc.fi
+Copyright (C) 2012-2013 CSC - IT Center for Science Ltd.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 3 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, see <http://www.gnu.org/licenses/>.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/Makefile
new file mode 100644
index 0000000..94bfcc3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/Makefile
@@ -0,0 +1,15 @@
+PLUGIN := check_varnish
+CLEANFILES := check_varnish
+
+include ../common.mk
+
+check_varnish:
+ set -e; for i in guess sub; do if [ ! -e src/config.$$i.bak ]; then cp src/config.$$i src/config.$$i.bak; fi; done
+ cp /usr/share/misc/config.* src
+ cd src && ./configure --prefix=/usr
+ make -C src
+ cp src/check_varnish $@
+
+clean::
+ [ ! -f src/Makefile ] || make -C src distclean
+ set -e; for i in guess sub; do if [ -e src/config.$$i.bak ]; then mv src/config.$$i.bak src/config.$$i; fi; done
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/control
new file mode 100644
index 0000000..c4ee5b6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/control
@@ -0,0 +1,6 @@
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Build-Depends: libvarnishapi-dev [!hurd-i386 !m68k], pkg-config, automake-1.15
+Version: 672523d
+Homepage: https://github.com/varnish/varnish-nagios
+Watch: https://github.com/varnish/varnish-nagios <a class="commit-tease-sha"[^>]*>\s+([0-9a-f]+)\s+</a>
+Description: plugin to monitor varnish instances
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/copyright
new file mode 100644
index 0000000..158ebb0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/copyright
@@ -0,0 +1,24 @@
+
+Copyright (c) 2007-2009 Linpro AS
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/src b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/src
new file mode 120000
index 0000000..9f8197a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/src
@@ -0,0 +1 @@
+varnish-nagios \ No newline at end of file
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/tests b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/tests
new file mode 100644
index 0000000..421e067
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/tests
@@ -0,0 +1,3 @@
+Depends: varnish, systemd, dbus
+Restrictions: needs-root, isolation-container
+Tests: test_check_varnish
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/LICENSE b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/LICENSE
new file mode 100644
index 0000000..dcd2aae
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2007-2009 Linpro AS
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/Makefile.am b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/Makefile.am
new file mode 100644
index 0000000..c9eae8c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/Makefile.am
@@ -0,0 +1,11 @@
+# $Id$
+
+libexec_PROGRAMS = check_varnish
+
+check_varnish_SOURCES = check_varnish.c
+
+check_varnish_CFLAGS = -include config.h ${VARNISHAPI_CFLAGS}
+
+check_varnish_LDADD = ${VARNISHAPI_LIBS}
+
+EXTRA_DIST = LICENSE autogen.sh
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/Makefile.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/Makefile.in
new file mode 100644
index 0000000..235483f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/Makefile.in
@@ -0,0 +1,848 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# $Id$
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+libexec_PROGRAMS = check_varnish$(EXEEXT)
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(libexecdir)"
+PROGRAMS = $(libexec_PROGRAMS)
+am_check_varnish_OBJECTS = check_varnish-check_varnish.$(OBJEXT)
+check_varnish_OBJECTS = $(am_check_varnish_OBJECTS)
+am__DEPENDENCIES_1 =
+check_varnish_DEPENDENCIES = $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+check_varnish_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(check_varnish_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(check_varnish_SOURCES)
+DIST_SOURCES = $(check_varnish_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+ $(LISP)config.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+AM_RECURSIVE_TARGETS = cscope
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in compile \
+ config.guess config.sub depcomp install-sh ltmain.sh missing
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VARNISHAPI_CFLAGS = @VARNISHAPI_CFLAGS@
+VARNISHAPI_LIBS = @VARNISHAPI_LIBS@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+check_varnish_SOURCES = check_varnish.c
+check_varnish_CFLAGS = -include config.h ${VARNISHAPI_CFLAGS}
+check_varnish_LDADD = ${VARNISHAPI_LIBS}
+EXTRA_DIST = LICENSE autogen.sh
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+check_varnish$(EXEEXT): $(check_varnish_OBJECTS) $(check_varnish_DEPENDENCIES) $(EXTRA_check_varnish_DEPENDENCIES)
+ @rm -f check_varnish$(EXEEXT)
+ $(AM_V_CCLD)$(check_varnish_LINK) $(check_varnish_OBJECTS) $(check_varnish_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_varnish-check_varnish.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+check_varnish-check_varnish.o: check_varnish.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_varnish_CFLAGS) $(CFLAGS) -MT check_varnish-check_varnish.o -MD -MP -MF $(DEPDIR)/check_varnish-check_varnish.Tpo -c -o check_varnish-check_varnish.o `test -f 'check_varnish.c' || echo '$(srcdir)/'`check_varnish.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_varnish-check_varnish.Tpo $(DEPDIR)/check_varnish-check_varnish.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_varnish.c' object='check_varnish-check_varnish.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_varnish_CFLAGS) $(CFLAGS) -c -o check_varnish-check_varnish.o `test -f 'check_varnish.c' || echo '$(srcdir)/'`check_varnish.c
+
+check_varnish-check_varnish.obj: check_varnish.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_varnish_CFLAGS) $(CFLAGS) -MT check_varnish-check_varnish.obj -MD -MP -MF $(DEPDIR)/check_varnish-check_varnish.Tpo -c -o check_varnish-check_varnish.obj `if test -f 'check_varnish.c'; then $(CYGPATH_W) 'check_varnish.c'; else $(CYGPATH_W) '$(srcdir)/check_varnish.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/check_varnish-check_varnish.Tpo $(DEPDIR)/check_varnish-check_varnish.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check_varnish.c' object='check_varnish-check_varnish.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_varnish_CFLAGS) $(CFLAGS) -c -o check_varnish-check_varnish.obj `if test -f 'check_varnish.c'; then $(CYGPATH_W) 'check_varnish.c'; else $(CYGPATH_W) '$(srcdir)/check_varnish.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
+
+dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__post_remove_distdir)
+
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__post_remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) config.h
+installdirs:
+ for dir in "$(DESTDIR)$(libexecdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libexecPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libexecPROGRAMS
+
+.MAKE: all install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \
+ clean-cscope clean-generic clean-libexecPROGRAMS clean-libtool \
+ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
+ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
+ distcheck distclean distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags distcleancheck \
+ distdir distuninstallcheck dvi dvi-am html html-am info \
+ info-am install install-am install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-libexecPROGRAMS install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-libexecPROGRAMS
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/README.md b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/README.md
new file mode 100644
index 0000000..92b0559
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/README.md
@@ -0,0 +1,12 @@
+# check_varnish
+
+A simple nagios check for varnish.
+
+## Building
+
+You will need the varnish source tree, or development packages in addition to autoconf, automake and pkg-config in order to build this:
+
+ ./autogen.sh
+ ./configure
+ make
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/aclocal.m4 b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/aclocal.m4
new file mode 100644
index 0000000..77dcc64
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/aclocal.m4
@@ -0,0 +1,10504 @@
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the same
+# distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+])
+
+# serial 58 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS=$ltmain
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_PREPARE_CC_BASENAME
+# -----------------------
+m4_defun([_LT_PREPARE_CC_BASENAME], [
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in @S|@*""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+])# _LT_PREPARE_CC_BASENAME
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
+# but that macro is also expanded into generated libtool script, which
+# arranges for $SED and $ECHO to be set by different means.
+m4_defun([_LT_CC_BASENAME],
+[m4_require([_LT_PREPARE_CC_BASENAME])dnl
+AC_REQUIRE([_LT_DECL_SED])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+func_cc_basename $1
+cc_basename=$func_cc_basename_result
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
+m4_require([_LT_CMD_TRUNCATE])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options that allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+old_CC=$CC
+old_CFLAGS=$CFLAGS
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ _LT_PATH_MAGIC
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from 'configure', and 'config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# 'config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain=$ac_aux_dir/ltmain.sh
+])# _LT_PROG_LTMAIN
+
+
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the 'libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to 'config.status' so that its
+# declaration there will have the same value as in 'configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags='_LT_TAGS'dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into 'config.status', and then the shell code to quote escape them in
+# for loops in 'config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable. If COMMENT is supplied, it is inserted after the
+# '#!' sequence but before initialization text begins. After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script. The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test 0 = "$lt_write_fail" && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+'$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2011 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test 0 != $[#]
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try '$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try '$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test yes = "$silent" &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options that allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile=${ofile}T
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+# Generated automatically by $as_me ($PACKAGE) $VERSION
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_PREPARE_MUNGE_PATH_LIST
+_LT_PREPARE_CC_BASENAME
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Go], [_LT_LANG(GO)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+m4_ifndef([AC_PROG_GO], [
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_GO. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC], [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+ fi
+fi
+if test -z "$GOC"; then
+ AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+ [LT_LANG(GO)],
+ [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "$LT_MULTI_MODULE"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS=$save_LDFLAGS
+ ])
+
+ AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+ [lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+ echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]][[,.]]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test yes = "$lt_cv_ld_exported_symbols_list"; then
+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
+ fi
+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ if test yes = "$lt_cv_ld_force_load"; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+ [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
+ case $cc_basename in
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test yes = "$_lt_dar_can_shared"; then
+ output_verbose_link_cmd=func_echo_all
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ m4_if([$1], [CXX],
+[ if test yes != "$lt_cv_apple_cc_single_mod"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+ lt_aix_libpath_sed='[
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }]'
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi],[])
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
+ fi
+ ])
+ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script that will find a shell with a builtin
+# printf (that we can use as an echo command).
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+case $ECHO in
+ printf*) AC_MSG_RESULT([printf]) ;;
+ print*) AC_MSG_RESULT([print -r]) ;;
+ *) AC_MSG_RESULT([cat]) ;;
+esac
+
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test "X`printf %s $ECHO`" = "X$ECHO" \
+ || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
+
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
+ [Search for dependent libraries within DIR (or the compiler's sysroot
+ if not specified).])],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted. We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+ if test yes = "$GCC"; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ AC_MSG_RESULT([$with_sysroot])
+ AC_MSG_ERROR([The sysroot must be an absolute path.])
+ ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and where our libraries should be installed.])])
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out what ABI is being produced by ac_compile, and set mode
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE=32
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE=64
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+mips64*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ emul=elf
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ emul="${emul}32"
+ ;;
+ *64-bit*)
+ emul="${emul}64"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *MSB*)
+ emul="${emul}btsmip"
+ ;;
+ *LSB*)
+ emul="${emul}ltsmip"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *N32*)
+ emul="${emul}n32"
+ ;;
+ esac
+ LD="${LD-ld} -m $emul"
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly. Note that the listed cases only cover the
+ # situations where additional linker options are needed (such as when
+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+ # vice versa); the common cases where no linker options are needed do
+ # not appear in the list.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
+ ;;
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test yes != "$lt_cv_cc_needs_belf"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS=$SAVE_CFLAGS
+ fi
+ ;;
+*-*solaris*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*)
+ case $host in
+ i?86-*-solaris*|x86_64-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD=${LD-ld}_sol2
+ fi
+ ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks=$enable_libtool_lock
+])# _LT_ENABLE_LOCK
+
+
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+ [lt_cv_ar_at_file=no
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+ [echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([lt_ar_try])
+ if test 0 -eq "$ac_status"; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ AC_TRY_EVAL([lt_ar_try])
+ if test 0 -ne "$ac_status"; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+ ])
+ ])
+
+if test no = "$lt_cv_ar_at_file"; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+ [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[_LT_PROG_AR
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ bitrig* | openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+ [Whether to use a lock for old archive extraction])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test yes = "[$]$2"; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+])
+
+if test yes = "[$]$2"; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring=ABCD
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test 17 != "$i" # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n "$lt_cv_sys_max_cmd_len"; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test yes = "$cross_compiling"; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisibility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test yes != "$enable_dlopen"; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen=load_add_on
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen=LoadLibrary
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
+ lt_cv_dlopen=dyld
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen=shl_load],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen=dlopen],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test no = "$lt_cv_dlopen"; then
+ enable_dlopen=no
+ else
+ enable_dlopen=yes
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS=$LDFLAGS
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS=$LIBS
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test yes = "$lt_cv_dlopen_self"; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links=nottested
+if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test no = "$hard_links"; then
+ AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
+ [Define to the sub-directory where libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
+
+ # We can hardcode non-existent directories.
+ if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
+ test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
+ test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP"; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_PREPARE_MUNGE_PATH_LIST
+# ---------------------------
+# Make sure func_munge_path_list() is defined correctly.
+m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
+[[# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x@S|@2 in
+ x)
+ ;;
+ *:)
+ eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
+ ;;
+ x:*)
+ eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
+ ;;
+ *)
+ eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+]])# _LT_PREPARE_PATH_LIST
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test yes = "$GCC"; then
+ case $host_os in
+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+ *) lt_awk_arg='/^libraries:/' ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
+ *) lt_sed_strip_eq='s|=/|/|g' ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary...
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ # ...but if some path component already ends with the multilib dir we assume
+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+ case "$lt_multi_os_dir; $lt_search_path_spec " in
+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+ lt_multi_os_dir=
+ ;;
+ esac
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+ elif test -n "$lt_multi_os_dir"; then
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS = " "; FS = "/|\n";} {
+ lt_foo = "";
+ lt_count = 0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo = "/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=.so
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
+[User-defined run-time library search path.])
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+
+aix[[4-9]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 supports IA64
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a[(]lib.so.V[)]'
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='$libname$shared_ext'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[[45]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec=$LIB
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[23]].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
+ fi
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[[3-9]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+ [lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [lt_cv_shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+ ])
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd* | bitrig*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec=/usr/lib
+ need_lib_prefix=no
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
+ else
+ need_version=yes
+ fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+os2*)
+ libname_spec='$name'
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test yes = "$with_gnu_ld"; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=sco
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test yes = "$with_gnu_ld"; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test no = "$dynamic_linker" && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test yes = "$GCC"; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+fi
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+fi
+
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+ [Permission mode override for installation of shared libraries])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
+ [Detected run-time system search path for libraries])
+_LT_DECL([], [configure_time_lt_sys_library_path], [2],
+ [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program that can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$1"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
+ ;;
+esac])
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program that can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test no = "$withval" || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test yes = "$GCC"; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return, which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD=$ac_prog
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test yes = "$with_gnu_ld"; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD=$ac_dir/$ac_prog
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test no != "$with_gnu_ld" && break
+ ;;
+ *)
+ test yes != "$with_gnu_ld" && break
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+else
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
+fi])
+LD=$lt_cv_path_LD
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test yes != "$GCC"; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_PATH_DD
+# -----------
+# find a working dd
+m4_defun([_LT_PATH_DD],
+[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
+[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi])
+rm -f conftest.i conftest2.i conftest.out])
+])# _LT_PATH_DD
+
+
+# _LT_CMD_TRUNCATE
+# ----------------
+# find command to truncate a binary pipe
+m4_defun([_LT_CMD_TRUNCATE],
+[m4_require([_LT_PATH_DD])
+AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
+_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
+ [Command to truncate a binary pipe])
+])# _LT_CMD_TRUNCATE
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# 'unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd* | bitrig*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+os2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+ [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM=$NM
+else
+ lt_nm_to_check=${ac_tool_prefix}nm
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm=$ac_dir/$lt_tmp_nm
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+ case $build_os in
+ mingw*) lt_bad_file=conftest.nm/nofile ;;
+ *) lt_bad_file=/dev/null ;;
+ esac
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ *$lt_bad_file* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break 2
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break 2
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols -headers"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+ AC_SUBST([DUMPBIN])
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd=$ECHO
+ ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+ [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+ [lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*])
+if test yes != "$lt_cv_path_mainfest_tool"; then
+ MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# _LT_DLL_DEF_P([FILE])
+# ---------------------
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with func_dll_def_p in the libtool script
+AC_DEFUN([_LT_DLL_DEF_P],
+[dnl
+ test DEF = "`$SED -n dnl
+ -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
+ -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
+ -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
+ -e q dnl Only consider the first "real" line
+ $1`" dnl
+])# _LT_DLL_DEF_P
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM=-lm)
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test yes = "$GCC"; then
+ case $cc_basename in
+ nvcc*)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+ esac
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test ia64 = "$host_cpu"; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Gets list of data symbols to import.
+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
+else
+ # Disable hooks by default.
+ lt_cv_sys_global_symbol_to_import=
+ lt_cdecl_hook=
+ lt_c_name_hook=
+ lt_c_name_lib_hook=
+fi
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function,
+ # D for any global variable and I for any imported variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT@&t@_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT@&t@_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS=conftstm.$ac_objext
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test yes = "$pipe_works"; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
+ [Transform the output of nm into a list of symbols to manually relocate])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
+ [The name lister interface])
+_LT_DECL([], [nm_file_list_spec], [1],
+ [Specify filename containing input files for $NM])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test yes = "$GXX"; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ case $host_os in
+ os2*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+ if test ia64 != "$host_cpu"; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64, which still supported -KPIC.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ case $host_os in
+ os2*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+ if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ case $host_os in
+ os2*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+ ;;
+ esac
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ # old Intel for x86_64, which still supported -KPIC.
+ ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Intel*\ [[CF]]*Compiler*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ *Portland\ Group*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ case $host_os in
+ aix[[4-9]]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
+ ;;
+ cygwin* | mingw* | cegcc*)
+ case $cc_basename in
+ cl*)
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ' (' and ')$', so one must not match beginning or
+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+ # as well as any symbol that contains 'd'.
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test yes != "$GCC"; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd* | bitrig*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test yes = "$with_gnu_ld"; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+ *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test yes = "$lt_use_gnu_ld_interface"; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='$wl'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test ia64 != "$host_cpu"; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ shrext_cmds=.dll
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test linux-dietlibc = "$host_os"; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test no = "$tmp_diet"
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
+ xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+
+ if test yes = "$supports_anon_versioning"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ tcc*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
+ ;;
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test ia64 = "$host_cpu"; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # traditional, no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ ;;
+ esac
+
+ if test yes = "$GCC"; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`$CC -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
+ fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
+ else
+ # not using gcc
+ if test ia64 = "$host_cpu"; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
+ else
+ shared_flag='$wl-bM:SRE'
+ fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ else
+ if test ia64 = "$host_cpu"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ ;;
+
+ hpux10*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ m4_if($1, [], [
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ _LT_LINKER_OPTION([if $CC understands -b],
+ _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+ [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+ ;;
+ esac
+ fi
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+ [lt_cv_irix_exported_symbol],
+ [save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+ [C++], [[int foo (void) { return 0; }]],
+ [Fortran 77], [[
+ subroutine foo
+ end]],
+ [Fortran], [[
+ subroutine foo
+ end]])])],
+ [lt_cv_irix_exported_symbol=yes],
+ [lt_cv_irix_exported_symbol=no])
+ LDFLAGS=$save_LDFLAGS])
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ linux*)
+ case $cc_basename in
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd* | bitrig*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ shrext_cmds=.dll
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ osf3*)
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='$wl'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands '-z linker_flag'. GCC discards it without '$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test sequent = "$host_vendor"; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We CANNOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test sni = "$host_vendor"; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test yes,yes = "$GCC,$enable_shared"; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+ [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+ [$RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ ])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting $shlibpath_var if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+ [Commands necessary for finishing linking programs])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC=$CC
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report what library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC=$lt_save_CC
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test no != "$CXX" &&
+ ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+ (test g++ != "$CXX"))); then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test yes != "$_lt_caught_CXX_error"; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ CFLAGS=$CXXFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test yes = "$GXX"; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test yes = "$GXX"; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test yes = "$with_gnu_ld"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='$wl'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test ia64 = "$host_cpu"; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ ;;
+ esac
+
+ if test yes = "$GXX"; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`$CC -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag=$shared_flag' $wl-G'
+ fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
+ else
+ # not using gcc
+ if test ia64 = "$host_cpu"; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
+ else
+ shared_flag='$wl-bM:SRE'
+ fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ # The "-G" linker flag allows undefined symbols.
+ _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ else
+ if test ia64 = "$host_cpu"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared
+ # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl*)
+ # Native MSVC
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # g++
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ shrext_cmds=.dll
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test yes = "$GXX"; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 6 and above use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ ;;
+ xl* | mpixl* | bgxl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd* | bitrig*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=func_echo_all
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands '-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require '-G' NOT '-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We CANNOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+ '"$_LT_TAGVAR(old_archive_cmds, $1)"
+ _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+ '"$_LT_TAGVAR(reload_cmds, $1)"
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)=$GXX
+ _LT_TAGVAR(LD, $1)=$LD
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test yes != "$_lt_caught_CXX_error"
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+ case @S|@2 in
+ .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
+ *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
+ esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
+])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $prev$p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test x-L = "$p" ||
+ test x-R = "$p"; then
+ prev=$p
+ continue
+ fi
+
+ # Expand the sysroot to ease extracting the directories later.
+ if test -z "$prev"; then
+ case $p in
+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+ esac
+ fi
+ case $p in
+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+ esac
+ if test no = "$pre_test_object_deps_done"; then
+ case $prev in
+ -L | -R)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)=$prev$p
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
+ fi
+ fi
+ prev=
+ ;;
+
+ *.lto.$objext) ;; # Ignore GCC LTO objects
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test no = "$pre_test_object_deps_done"; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)=$p
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)=$p
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test no = "$F77"; then
+ _lt_disable_F77=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test yes != "$_lt_disable_F77"; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${F77-"f77"}
+ CFLAGS=$FFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)=$G77
+ _LT_TAGVAR(LD, $1)=$LD
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_F77"
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test no = "$FC"; then
+ _lt_disable_FC=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test yes != "$_lt_disable_FC"; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${FC-"f95"}
+ CFLAGS=$FCFLAGS
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
+ _LT_TAGVAR(LD, $1)=$LD
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_FC"
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)=$LD
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)=$LD
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code=$lt_simple_compile_test_code
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f "$lt_ac_sed" && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test 10 -lt "$lt_ac_count" && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test "$lt_ac_count" -gt "$lt_ac_max"; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine what file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+ [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+ [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
+
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
+# Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 8 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option '$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
+ [_LT_WITH_AIX_SONAME([aix])])
+ ])
+])# _LT_SET_OPTIONS
+
+
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [1], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the 'shared' and
+# 'disable-shared' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the 'static' and
+# 'disable-static' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the 'fast-install'
+# and 'disable-fast-install' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_AIX_SONAME([DEFAULT])
+# ----------------------------------
+# implement the --with-aix-soname flag, and support the `aix-soname=aix'
+# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
+# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
+m4_define([_LT_WITH_AIX_SONAME],
+[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
+shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[[5-9]]*,yes)
+ AC_MSG_CHECKING([which variant of shared library versioning to provide])
+ AC_ARG_WITH([aix-soname],
+ [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+ [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
+ [case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ AC_MSG_ERROR([Unknown argument to --with-aix-soname])
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname],
+ [AC_CACHE_VAL([lt_cv_with_aix_soname],
+ [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
+ with_aix_soname=$lt_cv_with_aix_soname])
+ AC_MSG_RESULT([$with_aix_soname])
+ if test aix != "$with_aix_soname"; then
+ # For the AIX way of multilib, we name the shared archive member
+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+ # the AIX toolchain works better with OBJECT_MODE set (default 32).
+ if test 64 = "${OBJECT_MODE-32}"; then
+ shared_archive_member_spec=shr_64
+ else
+ shared_archive_member_spec=shr
+ fi
+ fi
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+esac
+
+_LT_DECL([], [shared_archive_member_spec], [0],
+ [Shared archive member basename, for filename based shared library versioning on AIX])dnl
+])# _LT_WITH_AIX_SONAME
+
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
+# LT_INIT options.
+# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $withval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [pic_mode=m4_default([$1], [default])])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
+
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59, which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
+
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# @configure_input@
+
+# serial 4179 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4.6])
+m4_define([LT_PACKAGE_REVISION], [2.4.6])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4.6'
+macro_revision='2.4.6'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
+# Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 5 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
+
+dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+dnl serial 11 (pkg-config-0.29)
+dnl
+dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+ [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])dnl PKG_PROG_PKG_CONFIG
+
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])dnl _PKG_CONFIG
+
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
+
+
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])dnl PKG_CHECK_MODULES
+
+
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+
+
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_NOARCH_INSTALLDIR
+
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
+
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.15'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.15], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.15])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "$am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each '.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.65])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# -*- Autoconf -*-
+# Obsolete and "removed" macros, that must however still report explicit
+# error messages when used, to smooth transition.
+#
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([AM_CONFIG_HEADER],
+[AC_DIAGNOSE([obsolete],
+['$0': this macro is obsolete.
+You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
+AC_CONFIG_HEADERS($@)])
+
+AC_DEFUN([AM_PROG_CC_STDC],
+[AC_PROG_CC
+am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
+AC_DIAGNOSE([obsolete],
+['$0': this macro is obsolete.
+You should simply use the 'AC][_PROG_CC' macro instead.
+Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
+but upon 'ac_cv_prog_cc_stdc'.])])
+
+AC_DEFUN([AM_C_PROTOTYPES],
+ [AC_FATAL([automatic de-ANSI-fication support has been removed])])
+AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/autogen.des b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/autogen.des
new file mode 100755
index 0000000..c2cceff
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/autogen.des
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# $Id$
+#
+
+set -ex
+
+. ./autogen.sh
+
+# autoconf prior to 2.62 has issues with zsh 4.2 and newer
+export CONFIG_SHELL=/bin/sh
+
+./configure \
+ --enable-developer-warnings \
+ --enable-debugging-symbols \
+ --enable-dependency-tracking \
+ --enable-extra-developer-warnings \
+ --enable-stack-protector \
+ --enable-werror \
+ --prefix=/opt/varnish
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/autogen.sh b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/autogen.sh
new file mode 100755
index 0000000..457a7d0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/autogen.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# $Id$
+#
+
+warn() {
+ echo "WARNING: $@" 1>&2
+}
+
+case `uname -s` in
+Darwin)
+ LIBTOOLIZE=glibtoolize
+ ;;
+FreeBSD)
+ LIBTOOLIZE=libtoolize
+ if [ -d /usr/local/gnu-autotools/bin ] ; then
+ PATH=/usr/local/gnu-autotools/bin:${PATH}
+ export PATH
+ FIX_BROKEN_FREEBSD_PORTS="-I /usr/local/share/aclocal"
+ fi
+ ;;
+Linux)
+ LIBTOOLIZE=libtoolize
+ ;;
+esac
+
+automake_version=$(automake --version | tr ' ' '\n' | egrep '^[0-9]\.[0-9a-z.-]+')
+if [ -z "$automake_version" ] ; then
+ warn "unable to determine automake version"
+else
+ case $automake_version in
+ 0.*|1.[0-8]|1.[0-8][.-]*)
+ warn "automake ($automake_version) detected; 1.9 or newer recommended"
+ ;;
+ *)
+ ;;
+ esac
+fi
+
+set -ex
+
+aclocal ${FIX_BROKEN_FREEBSD_PORTS}
+$LIBTOOLIZE --copy --force
+autoheader
+automake --add-missing --copy --foreign
+autoconf
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/check_varnish.c b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/check_varnish.c
new file mode 100644
index 0000000..809657c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/check_varnish.c
@@ -0,0 +1,383 @@
+/*-
+ * Copyright (c) 2007-2011 Varnish Software AS
+ * All rights reserved.
+ *
+ * Author: Cecilie Fritzvold <cecilihf@linpro.no>
+ * Author: Tollef Fog Heen <tfheen@varnish-software.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id$
+ *
+ * Nagios plugin for Varnish
+ */
+
+#include <inttypes.h>
+#include <limits.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include <locale.h>
+#include <assert.h>
+
+#if defined(HAVE_VARNISHAPI_4) || defined(HAVE_VARNISHAPI_4_1)
+#include <vapi/vsc.h>
+#include <vapi/vsm.h>
+#elif defined(HAVE_VARNISHAPI_3)
+#include "vsc.h"
+#include "varnishapi.h"
+#endif
+
+static int verbose = 0;
+
+struct range {
+ intmax_t lo;
+ intmax_t hi;
+ int inverted:1;
+ int defined:1;
+};
+
+static struct range critical;
+static struct range warning;
+
+enum {
+ NAGIOS_OK = 0,
+ NAGIOS_WARNING = 1,
+ NAGIOS_CRITICAL = 2,
+ NAGIOS_UNKNOWN = 3,
+};
+
+static const char *status_text[] = {
+ [NAGIOS_OK] = "OK",
+ [NAGIOS_WARNING] = "WARNING",
+ [NAGIOS_CRITICAL] = "CRITICAL",
+ [NAGIOS_UNKNOWN] = "UNKNOWN",
+};
+
+/*
+ * Parse a range specification
+ */
+static int
+parse_range(const char *spec, struct range *range)
+{
+ const char *delim;
+ char *end;
+
+ /* @ means invert the range */
+ if (*spec == '@') {
+ ++spec;
+ range->inverted = 1;
+ } else {
+ range->inverted = 0;
+ }
+
+ /* empty spec... */
+ if (*spec == '\0')
+ return (-1);
+
+ if ((delim = strchr(spec, ':')) != NULL) {
+ /*
+ * The Nagios plugin documentation says nothing about how
+ * to interpret ":N", so we disallow it. Allowed forms
+ * are "~:N", "~:", "M:" and "M:N".
+ */
+ if (delim - spec == 1 && *spec == '~') {
+ range->lo = INTMAX_MIN;
+ } else {
+ range->lo = strtoimax(spec, &end, 10);
+ if (end != delim)
+ return (-1);
+ }
+ if (*(delim + 1) != '\0') {
+ range->hi = strtoimax(delim + 1, &end, 10);
+ if (*end != '\0')
+ return (-1);
+ } else {
+ range->hi = INTMAX_MAX;
+ }
+ } else {
+ /*
+ * Allowed forms are N
+ */
+ range->lo = 0;
+ range->hi = strtol(spec, &end, 10);
+ if (*end != '\0')
+ return (-1);
+ }
+
+ /*
+ * Sanity
+ */
+ if (range->lo > range->hi)
+ return (-1);
+
+ range->defined = 1;
+ return (0);
+}
+
+/*
+ * Check if a given value is within a given range.
+ */
+static int
+inside_range(intmax_t value, const struct range *range)
+{
+
+ if (range->inverted)
+ return (value < range->lo || value > range->hi);
+ return (value >= range->lo && value <= range->hi);
+}
+
+/*
+ * Check if the thresholds against the value and return the appropriate
+ * status code.
+ */
+static int
+check_thresholds(intmax_t value)
+{
+
+ if (!warning.defined && !critical.defined)
+ return (NAGIOS_UNKNOWN);
+ if (critical.defined && !inside_range(value, &critical))
+ return (NAGIOS_CRITICAL);
+ if (warning.defined && !inside_range(value, &warning))
+ return (NAGIOS_WARNING);
+ return (NAGIOS_OK);
+}
+
+struct stat_priv {
+ char *param;
+ const char *info;
+ intmax_t value;
+ int found;
+ intmax_t cache_hit;
+ intmax_t cache_miss;
+};
+
+static int
+check_stats_cb(void *priv, const struct VSC_point * const pt)
+{
+ struct stat_priv *p;
+ char tmp[1024];
+
+ if (pt == NULL)
+ return(0);
+
+#if defined(HAVE_VARNISHAPI_4_1) || defined(HAVE_VARNISHAPI_4)
+ assert(sizeof(tmp) > (strlen(pt->section->fantom->type) + 1 +
+ strlen(pt->section->fantom->ident) + 1 +
+ strlen(pt->desc->name) + 1));
+ snprintf(tmp, sizeof(tmp), "%s%s%s%s%s",
+ (pt->section->fantom->type[0] == 0 ? "" : pt->section->fantom->type),
+ (pt->section->fantom->type[0] == 0 ? "" : "."),
+ (pt->section->fantom->ident[0] == 0 ? "" : pt->section->fantom->ident),
+ (pt->section->fantom->ident[0] == 0 ? "" : "."),
+ pt->desc->name);
+ p = priv;
+#endif
+#if defined(HAVE_VARNISHAPI_4_1)
+ assert(!strcmp(pt->desc->ctype, "uint64_t"));
+#elif defined(HAVE_VARNISHAPI_4)
+ assert(!strcmp(pt->desc->fmt, "uint64_t"));
+#elif defined(HAVE_VARNISHAPI_3)
+ assert(sizeof(tmp) > (strlen(pt->class) + 1 +
+ strlen(pt->ident) + 1 +
+ strlen(pt->name) + 1));
+ snprintf(tmp, sizeof(tmp), "%s%s%s%s%s",
+ (pt->class[0] == 0 ? "" : pt->class),
+ (pt->class[0] == 0 ? "" : "."),
+ (pt->ident[0] == 0 ? "" : pt->ident),
+ (pt->ident[0] == 0 ? "" : "."),
+ pt->name);
+ p = priv;
+ assert(!strcmp(pt->fmt, "uint64_t"));
+#endif
+ if (strcmp(tmp, p->param) == 0) {
+ p->found = 1;
+#if defined(HAVE_VARNISHAPI_4) || defined(HAVE_VARNISHAPI_4_1)
+ p->info = pt->desc->sdesc;
+#elif defined(HAVE_VARNISHAPI_3)
+ p->info = pt->desc;
+#endif
+ p->value = *(const volatile uint64_t*)pt->ptr;
+ } else if (strcmp(p->param, "ratio") == 0) {
+ if (strcmp(tmp, "cache_hit") == 0 || strcmp(tmp, "MAIN.cache_hit") == 0) {
+ p->found = 1;
+ p->cache_hit = *(const volatile uint64_t*)pt->ptr;
+ } else if (strcmp(tmp, "cache_miss") == 0 || strcmp(tmp, "MAIN.cache_miss") == 0) {
+ p->cache_miss = *(const volatile uint64_t*)pt->ptr;
+ }
+ }
+ return (0);
+}
+
+/*
+ * Check the statistics for the requested parameter.
+ */
+static void
+check_stats(struct VSM_data *vd, char *param)
+{
+ int status;
+ struct stat_priv priv;
+
+ priv.found = 0;
+ priv.param = param;
+
+#if defined(HAVE_VARNISHAPI_4) || defined(HAVE_VARNISHAPI_4_1)
+ (void)VSC_Iter(vd, NULL, check_stats_cb, &priv);
+#elif defined(HAVE_VARNISHAPI_3)
+ (void)VSC_Iter(vd, check_stats_cb, &priv);
+#endif
+ if (strcmp(param, "ratio") == 0) {
+ intmax_t total = priv.cache_hit + priv.cache_miss;
+ priv.value = total ? (100 * priv.cache_hit / total) : 0;
+ priv.info = "Cache hit ratio";
+ }
+ if (priv.found != 1) {
+ printf("Unknown parameter '%s'\n", param);
+ exit(1);
+ }
+
+ status = check_thresholds(priv.value);
+ printf("VARNISH %s: %s (%'jd)|%s=%jd\n", status_text[status],
+ priv.info, priv.value, param, priv.value);
+ exit(status);
+}
+
+/*-------------------------------------------------------------------------------*/
+
+static void
+help(void)
+{
+
+ fprintf(stderr, "usage: "
+ "check_varnish [-lv] [-n varnish_name] [-p param_name [-c N] [-w N]]\n"
+ "\n"
+ "-v Increase verbosity.\n"
+ "-n varnish_name Specify the Varnish instance name\n"
+ "-p param_name Specify the parameter to check (see below).\n"
+ " The default is 'ratio'.\n"
+ "-c [@][lo:]hi Set critical threshold\n"
+ "-w [@][lo:]hi Set warning threshold\n"
+ "\n"
+ "All items reported by varnishstat(1) are available - use the\n"
+ "identifier listed in the left column by 'varnishstat -l'.\n"
+ "\n"
+ "Examples for Varnish 3.x:\n"
+ "\n"
+ "uptime How long the cache has been running (in seconds)\n"
+ "ratio The cache hit ratio expressed as a percentage of hits to\n"
+ " hits + misses. Default thresholds are 95 and 90.\n"
+ "usage Cache file usage as a percentage of the total cache space.\n"
+ "\n"
+ "Examples for Varnish 4.x:\n"
+ "\n"
+ "ratio The cache hit ratio expressed as a percentage of hits to\n"
+ " hits + misses. Default thresholds are 95 and 90.\n"
+ "MAIN.uptime How long the cache has been running (in seconds).\n"
+ "MAIN.n_purges Number of purge operations executed.\n"
+ );
+ exit(0);
+}
+
+static void
+usage(void)
+{
+
+ fprintf(stderr, "usage: "
+ "check_varnish [-lv] [-n varnish_name] [-p param_name [-c N] [-w N]]\n");
+ exit(3);
+}
+
+
+int
+main(int argc, char **argv)
+{
+ struct VSM_data *vd;
+ char *param = NULL;
+ int opt;
+
+ setlocale(LC_ALL, "");
+
+ vd = VSM_New();
+#if defined(HAVE_VARNISHAPI_3)
+ VSC_Setup(vd);
+#endif
+
+ while ((opt = getopt(argc, argv, VSC_ARGS "c:hn:p:vw:")) != -1) {
+ switch (opt) {
+ case 'c':
+ if (parse_range(optarg, &critical) != 0)
+ usage();
+ break;
+ case 'h':
+ help();
+ break;
+ case 'n':
+ VSC_Arg(vd, opt, optarg);
+ break;
+ case 'p':
+ param = strdup(optarg);
+ break;
+ case 'v':
+ ++verbose;
+ break;
+ case 'w':
+ if (parse_range(optarg, &warning) != 0)
+ usage();
+ break;
+ default:
+ if (VSC_Arg(vd, opt, optarg) > 0)
+ break;
+ usage();
+ }
+ }
+
+#if defined(HAVE_VARNISHAPI_4) || defined(HAVE_VARNISHAPI_4_1)
+ if (VSM_Open(vd))
+ exit(1);
+#elif defined(HAVE_VARNISHAPI_3)
+ if (VSC_Open(vd, 1))
+ exit(1);
+#endif
+
+ /* Default: if no param specified, check hit ratio. If no warning
+ * and critical values are specified either, set these to default.
+ */
+ if (param == NULL) {
+ param = strdup("ratio");
+ if (!warning.defined)
+ parse_range("95:", &warning);
+ if (!critical.defined)
+ parse_range("90:", &critical);
+ }
+
+ if (!param)
+ usage();
+
+ check_stats(vd, param);
+
+ exit(0);
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/compile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/compile
new file mode 100755
index 0000000..a85b723
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/compile
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ if test -f "$dir/lib$lib.a"; then
+ found=yes
+ lib=$dir/lib$lib.a
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -l*)
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
+ -L*)
+ func_cl_dashL "${1#-L}"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ # So we strip '-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no '-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # '.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/config.guess b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/config.guess
new file mode 100755
index 0000000..2e9ad7f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/config.guess
@@ -0,0 +1,1462 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2016 Free Software Foundation, Inc.
+
+timestamp='2016-10-02'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2016 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || \
+ echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently (or will in the future) and ABI.
+ case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ os=netbsdelf
+ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # Determine ABI tags.
+ case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}${abi}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:Sortix:*:*)
+ echo ${UNAME_MACHINE}-unknown-sortix
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE=alpha ;;
+ "EV5 (21164)")
+ UNAME_MACHINE=alphaev5 ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE=alphaev56 ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE=alphapca56 ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE=alphapca57 ;;
+ "EV6 (21264)")
+ UNAME_MACHINE=alphaev6 ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE=alphaev67 ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE=alphaev69 ;;
+ "EV7 (21364)")
+ UNAME_MACHINE=alphaev7 ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE=alphaev79 ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH=i386
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH=x86_64
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = hppa2.0w ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH=hppa2.0w
+ else
+ HP_ARCH=hppa64
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ *:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ e2k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ k1om:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ mips64el:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configure will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = x86; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = 386; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
+ exit ;;
+esac
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/config.h.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/config.h.in
new file mode 100644
index 0000000..bea57a9
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/config.h.in
@@ -0,0 +1,114 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Use VARNISHAPI v3 */
+#undef HAVE_VARNISHAPI_3
+
+/* Use VARNISHAPI v4 */
+#undef HAVE_VARNISHAPI_4
+
+/* Use VARNISHAPI v4.1 */
+#undef HAVE_VARNISHAPI_4_1
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/config.sub b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/config.sub
new file mode 100755
index 0000000..dd2ca93
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/config.sub
@@ -0,0 +1,1825 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2016 Free Software Foundation, Inc.
+
+timestamp='2016-11-04'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2016 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+ kopensolaris*-gnu* | cloudabi*-eabi* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | ba \
+ | be32 | be64 \
+ | bfin \
+ | c4x | c8051 | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | epiphany \
+ | fido | fr30 | frv | ft32 \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
+ | ns16k | ns32k \
+ | open8 | or1k | or1knd | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pru \
+ | pyramid \
+ | riscv32 | riscv64 \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | ba-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | e2k-* | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | k1om-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | or1k*-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pru-* \
+ | pyramid-* \
+ | riscv32-* | riscv64-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | visium-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ asmjs)
+ basic_machine=asmjs-unknown
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ e500v[12])
+ basic_machine=powerpc-unknown
+ os=$os"spe"
+ ;;
+ e500v[12]-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=$os"spe"
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* | -plan9* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* | -cloudabi* | -sortix* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -ios)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ c8051-*)
+ os=-elf
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/configure b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/configure
new file mode 100755
index 0000000..4b9b01d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/configure
@@ -0,0 +1,16364 @@
+#! /bin/sh
+# From configure.ac Id.
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for varnish-nagios 1.1.
+#
+# Report bugs to <varnish-dev@varnish-cache.org>.
+#
+# Copyright (c) 2007-2011 Varnish Software AS
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1
+
+ test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: varnish-dev@varnish-cache.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='varnish-nagios'
+PACKAGE_TARNAME='varnish-nagios'
+PACKAGE_VERSION='1.1'
+PACKAGE_STRING='varnish-nagios 1.1'
+PACKAGE_BUGREPORT='varnish-dev@varnish-cache.org'
+PACKAGE_URL=''
+
+ac_unique_file="check_varnish.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+VARNISHAPI_LIBS
+VARNISHAPI_CFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+LT_SYS_LIBRARY_PATH
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+RANLIB
+ac_ct_AR
+AR
+DLLTOOL
+OBJDUMP
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+SED
+LIBTOOL
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+runstatedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_dependency_tracking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_aix_soname
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+enable_developer_warnings
+enable_debugging_symbols
+enable_extra_developer_warnings
+enable_stack_protector
+enable_werror
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+LT_SYS_LIBRARY_PATH
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+VARNISHAPI_CFLAGS
+VARNISHAPI_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir runstatedir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures varnish-nagios 1.1 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/varnish-nagios]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of varnish-nagios 1.1:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-developer-warnings
+ enable strict warnings (default is NO)
+ --enable-debugging-symbols
+ enable debugging symbols (default is NO)
+ --enable-extra-developer-warnings
+ enable even stricter warnings (default is NO)
+ --enable-stack-protector
+ enable stack protector (default is NO)
+ --enable-werror use -Werror (default is NO)
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-aix-soname=aix|svr4|both
+ shared library versioning (aka "SONAME") variant to
+ provide on AIX, [default=aix].
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
+ compiler's sysroot if not specified).
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+ LT_SYS_LIBRARY_PATH
+ User-defined run-time library search path.
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
+ VARNISHAPI_CFLAGS
+ C compiler flags for VARNISHAPI, overriding pkg-config
+ VARNISHAPI_LIBS
+ linker flags for VARNISHAPI, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <varnish-dev@varnish-cache.org>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+varnish-nagios configure 1.1
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+
+Copyright (c) 2007-2011 Varnish Software AS
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## -------------------------------------------- ##
+## Report this to varnish-dev@varnish-cache.org ##
+## -------------------------------------------- ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by varnish-nagios $as_me 1.1, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if ${ac_cv_target+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$target_alias" = x; then
+ ac_cv_target=$ac_cv_host
+else
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+am__api_version='1.15'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='varnish-nagios'
+ VERSION='1.1'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
+
+# Checks for programs.
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+ MINIX=yes
+else
+ MINIX=
+fi
+
+
+ if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_safe_to_define___extensions__=yes
+else
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+ $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4.6'
+macro_revision='2.4.6'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain=$ac_aux_dir/ltmain.sh
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO ""
+}
+
+case $ECHO in
+ printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+ print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if ${ac_cv_path_FGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_FGREP" || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test yes = "$GCC"; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return, which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD=$ac_prog
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test yes = "$with_gnu_ld"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${lt_cv_path_LD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD=$ac_dir/$ac_prog
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test no != "$with_gnu_ld" && break
+ ;;
+ *)
+ test yes != "$with_gnu_ld" && break
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+else
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
+fi
+fi
+
+LD=$lt_cv_path_LD
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if ${lt_cv_path_NM+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM=$NM
+else
+ lt_nm_to_check=${ac_tool_prefix}nm
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm=$ac_dir/$lt_tmp_nm
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+ case $build_os in
+ mingw*) lt_bad_file=conftest.nm/nofile ;;
+ *) lt_bad_file=/dev/null ;;
+ esac
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ *$lt_bad_file* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break 2
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break 2
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in dumpbin "link -dump"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DUMPBIN+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in dumpbin "link -dump"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols -headers"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if ${lt_cv_nm_interface+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if ${lt_cv_sys_max_cmd_len+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ i=0
+ teststring=ABCD
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test 17 != "$i" # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n "$lt_cv_sys_max_cmd_len"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if ${lt_cv_ld_reload_flag+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test yes != "$GCC"; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if ${lt_cv_deplibs_check_method+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# 'unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd* | bitrig*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+os2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd=$ECHO
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AR" && break
+ done
+fi
+if test -z "$AR"; then
+ ac_ct_AR=$AR
+ for ac_prog in ar
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_AR" && break
+done
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ar_at_file=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test 0 -eq "$ac_status"; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test 0 -ne "$ac_status"; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test no = "$lt_cv_ar_at_file"; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ bitrig* | openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test ia64 = "$host_cpu"; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Gets list of data symbols to import.
+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
+else
+ # Disable hooks by default.
+ lt_cv_sys_global_symbol_to_import=
+ lt_cdecl_hook=
+ lt_c_name_hook=
+ lt_c_name_lib_hook=
+fi
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function,
+ # D for any global variable and I for any imported variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS=conftstm.$ac_objext
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test yes = "$pipe_works"; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+ withval=$with_sysroot;
+else
+ with_sysroot=no
+fi
+
+
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+ if test yes = "$GCC"; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+$as_echo "$with_sysroot" >&6; }
+ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+$as_echo_n "checking for a working dd... " >&6; }
+if ${ac_cv_path_lt_DD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+if test -z "$lt_DD"; then
+ ac_path_lt_DD_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in dd; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_lt_DD" || continue
+if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi
+ $ac_path_lt_DD_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_lt_DD"; then
+ :
+ fi
+else
+ ac_cv_path_lt_DD=$lt_DD
+fi
+
+rm -f conftest.i conftest2.i conftest.out
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+$as_echo "$ac_cv_path_lt_DD" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+$as_echo_n "checking how to truncate binary pipes... " >&6; }
+if ${lt_cv_truncate_bin+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+$as_echo "$lt_cv_truncate_bin" >&6; }
+
+
+
+
+
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out what ABI is being produced by ac_compile, and set mode
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE=32
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE=64
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+mips64*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ emul=elf
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ emul="${emul}32"
+ ;;
+ *64-bit*)
+ emul="${emul}64"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *MSB*)
+ emul="${emul}btsmip"
+ ;;
+ *LSB*)
+ emul="${emul}ltsmip"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *N32*)
+ emul="${emul}n32"
+ ;;
+ esac
+ LD="${LD-ld} -m $emul"
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly. Note that the listed cases only cover the
+ # situations where additional linker options are needed (such as when
+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+ # vice versa); the common cases where no linker options are needed do
+ # not appear in the list.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
+ ;;
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -belf"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if ${lt_cv_cc_needs_belf+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_cc_needs_belf=yes
+else
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+ if test yes != "$lt_cv_cc_needs_belf"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS=$SAVE_CFLAGS
+ fi
+ ;;
+*-*solaris*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*)
+ case $host in
+ i?86-*-solaris*|x86_64-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD=${LD-ld}_sol2
+ fi
+ ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks=$enable_libtool_lock
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MANIFEST_TOOL"; then
+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+ # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
+ MANIFEST_TOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+ fi
+else
+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&5
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test yes != "$lt_cv_path_mainfest_tool"; then
+ MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NMEDIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LIPO+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL64+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if ${lt_cv_apple_cc_single_mod+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "$LT_MULTI_MODULE"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&5
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_ld_exported_symbols_list=yes
+else
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+ echo "$AR cru libconftest.a conftest.o" >&5
+ $AR cru libconftest.a conftest.o 2>&5
+ echo "$RANLIB libconftest.a" >&5
+ $RANLIB libconftest.a 2>&5
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&5
+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ 10.[012][,.]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test yes = "$lt_cv_ld_exported_symbols_list"; then
+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
+ fi
+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+# Set options
+
+
+
+ enable_dlopen=no
+
+
+ enable_win32_dll=no
+
+
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+ # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else
+ enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+ withval=$with_pic; lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $withval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else
+ pic_mode=default
+fi
+
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+ shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[5-9]*,yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+
+# Check whether --with-aix-soname was given.
+if test "${with_aix_soname+set}" = set; then :
+ withval=$with_aix_soname; case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname
+else
+ if ${lt_cv_with_aix_soname+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_with_aix_soname=aix
+fi
+
+ with_aix_soname=$lt_cv_with_aix_soname
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+$as_echo "$with_aix_soname" >&6; }
+ if test aix != "$with_aix_soname"; then
+ # For the AIX way of multilib, we name the shared archive member
+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+ # the AIX toolchain works better with OBJECT_MODE set (default 32).
+ if test 64 = "${OBJECT_MODE-32}"; then
+ shared_archive_member_spec=shr_64
+ else
+ shared_archive_member_spec=shr
+ fi
+ fi
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS=$ltmain
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if ${lt_cv_objdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+old_CC=$CC
+old_CFLAGS=$CFLAGS
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/${ac_tool_prefix}file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
+ ;;
+esac
+fi
+
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
+ ;;
+esac
+fi
+
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC=$CC
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test yes = "$GCC"; then
+ case $cc_basename in
+ nvcc*)
+ lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+ *)
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+ if test yes = "$GCC"; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ lt_prog_compiler_wl='-Xlinker '
+ if test -n "$lt_prog_compiler_pic"; then
+ lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='$wl-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ # old Intel for x86_64, which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Intel*\ [CF]*Compiler*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *Portland\ Group*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if ${lt_cv_prog_compiler_static_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_static_works"; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test no = "$hard_links"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ' (' and ')$', so one must not match beginning or
+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+ # as well as any symbol that contains 'd'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test yes != "$GCC"; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd* | bitrig*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ link_all_deplibs=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test yes = "$with_gnu_ld"; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+ *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test yes = "$lt_use_gnu_ld_interface"; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='$wl'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec='$wl--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test ia64 != "$host_cpu"; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ export_dynamic_flag_spec='$wl--export-all-symbols'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ haiku*)
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ link_all_deplibs=yes
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test linux-dietlibc = "$host_os"; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test no = "$tmp_diet"
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ compiler_needs_object=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+
+ if test yes = "$supports_anon_versioning"; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ tcc*)
+ export_dynamic_flag_spec='-rdynamic'
+ ;;
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test no = "$ld_shlibs"; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test ia64 = "$host_cpu"; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # traditional, no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ ;;
+ esac
+
+ if test yes = "$GCC"; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`$CC -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
+ fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
+ else
+ # not using gcc
+ if test ia64 = "$host_cpu"; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
+ else
+ shared_flag='$wl-bM:SRE'
+ fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
+ fi
+ fi
+
+ export_dynamic_flag_spec='$wl-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ else
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' $wl-bernotok'
+ allow_undefined_flag=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ fi
+ archive_cmds_need_lc=yes
+ archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ file_list_spec='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+ enable_shared_with_static_runtimes=yes
+ exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ old_postinstall_cmds='chmod 644 $oldlib'
+ postlink_cmds='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ enable_shared_with_static_runtimes=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+ else
+ whole_archive_flag_spec=''
+ fi
+ link_all_deplibs=yes
+ allow_undefined_flag=$_lt_dar_allow_undefined
+ case $cc_basename in
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test yes = "$_lt_dar_can_shared"; then
+ output_verbose_link_cmd=func_echo_all
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test yes = "$GCC"; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='$wl-E'
+ ;;
+
+ hpux10*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='$wl-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+$as_echo_n "checking if $CC understands -b... " >&6; }
+if ${lt_cv_prog_compiler__b+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler__b=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -b"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler__b=yes
+ fi
+ else
+ lt_cv_prog_compiler__b=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+$as_echo "$lt_cv_prog_compiler__b" >&6; }
+
+if test yes = "$lt_cv_prog_compiler__b"; then
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
+ ;;
+ esac
+ fi
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='$wl-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo (void) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_irix_exported_symbol=yes
+else
+ lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+ fi
+ link_all_deplibs=no
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ linux*)
+ case $cc_basename in
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ ld_shlibs=yes
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd* | bitrig*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
+ else
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ osf3*)
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='$wl'
+ archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands '-z linker_flag'. GCC discards it without '$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test yes = "$GCC"; then
+ whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test sequent = "$host_vendor"; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='$wl-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We CANNOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='$wl-z,text'
+ allow_undefined_flag='$wl-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='$wl-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='$wl-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test sni = "$host_vendor"; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='$wl-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test no = "$ld_shlibs" && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test yes,yes = "$GCC,$enable_shared"; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc=no
+ else
+ lt_cv_archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+ archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test yes = "$GCC"; then
+ case $host_os in
+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+ *) lt_awk_arg='/^libraries:/' ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+ *) lt_sed_strip_eq='s|=/|/|g' ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary...
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ # ...but if some path component already ends with the multilib dir we assume
+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+ case "$lt_multi_os_dir; $lt_search_path_spec " in
+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+ lt_multi_os_dir=
+ ;;
+ esac
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+ elif test -n "$lt_multi_os_dir"; then
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS = " "; FS = "/|\n";} {
+ lt_foo = "";
+ lt_count = 0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo = "/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=.so
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 supports IA64
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a(lib.so.V)'
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='$libname$shared_ext'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec=$LIB
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
+ fi
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[3-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd* | bitrig*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec=/usr/lib
+ need_lib_prefix=no
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
+ else
+ need_version=yes
+ fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+os2*)
+ libname_spec='$name'
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test yes = "$with_gnu_ld"; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=sco
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test yes = "$with_gnu_ld"; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test no = "$dynamic_linker" && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test yes = "$GCC"; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+fi
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+fi
+
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test yes = "$hardcode_automatic"; then
+
+ # We can hardcode non-existent directories.
+ if test no != "$hardcode_direct" &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+ test no != "$hardcode_minus_L"; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test relink = "$hardcode_action" ||
+ test yes = "$inherit_rpath"; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test yes != "$enable_dlopen"; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen=load_add_on
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen=LoadLibrary
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else
+
+ lt_cv_dlopen=dyld
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes; then :
+ lt_cv_dlopen=shl_load
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+ lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
+else
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes; then :
+ lt_cv_dlopen=dlopen
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if ${ac_cv_lib_svld_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if ${ac_cv_lib_dld_dld_link+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+ lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test no = "$lt_cv_dlopen"; then
+ enable_dlopen=no
+ else
+ enable_dlopen=yes
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS=$LDFLAGS
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS=$LIBS
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test yes = "$cross_compiling"; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisibility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+ if test yes = "$lt_cv_dlopen_self"; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self_static+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test yes = "$cross_compiling"; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisibility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP"; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report what library types will actually be built
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC=$lt_save_CC
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+# Checks for libraries.
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VARNISHAPI" >&5
+$as_echo_n "checking for VARNISHAPI... " >&6; }
+
+if test -n "$VARNISHAPI_CFLAGS"; then
+ pkg_cv_VARNISHAPI_CFLAGS="$VARNISHAPI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 4.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 4.1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_CFLAGS=`$PKG_CONFIG --cflags "varnishapi >= 4.1" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$VARNISHAPI_LIBS"; then
+ pkg_cv_VARNISHAPI_LIBS="$VARNISHAPI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 4.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 4.1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_LIBS=`$PKG_CONFIG --libs "varnishapi >= 4.1" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "varnishapi >= 4.1" 2>&1`
+ else
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "varnishapi >= 4.1" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$VARNISHAPI_PKG_ERRORS" >&5
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VARNISHAPI" >&5
+$as_echo_n "checking for VARNISHAPI... " >&6; }
+
+if test -n "$VARNISHAPI_CFLAGS"; then
+ pkg_cv_VARNISHAPI_CFLAGS="$VARNISHAPI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 4\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_CFLAGS=`$PKG_CONFIG --cflags "varnishapi >= 4" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$VARNISHAPI_LIBS"; then
+ pkg_cv_VARNISHAPI_LIBS="$VARNISHAPI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 4\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_LIBS=`$PKG_CONFIG --libs "varnishapi >= 4" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "varnishapi >= 4" 2>&1`
+ else
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "varnishapi >= 4" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$VARNISHAPI_PKG_ERRORS" >&5
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VARNISHAPI" >&5
+$as_echo_n "checking for VARNISHAPI... " >&6; }
+
+if test -n "$VARNISHAPI_CFLAGS"; then
+ pkg_cv_VARNISHAPI_CFLAGS="$VARNISHAPI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_CFLAGS=`$PKG_CONFIG --cflags "varnishapi >= 3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$VARNISHAPI_LIBS"; then
+ pkg_cv_VARNISHAPI_LIBS="$VARNISHAPI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_LIBS=`$PKG_CONFIG --libs "varnishapi >= 3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "varnishapi >= 3" 2>&1`
+ else
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "varnishapi >= 3" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$VARNISHAPI_PKG_ERRORS" >&5
+
+ as_fn_error $? "Could not find neither varnishapi v4 nor v3." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "Could not find neither varnishapi v4 nor v3." "$LINENO" 5
+else
+ VARNISHAPI_CFLAGS=$pkg_cv_VARNISHAPI_CFLAGS
+ VARNISHAPI_LIBS=$pkg_cv_VARNISHAPI_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_VARNISHAPI_3 1" >>confdefs.h
+
+fi
+
+
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VARNISHAPI" >&5
+$as_echo_n "checking for VARNISHAPI... " >&6; }
+
+if test -n "$VARNISHAPI_CFLAGS"; then
+ pkg_cv_VARNISHAPI_CFLAGS="$VARNISHAPI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_CFLAGS=`$PKG_CONFIG --cflags "varnishapi >= 3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$VARNISHAPI_LIBS"; then
+ pkg_cv_VARNISHAPI_LIBS="$VARNISHAPI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_LIBS=`$PKG_CONFIG --libs "varnishapi >= 3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "varnishapi >= 3" 2>&1`
+ else
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "varnishapi >= 3" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$VARNISHAPI_PKG_ERRORS" >&5
+
+ as_fn_error $? "Could not find neither varnishapi v4 nor v3." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "Could not find neither varnishapi v4 nor v3." "$LINENO" 5
+else
+ VARNISHAPI_CFLAGS=$pkg_cv_VARNISHAPI_CFLAGS
+ VARNISHAPI_LIBS=$pkg_cv_VARNISHAPI_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_VARNISHAPI_3 1" >>confdefs.h
+
+fi
+
+
+else
+ VARNISHAPI_CFLAGS=$pkg_cv_VARNISHAPI_CFLAGS
+ VARNISHAPI_LIBS=$pkg_cv_VARNISHAPI_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_VARNISHAPI_4 1" >>confdefs.h
+
+fi
+
+
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VARNISHAPI" >&5
+$as_echo_n "checking for VARNISHAPI... " >&6; }
+
+if test -n "$VARNISHAPI_CFLAGS"; then
+ pkg_cv_VARNISHAPI_CFLAGS="$VARNISHAPI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 4\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_CFLAGS=`$PKG_CONFIG --cflags "varnishapi >= 4" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$VARNISHAPI_LIBS"; then
+ pkg_cv_VARNISHAPI_LIBS="$VARNISHAPI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 4\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_LIBS=`$PKG_CONFIG --libs "varnishapi >= 4" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "varnishapi >= 4" 2>&1`
+ else
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "varnishapi >= 4" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$VARNISHAPI_PKG_ERRORS" >&5
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VARNISHAPI" >&5
+$as_echo_n "checking for VARNISHAPI... " >&6; }
+
+if test -n "$VARNISHAPI_CFLAGS"; then
+ pkg_cv_VARNISHAPI_CFLAGS="$VARNISHAPI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_CFLAGS=`$PKG_CONFIG --cflags "varnishapi >= 3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$VARNISHAPI_LIBS"; then
+ pkg_cv_VARNISHAPI_LIBS="$VARNISHAPI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_LIBS=`$PKG_CONFIG --libs "varnishapi >= 3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "varnishapi >= 3" 2>&1`
+ else
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "varnishapi >= 3" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$VARNISHAPI_PKG_ERRORS" >&5
+
+ as_fn_error $? "Could not find neither varnishapi v4 nor v3." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "Could not find neither varnishapi v4 nor v3." "$LINENO" 5
+else
+ VARNISHAPI_CFLAGS=$pkg_cv_VARNISHAPI_CFLAGS
+ VARNISHAPI_LIBS=$pkg_cv_VARNISHAPI_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_VARNISHAPI_3 1" >>confdefs.h
+
+fi
+
+
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VARNISHAPI" >&5
+$as_echo_n "checking for VARNISHAPI... " >&6; }
+
+if test -n "$VARNISHAPI_CFLAGS"; then
+ pkg_cv_VARNISHAPI_CFLAGS="$VARNISHAPI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_CFLAGS=`$PKG_CONFIG --cflags "varnishapi >= 3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$VARNISHAPI_LIBS"; then
+ pkg_cv_VARNISHAPI_LIBS="$VARNISHAPI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"varnishapi >= 3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "varnishapi >= 3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VARNISHAPI_LIBS=`$PKG_CONFIG --libs "varnishapi >= 3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "varnishapi >= 3" 2>&1`
+ else
+ VARNISHAPI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "varnishapi >= 3" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$VARNISHAPI_PKG_ERRORS" >&5
+
+ as_fn_error $? "Could not find neither varnishapi v4 nor v3." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "Could not find neither varnishapi v4 nor v3." "$LINENO" 5
+else
+ VARNISHAPI_CFLAGS=$pkg_cv_VARNISHAPI_CFLAGS
+ VARNISHAPI_LIBS=$pkg_cv_VARNISHAPI_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_VARNISHAPI_3 1" >>confdefs.h
+
+fi
+
+
+else
+ VARNISHAPI_CFLAGS=$pkg_cv_VARNISHAPI_CFLAGS
+ VARNISHAPI_LIBS=$pkg_cv_VARNISHAPI_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_VARNISHAPI_4 1" >>confdefs.h
+
+fi
+
+
+else
+ VARNISHAPI_CFLAGS=$pkg_cv_VARNISHAPI_CFLAGS
+ VARNISHAPI_LIBS=$pkg_cv_VARNISHAPI_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_VARNISHAPI_4_1 1" >>confdefs.h
+
+fi
+
+# Checks for header files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
+$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
+if ${ac_cv_header_sys_wait_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+
+int
+main ()
+{
+ int s;
+ wait (&s);
+ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_sys_wait_h=yes
+else
+ ac_cv_header_sys_wait_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
+$as_echo "$ac_cv_header_sys_wait_h" >&6; }
+if test $ac_cv_header_sys_wait_h = yes; then
+
+$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if ${ac_cv_header_time+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_time=yes
+else
+ ac_cv_header_time=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+
+fi
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this sort of thing. */
+ typedef int charset[2];
+ const charset cs = { 0, 0 };
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this sort of thing. */
+ char tx;
+ char *t = &tx;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; } bx;
+ struct s *b = &bx; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_const=yes
+else
+ ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+
+# Checks for library functions.
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pow" >&5
+$as_echo_n "checking for library containing pow... " >&6; }
+if ${ac_cv_search_pow+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pow ();
+int
+main ()
+{
+return pow ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' m; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_pow=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_pow+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_pow+:} false; then :
+
+else
+ ac_cv_search_pow=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pow" >&5
+$as_echo "$ac_cv_search_pow" >&6; }
+ac_res=$ac_cv_search_pow
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+ as_fn_error $? "unable to find libm" "$LINENO" 5
+fi
+
+
+# Now that we're done using the compiler to look for functions and
+# libraries, set CFLAGS to what we want them to be for our own code
+
+# This corresponds to FreeBSD's WARNS level 6
+DEVELOPER_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat"
+
+# Additional flags for GCC 4
+EXTRA_DEVELOPER_CFLAGS="-Wextra -Wno-missing-field-initializers -Wno-sign-compare"
+
+# Check whether --enable-developer-warnings was given.
+if test "${enable_developer_warnings+set}" = set; then :
+ enableval=$enable_developer_warnings; CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"
+fi
+
+# Check whether --enable-debugging-symbols was given.
+if test "${enable_debugging_symbols+set}" = set; then :
+ enableval=$enable_debugging_symbols; CFLAGS="${CFLAGS} -O0 -g -fno-inline"
+fi
+
+# Check whether --enable-extra-developer-warnings was given.
+if test "${enable_extra_developer_warnings+set}" = set; then :
+ enableval=$enable_extra_developer_warnings; CFLAGS="${CFLAGS} ${EXTRA_DEVELOPER_CFLAGS}"
+fi
+
+# Check whether --enable-stack-protector was given.
+if test "${enable_stack_protector+set}" = set; then :
+ enableval=$enable_stack_protector; CFLAGS="${CFLAGS} -fstack-protector-all"
+fi
+
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+ enableval=$enable_werror; CFLAGS="${CFLAGS} -Werror"
+fi
+
+
+# Generate output
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by varnish-nagios $as_me 1.1, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <varnish-dev@varnish-cache.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+varnish-nagios config.status 1.1
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
+configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+lt_cv_nm_interface \
+nm_file_list_spec \
+lt_cv_truncate_bin \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postlink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+configure_time_dlsearch_path \
+configure_time_lt_sys_library_path; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+ac_aux_dir='$ac_aux_dir'
+
+# See if we are running on zsh, and set the options that allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "$am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options that allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile=${ofile}T
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+# Generated automatically by $as_me ($PACKAGE) $VERSION
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the same
+# distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=''
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# Shared archive member basename,for filename based shared library versioning on AIX.
+shared_archive_member_spec=$shared_archive_member_spec
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name lister interface.
+nm_interface=$lt_lt_cv_nm_interface
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and where our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# Command to truncate a binary pipe.
+lt_truncate_bin=$lt_lt_cv_truncate_bin
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Detected run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
+
+# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
+configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain=$ac_aux_dir/ltmain.sh
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/configure.ac b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/configure.ac
new file mode 100644
index 0000000..c7946c2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/configure.ac
@@ -0,0 +1,77 @@
+# $Id$
+
+AC_PREREQ(2.59)
+AC_COPYRIGHT([Copyright (c) 2007-2011 Varnish Software AS])
+AC_REVISION([$Id$])
+AC_INIT([varnish-nagios], [1.1], [varnish-dev@varnish-cache.org])
+AC_CONFIG_SRCDIR(check_varnish.c)
+AM_CONFIG_HEADER(config.h)
+
+AC_CANONICAL_SYSTEM
+AC_LANG(C)
+
+AM_INIT_AUTOMAKE
+
+# Checks for programs.
+AC_GNU_SOURCE
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+AC_PROG_MAKE_SET
+
+# Checks for libraries.
+PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 4.1],
+ [AC_DEFINE([HAVE_VARNISHAPI_4_1], [1], [Use VARNISHAPI v4.1])],
+ [PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 4],
+ [AC_DEFINE([HAVE_VARNISHAPI_4], [1], [Use VARNISHAPI v4])],
+ [PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 3],
+ [AC_DEFINE([HAVE_VARNISHAPI_3], [1], [Use VARNISHAPI v3])],
+ [AC_MSG_ERROR([Could not find neither varnishapi v4 nor v3.])])
+ ]
+ )
+ ]
+)
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_HEADER_TIME
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+
+# Checks for library functions.
+AC_TYPE_SIZE_T
+AC_SEARCH_LIBS([pow],[m],[],[AC_MSG_ERROR([unable to find libm])])
+
+# Now that we're done using the compiler to look for functions and
+# libraries, set CFLAGS to what we want them to be for our own code
+
+# This corresponds to FreeBSD's WARNS level 6
+DEVELOPER_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat"
+
+# Additional flags for GCC 4
+EXTRA_DEVELOPER_CFLAGS="-Wextra -Wno-missing-field-initializers -Wno-sign-compare"
+
+AC_ARG_ENABLE(developer-warnings,
+ AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]),
+ CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}")
+AC_ARG_ENABLE(debugging-symbols,
+ AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]),
+ CFLAGS="${CFLAGS} -O0 -g -fno-inline")
+AC_ARG_ENABLE(extra-developer-warnings,
+ AS_HELP_STRING([--enable-extra-developer-warnings],[enable even stricter warnings (default is NO)]),
+ CFLAGS="${CFLAGS} ${EXTRA_DEVELOPER_CFLAGS}")
+AC_ARG_ENABLE(stack-protector,
+ AS_HELP_STRING([--enable-stack-protector],[enable stack protector (default is NO)]),
+ CFLAGS="${CFLAGS} -fstack-protector-all")
+AC_ARG_ENABLE(werror,
+ AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]),
+ CFLAGS="${CFLAGS} -Werror")
+
+# Generate output
+AC_CONFIG_FILES([
+ Makefile
+])
+AC_OUTPUT
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/depcomp b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/depcomp
new file mode 100755
index 0000000..fc98710
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/depcomp
@@ -0,0 +1,791 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2013-05-30.07; # UTC
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by 'PROGRAMS ARGS'.
+ object Object file output by 'PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputting dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the "deleted header file" problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+## Some versions of gcc put a space before the ':'. On the theory
+## that the space means something, we add a space to the output as
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like '#:fec' to the end of the
+ # dependency line.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+ | tr "$nl" ' ' >> "$depfile"
+ echo >> "$depfile"
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+xlc)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts '$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ aix_post_process_depfile
+ ;;
+
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using '\' :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+ set_dir_from "$object"
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ set_base_from "$source"
+ tmpdepfile=$base.d
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0; do
+ # mkdir is a portable test-and-set.
+ if mkdir "$lockdir" 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rmdir "$lockdir"
+ break
+ else
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
+
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add 'dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
+
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/'"$tab"'/
+ G
+ p
+}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for ':'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
+ "$@" $dashmflag |
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+ echo "$tab" >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/install-sh b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/install-sh
new file mode 100755
index 0000000..59990a1
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/install-sh
@@ -0,0 +1,508 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2014-09-12.12; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+tab=' '
+nl='
+'
+IFS=" $tab$nl"
+
+# Set DOITPROG to "echo" to test this script.
+
+doit=${DOITPROG-}
+doit_exec=${doit:-exec}
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+is_target_a_directory=possibly
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) is_target_a_directory=never;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call 'install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for 'test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ dstdir=`dirname "$dst"`
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ # $RANDOM is not portable (e.g. dash); use it when possible to
+ # lower collision chance
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ # As "mkdir -p" follows symlinks and we work in /tmp possibly; so
+ # create the $tmpdir first (and fail if unsuccessful) to make sure
+ # that nobody tries to guess the $tmpdir name.
+ if (umask $mkdir_umask &&
+ $mkdirprog $mkdir_mode "$tmpdir" &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ test_tmpdir="$tmpdir/a"
+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ oIFS=$IFS
+ IFS=/
+ set -f
+ set fnord $dstdir
+ shift
+ set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ set +f &&
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/ltmain.sh b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/ltmain.sh
new file mode 100644
index 0000000..a736cf9
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/ltmain.sh
@@ -0,0 +1,11156 @@
+#! /bin/sh
+## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
+## by inline-source v2014-01-03.01
+
+# libtool (GNU libtool) 2.4.6
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION="2.4.6 Debian-2.4.6-2"
+package_revision=2.4.6
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run './libtool --help' for help with using this script from the
+# command line.
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir.
+
+# Set a version string for this script.
+scriptversion=2015-01-20.17; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# As a special exception to the GNU General Public License, if you distribute
+# this file as part of a program or library that is built using GNU Libtool,
+# you may include this file under the same distribution terms that you use
+# for the rest of that program.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
+#
+# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+#
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
+
+
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
+fi
+
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test set = \"\${$_G_var+set}\"; then
+ save_$_G_var=\$$_G_var
+ $_G_var=C
+ export $_G_var
+ _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
+ fi"
+done
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp $nl"
+
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
+
+
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+}
+
+
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than
+# $_G_path_prog_max characters.
+func_path_progs ()
+{
+ _G_progs_list=$1
+ _G_check_func=$2
+ _G_PATH=${3-"$PATH"}
+
+ _G_path_prog_max=0
+ _G_path_prog_found=false
+ _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
+ for _G_dir in $_G_PATH; do
+ IFS=$_G_save_IFS
+ test -z "$_G_dir" && _G_dir=.
+ for _G_prog_name in $_G_progs_list; do
+ for _exeext in '' .EXE; do
+ _G_path_prog=$_G_dir/$_G_prog_name$_exeext
+ func_executable_p "$_G_path_prog" || continue
+ case `"$_G_path_prog" --version 2>&1` in
+ *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
+ *) $_G_check_func $_G_path_prog
+ func_path_progs_result=$func_check_prog_result
+ ;;
+ esac
+ $_G_path_prog_found && break 3
+ done
+ done
+ done
+ IFS=$_G_save_IFS
+ test -z "$func_path_progs_result" && {
+ echo "no acceptable sed could be found in \$PATH" >&2
+ exit 1
+ }
+}
+
+
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+
+# Unless the user overrides by setting SED, search the path for either GNU
+# sed, or the sed that truncates its output the least.
+test -z "$SED" && {
+ _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for _G_i in 1 2 3 4 5 6 7; do
+ _G_sed_script=$_G_sed_script$nl$_G_sed_script
+ done
+ echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
+ _G_sed_script=
+
+ func_check_prog_sed ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo '' >> conftest.nl
+ "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+ rm -f conftest.sed
+ SED=$func_path_progs_result
+}
+
+
+# Unless the user overrides by setting GREP, search the path for either GNU
+# grep, or the grep that truncates its output the least.
+test -z "$GREP" && {
+ func_check_prog_grep ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ _G_path_prog_max=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo 'GREP' >> conftest.nl
+ "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+ GREP=$func_path_progs_result
+}
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# All uppercase variable names are used for environment variables. These
+# variables can be overridden by the user before calling a script that
+# uses them if a suitable command of that name is not already available
+# in the command search PATH.
+
+: ${CP="cp -f"}
+: ${ECHO="printf %s\n"}
+: ${EGREP="$GREP -E"}
+: ${FGREP="$GREP -F"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+
+
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
+
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
+
+# Same as above, but do not quote variable references.
+sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
+
+# Sed substitution that converts a w32 file name or path
+# that contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-'\' parameter expansions in output of sed_double_quote_subst that
+# were '\'-ed in input to the same. If an odd number of '\' preceded a
+# '$' in input to sed_double_quote_subst, that '$' was protected from
+# expansion. Since each input '\' is now two '\'s, look for any number
+# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
+_G_bs='\\'
+_G_bs2='\\\\'
+_G_bs4='\\\\\\\\'
+_G_dollar='\$'
+sed_double_backslash="\
+ s/$_G_bs4/&\\
+/g
+ s/^$_G_bs2$_G_dollar/$_G_bs&/
+ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
+ s/\n//g"
+
+
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
+
+# Except for the global variables explicitly listed below, the following
+# functions in the '^func_' namespace, and the '^require_' namespace
+# variables initialised in the 'Resource management' section, sourcing
+# this file will not pollute your global namespace with anything
+# else. There's no portable way to scope variables in Bourne shell
+# though, so actually running these functions will sometimes place
+# results into a variable named after the function, and often use
+# temporary variables in the '^_G_' namespace. If you are careful to
+# avoid using those namespaces casually in your sourcing script, things
+# should continue to work as you expect. And, of course, you can freely
+# overwrite any of the functions or variables defined here before
+# calling anything to customize them.
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+# Allow overriding, eg assuming that you follow the convention of
+# putting '$debug_cmd' at the start of all your functions, you can get
+# bash to show function call trace with:
+#
+# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+debug_cmd=${debug_cmd-":"}
+exit_cmd=:
+
+# By convention, finish your script with:
+#
+# exit $exit_status
+#
+# so that you can set exit_status to non-zero if you want to indicate
+# something went wrong during execution without actually bailing out at
+# the point of failure.
+exit_status=$EXIT_SUCCESS
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath=$0
+
+# The name of this program.
+progname=`$ECHO "$progpath" |$SED "$sed_basename"`
+
+# Make sure we have an absolute progpath for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
+ progdir=`cd "$progdir" && pwd`
+ progpath=$progdir/$progname
+ ;;
+ *)
+ _G_IFS=$IFS
+ IFS=${PATH_SEPARATOR-:}
+ for progdir in $PATH; do
+ IFS=$_G_IFS
+ test -x "$progdir/$progname" && break
+ done
+ IFS=$_G_IFS
+ test -n "$progdir" || progdir=`pwd`
+ progpath=$progdir/$progname
+ ;;
+esac
+
+
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
+
+# The following options affect the operation of the functions defined
+# below, and should be set appropriately depending on run-time para-
+# meters passed on the command line.
+
+opt_dry_run=false
+opt_quiet=false
+opt_verbose=false
+
+# Categories 'all' and 'none' are always available. Append any others
+# you will pass as the first argument to func_warning from your own
+# code.
+warning_categories=
+
+# By default, display warnings according to 'opt_warning_types'. Set
+# 'warning_func' to ':' to elide all warnings, or func_fatal_error to
+# treat the next displayed warning as a fatal error.
+warning_func=func_warn_and_continue
+
+# Set to 'all' to display all warnings, 'none' to suppress all
+# warnings, or a space delimited list of some subset of
+# 'warning_categories' to display only the listed warnings.
+opt_warning_types=all
+
+
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Call them using their associated
+# 'require_*' variable to ensure that they are executed, at most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
+
+
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
+{
+ $debug_cmd
+
+ test -t 1 && {
+ # COLORTERM and USE_ANSI_COLORS environment variables take
+ # precedence, because most terminfo databases neglect to describe
+ # whether color sequences are supported.
+ test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
+
+ if test 1 = "$USE_ANSI_COLORS"; then
+ # Standard ANSI escape sequences
+ tc_reset=''
+ tc_bold=''; tc_standout=''
+ tc_red=''; tc_green=''
+ tc_blue=''; tc_cyan=''
+ else
+ # Otherwise trust the terminfo database after all.
+ test -n "`tput sgr0 2>/dev/null`" && {
+ tc_reset=`tput sgr0`
+ test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
+ tc_standout=$tc_bold
+ test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
+ test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
+ test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
+ test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
+ test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
+ }
+ fi
+ }
+
+ require_term_colors=:
+}
+
+
+## ----------------- ##
+## Function library. ##
+## ----------------- ##
+
+# This section contains a variety of useful functions to call in your
+# scripts. Take note of the portable wrappers for features provided by
+# some modern shells, which will fall back to slower equivalents on
+# less featureful shells.
+
+
+# func_append VAR VALUE
+# ---------------------
+# Append VALUE onto the existing contents of VAR.
+
+ # We should try to minimise forks, especially on Windows where they are
+ # unreasonably slow, so skip the feature probes when bash or zsh are
+ # being used:
+ if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
+ : ${_G_HAVE_ARITH_OP="yes"}
+ : ${_G_HAVE_XSI_OPS="yes"}
+ # The += operator was introduced in bash 3.1
+ case $BASH_VERSION in
+ [12].* | 3.0 | 3.0*) ;;
+ *)
+ : ${_G_HAVE_PLUSEQ_OP="yes"}
+ ;;
+ esac
+ fi
+
+ # _G_HAVE_PLUSEQ_OP
+ # Can be empty, in which case the shell is probed, "yes" if += is
+ # useable or anything else if it does not work.
+ test -z "$_G_HAVE_PLUSEQ_OP" \
+ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
+ && _G_HAVE_PLUSEQ_OP=yes
+
+if test yes = "$_G_HAVE_PLUSEQ_OP"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_append ()
+ {
+ $debug_cmd
+
+ eval "$1+=\$2"
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_append ()
+ {
+ $debug_cmd
+
+ eval "$1=\$$1\$2"
+ }
+fi
+
+
+# func_append_quoted VAR VALUE
+# ----------------------------
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+if test yes = "$_G_HAVE_PLUSEQ_OP"; then
+ eval 'func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1+=\\ \$func_quote_for_eval_result"
+ }'
+else
+ func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1=\$$1\\ \$func_quote_for_eval_result"
+ }
+fi
+
+
+# func_append_uniq VAR VALUE
+# --------------------------
+# Append unique VALUE onto the existing contents of VAR, assuming
+# entries are delimited by the first character of VALUE. For example:
+#
+# func_append_uniq options " --another-option option-argument"
+#
+# will only append to $options if " --another-option option-argument "
+# is not already present somewhere in $options already (note spaces at
+# each end implied by leading space in second argument).
+func_append_uniq ()
+{
+ $debug_cmd
+
+ eval _G_current_value='`$ECHO $'$1'`'
+ _G_delim=`expr "$2" : '\(.\)'`
+
+ case $_G_delim$_G_current_value$_G_delim in
+ *"$2$_G_delim"*) ;;
+ *) func_append "$@" ;;
+ esac
+}
+
+
+# func_arith TERM...
+# ------------------
+# Set func_arith_result to the result of evaluating TERMs.
+ test -z "$_G_HAVE_ARITH_OP" \
+ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
+ && _G_HAVE_ARITH_OP=yes
+
+if test yes = "$_G_HAVE_ARITH_OP"; then
+ eval 'func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=$(( $* ))
+ }'
+else
+ func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=`expr "$@"`
+ }
+fi
+
+
+# func_basename FILE
+# ------------------
+# Set func_basename_result to FILE with everything up to and including
+# the last / stripped.
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ # If this shell supports suffix pattern removal, then use it to avoid
+ # forking. Hide the definitions single quotes in case the shell chokes
+ # on unsupported syntax...
+ _b='func_basename_result=${1##*/}'
+ _d='case $1 in
+ */*) func_dirname_result=${1%/*}$2 ;;
+ * ) func_dirname_result=$3 ;;
+ esac'
+
+else
+ # ...otherwise fall back to using sed.
+ _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
+ _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
+ if test "X$func_dirname_result" = "X$1"; then
+ func_dirname_result=$3
+ else
+ func_append func_dirname_result "$2"
+ fi'
+fi
+
+eval 'func_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+}'
+
+
+# func_dirname FILE APPEND NONDIR_REPLACEMENT
+# -------------------------------------------
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+eval 'func_dirname ()
+{
+ $debug_cmd
+
+ '"$_d"'
+}'
+
+
+# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
+# --------------------------------------------------------
+# Perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# For efficiency, we do not delegate to the functions above but instead
+# duplicate the functionality here.
+eval 'func_dirname_and_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+ '"$_d"'
+}'
+
+
+# func_echo ARG...
+# ----------------
+# Echo program name prefixed message.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_echo_all ARG...
+# --------------------
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+
+# func_echo_infix_1 INFIX ARG...
+# ------------------------------
+# Echo program name, followed by INFIX on the first line, with any
+# additional lines not showing INFIX.
+func_echo_infix_1 ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ _G_infix=$1; shift
+ _G_indent=$_G_infix
+ _G_prefix="$progname: $_G_infix: "
+ _G_message=$*
+
+ # Strip color escape sequences before counting printable length
+ for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
+ do
+ test -n "$_G_tc" && {
+ _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
+ _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
+ }
+ done
+ _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
+
+ func_echo_infix_1_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_infix_1_IFS
+ $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
+ _G_prefix=$_G_indent
+ done
+ IFS=$func_echo_infix_1_IFS
+}
+
+
+# func_error ARG...
+# -----------------
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
+}
+
+
+# func_fatal_error ARG...
+# -----------------------
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ $debug_cmd
+
+ func_error "$*"
+ exit $EXIT_FAILURE
+}
+
+
+# func_grep EXPRESSION FILENAME
+# -----------------------------
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $debug_cmd
+
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_len STRING
+# ---------------
+# Set func_len_result to the length of STRING. STRING may not
+# start with a hyphen.
+ test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=${#1}
+ }'
+else
+ func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+ }
+fi
+
+
+# func_mkdir_p DIRECTORY-PATH
+# ---------------------------
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ $debug_cmd
+
+ _G_directory_path=$1
+ _G_dir_list=
+
+ if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+
+ # Protect directory names starting with '-'
+ case $_G_directory_path in
+ -*) _G_directory_path=./$_G_directory_path ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$_G_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ _G_dir_list=$_G_directory_path:$_G_dir_list
+
+ # If the last portion added has no slash in it, the list is done
+ case $_G_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
+ done
+ _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
+
+ func_mkdir_p_IFS=$IFS; IFS=:
+ for _G_dir in $_G_dir_list; do
+ IFS=$func_mkdir_p_IFS
+ # mkdir can fail with a 'File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$_G_dir" 2>/dev/null || :
+ done
+ IFS=$func_mkdir_p_IFS
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$_G_directory_path" || \
+ func_fatal_error "Failed to create '$1'"
+ fi
+}
+
+
+# func_mktempdir [BASENAME]
+# -------------------------
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, BASENAME is the basename for that directory.
+func_mktempdir ()
+{
+ $debug_cmd
+
+ _G_template=${TMPDIR-/tmp}/${1-$progname}
+
+ if test : = "$opt_dry_run"; then
+ # Return a directory name, but don't create it in dry-run mode
+ _G_tmpdir=$_G_template-$$
+ else
+
+ # If mktemp works, use that first and foremost
+ _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$_G_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ _G_tmpdir=$_G_template-${RANDOM-0}$$
+
+ func_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$_G_tmpdir"
+ umask $func_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$_G_tmpdir" || \
+ func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
+ fi
+
+ $ECHO "$_G_tmpdir"
+}
+
+
+# func_normal_abspath PATH
+# ------------------------
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+func_normal_abspath ()
+{
+ $debug_cmd
+
+ # These SED scripts presuppose an absolute path with a trailing slash.
+ _G_pathcar='s|^/\([^/]*\).*$|\1|'
+ _G_pathcdr='s|^/[^/]*||'
+ _G_removedotparts=':dotsl
+ s|/\./|/|g
+ t dotsl
+ s|/\.$|/|'
+ _G_collapseslashes='s|/\{1,\}|/|g'
+ _G_finalslash='s|/*$|/|'
+
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test / = "$func_normal_abspath_tpath"; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result"; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+
+# func_notquiet ARG...
+# --------------------
+# Echo program name prefixed message only when not in quiet mode.
+func_notquiet ()
+{
+ $debug_cmd
+
+ $opt_quiet || func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+
+# func_relative_path SRCDIR DSTDIR
+# --------------------------------
+# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
+func_relative_path ()
+{
+ $debug_cmd
+
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=$func_dirname_result
+ if test -z "$func_relative_path_tlibdir"; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test -n "$func_stripname_result"; then
+ func_append func_relative_path_result "/$func_stripname_result"
+ fi
+
+ # Normalisation. If bindir is libdir, return '.' else relative path.
+ if test -n "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ fi
+
+ test -n "$func_relative_path_result" || func_relative_path_result=.
+
+ :
+}
+
+
+# func_quote_for_eval ARG...
+# --------------------------
+# Aesthetically quote ARGs to be evaled later.
+# This function returns two values:
+# i) func_quote_for_eval_result
+# double-quoted, suitable for a subsequent eval
+# ii) func_quote_for_eval_unquoted_result
+# has all characters that are still active within double
+# quotes backslashified.
+func_quote_for_eval ()
+{
+ $debug_cmd
+
+ func_quote_for_eval_unquoted_result=
+ func_quote_for_eval_result=
+ while test 0 -lt $#; do
+ case $1 in
+ *[\\\`\"\$]*)
+ _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+ *)
+ _G_unquoted_arg=$1 ;;
+ esac
+ if test -n "$func_quote_for_eval_unquoted_result"; then
+ func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+ else
+ func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+ fi
+
+ case $_G_unquoted_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and variable expansion
+ # for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_quoted_arg=\"$_G_unquoted_arg\"
+ ;;
+ *)
+ _G_quoted_arg=$_G_unquoted_arg
+ ;;
+ esac
+
+ if test -n "$func_quote_for_eval_result"; then
+ func_append func_quote_for_eval_result " $_G_quoted_arg"
+ else
+ func_append func_quote_for_eval_result "$_G_quoted_arg"
+ fi
+ shift
+ done
+}
+
+
+# func_quote_for_expand ARG
+# -------------------------
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ $debug_cmd
+
+ case $1 in
+ *[\\\`\"]*)
+ _G_arg=`$ECHO "$1" | $SED \
+ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ _G_arg=$1 ;;
+ esac
+
+ case $_G_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_arg=\"$_G_arg\"
+ ;;
+ esac
+
+ func_quote_for_expand_result=$_G_arg
+}
+
+
+# func_stripname PREFIX SUFFIX NAME
+# ---------------------------------
+# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_stripname ()
+ {
+ $debug_cmd
+
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary variable first.
+ func_stripname_result=$3
+ func_stripname_result=${func_stripname_result#"$1"}
+ func_stripname_result=${func_stripname_result%"$2"}
+ }'
+else
+ func_stripname ()
+ {
+ $debug_cmd
+
+ case $2 in
+ .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+ *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
+ esac
+ }
+fi
+
+
+# func_show_eval CMD [FAIL_EXP]
+# -----------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ func_quote_for_expand "$_G_cmd"
+ eval "func_notquiet $func_quote_for_expand_result"
+
+ $opt_dry_run || {
+ eval "$_G_cmd"
+ _G_status=$?
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ fi
+ }
+}
+
+
+# func_show_eval_locale CMD [FAIL_EXP]
+# ------------------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ $opt_quiet || {
+ func_quote_for_expand "$_G_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ $opt_dry_run || {
+ eval "$_G_user_locale
+ $_G_cmd"
+ _G_status=$?
+ eval "$_G_safe_locale"
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ fi
+ }
+}
+
+
+# func_tr_sh
+# ----------
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result. All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+ $debug_cmd
+
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
+}
+
+
+# func_verbose ARG...
+# -------------------
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $debug_cmd
+
+ $opt_verbose && func_echo "$*"
+
+ :
+}
+
+
+# func_warn_and_continue ARG...
+# -----------------------------
+# Echo program name prefixed warning message to standard error.
+func_warn_and_continue ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
+}
+
+
+# func_warning CATEGORY ARG...
+# ----------------------------
+# Echo program name prefixed warning message to standard error. Warning
+# messages can be filtered according to CATEGORY, where this function
+# elides messages where CATEGORY is not listed in the global variable
+# 'opt_warning_types'.
+func_warning ()
+{
+ $debug_cmd
+
+ # CATEGORY must be in the warning_categories list!
+ case " $warning_categories " in
+ *" $1 "*) ;;
+ *) func_internal_error "invalid warning category '$1'" ;;
+ esac
+
+ _G_category=$1
+ shift
+
+ case " $opt_warning_types " in
+ *" $_G_category "*) $warning_func ${1+"$@"} ;;
+ esac
+}
+
+
+# func_sort_ver VER1 VER2
+# -----------------------
+# 'sort -V' is not generally available.
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+func_sort_ver ()
+{
+ $debug_cmd
+
+ printf '%s\n%s\n' "$1" "$2" \
+ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
+}
+
+# func_lt_ver PREV CURR
+# ---------------------
+# Return true if PREV and CURR are in the correct order according to
+# func_sort_ver, otherwise false. Use it like this:
+#
+# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
+func_lt_ver ()
+{
+ $debug_cmd
+
+ test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# Set a version string for this script.
+scriptversion=2014-01-07.03; # UTC
+
+# A portable, pluggable option parser for Bourne shell.
+# Written by Gary V. Vaughan, 2010
+
+# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# This file is a library for parsing options in your shell scripts along
+# with assorted other useful supporting features that you can make use
+# of too.
+#
+# For the simplest scripts you might need only:
+#
+# #!/bin/sh
+# . relative/path/to/funclib.sh
+# . relative/path/to/options-parser
+# scriptversion=1.0
+# func_options ${1+"$@"}
+# eval set dummy "$func_options_result"; shift
+# ...rest of your script...
+#
+# In order for the '--version' option to work, you will need to have a
+# suitably formatted comment like the one at the top of this file
+# starting with '# Written by ' and ending with '# warranty; '.
+#
+# For '-h' and '--help' to work, you will also need a one line
+# description of your script's purpose in a comment directly above the
+# '# Written by ' line, like the one at the top of this file.
+#
+# The default options also support '--debug', which will turn on shell
+# execution tracing (see the comment above debug_cmd below for another
+# use), and '--verbose' and the func_verbose function to allow your script
+# to display verbose messages only when your user has specified
+# '--verbose'.
+#
+# After sourcing this file, you can plug processing for additional
+# options by amending the variables from the 'Configuration' section
+# below, and following the instructions in the 'Option parsing'
+# section further down.
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# You should override these variables in your script after sourcing this
+# file so that they reflect the customisations you have added to the
+# option parser.
+
+# The usage line for option parsing errors and the start of '-h' and
+# '--help' output messages. You can embed shell variables for delayed
+# expansion at the time the message is displayed, but you will need to
+# quote other shell meta-characters carefully to prevent them being
+# expanded when the contents are evaled.
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h' and '--help'. Add to this or
+# override it after sourcing this library to reflect the full set of
+# options your script accepts.
+usage_message="\
+ --debug enable verbose shell tracing
+ -W, --warnings=CATEGORY
+ report the warnings falling in CATEGORY [all]
+ -v, --verbose verbosely report processing
+ --version print version information and exit
+ -h, --help print short or long help message and exit
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message="
+Warning categories include:
+ 'all' show all warnings
+ 'none' turn off all the warnings
+ 'error' warnings are treated as fatal errors"
+
+# Help message printed before fatal option parsing errors.
+fatal_help="Try '\$progname --help' for more information."
+
+
+
+## ------------------------- ##
+## Hook function management. ##
+## ------------------------- ##
+
+# This section contains functions for adding, removing, and running hooks
+# to the main code. A hook is just a named list of of function, that can
+# be run in order later on.
+
+# func_hookable FUNC_NAME
+# -----------------------
+# Declare that FUNC_NAME will run hooks added with
+# 'func_add_hook FUNC_NAME ...'.
+func_hookable ()
+{
+ $debug_cmd
+
+ func_append hookable_fns " $1"
+}
+
+
+# func_add_hook FUNC_NAME HOOK_FUNC
+# ---------------------------------
+# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
+# first have been declared "hookable" by a call to 'func_hookable'.
+func_add_hook ()
+{
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not accept hook functions." ;;
+ esac
+
+ eval func_append ${1}_hooks '" $2"'
+}
+
+
+# func_remove_hook FUNC_NAME HOOK_FUNC
+# ------------------------------------
+# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+func_remove_hook ()
+{
+ $debug_cmd
+
+ eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
+}
+
+
+# func_run_hooks FUNC_NAME [ARG]...
+# ---------------------------------
+# Run all hook functions registered to FUNC_NAME.
+# It is assumed that the list of hook functions contains nothing more
+# than a whitespace-delimited list of legal shell function names, and
+# no effort is wasted trying to catch shell meta-characters or preserve
+# whitespace.
+func_run_hooks ()
+{
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+ esac
+
+ eval _G_hook_fns=\$$1_hooks; shift
+
+ for _G_hook in $_G_hook_fns; do
+ eval $_G_hook '"$@"'
+
+ # store returned options list back into positional
+ # parameters for next 'cmd' execution.
+ eval _G_hook_result=\$${_G_hook}_result
+ eval set dummy "$_G_hook_result"; shift
+ done
+
+ func_quote_for_eval ${1+"$@"}
+ func_run_hooks_result=$func_quote_for_eval_result
+}
+
+
+
+## --------------- ##
+## Option parsing. ##
+## --------------- ##
+
+# In order to add your own option parsing hooks, you must accept the
+# full positional parameter list in your hook function, remove any
+# options that you action, and then pass back the remaining unprocessed
+# options in '<hooked_function_name>_result', escaped suitably for
+# 'eval'. Like this:
+#
+# my_options_prep ()
+# {
+# $debug_cmd
+#
+# # Extend the existing usage message.
+# usage_message=$usage_message'
+# -s, --silent don'\''t print informational messages
+# '
+#
+# func_quote_for_eval ${1+"$@"}
+# my_options_prep_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_options_prep my_options_prep
+#
+#
+# my_silent_option ()
+# {
+# $debug_cmd
+#
+# # Note that for efficiency, we parse as many options as we can
+# # recognise in a loop before passing the remainder back to the
+# # caller on the first unrecognised argument we encounter.
+# while test $# -gt 0; do
+# opt=$1; shift
+# case $opt in
+# --silent|-s) opt_silent=: ;;
+# # Separate non-argument short options:
+# -s*) func_split_short_opt "$_G_opt"
+# set dummy "$func_split_short_opt_name" \
+# "-$func_split_short_opt_arg" ${1+"$@"}
+# shift
+# ;;
+# *) set dummy "$_G_opt" "$*"; shift; break ;;
+# esac
+# done
+#
+# func_quote_for_eval ${1+"$@"}
+# my_silent_option_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_parse_options my_silent_option
+#
+#
+# my_option_validation ()
+# {
+# $debug_cmd
+#
+# $opt_silent && $opt_verbose && func_fatal_help "\
+# '--silent' and '--verbose' options are mutually exclusive."
+#
+# func_quote_for_eval ${1+"$@"}
+# my_option_validation_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_validate_options my_option_validation
+#
+# You'll alse need to manually amend $usage_message to reflect the extra
+# options you parse. It's preferable to append if you can, so that
+# multiple option parsing hooks can be added safely.
+
+
+# func_options [ARG]...
+# ---------------------
+# All the functions called inside func_options are hookable. See the
+# individual implementations for details.
+func_hookable func_options
+func_options ()
+{
+ $debug_cmd
+
+ func_options_prep ${1+"$@"}
+ eval func_parse_options \
+ ${func_options_prep_result+"$func_options_prep_result"}
+ eval func_validate_options \
+ ${func_parse_options_result+"$func_parse_options_result"}
+
+ eval func_run_hooks func_options \
+ ${func_validate_options_result+"$func_validate_options_result"}
+
+ # save modified positional parameters for caller
+ func_options_result=$func_run_hooks_result
+}
+
+
+# func_options_prep [ARG]...
+# --------------------------
+# All initialisations required before starting the option parse loop.
+# Note that when calling hook functions, we pass through the list of
+# positional parameters. If a hook function modifies that list, and
+# needs to propogate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before
+# returning.
+func_hookable func_options_prep
+func_options_prep ()
+{
+ $debug_cmd
+
+ # Option defaults:
+ opt_verbose=false
+ opt_warning_types=
+
+ func_run_hooks func_options_prep ${1+"$@"}
+
+ # save modified positional parameters for caller
+ func_options_prep_result=$func_run_hooks_result
+}
+
+
+# func_parse_options [ARG]...
+# ---------------------------
+# The main option parsing loop.
+func_hookable func_parse_options
+func_parse_options ()
+{
+ $debug_cmd
+
+ func_parse_options_result=
+
+ # this just eases exit handling
+ while test $# -gt 0; do
+ # Defer to hook functions for initial option parsing, so they
+ # get priority in the event of reusing an option name.
+ func_run_hooks func_parse_options ${1+"$@"}
+
+ # Adjust func_parse_options positional parameters to match
+ eval set dummy "$func_run_hooks_result"; shift
+
+ # Break out of the loop if we already parsed every option.
+ test $# -gt 0 || break
+
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --debug|-x) debug_cmd='set -x'
+ func_echo "enabling shell trace mode"
+ $debug_cmd
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ set dummy --warnings none ${1+"$@"}
+ shift
+ ;;
+
+ --warnings|--warning|-W)
+ test $# = 0 && func_missing_arg $_G_opt && break
+ case " $warning_categories $1" in
+ *" $1 "*)
+ # trailing space prevents matching last $1 above
+ func_append_uniq opt_warning_types " $1"
+ ;;
+ *all)
+ opt_warning_types=$warning_categories
+ ;;
+ *none)
+ opt_warning_types=none
+ warning_func=:
+ ;;
+ *error)
+ opt_warning_types=$warning_categories
+ warning_func=func_fatal_error
+ ;;
+ *)
+ func_fatal_error \
+ "unsupported warning category: '$1'"
+ ;;
+ esac
+ shift
+ ;;
+
+ --verbose|-v) opt_verbose=: ;;
+ --version) func_version ;;
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+
+ # Separate optargs to long options (plugins may need this):
+ --*=*) func_split_equals "$_G_opt"
+ set dummy "$func_split_equals_lhs" \
+ "$func_split_equals_rhs" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate optargs to short options:
+ -W*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-v*|-x*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) break ;;
+ -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
+ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ func_parse_options_result=$func_quote_for_eval_result
+}
+
+
+# func_validate_options [ARG]...
+# ------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+func_hookable func_validate_options
+func_validate_options ()
+{
+ $debug_cmd
+
+ # Display all warnings if -W was not given.
+ test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
+
+ func_run_hooks func_validate_options ${1+"$@"}
+
+ # Bail if the options were screwed!
+ $exit_cmd $EXIT_FAILURE
+
+ # save modified positional parameters for caller
+ func_validate_options_result=$func_run_hooks_result
+}
+
+
+
+## ----------------- ##
+## Helper functions. ##
+## ----------------- ##
+
+# This section contains the helper functions used by the rest of the
+# hookable option parser framework in ascii-betical order.
+
+
+# func_fatal_help ARG...
+# ----------------------
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ $debug_cmd
+
+ eval \$ECHO \""Usage: $usage"\"
+ eval \$ECHO \""$fatal_help"\"
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+
+# func_help
+# ---------
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "$long_help_message"
+ exit 0
+}
+
+
+# func_missing_arg ARGNAME
+# ------------------------
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ $debug_cmd
+
+ func_error "Missing argument for '$1'."
+ exit_cmd=exit
+}
+
+
+# func_split_equals STRING
+# ------------------------
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
+# splitting STRING at the '=' sign.
+test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=${1%%=*}
+ func_split_equals_rhs=${1#*=}
+ test "x$func_split_equals_lhs" = "x$1" \
+ && func_split_equals_rhs=
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
+ func_split_equals_rhs=
+ test "x$func_split_equals_lhs" = "x$1" \
+ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
+ }
+fi #func_split_equals
+
+
+# func_split_short_opt SHORTOPT
+# -----------------------------
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+ func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
+ }
+fi #func_split_short_opt
+
+
+# func_usage
+# ----------
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
+ exit 0
+}
+
+
+# func_usage_message
+# ------------------
+# Echo short help message to standard output.
+func_usage_message ()
+{
+ $debug_cmd
+
+ eval \$ECHO \""Usage: $usage"\"
+ echo
+ $SED -n 's|^# ||
+ /^Written by/{
+ x;p;x
+ }
+ h
+ /^Written by/q' < "$progpath"
+ echo
+ eval \$ECHO \""$usage_message"\"
+}
+
+
+# func_version
+# ------------
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $debug_cmd
+
+ printf '%s\n' "$progname $scriptversion"
+ $SED -n '
+ /(C)/!b go
+ :more
+ /\./!{
+ N
+ s|\n# | |
+ b more
+ }
+ :go
+ /^# Written by /,/# warranty; / {
+ s|^# ||
+ s|^# *$||
+ s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+ p
+ }
+ /^# Written by / {
+ s|^# ||
+ p
+ }
+ /^warranty; /q' < "$progpath"
+
+ exit $?
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+
+# Set a version string.
+scriptversion='(GNU libtool) 2.4.6'
+
+
+# func_echo ARG...
+# ----------------
+# Libtool also displays the current mode in messages, so override
+# funclib.sh func_echo with this custom definition.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
+{
+ $debug_cmd
+
+ $warning_func ${1+"$@"}
+}
+
+
+## ---------------- ##
+## Options parsing. ##
+## ---------------- ##
+
+# Hook in the functions to make sure our own options are parsed during
+# the option parsing loop.
+
+usage='$progpath [OPTION]... [MODE-ARG]...'
+
+# Short help message in response to '-h'.
+usage_message="Options:
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+ -n, --dry-run display commands without modifying any files
+ --features display basic configuration information and exit
+ --mode=MODE use operation mode MODE
+ --no-warnings equivalent to '-Wnone'
+ --preserve-dup-deps don't remove duplicate dependency libraries
+ --quiet, --silent don't print informational messages
+ --tag=TAG use configuration variables from tag TAG
+ -v, --verbose print more informational messages than default
+ --version print version information
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
+ -h, --help, --help-all print short, long, or detailed help message
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+func_help ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "$long_help_message
+
+MODE must be one of the following:
+
+ clean remove files from the build directory
+ compile compile a source file into a libtool object
+ execute automatically set library path, then run a program
+ finish complete the installation of libtool libraries
+ install install libraries or executables
+ link create a library or an executable
+ uninstall remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE. When passed as first option,
+'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
+Try '$progname --help --mode=MODE' for a more detailed description of MODE.
+
+When reporting a bug, please describe a test case to reproduce it and
+include the following information:
+
+ host-triplet: $host
+ shell: $SHELL
+ compiler: $LTCC
+ compiler flags: $LTCFLAGS
+ linker: $LD (gnu? $with_gnu_ld)
+ version: $progname $scriptversion Debian-2.4.6-2
+ automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+ autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+
+Report bugs to <bug-libtool@gnu.org>.
+GNU libtool home page: <http://www.gnu.org/s/libtool/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+ exit 0
+}
+
+
+# func_lo2o OBJECT-NAME
+# ---------------------
+# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
+# object suffix.
+
+lo2o=s/\\.lo\$/.$objext/
+o2lo=s/\\.$objext\$/.lo/
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_lo2o ()
+ {
+ case $1 in
+ *.lo) func_lo2o_result=${1%.lo}.$objext ;;
+ * ) func_lo2o_result=$1 ;;
+ esac
+ }'
+
+ # func_xform LIBOBJ-OR-SOURCE
+ # ---------------------------
+ # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
+ # suffix to a '.lo' libtool-object suffix.
+ eval 'func_xform ()
+ {
+ func_xform_result=${1%.*}.lo
+ }'
+else
+ # ...otherwise fall back to using sed.
+ func_lo2o ()
+ {
+ func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
+ }
+
+ func_xform ()
+ {
+ func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
+ }
+fi
+
+
+# func_fatal_configuration ARG...
+# -------------------------------
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func__fatal_error ${1+"$@"} \
+ "See the $PACKAGE documentation for more information." \
+ "Fatal configuration error."
+}
+
+
+# func_config
+# -----------
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+
+# func_features
+# -------------
+# Display the features supported by this script.
+func_features ()
+{
+ echo "host: $host"
+ if test yes = "$build_libtool_libs"; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test yes = "$build_old_libs"; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+
+ exit $?
+}
+
+
+# func_enable_tag TAGNAME
+# -----------------------
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname=$1
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf=/$re_begincf/,/$re_endcf/p
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+
+# func_check_version_match
+# ------------------------
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+# libtool_options_prep [ARG]...
+# -----------------------------
+# Preparation for options parsed by libtool.
+libtool_options_prep ()
+{
+ $debug_mode
+
+ # Option defaults:
+ opt_config=false
+ opt_dlopen=
+ opt_dry_run=false
+ opt_help=false
+ opt_mode=
+ opt_preserve_dup_deps=false
+ opt_quiet=false
+
+ nonopt=
+ preserve_args=
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ esac
+
+ # Pass back the list of options.
+ func_quote_for_eval ${1+"$@"}
+ libtool_options_prep_result=$func_quote_for_eval_result
+}
+func_add_hook func_options_prep libtool_options_prep
+
+
+# libtool_parse_options [ARG]...
+# ---------------------------------
+# Provide handling for libtool specific options.
+libtool_parse_options ()
+{
+ $debug_cmd
+
+ # Perform our own loop to consume as many options as possible in
+ # each iteration.
+ while test $# -gt 0; do
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+
+ --config) func_config ;;
+
+ --dlopen|-dlopen)
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=: ;;
+
+ --features) func_features ;;
+
+ --finish) set dummy --mode finish ${1+"$@"}; shift ;;
+
+ --help) opt_help=: ;;
+
+ --help-all) opt_help=': help-all' ;;
+
+ --mode) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_mode=$1
+ case $1 in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $_G_opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+ shift
+ ;;
+
+ --no-silent|--no-quiet)
+ opt_quiet=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ opt_warning=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-verbose)
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --silent|--quiet)
+ opt_quiet=:
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --tag) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_tag=$1
+ func_append preserve_args " $_G_opt $1"
+ func_enable_tag "$1"
+ shift
+ ;;
+
+ --verbose|-v) opt_quiet=false
+ opt_verbose=:
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ # An option not handled by this hook function:
+ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ libtool_parse_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_parse_options libtool_parse_options
+
+
+
+# libtool_validate_options [ARG]...
+# ---------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+libtool_validate_options ()
+{
+ # save first non-option argument
+ if test 0 -lt $#; then
+ nonopt=$1
+ shift
+ fi
+
+ # preserve --debug
+ test : = "$debug_cmd" || func_append preserve_args " --debug"
+
+ case $host in
+ # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+ # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+ *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
+
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ test yes != "$build_libtool_libs" \
+ && test yes != "$build_old_libs" \
+ && func_fatal_configuration "not configured to build any kind of library"
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
+ func_error "unrecognized option '-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help=$help
+ help="Try '$progname --help --mode=$opt_mode' for more information."
+ }
+
+ # Pass back the unparsed argument list
+ func_quote_for_eval ${1+"$@"}
+ libtool_validate_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_validate_options libtool_validate_options
+
+
+# Process options as early as possible so that --help and --version
+# can return quickly.
+func_options ${1+"$@"}
+eval set dummy "$func_options_result"; shift
+
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+magic='%%%MAGIC variable%%%'
+magic_exe='%%%MAGIC EXE variable%%%'
+
+# Global variables.
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# func_generated_by_libtool
+# True iff stdin has been generated by Libtool. This function is only
+# a basic sanity check; it will hardly flush out determined imposters.
+func_generated_by_libtool_p ()
+{
+ $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if 'file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case $lalib_p_line in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test yes = "$lalib_p"
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ test -f "$1" &&
+ $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $debug_cmd
+
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$sp$nl
+ eval cmd=\"$cmd\"
+ IFS=$save_ifs
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# 'FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $debug_cmd
+
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot. Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+ func_resolve_sysroot_result=$1
+ case $func_resolve_sysroot_result in
+ =*)
+ func_stripname '=' '' "$func_resolve_sysroot_result"
+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+ ;;
+ esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+ case $lt_sysroot:$1 in
+ ?*:"$lt_sysroot"*)
+ func_stripname "$lt_sysroot" '' "$1"
+ func_replace_sysroot_result='='$func_stripname_result
+ ;;
+ *)
+ # Including no sysroot.
+ func_replace_sysroot_result=$1
+ ;;
+ esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $debug_cmd
+
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case "$@ " in
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with '--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=$1
+ if test yes = "$build_libtool_libs"; then
+ write_lobj=\'$2\'
+ else
+ write_lobj=none
+ fi
+
+ if test yes = "$build_old_libs"; then
+ write_oldobj=\'$3\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "$write_libobj"
+ }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+ $debug_cmd
+
+ func_convert_core_file_wine_to_w32_result=$1
+ if test -n "$1"; then
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
+ # are forced to check the contents of stdout. On the other hand, if the
+ # command is not found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both error code of
+ # zero AND non-empty stdout, which explains the odd construction:
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+ $SED -e "$sed_naive_backslashify"`
+ else
+ func_convert_core_file_wine_to_w32_result=
+ fi
+ fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+ $debug_cmd
+
+ # unfortunately, winepath doesn't convert paths, only file names
+ func_convert_core_path_wine_to_w32_result=
+ if test -n "$1"; then
+ oldIFS=$IFS
+ IFS=:
+ for func_convert_core_path_wine_to_w32_f in $1; do
+ IFS=$oldIFS
+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+ if test -n "$func_convert_core_file_wine_to_w32_result"; then
+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
+ func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
+ else
+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+ fi
+ fi
+ done
+ IFS=$oldIFS
+ fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+ $debug_cmd
+
+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+ if test "$?" -ne 0; then
+ # on failure, ensure result is empty
+ func_cygpath_result=
+ fi
+ else
+ func_cygpath_result=
+ func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
+ fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format. Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+ $debug_cmd
+
+ # awkward: cmd appends spaces to result
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+ $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+ $debug_cmd
+
+ if test -z "$2" && test -n "$1"; then
+ func_error "Could not determine host file name corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_file_result=$1
+ fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+ $debug_cmd
+
+ if test -z "$4" && test -n "$3"; then
+ func_error "Could not determine the host path corresponding to"
+ func_error " '$3'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This is a deliberately simplistic "conversion" and
+ # should not be "improved". See libtool.info.
+ if test "x$1" != "x$2"; then
+ lt_replace_pathsep_chars="s|$1|$2|g"
+ func_to_host_path_result=`echo "$3" |
+ $SED -e "$lt_replace_pathsep_chars"`
+ else
+ func_to_host_path_result=$3
+ fi
+ fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+ $debug_cmd
+
+ case $4 in
+ $1 ) func_to_host_path_result=$3$func_to_host_path_result
+ ;;
+ esac
+ case $4 in
+ $2 ) func_append func_to_host_path_result "$3"
+ ;;
+ esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via '$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+ $debug_cmd
+
+ $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result. If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+ $debug_cmd
+
+ case ,$2, in
+ *,"$to_tool_file_cmd",*)
+ func_to_tool_file_result=$1
+ ;;
+ *)
+ $to_tool_file_cmd "$1"
+ func_to_tool_file_result=$func_to_host_file_result
+ ;;
+ esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+ func_to_host_file_result=$1
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_to_host_file_result=$func_convert_core_msys_to_w32_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+ # LT_CYGPATH in this case.
+ func_to_host_file_result=`cygpath -m "$1"`
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format. Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_file_wine_to_w32 "$1"
+ func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
+ func_to_host_file_result=$func_cygpath_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+ func_convert_core_file_wine_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+ func_to_host_file_result=$func_cygpath_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via '$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format. If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+# file name conversion function : func_convert_file_X_to_Y ()
+# path conversion function : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same. If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+ $debug_cmd
+
+ if test -z "$to_host_path_cmd"; then
+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+ to_host_path_cmd=func_convert_path_$func_stripname_result
+ fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+ $debug_cmd
+
+ func_init_to_host_path_cmd
+ $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+ func_to_host_path_result=$1
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from ARG. MSYS
+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+ # and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result=$func_convert_core_msys_to_w32_result
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format. Requires a wine environment and
+# a working winepath. Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+ func_to_host_path_result=$func_cygpath_result
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+ func_to_host_path_result=$func_cygpath_result
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_dll_def_p FILE
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with _LT_DLL_DEF_P in libtool.m4
+func_dll_def_p ()
+{
+ $debug_cmd
+
+ func_dll_def_p_tmp=`$SED -n \
+ -e 's/^[ ]*//' \
+ -e '/^\(;.*\)*$/d' \
+ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
+ -e q \
+ "$1"`
+ test DEF = "$func_dll_def_p_tmp"
+}
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $debug_cmd
+
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile=$nonopt # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg=$arg
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj=$arg
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify '-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ func_append pie_flag " $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ func_append later " $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs=$IFS; IFS=,
+ for arg in $args; do
+ IFS=$save_ifs
+ func_append_quoted lastarg "$arg"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ func_append base_compile " $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg=$srcfile
+ srcfile=$arg
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_append_quoted base_compile "$lastarg"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with '-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj=$func_basename_result
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from '$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test yes = "$build_libtool_libs" \
+ || func_fatal_configuration "cannot build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name '$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname=$func_basename_result
+ xdir=$func_dirname_result
+ lobj=$xdir$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test yes = "$build_old_libs"; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test no = "$compiler_c_o"; then
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
+ lockfile=$output_obj.lock
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test yes = "$need_locks"; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test warn = "$need_locks"; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ func_append removelist " $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ func_append removelist " $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+ srcfile=$func_to_tool_file_result
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test yes = "$build_libtool_libs"; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test no != "$pic_mode"; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ func_append command " -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test warn = "$need_locks" &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test yes = "$suppress_opt"; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test yes = "$build_old_libs"; then
+ if test yes != "$pic_mode"; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test yes = "$compiler_c_o"; then
+ func_append command " -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ func_append command "$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test warn = "$need_locks" &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test no != "$need_locks"; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $opt_mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to build PIC objects only
+ -prefer-non-pic try to build non-PIC objects only
+ -shared do not build a '.o' file suitable for static linking
+ -static only build a '.o' file suitable for static linking
+ -Wc,FLAG pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a 'standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix '.c' with the
+library object suffix, '.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to '-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the '--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the 'install' or 'cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -bindir BINDIR specify path to binaries directory (for systems where
+ libraries must be found in the PATH setting at runtime)
+ -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE use a list of object files found in FILE to specify objects
+ -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+ -Wc,FLAG
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wl,FLAG
+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with '-') are ignored.
+
+Every other argument is treated as a filename. Files ending in '.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in '.la', then a libtool library is created,
+only library objects ('.lo' files) may be specified, and '-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
+using 'ar' and 'ranlib', or on Windows using 'lib'.
+
+If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode '$opt_mode'"
+ ;;
+ esac
+
+ echo
+ $ECHO "Try '$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+ if test : = "$opt_help"; then
+ func_mode_help
+ else
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ func_mode_help
+ done
+ } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ echo
+ func_mode_help
+ done
+ } |
+ $SED '1d
+ /^When reporting/,/^Report/{
+ H
+ d
+ }
+ $x
+ /information about other modes/d
+ /more detailed .*MODE/d
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
+ exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $debug_cmd
+
+ # The first argument is the command name.
+ cmd=$nonopt
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $opt_dlopen; do
+ test -f "$file" \
+ || func_fatal_help "'$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "'$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "'$file' was not linked with '-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+
+ if test -f "$dir/$objdir/$dlname"; then
+ func_append dir "/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+ ;;
+
+ *)
+ func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir=$absdir
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic=$magic
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -* | *.la | *.lo ) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file=$progdir/$program
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file=$progdir/$program
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_append_quoted args "$file"
+ done
+
+ if $opt_dry_run; then
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ else
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd=\$cmd$args
+ fi
+}
+
+test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $debug_cmd
+
+ libs=
+ libdirs=
+ admincmds=
+
+ for opt in "$nonopt" ${1+"$@"}
+ do
+ if test -d "$opt"; then
+ func_append libdirs " $opt"
+
+ elif test -f "$opt"; then
+ if func_lalib_unsafe_p "$opt"; then
+ func_append libs " $opt"
+ else
+ func_warning "'$opt' is not a valid libtool archive"
+ fi
+
+ else
+ func_fatal_error "invalid argument '$opt'"
+ fi
+ done
+
+ if test -n "$libs"; then
+ if test -n "$lt_sysroot"; then
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+ else
+ sysroot_cmd=
+ fi
+
+ # Remove sysroot references
+ if $opt_dry_run; then
+ for lib in $libs; do
+ echo "removing references to $lt_sysroot and '=' prefixes from $lib"
+ done
+ else
+ tmpdir=`func_mktempdir`
+ for lib in $libs; do
+ $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ > $tmpdir/tmp-la
+ mv -f $tmpdir/tmp-la $lib
+ done
+ ${RM}r "$tmpdir"
+ fi
+ fi
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || func_append admincmds "
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_quiet && exit $EXIT_SUCCESS
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the '-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the '$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the '$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the '$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
+ fi
+ echo
+
+ echo "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ echo "pages."
+ ;;
+ *)
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ echo "----------------------------------------------------------------------"
+ fi
+ exit $EXIT_SUCCESS
+}
+
+test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $debug_cmd
+
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
+ # Allow the use of GNU shtool's install command.
+ case $nonopt in *shtool*) :;; *) false;; esac
+ then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ func_append install_prog "$func_quote_for_eval_result"
+ install_shared_prog=$install_prog
+ case " $install_prog " in
+ *[\\\ /]cp\ *) install_cp=: ;;
+ *) install_cp=false ;;
+ esac
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=false
+ stripme=
+ no_mode=:
+ for arg
+ do
+ arg2=
+ if test -n "$dest"; then
+ func_append files " $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=: ;;
+ -f)
+ if $install_cp; then :; else
+ prev=$arg
+ fi
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ if test X-m = "X$prev" && test -n "$install_override_mode"; then
+ arg2=$install_override_mode
+ no_mode=false
+ fi
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ func_append install_prog " $func_quote_for_eval_result"
+ if test -n "$arg2"; then
+ func_quote_for_eval "$arg2"
+ fi
+ func_append install_shared_prog " $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the '$prev' option requires an argument"
+
+ if test -n "$install_override_mode" && $no_mode; then
+ if $install_cp; then :; else
+ func_quote_for_eval "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
+ fi
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=:
+ if $isdir; then
+ destdir=$dest
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir=$func_dirname_result
+ destname=$func_basename_result
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "'$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "'$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=$magic
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ func_append staticlibs " $file"
+ ;;
+
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "'$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append current_libdirs " $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append future_libdirs " $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir=$func_dirname_result
+ func_append dir "$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking '$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname=$1
+ shift
+
+ srcname=$realname
+ test -n "$relink_command" && srcname=${realname}T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme=$stripme
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=
+ ;;
+ esac
+ ;;
+ os2*)
+ case $realname in
+ *_dll.a)
+ tstripme=
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try 'ln -sf' first, because the 'ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib=$destdir/$realname
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name=$func_basename_result
+ instname=$dir/${name}i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile=$destdir/$destname
+ else
+ func_basename "$file"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest=$destfile
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to '$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test yes = "$build_old_libs"; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile=$destdir/$destname
+ else
+ func_basename "$file"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=.exe
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script '$wrapper'"
+
+ finalize=:
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "'$lib' has not been installed in '$libdir'"
+ finalize=false
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test no = "$fast_install" && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if $finalize; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file=$func_basename_result
+ outputname=$tmpdir/$file
+ # Replace the output file specification.
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_quiet || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink '$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file=$outputname
+ else
+ func_warning "cannot relink '$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name=$func_basename_result
+
+ # Set up the ranlib parameters.
+ oldlib=$destdir/$name
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run '$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test install = "$opt_mode" && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $debug_cmd
+
+ my_outputname=$1
+ my_originator=$2
+ my_pic_p=${3-false}
+ my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms=${my_outputname}S.c
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist=$output_objdir/$my_outputname.nm
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test yes = "$dlself"; then
+ func_verbose "generating symbol list for '$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+ func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols=$output_objdir/$outputname.exp
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from '$dlprefile'"
+ func_basename "$dlprefile"
+ name=$func_basename_result
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
+ dlprefile_dlbasename=
+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+ # Use subshell, to avoid clobbering current variable values
+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+ if test -n "$dlprefile_dlname"; then
+ func_basename "$dlprefile_dlname"
+ dlprefile_dlbasename=$func_basename_result
+ else
+ # no lafile. user explicitly requested -dlpreopen <import library>.
+ $sharedlib_from_linklib_cmd "$dlprefile"
+ dlprefile_dlbasename=$sharedlib_from_linklib_result
+ fi
+ fi
+ $opt_dry_run || {
+ if test -n "$dlprefile_dlbasename"; then
+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+ else
+ func_warning "Could not compute DLL name from $name"
+ eval '$ECHO ": $name " >> "$nlist"'
+ fi
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ }
+ else # not an import lib
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ fi
+ ;;
+ *)
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ ;;
+ esac
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ func_show_eval '$RM "${nlist}I"'
+ if test -n "$global_symbol_to_import"; then
+ eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
+ fi
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];\
+"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+static void lt_syminit(void)
+{
+ LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
+ for (; symbol->name; ++symbol)
+ {"
+ $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
+ echo >> "$output_objdir/$my_dlsyms" "\
+ }
+}"
+ fi
+ echo >> "$output_objdir/$my_dlsyms" "\
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{ {\"$my_originator\", (void *) 0},"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {\"@INIT@\", (void *) &lt_syminit},"
+ fi
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ $my_pic_p && pic_flag_for_symtable=" $pic_flag"
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) func_append symtab_cflags " $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj=$output_objdir/${my_outputname}S.$objext
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for '$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+ $debug_cmd
+
+ win32_libid_type=unknown
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ case $nm_interface in
+ "MS dumpbin")
+ if func_cygming_ms_implib_p "$1" ||
+ func_cygming_gnu_implib_p "$1"
+ then
+ win32_nmres=import
+ else
+ win32_nmres=
+ fi
+ ;;
+ *)
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s|.*|import|
+ p
+ q
+ }
+ }'`
+ ;;
+ esac
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+ $debug_cmd
+
+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+ $debug_cmd
+
+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+ $SED '/^Contents of section '"$match_literal"':/{
+ # Place marker at beginning of archive member dllname section
+ s/.*/====MARK====/
+ p
+ d
+ }
+ # These lines can sometimes be longer than 43 characters, but
+ # are always uninteresting
+ /:[ ]*file format pe[i]\{,1\}-/d
+ /^In archive [^:]*:/d
+ # Ensure marker is printed
+ /^====MARK====/p
+ # Remove all lines with less than 43 characters
+ /^.\{43\}/!d
+ # From remaining lines, remove first 43 characters
+ s/^.\{43\}//' |
+ $SED -n '
+ # Join marker and all lines until next marker into a single line
+ /^====MARK====/ b para
+ H
+ $ b para
+ b
+ :para
+ x
+ s/\n//g
+ # Remove the marker
+ s/^====MARK====//
+ # Remove trailing dots and whitespace
+ s/[\. \t]*$//
+ # Print
+ /./p' |
+ # we now have a list, one entry per line, of the stringified
+ # contents of the appropriate section of all members of the
+ # archive that possess that section. Heuristic: eliminate
+ # all those that have a first or second character that is
+ # a '.' (that is, objdump's representation of an unprintable
+ # character.) This should work for all archives with less than
+ # 0x302f exports -- but will fail for DLLs whose name actually
+ # begins with a literal '.' or a single character followed by
+ # a '.'.
+ #
+ # Of those that remain, print the first one.
+ $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+ $debug_cmd
+
+ if func_cygming_gnu_implib_p "$1"; then
+ # binutils import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+ elif func_cygming_ms_implib_p "$1"; then
+ # ms-generated import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+ else
+ # unknown
+ sharedlib_from_linklib_result=
+ fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $debug_cmd
+
+ f_ex_an_ar_dir=$1; shift
+ f_ex_an_ar_oldlib=$1
+ if test yes = "$lock_old_archive_extraction"; then
+ lockfile=$f_ex_an_ar_oldlib.lock
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ fi
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+ 'stat=$?; rm -f "$lockfile"; exit $stat'
+ if test yes = "$lock_old_archive_extraction"; then
+ $opt_dry_run || rm -f "$lockfile"
+ fi
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $debug_cmd
+
+ my_gentop=$1; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=
+ my_xlib=
+ my_xabs=
+ my_xdir=
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib=$func_basename_result
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir=$my_gentop/$my_xlib_u
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ func_basename "$darwin_archive"
+ darwin_base_archive=$func_basename_result
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches; do
+ func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
+ $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
+ cd "unfat-$$/$darwin_base_archive-$darwin_arch"
+ func_extract_an_archive "`pwd`" "$darwin_base_archive"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
+ func_extract_archives_result=$my_oldobjs
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory where it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=${1-no}
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+ ECHO=\"$qECHO\"
+ fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ that is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options that match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+ lt_script_arg0=\$0
+ shift
+ for lt_opt
+ do
+ case \"\$lt_opt\" in
+ --lt-debug) lt_option_debug=1 ;;
+ --lt-dump-script)
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+ cat \"\$lt_dump_D/\$lt_dump_F\"
+ exit 0
+ ;;
+ --lt-*)
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+
+ # Print the debug banner immediately:
+ if test -n \"\$lt_option_debug\"; then
+ echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
+ fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+ lt_dump_args_N=1;
+ for lt_arg
+ do
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+ done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+ case \" \$* \" in
+ *\\ --lt-*)
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done ;;
+ esac
+ func_exec_program_core \${1+\"\$@\"}
+}
+
+ # Parse options
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test yes = "$fast_install"; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ \$ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # fixup the dll searchpath if we need to.
+ #
+ # Fix the DLL searchpath if we need to. Do this before prepending
+ # to shlibpath, because on Windows, both are PATH and uninstalled
+ # libraries must come first.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ # Export our shlibpath_var if we have one.
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+ func_exec_program \${1+\"\$@\"}
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* declarations of non-ANSI functions */
+#if defined __MINGW32__
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined __CYGWIN__
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined other_platform || defined ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined _MSC_VER
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+# define S_IXUSR _S_IEXEC
+#elif defined __MINGW32__
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+#elif defined __CYGWIN__
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined other platforms ... */
+#endif
+
+#if defined PATH_MAX
+# define LT_PATHMAX PATH_MAX
+#elif defined MAXPATHLEN
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
+ defined __OS2__
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free (stale); stale = 0; } \
+} while (0)
+
+#if defined LT_DEBUGWRAPPER
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+ cat <<EOF
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+# define externally_visible volatile
+#else
+# define externally_visible __attribute__((externally_visible)) volatile
+#endif
+externally_visible const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_path "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_path "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test yes = "$fast_install"; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ int rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, (size_t) argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (STREQ (argv[i], dumpscript_opt))
+ {
+EOF
+ case $host in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (STREQ (argv[i], debug_opt))
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (STREQ (argv[i], ltwrapper_option_prefix))
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+EOF
+ cat <<EOF
+ /* The GNU banner must be the first non-error debug message */
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
+ libraries must come first. */
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ newargz = prepare_spawn (newargz);
+ rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ size_t tmp_len;
+ char *concat_name;
+
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+ nonempty (wrapper));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = (size_t) (q - p);
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ lt_debugprintf (__FILE__, __LINE__,
+ "checking path component for symlinks: %s\n",
+ tmp_pathspec);
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "error accessing file \"%s\": %s",
+ tmp_pathspec, nonnull (strerror (errno)));
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (STREQ (str, pat))
+ *str = '\0';
+ }
+ return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+ va_list args;
+ if (lt_debug)
+ {
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+ int line, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+ va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+ return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_setenv) setting '%s' to '%s'\n",
+ nonnull (name), nonnull (value));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ size_t len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ size_t orig_value_len = strlen (orig_value);
+ size_t add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ size_t len = strlen (new_value);
+ while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[--len] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+EOF
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XMALLOC (char *, argc + 1);
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = XMALLOC (char, length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+ func_emit_wrapper yes |
+ $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/ fputs ("\1", f);/p
+g
+D'
+ cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+ $debug_cmd
+
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_suncc_cstd_abi
+# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
+# Several compiler flags select an ABI that is incompatible with the
+# Cstd library. Avoid specifying it if any are in CXXFLAGS.
+func_suncc_cstd_abi ()
+{
+ $debug_cmd
+
+ case " $compile_command " in
+ *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
+ suncc_use_cstd_abi=no
+ ;;
+ *)
+ suncc_use_cstd_abi=yes
+ ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $debug_cmd
+
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # what system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll that has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ bindir=
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ os2dllname=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=false
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module=$wl-single_module
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test yes != "$build_libtool_libs" \
+ && func_fatal_configuration "cannot build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg=$1
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ bindir)
+ bindir=$arg
+ prev=
+ continue
+ ;;
+ dlfiles|dlprefiles)
+ $preload || {
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=:
+ }
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test no = "$dlself"; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test dlprefiles = "$prev"; then
+ dlself=yes
+ elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test dlfiles = "$prev"; then
+ func_append dlfiles " $arg"
+ else
+ func_append dlprefiles " $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols=$arg
+ test -f "$arg" \
+ || func_fatal_error "symbol file '$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex=$arg
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir=$arg
+ prev=
+ continue
+ ;;
+ mllvm)
+ # Clang does not use LLVM to link, so we can simply discard any
+ # '-mllvm $arg' options when doing the link step.
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# func_append moreargs " $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ if test none != "$pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ pic_object=$xdir$pic_object
+
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test dlprefiles = "$prev"; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg=$pic_object
+ fi
+
+ # Non-PIC object.
+ if test none != "$non_pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object=$xdir$non_pic_object
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object=$pic_object
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "'$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file '$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ os2dllname)
+ os2dllname=$arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex=$arg
+ prev=
+ continue
+ ;;
+ release)
+ release=-$arg
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test rpath = "$prev"; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) func_append rpath " $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) func_append xrpath " $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds=$arg
+ prev=
+ continue
+ ;;
+ weak)
+ func_append weak_libs " $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg=$arg
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "'-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -bindir)
+ prev=bindir
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test X-export-symbols = "X$arg"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname "-L" '' "$arg"
+ if test -z "$func_stripname_result"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between '-L' and '$1'"
+ else
+ func_fatal_error "need path for '-L' option"
+ fi
+ fi
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of '$dir'"
+ dir=$absdir
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "* | *" $arg "*)
+ # Will only happen for absolute or sysroot arguments
+ ;;
+ *)
+ # Preserve sysroot, but never include relative directories
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+ *) func_append deplibs " -L$dir" ;;
+ esac
+ func_append lib_search_path " $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) func_append dllsearchpath ":$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test X-lc = "X$arg" || test X-lm = "X$arg"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ # Do not include libc due to us having libc/libc_r.
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ func_append deplibs " System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test X-lc = "X$arg" && continue
+ ;;
+ esac
+ elif test X-lc_r = "X$arg"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ func_append deplibs " $arg"
+ continue
+ ;;
+
+ -mllvm)
+ prev=mllvm
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot|--sysroot)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module=$wl-multi_module
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "'-no-install' is ignored for $host"
+ func_warning "assuming '-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -os2dllname)
+ prev=os2dllname
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ =*)
+ func_stripname '=' '' "$dir"
+ dir=$lt_sysroot$func_stripname_result
+ ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+ for flag in $args; do
+ IFS=$save_ifs
+ func_quote_for_eval "$flag"
+ func_append arg " $func_quote_for_eval_result"
+ func_append compiler_flags " $func_quote_for_eval_result"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+ for flag in $args; do
+ IFS=$save_ifs
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # -fstack-protector* stack protector flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -specs=* GCC specs files
+ # -stdlib=* select c++ std lib with clang
+ # -fsanitize=* Clang/GCC memory and address sanitizer
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+ -specs=*|-fsanitize=*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ func_append compiler_flags " $arg"
+ continue
+ ;;
+
+ -Z*)
+ if test os2 = "`expr $host : '.*\(os2\)'`"; then
+ # OS/2 uses -Zxxx to specify OS/2-specific options
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case $arg in
+ -Zlinker | -Zstack)
+ prev=xcompiler
+ ;;
+ esac
+ continue
+ else
+ # Otherwise treat like 'Some other compiler flag' below
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ fi
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+
+ *.$objext)
+ # A standard object.
+ func_append objs " $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ test none = "$pic_object" || {
+ # Prepend the subdirectory the object is found in.
+ pic_object=$xdir$pic_object
+
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test dlprefiles = "$prev"; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg=$pic_object
+ }
+
+ # Non-PIC object.
+ if test none != "$non_pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object=$xdir$non_pic_object
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object=$pic_object
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "'$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ func_append deplibs " $arg"
+ func_append old_deplibs " $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ func_resolve_sysroot "$arg"
+ if test dlfiles = "$prev"; then
+ # This library was specified with -dlopen.
+ func_append dlfiles " $func_resolve_sysroot_result"
+ prev=
+ elif test dlprefiles = "$prev"; then
+ # The library was specified with -dlpreopen.
+ func_append dlprefiles " $func_resolve_sysroot_result"
+ prev=
+ else
+ func_append deplibs " $func_resolve_sysroot_result"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the '$prevarg' option requires an argument"
+
+ if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname=$func_basename_result
+ libobjs_save=$libobjs
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ # Definition is injected by LT_CONFIG during libtool generation.
+ func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
+
+ func_dirname "$output" "/" ""
+ output_objdir=$func_dirname_result$objdir
+ func_to_tool_file "$output_objdir/"
+ tool_output_objdir=$func_to_tool_file_result
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_preserve_dup_deps; then
+ case "$libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append libs " $deplib"
+ done
+
+ if test lib = "$linkmode"; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+ esac
+ func_append pre_post_deps " $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=false
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test lib,link = "$linkmode,$pass"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs=$tmp_deplibs
+ fi
+
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass"; then
+ libs=$deplibs
+ deplibs=
+ fi
+ if test prog = "$linkmode"; then
+ case $pass in
+ dlopen) libs=$dlfiles ;;
+ dlpreopen) libs=$dlprefiles ;;
+ link)
+ libs="$deplibs %DEPLIBS%"
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+ ;;
+ esac
+ fi
+ if test lib,dlpreopen = "$linkmode,$pass"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ func_resolve_sysroot "$lib"
+ case $lib in
+ *.la) func_source "$func_resolve_sysroot_result" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ func_basename "$deplib"
+ deplib_base=$func_basename_result
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) func_append deplibs " $deplib" ;;
+ esac
+ done
+ done
+ libs=$dlprefiles
+ fi
+ if test dlopen = "$pass"; then
+ # Collect dlpreopened libraries
+ save_deplibs=$deplibs
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=false
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append compiler_flags " $deplib"
+ if test lib = "$linkmode"; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test lib != "$linkmode" && test prog != "$linkmode"; then
+ func_warning "'-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test lib = "$linkmode"; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib=$searchdir/lib$name$search_ext
+ if test -f "$lib"; then
+ if test .la = "$search_ext"; then
+ found=:
+ else
+ found=false
+ fi
+ break 2
+ fi
+ done
+ done
+ if $found; then
+ # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll=$l
+ done
+ if test "X$ll" = "X$old_library"; then # only static version available
+ found=false
+ func_dirname "$lib" "" "."
+ ladir=$func_dirname_result
+ lib=$ladir/$old_library
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ else
+ # deplib doesn't seem to be a libtool library
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ ;; # -l
+ *.ltframework)
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test lib = "$linkmode"; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test conv = "$pass" && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ prog)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test scan = "$pass"; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ *)
+ func_warning "'-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test link = "$pass"; then
+ func_stripname '-R' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
+ *.$libext)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=false
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=:
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=:
+ ;;
+ esac
+ if $valid_a_lib; then
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ else
+ echo
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because the file extensions .$libext of this argument makes me believe"
+ echo "*** that it is just a static archive that I should not use here."
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test link != "$pass"; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ elif test prog = "$linkmode"; then
+ if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ func_append newdlprefiles " $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append newdlfiles " $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=:
+ continue
+ ;;
+ esac # case $deplib
+
+ $found || test -f "$lib" \
+ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "'$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir=$func_dirname_result
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass" ||
+ { test prog != "$linkmode" && test lib != "$linkmode"; }; then
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+ fi
+
+ if test conv = "$pass"; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for '$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ func_append convenience " $ladir/$objdir/$old_library"
+ func_append old_convenience " $ladir/$objdir/$old_library"
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
+ elif test prog != "$linkmode" && test lib != "$linkmode"; then
+ func_fatal_error "'$lib' is not a convenience library"
+ fi
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ if test -n "$old_library" &&
+ { test yes = "$prefer_static_libs" ||
+ test built,no = "$prefer_static_libs,$installed"; }; then
+ linklib=$old_library
+ else
+ for l in $old_library $library_names; do
+ linklib=$l
+ done
+ fi
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for '$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test dlopen = "$pass"; then
+ test -z "$libdir" \
+ && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
+ if test -z "$dlname" ||
+ test yes != "$dlopen_support" ||
+ test no = "$build_libtool_libs"
+ then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ func_append dlprefiles " $lib $dependency_libs"
+ else
+ func_append newdlfiles " $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of '$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir=$ladir
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname=$func_basename_result
+
+ # Find the relevant object directory and library name.
+ if test yes = "$installed"; then
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library '$lib' was moved."
+ dir=$ladir
+ absdir=$abs_ladir
+ libdir=$abs_ladir
+ else
+ dir=$lt_sysroot$libdir
+ absdir=$lt_sysroot$libdir
+ fi
+ test yes = "$hardcode_automatic" && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir=$ladir
+ absdir=$abs_ladir
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ else
+ dir=$ladir/$objdir
+ absdir=$abs_ladir/$objdir
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test dlpreopen = "$pass"; then
+ if test -z "$libdir" && test prog = "$linkmode"; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
+ fi
+ case $host in
+ # special handling for platforms with PE-DLLs.
+ *cygwin* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+ # (otherwise, the dlopen module name will be incorrect). We do
+ # this by putting the import library name into $newdlprefiles.
+ # We recover the dlopen module name by 'saving' the la file
+ # name in a special purpose variable, and (later) extracting the
+ # dlname from the la file.
+ if test -n "$dlname"; then
+ func_tr_sh "$dir/$linklib"
+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+ func_append newdlprefiles " $dir/$linklib"
+ else
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ fi
+ ;;
+ * )
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ func_append newdlprefiles " $dir/$dlname"
+ else
+ func_append newdlprefiles " $dir/$linklib"
+ fi
+ ;;
+ esac
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test lib = "$linkmode"; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test prog = "$linkmode" && test link != "$pass"; then
+ func_append newlib_search_path " $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=false
+ if test no != "$link_all_deplibs" || test -z "$library_names" ||
+ test no = "$build_libtool_libs"; then
+ linkalldeplibs=:
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if $linkalldeplibs; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test prog,link = "$linkmode,$pass"; then
+ if test -n "$library_names" &&
+ { { test no = "$prefer_static_libs" ||
+ test built,yes = "$prefer_static_libs,$installed"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
+ # Make sure the rpath contains only unique directories.
+ case $temp_rpath: in
+ *"$absdir:"*) ;;
+ *) func_append temp_rpath "$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if $alldeplibs &&
+ { test pass_all = "$deplibs_check_method" ||
+ { test yes = "$build_libtool_libs" &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test built = "$use_static_libs" && test yes = "$installed"; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test no = "$use_static_libs" || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc* | *os2*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+ ;;
+ *)
+ if test no = "$installed"; then
+ func_append notinst_deplibs " $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule=$dlpremoduletest
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
+ echo
+ if test prog = "$linkmode"; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test lib = "$linkmode" &&
+ test yes = "$hardcode_into_libs"; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname=$1
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname=$dlname
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc* | *os2*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname=$realname
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot=$soname
+ func_basename "$soroot"
+ soname=$func_basename_result
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from '$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for '$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test prog = "$linkmode" || test relink != "$opt_mode"; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test no = "$hardcode_direct"; then
+ add=$dir/$linklib
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
+ *-*-sysv4*uw2*) add_dir=-L$dir ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir=-L$dir ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we cannot
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library"; then
+ echo
+ echo "*** And there doesn't seem to be a static archive available"
+ echo "*** The link will probably fail, sorry"
+ else
+ add=$dir/$old_library
+ fi
+ elif test -n "$old_library"; then
+ add=$dir/$old_library
+ fi
+ fi
+ esac
+ elif test no = "$hardcode_minus_L"; then
+ case $host in
+ *-*-sunos*) add_shlibpath=$dir ;;
+ esac
+ add_dir=-L$dir
+ add=-l$name
+ elif test no = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$dir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$absdir
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test yes != "$lib_linked"; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
+ esac
+ fi
+ if test prog = "$linkmode"; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test yes != "$hardcode_direct" &&
+ test yes != "$hardcode_minus_L" &&
+ test yes = "$hardcode_shlibpath_var"; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test prog = "$linkmode" || test relink = "$opt_mode"; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$libdir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$libdir
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ add=-l$name
+ elif test yes = "$hardcode_automatic"; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib"; then
+ add=$inst_prefix_dir$libdir/$linklib
+ else
+ add=$libdir/$linklib
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir=-L$libdir
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add=-l$name
+ fi
+
+ if test prog = "$linkmode"; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test prog = "$linkmode"; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test unsupported != "$hardcode_direct"; then
+ test -n "$old_library" && linklib=$old_library
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test yes = "$build_libtool_libs"; then
+ # Not a shared library
+ if test pass_all != "$deplibs_check_method"; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ echo
+ $ECHO "*** Warning: This system cannot link to static lib archive $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ if test yes = "$module"; then
+ echo "*** But as you try to build a module library, libtool will still create "
+ echo "*** a static module, that should work as long as the dlopening application"
+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test no = "$build_old_libs"; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test lib = "$linkmode"; then
+ if test -n "$dependency_libs" &&
+ { test yes != "$hardcode_into_libs" ||
+ test yes = "$build_old_libs" ||
+ test yes = "$link_static"; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) func_append xrpath " $temp_xrpath";;
+ esac;;
+ *) func_append temp_deplibs " $libdir";;
+ esac
+ done
+ dependency_libs=$temp_deplibs
+ fi
+
+ func_append newlib_search_path " $absdir"
+ # Link against this library
+ test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result";;
+ *) func_resolve_sysroot "$deplib" ;;
+ esac
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $func_resolve_sysroot_result "*)
+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+ esac
+ fi
+ func_append tmp_libs " $func_resolve_sysroot_result"
+ done
+
+ if test no != "$link_all_deplibs"; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path=$deplib ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ deplib=$func_resolve_sysroot_result
+ func_dirname "$deplib" "" "."
+ dir=$func_dirname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of '$dir'"
+ absdir=$dir
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names"; then
+ for tmp in $deplibrary_names; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl"; then
+ depdepl=$absdir/$objdir/$depdepl
+ darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
+ func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path=-L$absdir/$objdir
+ ;;
+ esac
+ else
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "'$deplib' seems to be moved"
+
+ path=-L$absdir
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test link = "$pass"; then
+ if test prog = "$linkmode"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs=$newdependency_libs
+ if test dlpreopen = "$pass"; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test dlopen != "$pass"; then
+ test conv = "$pass" || {
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) func_append lib_search_path " $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ }
+
+ if test prog,link = "$linkmode,$pass"; then
+ vars="compile_deplibs finalize_deplibs"
+ else
+ vars=deplibs
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+
+ # Add Sun CC postdeps if required:
+ test CXX = "$tagname" && {
+ case $host_os in
+ linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C++ 5.9
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ func_cc_basename "$CC"
+ case $func_cc_basename_result in
+ CC* | sunCC*)
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ }
+
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=
+ ;;
+ esac
+ if test -n "$i"; then
+ func_append tmp_libs " $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test prog = "$linkmode"; then
+ dlfiles=$newdlfiles
+ fi
+ if test prog = "$linkmode" || test lib = "$linkmode"; then
+ dlprefiles=$newdlprefiles
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "'-l' and '-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "'-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "'-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "'-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs=$output
+ func_append objs "$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form 'libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test no = "$module" \
+ && func_fatal_help "libtool library '$output' must begin with 'lib'"
+
+ if test no != "$need_lib_prefix"; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test pass_all != "$deplibs_check_method"; then
+ func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ func_append libobjs " $objs"
+ fi
+ fi
+
+ test no = "$dlself" \
+ || func_warning "'-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test 1 -lt "$#" \
+ && func_warning "ignoring multiple '-rpath's for a libtool library"
+
+ install_libdir=$1
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test yes = "$build_libtool_libs"; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a '.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs=$IFS; IFS=:
+ set dummy $vinfo 0 0 0
+ shift
+ IFS=$save_ifs
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to '-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major=$1
+ number_minor=$2
+ number_revision=$3
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # that has an extra 1 added just for fun
+ #
+ case $version_type in
+ # correct linux to gnu/linux during the next big refactor
+ darwin|freebsd-elf|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age=$number_minor
+ revision=$number_revision
+ ;;
+ freebsd-aout|qnx|sunos)
+ current=$number_major
+ revision=$number_minor
+ age=0
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age=$number_minor
+ revision=$number_minor
+ lt_irix_increment=no
+ ;;
+ *)
+ func_fatal_configuration "$modename: unknown library version type '$version_type'"
+ ;;
+ esac
+ ;;
+ no)
+ current=$1
+ revision=$2
+ age=$3
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT '$current' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION '$revision' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE '$age' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE '$age' is greater than the current interface number '$current'"
+ func_fatal_error "'$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ # On Darwin other compilers
+ case $CC in
+ nagfor*)
+ verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ ;;
+ *)
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+ esac
+ ;;
+
+ freebsd-aout)
+ major=.$current
+ versuffix=.$current.$revision
+ ;;
+
+ freebsd-elf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ ;;
+
+ irix | nonstopux)
+ if test no = "$lt_irix_increment"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring=$verstring_prefix$major.$revision
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test 0 -ne "$loop"; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring=$verstring_prefix$major.$iface:$verstring
+ done
+
+ # Before this point, $major must not contain '.'.
+ major=.$major
+ versuffix=$major.$revision
+ ;;
+
+ linux) # correct to gnu/linux during the next big refactor
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=.$current.$age.$revision
+ verstring=$current.$age.$revision
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test 0 -ne "$loop"; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring=$verstring:$iface.0
+ done
+
+ # Make executables depend on our current version.
+ func_append verstring ":$current.0"
+ ;;
+
+ qnx)
+ major=.$current
+ versuffix=.$current
+ ;;
+
+ sco)
+ major=.$current
+ versuffix=.$current
+ ;;
+
+ sunos)
+ major=.$current
+ versuffix=.$current.$revision
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 file systems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type '$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring=0.0
+ ;;
+ esac
+ if test no = "$need_version"; then
+ versuffix=
+ else
+ versuffix=.0.0
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test yes,no = "$avoid_version,$need_version"; then
+ major=
+ versuffix=
+ verstring=
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test yes = "$allow_undefined"; then
+ if test unsupported = "$allow_undefined_flag"; then
+ if test yes = "$build_old_libs"; then
+ func_warning "undefined symbols not allowed in $host shared libraries; building static only"
+ build_libtool_libs=no
+ else
+ func_fatal_error "can't build $host shared library unless -no-undefined is specified"
+ fi
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag=$no_undefined_flag
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" :
+ func_append libobjs " $symfileobj"
+ test " " = "$libobjs" && libobjs=
+
+ if test relink != "$opt_mode"; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
+ if test -n "$precious_files_regex"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ func_append removelist " $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
+ func_append oldlibs " $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ func_replace_sysroot "$libdir"
+ func_append temp_xrpath " -R$func_replace_sysroot_result"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles=$dlfiles
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) func_append dlfiles " $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles=$dlprefiles
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) func_append dlprefiles " $lib" ;;
+ esac
+ done
+
+ if test yes = "$build_libtool_libs"; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ func_append deplibs " System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test yes = "$build_libtool_need_lc"; then
+ func_append deplibs " -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=
+ versuffix=
+ major=
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=
+ ;;
+ esac
+ fi
+ if test -n "$i"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=
+ ;;
+ esac
+ fi
+ if test -n "$i"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ if test -n "$file_magic_glob"; then
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+ else
+ libnameglob=$libname
+ fi
+ test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test yes = "$want_nocaseglob"; then
+ shopt -s nocaseglob
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ $nocaseglob
+ else
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ fi
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib=$potent_lib
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
+ *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib"; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib"; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib=$potent_lib # see symlink-check above in file_magic test
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib"; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib"; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=
+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ for i in $predeps $postdeps; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
+ done
+ fi
+ case $tmp_deplibs in
+ *[!\ \ ]*)
+ echo
+ if test none = "$deplibs_check_method"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ ;;
+ esac
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test yes = "$droppeddeps"; then
+ if test yes = "$module"; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test no = "$allow_undefined"; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ deplibs=$new_libs
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test yes = "$build_libtool_libs"; then
+ # Remove $wl instances when linking with ld.
+ # FIXME: should test the right _cmds variable.
+ case $archive_cmds in
+ *\$LD\ *) wl= ;;
+ esac
+ if test yes = "$hardcode_into_libs"; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath=$finalize_rpath
+ test relink = "$opt_mode" || rpath=$compile_rpath$rpath
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append dep_rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath=$finalize_shlibpath
+ test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname=$1
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname=$realname
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib=$output_objdir/$realname
+ linknames=
+ for link
+ do
+ func_append linknames " $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols=$output_objdir/$libname.uexp
+ func_append delfiles " $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ func_dll_def_p "$export_symbols" || {
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols=$export_symbols
+ export_symbols=
+ always_export_symbols=yes
+ }
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs=$IFS; IFS='~'
+ for cmd1 in $cmds; do
+ IFS=$save_ifs
+ # Take the normal branch if the nm_file_list_spec branch
+ # doesn't work or if tool conversion is not needed.
+ case $nm_file_list_spec~$to_tool_file_cmd in
+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+ try_normal_branch=yes
+ eval cmd=\"$cmd1\"
+ func_len " $cmd"
+ len=$func_len_result
+ ;;
+ *)
+ try_normal_branch=no
+ ;;
+ esac
+ if test yes = "$try_normal_branch" \
+ && { test "$len" -lt "$max_cmd_len" \
+ || test "$max_cmd_len" -le -1; }
+ then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ elif test -n "$nm_file_list_spec"; then
+ func_basename "$output"
+ output_la=$func_basename_result
+ save_libobjs=$libobjs
+ save_output=$output
+ output=$output_objdir/$output_la.nm
+ func_to_tool_file "$output"
+ libobjs=$nm_file_list_spec$func_to_tool_file_result
+ func_append delfiles " $output"
+ func_verbose "creating $NM input file list: $output"
+ for obj in $save_libobjs; do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > "$output"
+ eval cmd=\"$cmd1\"
+ func_show_eval "$cmd" 'exit $?'
+ output=$save_output
+ libobjs=$save_libobjs
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS=$save_ifs
+ if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands, which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ func_append tmp_deplibs " $test_deplib"
+ ;;
+ esac
+ done
+ deplibs=$tmp_deplibs
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test yes = "$compiler_needs_object" &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ func_append linker_flags " $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test relink = "$opt_mode"; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test yes = "$module" && test -n "$module_cmds"; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test : != "$skipped_export" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ func_basename "$output"
+ output_la=$func_basename_result
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+ output=$output_objdir/$output_la.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
+ elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+ output=$output_objdir/$output_la.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test yes = "$compiler_needs_object"; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-$k.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test -z "$objlist" ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test 1 -eq "$k"; then
+ # The first file doesn't have a previous command to add.
+ reload_objs=$objlist
+ eval concat_cmds=\"$reload_cmds\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-$k.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-$k.$objext
+ objlist=" $obj"
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds$reload_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ func_append delfiles " $output"
+
+ else
+ output=
+ fi
+
+ ${skipped_export-false} && {
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ }
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs=$IFS; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS=$save_ifs
+ $opt_quiet || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS=$save_ifs
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ ${skipped_export-false} && {
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands, which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ }
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test yes = "$module" && test -n "$module_cmds"; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs=$IFS; IFS='~'
+ for cmd in $cmds; do
+ IFS=$sp$nl
+ eval cmd=\"$cmd\"
+ IFS=$save_ifs
+ $opt_quiet || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS=$save_ifs
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test yes = "$module" || test yes = "$export_dynamic"; then
+ # On all known operating systems, these are identical.
+ dlname=$soname
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "'-l' and '-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "'-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "'-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object '$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj=$output
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # if reload_cmds runs $LD directly, get rid of -Wl from
+ # whole_archive_flag_spec and hope we can get by with turning comma
+ # into space.
+ case $reload_cmds in
+ *\$LD[\ \$]*) wl= ;;
+ esac
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
+ else
+ gentop=$output_objdir/${obj}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # If we're not building shared, we need to use non_pic_objs
+ test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
+
+ # Create the old-style object.
+ reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
+
+ output=$obj
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ test yes = "$build_libtool_libs" || {
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ }
+
+ if test -n "$pic_flag" || test default != "$pic_mode"; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output=$libobj
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "'-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for programs"
+
+ $preload \
+ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
+ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test CXX = "$tagname"; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ func_append compile_command " $wl-bind_at_load"
+ func_append finalize_command " $wl-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ compile_deplibs=$new_libs
+
+
+ func_append compile_command " $compile_deplibs"
+ func_append finalize_command " $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) func_append dllsearchpath ":$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath=$rpath
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath=$rpath
+
+ if test -n "$libobjs" && test yes = "$build_old_libs"; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" false
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=:
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=false
+ ;;
+ *cygwin* | *mingw* )
+ test yes = "$build_libtool_libs" || wrappers_required=false
+ ;;
+ *)
+ if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
+ wrappers_required=false
+ fi
+ ;;
+ esac
+ $wrappers_required || {
+ # Replace the output file specification.
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ link_command=$compile_command$compile_rpath
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.$objext"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
+ fi
+
+ exit $exit_status
+ }
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test yes = "$no_install"; then
+ # We don't need to create a wrapper script.
+ link_command=$compile_var$compile_command$compile_rpath
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ case $hardcode_action,$fast_install in
+ relink,*)
+ # Fast installation is not supported
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "'$output' will be relinked during installation"
+ ;;
+ *,yes)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ ;;
+ *,no)
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
+ ;;
+ *,needless)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=
+ ;;
+ esac
+
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output_objdir/$outputname"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource=$output_path/$objdir/lt-$output_name.c
+ cwrapper=$output_path/$output_name.exe
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host"; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ case $build_libtool_libs in
+ convenience)
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs=$convenience
+ build_libtool_libs=no
+ ;;
+ module)
+ oldobjs=$libobjs_save
+ addlibs=$old_convenience
+ build_libtool_libs=no
+ ;;
+ *)
+ oldobjs="$old_deplibs $non_pic_objects"
+ $preload && test -f "$symfileobj" \
+ && func_append oldobjs " $symfileobj"
+ addlibs=$old_convenience
+ ;;
+ esac
+
+ if test -n "$addlibs"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $addlibs
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ echo "copying selected object files to avoid basename conflicts..."
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase=$func_basename_result
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ func_append oldobjs " $gentop/$newobj"
+ ;;
+ *) func_append oldobjs " $obj" ;;
+ esac
+ done
+ fi
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ elif test -n "$archiver_list_spec"; then
+ func_verbose "using command file archive linking..."
+ for obj in $oldobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > $output_objdir/$libname.libcmd
+ func_to_tool_file "$output_objdir/$libname.libcmd"
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj"; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test -z "$oldobjs"; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test yes = "$build_old_libs" && old_library=$libname.$libext
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ if test yes = "$hardcode_automatic"; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test yes = "$installed"; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output=$output_objdir/${outputname}i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name=$func_basename_result
+ func_resolve_sysroot "$deplib"
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ -L*)
+ func_stripname -L '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -L$func_replace_sysroot_result"
+ ;;
+ -R*)
+ func_stripname -R '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -R$func_replace_sysroot_result"
+ ;;
+ *) func_append newdependency_libs " $deplib" ;;
+ esac
+ done
+ dependency_libs=$newdependency_libs
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "'$lib' is not a valid libtool archive"
+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ *) func_append newdlfiles " $lib" ;;
+ esac
+ done
+ dlfiles=$newdlfiles
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "'$lib' is not a valid libtool archive"
+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles=$newdlprefiles
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlfiles " $abs"
+ done
+ dlfiles=$newdlfiles
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlprefiles " $abs"
+ done
+ dlprefiles=$newdlprefiles
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ # In fact, it would be nice if we could use this code for all target
+ # systems that can't hard-code library paths into their executables
+ # and that have no shared library path variable independent of PATH,
+ # but it turns out we can't easily determine that from inspecting
+ # libtool variables, so we have to hard-code the OSs to which it
+ # applies here; at the moment, that means platforms that use the PE
+ # object format with DLL files. See the long comment at the top of
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test -n "$bindir"; then
+ func_relative_path "$install_libdir" "$bindir"
+ tdlname=$func_relative_path_result/$dlname
+ else
+ # Otherwise fall back on heuristic.
+ tdlname=../bin/$dlname
+ fi
+ ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that cannot go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test no,yes = "$installed,$need_relink"; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+if test link = "$opt_mode" || test relink = "$opt_mode"; then
+ func_mode_link ${1+"$@"}
+fi
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $debug_cmd
+
+ RM=$nonopt
+ files=
+ rmforce=false
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=$magic
+
+ for arg
+ do
+ case $arg in
+ -f) func_append RM " $arg"; rmforce=: ;;
+ -*) func_append RM " $arg" ;;
+ *) func_append files " $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+ if test . = "$dir"; then
+ odir=$objdir
+ else
+ odir=$dir/$objdir
+ fi
+ func_basename "$file"
+ name=$func_basename_result
+ test uninstall = "$opt_mode" && odir=$dir
+
+ # Remember odir for removal later, being careful to avoid duplicates
+ if test clean = "$opt_mode"; then
+ case " $rmdirs " in
+ *" $odir "*) ;;
+ *) func_append rmdirs " $odir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif $rmforce; then
+ continue
+ fi
+
+ rmfiles=$file
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ func_append rmfiles " $odir/$n"
+ done
+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+ case $opt_mode in
+ clean)
+ case " $library_names " in
+ *" $dlname "*) ;;
+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+ esac
+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" && test none != "$pic_object"; then
+ func_append rmfiles " $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" && test none != "$non_pic_object"; then
+ func_append rmfiles " $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test clean = "$opt_mode"; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ func_append rmfiles " $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ func_append rmfiles " $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ func_append rmfiles " $odir/$name $odir/${name}S.$objext"
+ if test yes = "$fast_install" && test -n "$relink_command"; then
+ func_append rmfiles " $odir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name"; then
+ func_append rmfiles " $odir/lt-$noexename.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+
+ # Try to remove the $objdir's in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
+ func_mode_uninstall ${1+"$@"}
+fi
+
+test -z "$opt_mode" && {
+ help=$generic_help
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode '$opt_mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# where we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/missing b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/missing
new file mode 100755
index 0000000..f62bbae
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_varnish/varnish-nagios/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2013-10-28.13; # UTC
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+fi
+
+case $1 in
+
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
+
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
+
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'autom4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/Makefile
new file mode 100644
index 0000000..31e27c8
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/Makefile
@@ -0,0 +1,13 @@
+PLUGIN := tmp/check_webinject
+
+include ../common.mk
+
+tmp/check_webinject:
+ mkdir -p tmp
+ sed -e '/^package Web/,/^#!\/usr\/bin\/env perl/d' \
+ -e '/^my.*Webinject->/ iuse Webinject;\n' \
+ check_webinject > $@
+
+clean::
+ rm -rf tmp
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/check_webinject b/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/check_webinject
new file mode 100755
index 0000000..d8a377e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/check_webinject
@@ -0,0 +1,1979 @@
+#!/usr/bin/perl
+# nagios: +epn
+
+package Webinject;
+
+# Copyright 2010-2012 Sven Nierlein (nierlein@cpan.org)
+# Copyright 2004-2006 Corey Goldberg (corey@goldb.org)
+#
+# This file is part of WebInject.
+#
+# WebInject is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# WebInject is distributed in the hope that it will be useful,
+# but without any warranty; without even the implied warranty of
+# merchantability or fitness for a particular purpose. See the
+# GNU General Public License for more details.
+
+use 5.006;
+use strict;
+use warnings;
+use Carp;
+use LWP;
+use HTTP::Request::Common;
+use HTTP::Cookies;
+use XML::Simple;
+use Time::HiRes 'time', 'sleep';
+use Getopt::Long;
+use Crypt::SSLeay; # for SSL/HTTPS (you may comment this out if you don't need it)
+use XML::Parser; # for web services verification (you may comment this out if aren't doing XML verifications for web services)
+use Error qw(:try); # for web services verification (you may comment this out if aren't doing XML verifications for web services)
+use Data::Dumper; # dump hashes for debugging
+use File::Temp qw/ tempfile /; # create temp files
+
+our $VERSION = '1.80';
+
+=head1 NAME
+
+Webinject - Perl Module for testing web services
+
+=head1 SYNOPSIS
+
+ use Webinject;
+ my $webinject = Webinject->new(reporttype => "nagios", timeout => 30, break_on_errors => 1);
+ $webinject->engine();
+
+=head1 DESCRIPTION
+
+WebInject is a free tool for automated testing of web applications and web
+services. It can be used to test individual system components that have HTTP
+interfaces (JSP, ASP, CGI, PHP, AJAX, Servlets, HTML Forms, XML/SOAP Web
+Services, REST, etc), and can be used as a test harness to create a suite of
+[HTTP level] automated functional, acceptance, and regression tests. A test
+harness allows you to run many test cases and collect/report your results.
+WebInject offers real-time results display and may also be used for monitoring
+system response times.
+
+=head1 CONSTRUCTOR
+
+=head2 new ( [ARGS] )
+
+Creates an C<Webinject> object.
+
+=over 4
+
+=item reporttype
+
+possible values are 'standard', 'nagios', 'nagios2', 'mrtg' or 'external:'
+
+=item nooutput
+
+suppress all output to STDOUT, create only logilfes
+
+=item break_on_errors
+
+stop after the first testcase fails, otherwise Webinject would go on and
+execute all tests regardless of the previous case.
+
+=item timeout
+
+Default timeout is 180seconds. Timeout starts again for every testcase.
+
+=item useragent
+
+Set the useragent used in HTTP requests. Default is 'Webinject'.
+
+=item max_redirect
+
+Set maximum number of HTTP redirects. Default is 0.
+
+=item proxy
+
+Sets a proxy which is then used for http and https requests.
+
+=item output_dir
+
+Output directory where all logfiles will go to. Defaults to current directory.
+
+=item globalhttplog
+
+Can be 'yes' or 'onfail'. Will log the http request and response to a http.log file.
+
+=item httpauth
+
+Provides credentials for webserver authentications. The format is:
+
+ ['servername', 'portnumber', 'realm-name', 'username', 'password']
+
+=item baseurl
+
+the value can be used as {BASEURL} in the test cases
+
+=item baseurl1
+
+the value can be used as {BASEURL1} in the test cases
+
+=item baseurl2
+
+the value can be used as {BASEURL2} in the test cases
+
+=item standaloneplot
+
+can be "on" or "off". Default is off.
+Create gnuplot graphs when enabled.
+
+=item graphtype
+
+Defaults to 'lines'
+
+=item gnuplot
+
+Defines the path to your gnuplot binary.
+
+=back
+
+=cut
+
+sub new {
+ my $class = shift;
+ my (%options) = @_;
+ $| = 1; # don't buffer output to STDOUT
+
+ my $self = {};
+ bless $self, $class;
+
+ # set default config options
+ $self->_set_defaults();
+
+ for my $opt_key ( keys %options ) {
+ if( exists $self->{'config'}->{$opt_key} ) {
+ if($opt_key eq 'httpauth') {
+ $self->_set_http_auth($options{$opt_key});
+ } else {
+ $self->{'config'}->{$opt_key} = $options{$opt_key};
+ }
+ }
+ else {
+ $self->_usage("ERROR: unknown option: ".$opt_key);
+ }
+ }
+
+ # get command line options
+ $self->_getoptions();
+
+ return $self;
+}
+
+########################################
+
+=head1 METHODS
+
+=head2 engine
+
+start the engine of webinject
+
+=cut
+
+sub engine {
+ #wrap the whole engine in a subroutine so it can be integrated with the gui
+ my $self = shift;
+
+ if($self->{'gui'}) {
+ $self->_gui_initial();
+ }
+ else {
+ # delete files leftover from previous run (do this here so they are whacked each run)
+ $self->_whackoldfiles();
+ }
+
+ $self->_processcasefile();
+
+ my $useragent = $self->_get_useragent();
+
+ # write opening tags for STDOUT.
+ $self->_writeinitialstdout();
+
+ # create the gnuplot config file
+ $self->_plotcfg();
+
+ # timer for entire test run
+ my $startruntimer = time();
+
+ # process test case files named in config
+ for my $currentcasefile ( @{ $self->{'casefilelist'} } ) {
+ #print "\n$currentcasefile\n\n";
+
+ my $resultfile = {
+ 'name' => $currentcasefile,
+ 'cases' => [],
+ };
+
+ if($self->{'gui'}) { $self->_gui_processing_msg($currentcasefile); }
+
+ my $tempfile = $self->_convtestcases($currentcasefile);
+
+ my $xmltestcases;
+ eval {
+ $xmltestcases = XMLin( $tempfile,
+ varattr => 'varname',
+ variables => $self->{'config'} ); # slurp test case file to parse (and specify variables tag)
+ };
+ if($@) {
+ my $error = $@;
+ $error =~ s/^\s*//mx;
+ $self->_usage("ERROR: reading xml test case ".$currentcasefile." failed: ".$error);
+ }
+
+ unless( defined $xmltestcases->{case} ) {
+ $self->_usage("ERROR: no test cases defined!");
+ }
+
+ # fix case if there is only one case
+ if( defined $xmltestcases->{'case'}->{'id'} ) {
+ my $tmpcase = $xmltestcases->{'case'};
+ $xmltestcases->{'case'} = { $tmpcase->{'id'} => $tmpcase };
+ }
+
+ #delete the temp file as soon as we are done reading it
+ if ( -e $tempfile ) { unlink $tempfile; }
+
+ my $repeat = 1;
+ if(defined $xmltestcases->{repeat} and $xmltestcases->{repeat} > 0) {
+ $repeat = $xmltestcases->{repeat};
+ }
+
+ my $useragent = $self->_get_useragent();
+
+ for my $run_nr (1 .. $repeat) {
+
+ # process cases in sorted order
+ for my $testnum ( sort { $a <=> $b } keys %{ $xmltestcases->{case} } ) {
+
+ # if an XPath Node is defined, only process the single Node
+ if( $self->{'xnode'} ) {
+ $testnum = $self->{'xnode'};
+ }
+
+ # create testcase
+ my $case = { 'id' => $testnum };
+
+ # populate variables with values from testcase file, do substitutions, and revert converted values back
+ for my $key (keys %{$xmltestcases->{'case'}->{$testnum}}) {
+ $case->{$key} = $xmltestcases->{'case'}->{$testnum}->{$key};
+ }
+
+ my $label = '';
+ if(defined $case->{'label'}) {
+ $label = $case->{'label'}." - ";
+ }
+ $self->_out(qq|Test: $label$currentcasefile - $testnum \n|);
+
+ $case = $self->_run_test_case($case, $useragent);
+
+ push @{$resultfile->{'cases'}}, $case;
+
+ # break from sub if user presses stop button in gui
+ if( $self->{'switches'}->{'stop'} eq 'yes' ) {
+ my $rc = $self->_finaltasks();
+ $self->{'switches'}->{'stop'} = 'no';
+ return $rc; # break from sub
+ }
+
+ # break here if the last result was an error
+ if($self->{'config'}->{'break_on_errors'} and $self->{'result'}->{'iscritical'}) {
+ last;
+ }
+
+ # if an XPath Node is defined, only process the single Node
+ if( $self->{'xnode'} ) {
+ last;
+ }
+ }
+ }
+
+ push @{$self->{'result'}->{'files'}}, $resultfile;
+ }
+
+ my $endruntimer = time();
+ $self->{'result'}->{'totalruntime'} = ( int( 1000 * ( $endruntimer - $startruntimer ) ) / 1000 ); #elapsed time rounded to thousandths
+
+
+ # do return/cleanup tasks
+ return $self->_finaltasks();
+}
+
+################################################################################
+# runs a single test case
+sub _run_test_case {
+ my($self,$case,$useragent) =@_;
+
+ confess("no testcase!") unless defined $case;
+
+ # set some defaults
+ $case->{'id'} = 1 unless defined $case->{'id'};
+ $case->{'passedcount'} = 0;
+ $case->{'failedcount'} = 0;
+ $case->{'iswarning'} = 0;
+ $case->{'iscritical'} = 0;
+ $case->{'messages'} = [];
+
+ $useragent = $self->_get_useragent() unless defined $useragent;
+
+ # don't do this if monitor is disabled in gui
+ if($self->{'gui'} and $self->{'monitorenabledchkbx'} ne 'monitor_off') {
+ my $curgraphtype = $self->{'config'}->{'graphtype'};
+ }
+
+ # used to replace parsed {timestamp} with real timestamp value
+ my $timestamp = time();
+
+ for my $key (keys %{$case}) {
+ $case->{$key} = $self->_convertbackxml($case->{$key}, $timestamp);
+ next if $key eq 'errormessage';
+ $case->{$key} = $self->_convertbackxmlresult($case->{$key});
+ }
+
+ if( $self->{'gui'} ) { $self->_gui_tc_descript($case); }
+
+ push @{$case->{'messages'}}, { 'html' => "<td>" }; # HTML: open table column
+ for(qw/description1 description2/) {
+ next unless defined $case->{$_};
+ $self->_out(qq|Desc: $case->{$_}\n|);
+ push @{$case->{'messages'}}, {'key' => $_, 'value' => $case->{$_}, 'html' => "<b>$case->{$_}</b><br />" };
+ }
+ my $method;
+ if (defined $case->{method}) {
+ $method = uc($case->{method});
+ } else {
+ $method = "GET";
+ }
+ push @{$case->{'messages'}}, { 'html' => qq|<small>$method <a href="$case->{url}">$case->{url}</a> </small><br />\n| };
+
+ push @{$case->{'messages'}}, { 'html' => "</td><td>" }; # HTML: next column
+
+ my($latency,$request,$response);
+ alarm($self->{'config'}->{'timeout'}+1); # timeout should be handled by LWP, but just in case...
+ eval {
+ local $SIG{ALRM} = sub { die("alarm") };
+ if($case->{method}){
+ if(lc $case->{method} eq "get") {
+ ($latency,$request,$response) = $self->_httpget($useragent, $case);
+ }
+ elsif(lc $case->{method} eq "post") {
+ ($latency,$request,$response) = $self->_httppost($useragent, $case);
+ }
+ else {
+ $self->_usage('ERROR: bad HTTP Request Method Type, you must use "get" or "post"');
+ }
+ }
+ else {
+ ($latency,$request,$response) = $self->_httpget($useragent, $case); # use "get" if no method is specified
+ }
+ };
+ alarm(0);
+ if($@) {
+ $case->{'iscritical'} = 1;
+ } else {
+ $case->{'latency'} = $latency;
+ $case->{'request'} = $request->as_string();
+ $case->{'response'} = $response->as_string();
+
+ # verify result from http response
+ $self->_verify($response, $case);
+
+ if($case->{verifypositivenext}) {
+ $self->{'verifylater'} = $case->{'verifypositivenext'};
+ $self->_out("Verify On Next Case: '".$case->{verifypositivenext}."' \n");
+ push @{$case->{'messages'}}, {'key' => 'verifypositivenext', 'value' => $case->{verifypositivenext}, 'html' => "Verify On Next Case: ".$case->{verifypositivenext}."<br />" };
+ }
+
+ if($case->{verifynegativenext}) {
+ $self->{'verifylaterneg'} = $case->{'verifynegativenext'};
+ $self->_out("Verify Negative On Next Case: '".$case->{verifynegativenext}."' \n");
+ push @{$case->{'messages'}}, {'key' => 'verifynegativenext', 'value' => $case->{verifynegativenext}, 'html' => "Verify Negative On Next Case: ".$case->{verifynegativenext}."<br />" };
+ }
+
+ # write to http.log file
+ $self->_httplog($request, $response, $case);
+
+ # send perf data to log file for plotting
+ $self->_plotlog($latency);
+
+ # call the external plotter to create a graph
+ $self->_plotit();
+
+ if( $self->{'gui'} ) {
+ $self->_gui_updatemontab(); # update monitor with the newly rendered plot graph
+ }
+
+ $self->_parseresponse($response, $case); # grab string from response to send later
+
+ # make parsed results available in the errormessage
+ for my $key (keys %{$case}) {
+ next unless $key eq 'errormessage';
+ $case->{$key} = $self->_convertbackxmlresult($case->{$key});
+ }
+ }
+
+ push @{$case->{'messages'}}, { 'html' => "</td><td>\n" }; # HTML: next column
+ # if any verification fails, test case is considered a failure
+ if($case->{'iscritical'}) {
+ # end result will be also critical
+ $self->{'result'}->{'iscritical'} = 1;
+
+ push @{$case->{'messages'}}, {'key' => 'success', 'value' => 'false' };
+ if( $self->{'result'}->{'returnmessage'} ) { # Add returnmessage to the output
+ my $prefix = "case #".$case->{'id'}.": ";
+ if(defined $case->{'label'}) {
+ $prefix = $case->{'label'}." (case #".$case->{'id'}."): ";
+ }
+ $self->{'result'}->{'returnmessage'} = $prefix.$self->{'result'}->{'returnmessage'};
+ my $message = $self->{'result'}->{'returnmessage'};
+ $message = $message.' - '.$case->{errormessage} if defined $case->{errormessage};
+ push @{$case->{'messages'}}, {
+ 'key' => 'result-message',
+ 'value' => $message,
+ 'html' => "<b><span class=\"fail\">FAILED :</span> ".$message."</b>"
+ };
+ $self->_out("TEST CASE FAILED : ".$message."\n");
+ }
+ # print regular error output
+ elsif ( $case->{errormessage} ) { # Add defined error message to the output
+ push @{$case->{'messages'}}, {
+ 'key' => 'result-message',
+ 'value' => $case->{errormessage},
+ 'html' => "<b><span class=\"fail\">FAILED :</span> ".$case->{errormessage}."</b>"
+ };
+ $self->_out(qq|TEST CASE FAILED : $case->{errormessage}\n|);
+ }
+ else {
+ push @{$case->{'messages'}}, {
+ 'key' => 'result-message',
+ 'value' => 'TEST CASE FAILED',
+ 'html' => "<b><span class=\"fail\">FAILED</span></b>"
+ };
+ $self->_out(qq|TEST CASE FAILED\n|);
+ }
+ unless( $self->{'result'}->{'returnmessage'} ) { #(used for plugin compatibility) if it's the first error message, set it to variable
+ if( $case->{errormessage} ) {
+ $self->{'result'}->{'returnmessage'} = $case->{errormessage};
+ }
+ else {
+ $self->{'result'}->{'returnmessage'} = "Test case number ".$case->{'id'}." failed";
+ if(defined $case->{'label'}) {
+ $self->{'result'}->{'returnmessage'} = "Test case ".$case->{'label'}." (#".$case->{'id'}.") failed";
+ }
+ }
+ }
+ if( $self->{'gui'} ) {
+ $self->_gui_status_failed();
+ }
+ }
+ elsif($case->{'iswarning'}) {
+ # end result will be also warning
+ $self->{'result'}->{'iswarning'} = 1;
+
+ push @{$case->{'messages'}}, {'key' => 'success', 'value' => 'false' };
+ if( $case->{errormessage} ) { # Add defined error message to the output
+ push @{$case->{'messages'}}, {'key' => 'result-message', 'value' => $case->{errormessage}, 'html' => "<b><span class=\"fail\">WARNED :</span> ".$case->{errormessage}."</b>" };
+ $self->_out(qq|TEST CASE WARNED : $case->{errormessage}\n|);
+ }
+ # print regular error output
+ else {
+ # we suppress most logging when running in a plugin mode
+ push @{$case->{'messages'}}, {'key' => 'result-message', 'value' => 'TEST CASE WARNED', 'html' => "<b><span class=\"fail\">WARNED</span></b>" };
+ $self->_out(qq|TEST CASE WARNED\n|);
+ }
+ unless( $self->{'result'}->{'returnmessage'} ) { #(used for plugin compatibility) if it's the first error message, set it to variable
+ if( $case->{errormessage} ) {
+ $self->{'result'}->{'returnmessage'} = $case->{errormessage};
+ }
+ else {
+ $self->{'result'}->{'returnmessage'} = "Test case number ".$case->{'id'}." warned";
+ if(defined $case->{'label'}) {
+ $self->{'result'}->{'returnmessage'} = "Test case ".$case->{'label'}." (#".$case->{'id'}.") warned";
+ }
+ }
+
+ }
+ if( $self->{'gui'} ) {
+ $self->_gui_status_failed();
+ }
+ }
+ else {
+ $self->_out(qq|TEST CASE PASSED\n|);
+ push @{$case->{'messages'}}, {'key' => 'success', 'value' => 'true' };
+ push @{$case->{'messages'}}, {
+ 'key' => 'result-message',
+ 'value' => 'TEST CASE PASSED',
+ 'html' => "<b><span class=\"pass\">PASSED</span></b>"
+ };
+ if( $self->{'gui'} ) {
+ $self->_gui_status_passed();
+ }
+ }
+
+ if( $self->{'gui'} ) { $self->_gui_timer_output($latency); }
+
+ $self->_out(qq|Response Time = $latency sec \n|);
+ $self->_out(qq|------------------------------------------------------- \n|);
+ push @{$case->{'messages'}}, {
+ 'key' => 'responsetime',
+ 'value' => $latency,
+ 'html' => "<br />".$latency." sec </td>\n" };
+
+ $self->{'result'}->{'runcount'}++;
+ $self->{'result'}->{'totalruncount'}++;
+
+ if( $self->{'gui'} ) {
+ # update the statusbar
+ $self->_gui_statusbar();
+ }
+
+ if( $latency > $self->{'result'}->{'maxresponse'} ) {
+ # set max response time
+ $self->{'result'}->{'maxresponse'} = $latency;
+ }
+ if(!defined $self->{'result'}->{'minresponse'} or $latency < $self->{'result'}->{'minresponse'} ) {
+ # set min response time
+ $self->{'result'}->{'minresponse'} = $latency;
+ }
+ # keep total of response times for calculating avg
+ $self->{'result'}->{'totalresponse'} = ( $self->{'result'}->{'totalresponse'} + $latency );
+ # avg response rounded to thousands
+ $self->{'result'}->{'avgresponse'} = ( int( 1000 * ( $self->{'result'}->{'totalresponse'} / $self->{'result'}->{'totalruncount'} ) ) / 1000 );
+
+ if( $self->{'gui'} ) {
+ # update timers and counts in monitor tab
+ $self->_gui_updatemonstats();
+ }
+
+
+ # if a sleep value is set in the test case, sleep that amount
+ if( $case->{sleep} ) {
+ sleep( $case->{sleep} );
+ }
+
+ $self->{'result'}->{'totalpassedcount'} += $case->{'passedcount'};
+ $self->{'result'}->{'totalfailedcount'} += $case->{'failedcount'};
+
+ if($case->{'iscritical'} or $case->{'iswarning'}) {
+ $self->{'result'}->{'totalcasesfailedcount'}++;
+ } else {
+ $self->{'result'}->{'totalcasespassedcount'}++;
+ }
+
+ return $case;
+}
+
+################################################################################
+sub _get_useragent {
+ my $self = shift;
+
+ # construct LWP object
+ my $useragent = LWP::UserAgent->new(keep_alive=>1);
+
+ # store cookies in our LWP object
+ my $fh;
+ our $cookietempfilename;
+ ($fh, $cookietempfilename) = tempfile(undef, UNLINK => 1);
+ unlink ($cookietempfilename);
+ $useragent->cookie_jar(HTTP::Cookies->new(
+ file => $cookietempfilename,
+ autosave => 1,
+ ));
+
+ # http useragent that will show up in webserver logs
+ unless(defined $self->{'config'}->{'useragent'}) {
+ $useragent->agent('WebInject');
+ } else {
+ $useragent->agent($self->{'config'}->{'useragent'});
+ }
+
+ # add proxy support if it is set in config.xml
+ if( $self->{'config'}->{'proxy'} ) {
+ my $proxy = $self->{'config'}->{'proxy'};
+ $proxy =~ s/^http:\/\///mx;
+ $useragent->proxy([qw( http )], "http://".$proxy);
+ $ENV{'HTTPS_PROXY'} = "http://".$proxy;
+ }
+
+ # don't follow redirects unless set by config
+ push @{$useragent->requests_redirectable}, 'POST';
+ $useragent->max_redirect($self->{'config'}->{'max_redirect'});
+
+ # add http basic authentication support
+ # corresponds to:
+ # $useragent->credentials('servername:portnumber', 'realm-name', 'username' => 'password');
+ if(scalar @{$self->{'config'}->{'httpauth'}}) {
+ # add the credentials to the user agent here. The foreach gives the reference to the tuple ($elem), and we
+ # deref $elem to get the array elements.
+ for my $elem ( @{ $self->{'config'}->{'httpauth'} } ) {
+ #print "adding credential: $elem->[0]:$elem->[1], $elem->[2], $elem->[3] => $elem->[4]\n";
+ $useragent->credentials( $elem->[0].":".$elem->[1], $elem->[2], $elem->[3] => $elem->[4] );
+ }
+ }
+
+ # change response delay timeout in seconds if it is set in config.xml
+ if($self->{'config'}->{'timeout'}) {
+ $useragent->timeout($self->{'config'}->{'timeout'}); # default LWP timeout is 180 secs.
+ }
+
+ return $useragent;
+}
+
+################################################################################
+# set defaults
+sub _set_defaults {
+ my $self = shift;
+ $self->{'config'} = {
+ 'currentdatetime' => scalar localtime time, #get current date and time for results report
+ 'standaloneplot' => 'off',
+ 'graphtype' => 'lines',
+ 'httpauth' => [],
+ 'reporttype' => 'standard',
+ 'output_dir' => './',
+ 'nooutput' => undef,
+ 'baseurl' => '',
+ 'baseurl1' => '',
+ 'baseurl2' => '',
+ 'break_on_errors' => 0,
+ 'max_redirect' => 0,
+ 'globalhttplog' => 'no',
+ 'proxy' => '',
+ 'timeout' => 180,
+ };
+ $self->{'exit_codes'} = {
+ 'UNKNOWN' => 3,
+ 'OK' => 0,
+ 'WARNING' => 1,
+ 'CRITICAL' => 2,
+ };
+ $self->{'switches'} = {
+ 'stop' => 'no',
+ 'plotclear' => 'no',
+ };
+ $self->{'out'} = '';
+ $self->_reset_result();
+ return;
+}
+
+################################################################################
+# reset result
+sub _reset_result {
+ my $self = shift;
+ $self->{'result'} = {
+ 'cases' => [],
+ 'returnmessage' => undef,
+ 'totalcasesfailedcount' => 0,
+ 'totalcasespassedcount' => 0,
+ 'totalfailedcount' => 0,
+ 'totalpassedcount' => 0,
+ 'totalresponse' => 0,
+ 'totalruncount' => 0,
+ 'totalruntime' => 0,
+ 'casecount' => 0,
+ 'avgresponse' => 0,
+ 'iscritical' => 0,
+ 'iswarning' => 0,
+ 'maxresponse' => 0,
+ 'minresponse' => undef,
+ 'runcount' => 0,
+ };
+ return;
+}
+
+################################################################################
+# write initial text for STDOUT
+sub _writeinitialstdout {
+ my $self = shift;
+
+ if($self->{'config'}->{'reporttype'} !~ /^nagios/mx) {
+ $self->_out(qq|
+Starting WebInject Engine (v$Webinject::VERSION)...
+|);
+ }
+ $self->_out("-------------------------------------------------------\n");
+ return;
+}
+
+################################################################################
+# write summary and closing tags for results file
+sub _write_result_html {
+ my $self = shift;
+
+ my $file = $self->{'config'}->{'output_dir'}."results.html";
+ open( my $resultshtml, ">", $file )
+ or $self->_usage("ERROR: Failed to write ".$file.": ".$!);
+
+ print $resultshtml
+ qq|<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>WebInject Test Results</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <style type="text/css">
+ body {
+ background-color: #F5F5F5;
+ color: #000000;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ }
+ table, td {
+ border: solid #ddd 1px;
+ }
+ .pass {
+ color: green;
+ }
+ .fail {
+ color: red;
+ }
+ </style>
+</head>
+<body>
+<table>
+<tr>
+<th>Test</th>
+<th>Description<br />Request URL</th>
+<th>Results</th>
+<th>Summary<br />Response Time</th>
+</tr>
+|;
+ for my $file (@{$self->{'result'}->{'files'}}) {
+ for my $case (@{$file->{'cases'}}) {
+ print $resultshtml qq|<tr><td>$file->{'name'}<br /><b>$case->{'id'} </b></td>\n|;
+ for my $message (@{$case->{'messages'}}) {
+ next unless defined $message->{'html'};
+ print $resultshtml $message->{'html'} . "\n";
+ }
+ print $resultshtml "</tr>\n";
+ }
+ }
+
+ print $resultshtml qq|
+</table>
+<b>
+Start Time: $self->{'config'}->{'currentdatetime'} <br />
+Total Run Time: $self->{'result'}->{'totalruntime'} seconds <br />
+<br />
+Test Cases Run: $self->{'result'}->{'totalruncount'} <br />
+Test Cases Passed: $self->{'result'}->{'totalcasespassedcount'} <br />
+Test Cases Failed: $self->{'result'}->{'totalcasesfailedcount'} <br />
+Verifications Passed: $self->{'result'}->{'totalpassedcount'} <br />
+Verifications Failed: $self->{'result'}->{'totalfailedcount'} <br />
+<br />
+Average Response Time: $self->{'result'}->{'avgresponse'} seconds <br />
+Max Response Time: $self->{'result'}->{'maxresponse'} seconds <br />
+Min Response Time: $self->{'result'}->{'minresponse'} seconds <br />
+</b>
+<br />
+
+</body>
+</html>
+|;
+ close($resultshtml);
+ return;
+}
+
+################################################################################
+# write summary and closing tags for XML results file
+sub _write_result_xml {
+ my $self = shift;
+
+ my $file = $self->{'config'}->{'output_dir'}."results.xml";
+ open( my $resultsxml, ">", $file )
+ or $self->_usage("ERROR: Failed to write ".$file.": ".$!);
+
+ print $resultsxml "<results>\n\n";
+
+ for my $file (@{$self->{'result'}->{'files'}}) {
+ print $resultsxml " <testcases file=\"".$file->{'name'}."\">\n\n";
+ for my $case (@{$file->{'cases'}}) {
+ print $resultsxml " <testcase id=\"".$case->{'id'}."\">\n";
+ for my $message (@{$case->{'messages'}}) {
+ next unless defined $message->{'key'};
+ print $resultsxml " <".$message->{'key'}.">".$message->{'value'}."</".$message->{'key'}.">\n";
+ }
+ print $resultsxml " </testcase>\n\n";
+ }
+ print $resultsxml " </testcases>\n";
+ }
+
+ print $resultsxml qq|
+ <test-summary>
+ <start-time>$self->{'config'}->{'currentdatetime'}</start-time>
+ <total-run-time>$self->{'result'}->{'totalruntime'}</total-run-time>
+ <test-cases-run>$self->{'result'}->{'totalruncount'}</test-cases-run>
+ <test-cases-passed>$self->{'result'}->{'totalcasespassedcount'}</test-cases-passed>
+ <test-cases-failed>$self->{'result'}->{'totalcasesfailedcount'}</test-cases-failed>
+ <verifications-passed>$self->{'result'}->{'totalpassedcount'}</verifications-passed>
+ <verifications-failed>$self->{'result'}->{'totalfailedcount'}</verifications-failed>
+ <average-response-time>$self->{'result'}->{'avgresponse'}</average-response-time>
+ <max-response-time>$self->{'result'}->{'maxresponse'}</max-response-time>
+ <min-response-time>$self->{'result'}->{'minresponse'}</min-response-time>
+ </test-summary>
+
+</results>
+|;
+ close($resultsxml);
+ return;
+}
+
+################################################################################
+# write summary and closing text for STDOUT
+sub _writefinalstdout {
+ my $self = shift;
+
+ if($self->{'config'}->{'reporttype'} !~ /^nagios/mx) {
+ $self->_out(qq|
+Start Time: $self->{'config'}->{'currentdatetime'}
+Total Run Time: $self->{'result'}->{'totalruntime'} seconds
+
+|);
+ }
+
+ $self->_out(qq|
+Test Cases Run: $self->{'result'}->{'totalruncount'}
+Test Cases Passed: $self->{'result'}->{'totalcasespassedcount'}
+Test Cases Failed: $self->{'result'}->{'totalcasesfailedcount'}
+Verifications Passed: $self->{'result'}->{'totalpassedcount'}
+Verifications Failed: $self->{'result'}->{'totalfailedcount'}
+
+|);
+ return;
+}
+
+################################################################################
+sub _http_defaults {
+ my $self = shift;
+ my $request = shift;
+ my $useragent = shift;
+ my $case = shift;
+
+ # add an additional HTTP Header if specified
+ if($case->{'addheader'}) {
+ # can add multiple headers with a pipe delimiter
+ for my $addheader (split /\|/mx, $case->{'addheader'}) {
+ $addheader =~ m~(.*):\ (.*)~mx;
+ $request->header( $1 => $2 ); # using HTTP::Headers Class
+ }
+ }
+
+ # print $self->{'request'}->as_string; print "\n\n";
+
+ my $starttimer = time();
+ my $response = $useragent->request($request);
+ my $endtimer = time();
+ my $latency = ( int( 1000 * ( $endtimer - $starttimer ) ) / 1000 ); # elapsed time rounded to thousandths
+ # print $response->as_string; print "\n\n";
+
+ return($latency,$request,$response);
+}
+
+################################################################################
+# send http request and read response
+sub _httpget {
+ my $self = shift;
+ my $useragent = shift;
+ my $case = shift;
+
+ $self->_out("GET Request: ".$case->{url}."\n");
+ my $request = new HTTP::Request( 'GET', $case->{url} );
+ return $self->_http_defaults($request, $useragent, $case);
+}
+
+################################################################################
+# post request based on specified encoding
+sub _httppost {
+ my $self = shift;
+ my $useragent = shift;
+ my $case = shift;
+
+ if($case->{posttype} ) {
+ if($case->{posttype} =~ m~application/x\-www\-form\-urlencoded~mx) {
+ return $self->_httppost_form_urlencoded($useragent, $case);
+ }
+ elsif($case->{posttype} =~ m~multipart/form\-data~mx) {
+ return $self->_httppost_form_data($useragent, $case);
+ }
+ elsif( ($case->{posttype} =~ m~text/xml~mx)
+ or ($case->{posttype} =~ m~application/soap\+xml~mx)
+ )
+ {
+ return $self->_httppost_xml($useragent, $case);
+ }
+ else {
+ $self->_usage('ERROR: Bad Form Encoding Type, I only accept "application/x-www-form-urlencoded", "multipart/form-data", "text/xml", "application/soap+xml"');
+ }
+ }
+ else {
+ # use "x-www-form-urlencoded" if no encoding is specified
+ $case->{posttype} = 'application/x-www-form-urlencoded';
+ return $self->_httppost_form_urlencoded($useragent, $case);
+ }
+ return;
+}
+
+################################################################################
+# send application/x-www-form-urlencoded HTTP request and read response
+sub _httppost_form_urlencoded {
+ my $self = shift;
+ my $useragent = shift;
+ my $case = shift;
+
+ $self->_out("POST Request: ".$case->{url}."\n");
+ my $request = new HTTP::Request('POST', $case->{url} );
+ $request->content_type($case->{posttype});
+ $request->content($case->{postbody});
+
+ return $self->_http_defaults($request,$useragent, $case);
+}
+
+################################################################################
+# send text/xml HTTP request and read response
+sub _httppost_xml {
+ my $self = shift;
+ my $useragent = shift;
+ my $case = shift;
+
+ my($latency,$request,$response);
+
+ # read the xml file specified in the testcase
+ $case->{postbody} =~ m~file=>(.*)~imx;
+ open( my $xmlbody, "<", $1 ) or $self->_usage("ERROR: Failed to open text/xml file ".$1.": ".$!); # open file handle
+ my @xmlbody = <$xmlbody>; # read the file into an array
+ close($xmlbody);
+
+ # Get the XML input file to use PARSEDRESULT and substitute the contents
+ my $content = $self->_convertbackxmlresult(join( " ", @xmlbody ));
+
+ $self->_out("POST Request: ".$case->{url}."\n");
+ $request = new HTTP::Request( 'POST', $case->{url} );
+ $request->content_type($case->{posttype});
+ $request->content( $content ); # load the contents of the file into the request body
+
+ ($latency,$request,$response) = $self->_http_defaults($request, $useragent, $case);
+
+ my $xmlparser = new XML::Parser;
+ # see if the XML parses properly
+ try {
+ $xmlparser->parse($response->decoded_content);
+
+ # print "good xml\n";
+ push @{$case->{'messages'}}, {'key' => 'verifyxml-success', 'value' => 'true', 'html' => '<span class="pass">Passed XML Parser (content is well-formed)</span>' };
+ $self->_out("Passed XML Parser (content is well-formed) \n");
+ $case->{'passedcount'}++;
+
+ # exit try block
+ return;
+ }
+ catch Error with {
+ # get the exception object
+ my $ex = shift;
+ # print "bad xml\n";
+ # we suppress most logging when running in a plugin mode
+ if($self->{'config'}->{'reporttype'} eq 'standard') {
+ push @{$case->{'messages'}}, {'key' => 'verifyxml-success', 'value' => 'false', 'html' => "<span class=\"fail\">Failed XML parser on response:</span> ".$ex };
+ }
+ $self->_out("Failed XML parser on response: $ex \n");
+ $case->{'failedcount'}++;
+ $case->{'iscritical'} = 1;
+ }; # <-- remember the semicolon
+
+ return($latency,$request,$response);
+}
+
+################################################################################
+# send multipart/form-data HTTP request and read response
+sub _httppost_form_data {
+ my $self = shift;
+ my $useragent = shift;
+ my $case = shift;
+ my %myContent_;
+ ## no critic
+ eval "\%myContent_ = $case->{postbody}";
+ ## use critic
+
+ $self->_out("POST Request: ".$case->{url}."\n");
+ my $request = POST($case->{url},
+ Content_Type => $case->{posttype},
+ Content => \%myContent_);
+
+ return $self->_http_defaults($request, $useragent, $case);
+}
+
+################################################################################
+# do verification of http response and print status to HTML/XML/STDOUT/UI
+sub _verify {
+ my $self = shift;
+ my $response = shift;
+ my $case = shift;
+
+ confess("no response") unless defined $response;
+ confess("no case") unless defined $case;
+
+ if( $case->{verifyresponsecode} ) {
+ $self->_out(qq|Verify Response Code: "$case->{verifyresponsecode}" \n|);
+ push @{$case->{'messages'}}, {'key' => 'verifyresponsecode', 'value' => $case->{verifyresponsecode} };
+
+ # verify returned HTTP response code matches verifyresponsecode set in test case
+ if ( $case->{verifyresponsecode} == $response->code() ) {
+ push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-success', 'value' => 'true', 'html' => '<span class="pass">Passed HTTP Response Code:</span> '.$case->{verifyresponsecode} };
+ push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-messages', 'value' => 'Passed HTTP Response Code Verification' };
+ $self->_out(qq|Passed HTTP Response Code Verification \n|);
+ $case->{'passedcount'}++;
+ }
+ else {
+ push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-success', 'value' => 'false', 'html' => '<span class="fail">Failed HTTP Response Code:</span> received '.$response->code().', expecting '.$case->{verifyresponsecode} };
+ push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-messages', 'value' => 'Failed HTTP Response Code Verification (received '.$response->code().', expecting '.$case->{verifyresponsecode}.')' };
+ $self->_out(qq|Failed HTTP Response Code Verification (received |.$response->code().qq|, expecting $case->{verifyresponsecode}) \n|);
+ $case->{'failedcount'}++;
+ $case->{'iscritical'} = 1;
+
+ if($self->{'config'}->{'break_on_errors'}) {
+ $self->{'result'}->{'returnmessage'} = 'Failed HTTP Response Code Verification (received '.$response->code().', expecting '.$case->{verifyresponsecode}.')';
+ return;
+ }
+ }
+ }
+ else {
+ # verify http response code is in the 100-399 range
+ if($response->as_string() =~ /HTTP\/1.(0|1)\ (1|2|3)/imx ) { # verify existance of string in response
+ push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-success', 'value' => 'true', 'html' => '<span class="pass">Passed HTTP Response Code Verification (not in error range)</span>' };
+ push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-messages', 'value' => 'Passed HTTP Response Code Verification (not in error range)' };
+ $self->_out(qq|Passed HTTP Response Code Verification (not in error range) \n|);
+
+ # succesful response codes: 100-399
+ $case->{'passedcount'}++;
+ }
+ else {
+ $response->as_string() =~ /(HTTP\/1.)(.*)/mxi;
+ if($1) { #this is true if an HTTP response returned
+ push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-success', 'value' => 'false', 'html' => '<span class="fail">Failed HTTP Response Code Verification ('.$1.$2.')</span>' };
+ push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-messages', 'value' => 'Failed HTTP Response Code Verification ('.$1.$2.')' };
+ $self->_out("Failed HTTP Response Code Verification ($1$2) \n"); #($1$2) is HTTP response code
+
+ $case->{'failedcount'}++;
+ $case->{'iscritical'} = 1;
+
+ if($self->{'config'}->{'break_on_errors'}) {
+ $self->{'result'}->{'returnmessage'} = 'Failed HTTP Response Code Verification ('.$1.$2.')';
+ return;
+ }
+ }
+ #no HTTP response returned.. could be error in connection, bad hostname/address, or can not connect to web server
+ else
+ {
+ push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-success', 'value' => 'false', 'html' => '<span class="fail">Failed - No Response</span>' };
+ push @{$case->{'messages'}}, {'key' => 'verifyresponsecode-messages', 'value' => 'Failed - No Response' };
+ $self->_out("Failed - No valid HTTP response:\n".$response->as_string());
+
+ $case->{'failedcount'}++;
+ $case->{'iscritical'} = 1;
+
+ if($self->{'config'}->{'break_on_errors'}) {
+ $self->{'result'}->{'returnmessage'} = 'Failed - No valid HTTP response: '.$response->as_string();
+ return;
+ }
+ }
+ }
+ }
+ push @{$case->{'messages'}}, { 'html' => '<br />' };
+
+ for my $nr ('', 1..1000) {
+ my $key = "verifypositive".$nr;
+ if( $case->{$key} ) {
+ $self->_out("Verify: '".$case->{$key}."' \n");
+ push @{$case->{'messages'}}, {'key' => $key, 'value' => $case->{$key} };
+ my $regex = $self->_fix_regex($case->{$key});
+ # verify existence of string in response
+ if( $response->as_string() =~ m~$regex~simx ) {
+ push @{$case->{'messages'}}, {'key' => $key.'-success', 'value' => 'true', 'html' => "<span class=\"pass\">Passed:</span> ".$case->{$key} };
+ $self->_out("Passed Positive Verification \n");
+ $case->{'passedcount'}++;
+ }
+ else {
+ push @{$case->{'messages'}}, {'key' => $key.'-success', 'value' => 'false', 'html' => "<span class=\"fail\">Failed:</span> ".$case->{$key} };
+ $self->_out("Failed Positive Verification \n");
+ $case->{'failedcount'}++;
+ $case->{'iscritical'} = 1;
+
+ if($self->{'config'}->{'break_on_errors'}) {
+ $self->{'result'}->{'returnmessage'} = 'Failed Positive Verification, can not find a string matching regex: '.$regex;
+ return;
+ }
+ }
+ push @{$case->{'messages'}}, { 'html' => '<br />' };
+ }
+ elsif($nr ne '' and $nr > 5) {
+ last;
+ }
+ }
+
+ for my $nr ('', 1..1000) {
+ my $key = "verifynegative".$nr;
+ if( $case->{$key} ) {
+ $self->_out("Verify Negative: '".$case->{$key}."' \n");
+ push @{$case->{'messages'}}, {'key' => $key, 'value' => $case->{$key} };
+ my $regex = $self->_fix_regex($case->{$key});
+ # verify existence of string in response
+ if( $response->as_string() =~ m~$regex~simx ) {
+ push @{$case->{'messages'}}, {'key' => $key.'-success', 'value' => 'false', 'html' => '<span class="fail">Failed Negative:</span> '.$case->{$key} };
+ $self->_out("Failed Negative Verification \n");
+ $case->{'failedcount'}++;
+ $case->{'iscritical'} = 1;
+
+ if($self->{'config'}->{'break_on_errors'}) {
+ $self->{'result'}->{'returnmessage'} = 'Failed Negative Verification, found regex matched string: '.$regex;
+ return;
+ }
+ }
+ else {
+ push @{$case->{'messages'}}, {'key' => $key.'-success', 'value' => 'true', 'html' => '<span class="pass">Passed Negative:</span> '.$case->{$key} };
+ $self->_out("Passed Negative Verification \n");
+ $case->{'passedcount'}++;
+ }
+ push @{$case->{'messages'}}, { 'html' => '<br />' };
+ }
+ elsif($nr ne '' and $nr > 5) {
+ last;
+ }
+ }
+
+ if($self->{'verifylater'}) {
+ my $regex = $self->_fix_regex($self->{'verifylater'});
+ # verify existence of string in response
+ if($response->as_string() =~ m~$regex~simx ) {
+ push @{$case->{'messages'}}, {'key' => 'verifypositivenext-success', 'value' => 'true', 'html' => '<span class="pass">Passed Positive Verification (verification set in previous test case)</span>' };
+ $self->_out("Passed Positive Verification (verification set in previous test case) \n");
+ $case->{'passedcount'}++;
+ }
+ else {
+ push @{$case->{'messages'}}, {'key' => 'verifypositivenext-success', 'value' => 'false', 'html' => '<span class="fail">Failed Positive Verification (verification set in previous test case)</span>' };
+ $self->_out("Failed Positive Verification (verification set in previous test case) \n");
+ $case->{'failedcount'}++;
+ $case->{'iscritical'} = 1;
+
+ if($self->{'config'}->{'break_on_errors'}) {
+ $self->{'result'}->{'returnmessage'} = 'Failed Positive Verification (verification set in previous test case), can not find a string matching regex: '.$regex;
+ return;
+ }
+ }
+ push @{$case->{'messages'}}, { 'html' => '<br />' };
+ # set to null after verification
+ delete $self->{'verifylater'};
+ }
+
+ if($self->{'verifylaterneg'}) {
+ my $regex = $self->_fix_regex($self->{'verifylaterneg'});
+ # verify existence of string in response
+ if($response->as_string() =~ m~$regex~simx) {
+ push @{$case->{'messages'}}, {'key' => 'verifynegativenext-success', 'value' => 'false', 'html' => '<span class="fail">Failed Negative Verification (negative verification set in previous test case)</span>' };
+ $self->_out("Failed Negative Verification (negative verification set in previous test case) \n");
+ $case->{'failedcount'}++;
+ $case->{'iscritical'} = 1;
+
+ if($self->{'config'}->{'break_on_errors'}) {
+ $self->{'result'}->{'returnmessage'} = 'Failed Negative Verification (negative verification set in previous test case), found regex matched string: '.$regex;
+ return;
+ }
+ }
+ else {
+ push @{$case->{'messages'}}, {'key' => 'verifynegativenext-success', 'value' => 'true', 'html' => '<span class="pass">Passed Negative Verification (negative verification set in previous test case)</span>' };
+ $self->_out("Passed Negative Verification (negative verification set in previous test case) \n");
+ $case->{'passedcount'}++;
+ }
+ push @{$case->{'messages'}}, { 'html' => '<br />' };
+ # set to null after verification
+ delete $self->{'verifylaterneg'};
+ }
+
+ if($case->{'warning'}) {
+ $self->_out("Verify Warning Threshold: ".$case->{'warning'}."\n");
+ push @{$case->{'messages'}}, {'key' => "Warning Threshold", 'value' => $case->{''} };
+ if($case->{'latency'} > $case->{'warning'}) {
+ push @{$case->{'messages'}}, {'key' => 'warning-success', 'value' => 'false', 'html' => "<span class=\"fail\">Failed Warning Threshold:</span> ".$case->{'warning'} };
+ $self->_out("Failed Warning Threshold \n");
+ $case->{'failedcount'}++;
+ $case->{'iswarning'} = 1;
+ }
+ else {
+ $self->_out("Passed Warning Threshold \n");
+ push @{$case->{'messages'}}, {'key' => 'warning-success', 'value' => 'true', 'html' => "<span class=\"pass\">Passed Warning Threshold:</span> ".$case->{'warning'} };
+ $case->{'passedcount'}++;
+ }
+ push @{$case->{'messages'}}, { 'html' => '<br />' };
+ }
+
+ if($case->{'critical'}) {
+ $self->_out("Verify Critical Threshold: ".$case->{'critical'}."\n");
+ push @{$case->{'messages'}}, {'key' => "Critical Threshold", 'value' => $case->{''} };
+ if($case->{'latency'} > $case->{'critical'}) {
+ push @{$case->{'messages'}}, {'key' => 'critical-success', 'value' => 'false', 'html' => "<span class=\"fail\">Failed Critical Threshold:</span> ".$case->{'critical'} };
+ $self->_out("Failed Critical Threshold \n");
+ $case->{'failedcount'}++;
+ $case->{'iscritical'} = 1;
+ }
+ else {
+ $self->_out("Passed Critical Threshold \n");
+ push @{$case->{'messages'}}, {'key' => 'critical-success', 'value' => 'true', 'html' => "<span class=\"pass\">Passed Critical Threshold:</span> ".$case->{'critical'} };
+ $case->{'passedcount'}++;
+ }
+ }
+
+ return;
+}
+
+################################################################################
+# parse values from responses for use in future request (for session id's, dynamic URL rewriting, etc)
+sub _parseresponse {
+ my $self = shift;
+ my $response = shift;
+ my $case = shift;
+
+ my ( $resptoparse, @parseargs );
+ my ( $leftboundary, $rightboundary, $escape );
+
+ for my $type ( qw/parseresponse parseresponse1 parseresponse2 parseresponse3 parseresponse4 parseresponse5/ ) {
+
+ next unless $case->{$type};
+
+ @parseargs = split( /\|/mx, $case->{$type} );
+
+ $leftboundary = $parseargs[0];
+ $rightboundary = $parseargs[1];
+ $escape = $parseargs[2];
+
+ $resptoparse = $response->as_string;
+ ## no critic
+ if ( $resptoparse =~ m~$leftboundary(.*?)$rightboundary~s ) {
+ $self->{'parsedresult'}->{$type} = $1;
+ }
+ ## use critic
+ elsif(!defined $case->{'parsewarning'} or $case->{'parsewarning'}) {
+ push @{$case->{'messages'}}, {'key' => $type.'-success', 'value' => 'false', 'html' => "<span class=\"fail\">Failed Parseresult, cannot find</span> $leftboundary(.*?)$rightboundary" };
+ $self->_out("Failed Parseresult, cannot find $leftboundary(*)$rightboundary\n");
+ $case->{'iswarning'} = 1;
+ }
+
+ if ($escape) {
+ if ( $escape eq 'escape' ) {
+ $self->{'parsedresult'}->{$type} =
+ $self->_url_escape( $self->{'parsedresult'}->{$type} );
+ }
+ }
+
+ #print "\n\nParsed String: $self->{'parsedresult'}->{$type}\n\n";
+ }
+ return;
+}
+
+################################################################################
+# read config.xml
+sub _read_config_xml {
+ my $self = shift;
+ my $config_file = shift;
+
+ my($config, $comment_mode,@configlines);
+
+ # process the config file
+ # if -c option was set on command line, use specified config file
+ if(defined $config_file) {
+ open( $config, '<', $config_file )
+ or $self->_usage("ERROR: Failed to open ".$config_file." file: ".$!);
+ $self->{'config'}->{'exists'} = 1; # flag we are going to use a config file
+ }
+ # if config.xml exists, read it
+ elsif( -e "config.xml" ) {
+ open( $config, '<', "config.xml" )
+ or $self->_usage("ERROR: Failed to open config.xml file: ".$!);
+ $self->{'config'}->{'exists'} = 1; # flag we are going to use a config file
+ }
+
+ if( $self->{'config'}->{'exists'} ) { #if we have a config file, use it
+
+ my @precomment = <$config>; #read the config file into an array
+
+ #remove any commented blocks from config file
+ foreach (@precomment) {
+ unless (m~<comment>.*</comment>~mx) { # single line comment
+ # multi-line comments
+ if (/<comment>/mx) {
+ $comment_mode = 1;
+ }
+ elsif (m~</comment>~mx) {
+ $comment_mode = 0;
+ }
+ elsif ( !$comment_mode ) {
+ push( @configlines, $_ );
+ }
+ }
+ }
+ close($config);
+ }
+
+ #grab values for constants in config file:
+ foreach (@configlines) {
+
+ for my $key (
+ qw/baseurl baseurl1 baseurl2 gnuplot proxy timeout output_dir
+ globaltimeout globalhttplog standaloneplot max_redirect
+ break_on_errors useragent/
+ )
+ {
+
+ if (/<$key>/mx) {
+ $_ =~ m~<$key>(.*)</$key>~mx;
+ $self->{'config'}->{$key} = $1;
+
+ #print "\n$_ : $self->{'config'}->{$_} \n\n";
+ }
+ }
+
+ if (/<reporttype>/mx) {
+ $_ =~ m~<reporttype>(.*)</reporttype>~mx;
+ if ( $1 ne "standard" ) {
+ $self->{'config'}->{'reporttype'} = $1;
+ $self->{'config'}->{'nooutput'} = "set";
+ }
+
+ #print "\nreporttype : $self->{'config'}->{'reporttype'} \n\n";
+ }
+
+ if (/<httpauth>/mx) {
+
+ $_ =~ m~<httpauth>(.*)</httpauth>~mx;
+ $self->_set_http_auth($1);
+
+ #print "\nhttpauth : @{$self->{'config'}->{'httpauth'}} \n\n";
+ }
+
+ if(/<testcasefile>/mx) {
+ my $firstparse = $'; #print "$' \n\n";
+ $firstparse =~ m~</testcasefile>~mx;
+ my $filename = $`; #string between tags will be in $filename
+ #print "\n$filename \n\n";
+ push @{ $self->{'casefilelist'} }, $filename; #add next filename we grab to end of array
+ }
+ }
+
+ return;
+}
+
+################################################################################
+# parse and set http auth config
+sub _set_http_auth {
+ my $self = shift;
+ my $confstring = shift;
+
+ #each time we see an <httpauth>, we set @authentry to be the
+ #array of values, then we use [] to get a reference to that array
+ #and push that reference onto @httpauth.
+
+ my @authentry = split( /:/mx, $confstring );
+ if( scalar @authentry != 5 ) {
+ $self->_usage("ERROR: httpauth should have 5 fields delimited by colons, got: ".$confstring);
+ }
+ else {
+ push( @{ $self->{'config'}->{'httpauth'} }, [@authentry] );
+ }
+ # basic authentication only works with redirects enabled
+ if($self->{'config'}->{'max_redirect'} == 0) {
+ $self->{'config'}->{'max_redirect'}++;
+ }
+
+ return;
+}
+
+################################################################################
+# get test case files to run (from command line or config file) and evaluate constants
+sub _processcasefile {
+ # parse config file and grab values it sets
+ my $self = shift;
+
+ if( ( $#ARGV + 1 ) < 1 ) { #no command line args were passed
+ unless( $self->{'casefilelist'}->[0] ) {
+ if ( -e "testcases.xml" ) {
+ # if no files are specified in config.xml, default to testcases.xml
+ push @{ $self->{'casefilelist'} }, "testcases.xml";
+ }
+ else {
+ $self->_usage("ERROR: I can't find any test case files to run.\nYou must either use a config file or pass a filename "
+ . "on the command line if you are not using the default testcase file (testcases.xml).");
+ }
+ }
+ }
+
+ elsif( ( $#ARGV + 1 ) == 1 ) { # one command line arg was passed
+ # use testcase filename passed on command line (config.xml is only used for other options)
+ push @{ $self->{'casefilelist'} }, $ARGV[0]; # first commandline argument is the test case file, put this on the array for processing
+ }
+
+ elsif( ( $#ARGV + 1 ) == 2 ) { # two command line args were passed
+ my $xpath = $ARGV[1];
+ if ( $xpath =~ /\/(.*)\[/mx ) { # if the argument contains a "/" and "[", it is really an XPath
+ $xpath =~ /(.*)\/(.*)\[(.*?)\]/mx; #if it contains XPath info, just grab the file name
+ $self->{'xnode'} = $3; # grab the XPath Node value.. (from inside the "[]")
+ # print "\nXPath Node is: $self->{'xnode'} \n";
+ }
+ else {
+ $self->_usage("ERROR: Sorry, $xpath is not in the XPath format I was expecting, I'm ignoring it...");
+ }
+
+ # use testcase filename passed on command line (config.xml is only used for other options)
+ push @{ $self->{'casefilelist'} }, $ARGV[0]; # first command line argument is the test case file, put this on the array for processing
+ }
+
+ elsif ( ( $#ARGV + 1 ) > 2 ) { #too many command line args were passed
+ $self->_usage("ERROR: Too many arguments.");
+ }
+
+ #print "\ntestcase file list: @{$self->{'casefilelist'}}\n\n";
+
+ return;
+}
+
+################################################################################
+# here we do some pre-processing of the test case file and write it out to a temp file.
+# we convert certain chars so xml parser doesn't puke.
+sub _convtestcases {
+ my $self = shift;
+ my $currentcasefile = shift;
+
+ my @xmltoconvert;
+
+ my ( $fh, $tempfilename ) = tempfile();
+ my $filename = $currentcasefile;
+ open( my $xmltoconvert, '<', $filename )
+ or $self->_usage("ERROR: Failed to read test case file: ".$filename.": ".$!);
+ # read the file into an array
+ @xmltoconvert = <$xmltoconvert>;
+ my $ids = {};
+ for my $line (@xmltoconvert) {
+
+ # convert escaped chars and certain reserved chars to temporary values that the parser can handle
+ # these are converted back later in processing
+ $line =~ s/&/{AMPERSAND}/gmx;
+ $line =~ s/\\</{LESSTHAN}/gmx;
+
+ # convert variables to lowercase
+ $line =~ s/(\$\{[\w\.]+\})/\L$1\E/gmx;
+ $line =~ s/(varname=('|").*?('|"))/\L$1\E/gmx;
+
+ # count cases while we are here
+ if ( $line =~ /<case/mx ) {
+ $self->{'result'}->{'casecount'}++;
+ }
+
+ # verify id is only use once per file
+ if ( $line =~ /^\s*id\s*=\s*\"*(\d+)\"*/mx ) {
+ if(defined $ids->{$1}) {
+ $self->{'result'}->{'iswarning'} = 1;
+ $self->_out("Warning: case id $1 is used more than once!\n");
+ }
+ $ids->{$1} = 1;
+ }
+ }
+
+ close($xmltoconvert);
+
+ # open file handle to temp file
+ open( $xmltoconvert, '>', $tempfilename )
+ or $self->_usage("ERROR: Failed to write ".$tempfilename.": ".$!);
+ print $xmltoconvert @xmltoconvert; # overwrite file with converted array
+ close($xmltoconvert);
+ return $tempfilename;
+}
+
+################################################################################
+# converts replaced xml with substitutions
+sub _convertbackxml {
+ my ( $self, $string, $timestamp ) = @_;
+ return unless defined $string;
+ $string =~ s~{AMPERSAND}~&~gmx;
+ $string =~ s~{LESSTHAN}~<~gmx;
+ $string =~ s~{TIMESTAMP}~$timestamp~gmx;
+ $string =~ s~{BASEURL}~$self->{'config'}->{baseurl}~gmx;
+ $string =~ s~{BASEURL1}~$self->{'config'}->{baseurl1}~gmx;
+ $string =~ s~{BASEURL2}~$self->{'config'}->{baseurl2}~gmx;
+ return $string;
+}
+
+################################################################################
+# converts replaced xml with parsed result
+sub _convertbackxmlresult {
+ my ( $self, $string) = @_;
+ return unless defined $string;
+ $string =~ s~\{PARSEDRESULT\}~$self->{'parsedresult'}->{'parseresponse'}~gmx if defined $self->{'parsedresult'}->{'parseresponse'};
+ for my $x (1..5) {
+ $string =~ s~\{PARSEDRESULT$x\}~$self->{'parsedresult'}->{"parseresponse$x"}~gmx if defined $self->{'parsedresult'}->{"parseresponse$x"};
+ }
+ return $string;
+}
+
+################################################################################
+# escapes difficult characters with %hexvalue
+sub _url_escape {
+ my ( $self, @values ) = @_;
+
+ # LWP handles url encoding already, but use this to escape valid chars that LWP won't convert (like +)
+ my @return;
+ for my $val (@values) {
+ $val =~ s/[^-\w.,!~'()\/\ ]/uc sprintf "%%%02x", ord $&/egmx;
+ push @return, $val;
+ }
+ return wantarray ? @return : $return[0];
+}
+
+################################################################################
+# write requests and responses to http.log file
+sub _httplog {
+ my $self = shift;
+ my $request = shift;
+ my $response = shift;
+ my $case = shift;
+ my $output = '';
+
+ # http request - log setting per test case
+ if($case->{'logrequest'} && $case->{'logrequest'} =~ /yes/mxi ) {
+ $output .= $request->as_string."\n\n";
+ }
+
+ # http response - log setting per test case
+ if($case->{'logresponse'} && $case->{'logresponse'} =~ /yes/mxi ) {
+ $output .= $response->as_string."\n\n";
+ }
+
+ # global http log setting
+ if($self->{'config'}->{'globalhttplog'} && $self->{'config'}->{'globalhttplog'} =~ /yes/mxi ) {
+ $output .= $request->as_string."\n\n";
+ $output .= $response->as_string."\n\n";
+ }
+
+ # global http log setting - onfail mode
+ if($self->{'config'}->{'globalhttplog'} && $self->{'config'}->{'globalhttplog'} =~ /onfail/mxi && $case->{'iscritical'}) {
+ $output .= $request->as_string."\n\n";
+ $output .= $response->as_string."\n\n";
+ }
+
+ if($output ne '') {
+ my $file = $self->{'config'}->{'output_dir'}."http.log";
+ open( my $httplogfile, ">>", $file )
+ or $self->_usage("ERROR: Failed to write ".$file.": ".$!);
+ print $httplogfile $output;
+ print $httplogfile "\n************************* LOG SEPARATOR *************************\n\n\n";
+ close($httplogfile);
+ }
+
+ return;
+}
+
+################################################################################
+# write performance results to plot.log in the format gnuplot can use
+sub _plotlog {
+ my ( $self, $value ) = @_;
+
+ my ( %months, $date, $time, $mon, $mday, $hours, $min, $sec, $year );
+
+ # do this unless: monitor is disabled in gui, or running standalone mode without config setting to turn on plotting
+ if( ( $self->{'gui'} and $self->{'monitorenabledchkbx'} ne 'monitor_off')
+ or (!$self->{'gui'} and $self->{'config'}->{'standaloneplot'} eq 'on')
+ ) {
+
+ %months = (
+ "Jan" => 1,
+ "Feb" => 2,
+ "Mar" => 3,
+ "Apr" => 4,
+ "May" => 5,
+ "Jun" => 6,
+ "Jul" => 7,
+ "Aug" => 8,
+ "Sep" => 9,
+ "Oct" => 10,
+ "Nov" => 11,
+ "Dec" => 12
+ );
+
+ $date = scalar localtime;
+ ($mon, $mday, $hours, $min, $sec, $year) = $date =~ /\w+\ (\w+)\ +(\d+)\ (\d\d):(\d\d):(\d\d)\ (\d\d\d\d)/mx;
+ $time = "$months{$mon} $mday $hours $min $sec $year";
+
+ my $plotlog;
+ # used to clear the graph when requested
+ if( $self->{'switches'}->{'plotclear'} eq 'yes' ) {
+ # open in clobber mode so log gets truncated
+ my $file = $self->{'config'}->{'output_dir'}."plot.log";
+ open( $plotlog, '>', $file )
+ or $self->_usage("ERROR: Failed to write ".$file.": ".$!);
+ $self->{'switches'}->{'plotclear'} = 'no'; # reset the value
+ }
+ else {
+ my $file = $self->{'config'}->{'output_dir'}."plot.log";
+ open( $plotlog, '>>', $file )
+ or $self->_usage("ERROR: Failed to write ".$file.": ".$!); #open in append mode
+ }
+
+ printf $plotlog "%s %2.4f\n", $time, $value;
+ close($plotlog);
+ }
+ return;
+}
+
+################################################################################
+# create gnuplot config file
+sub _plotcfg {
+ my $self = shift;
+
+ # do this unless: monitor is disabled in gui, or running standalone mode without config setting to turn on plotting
+ if( ( $self->{'gui'} and $self->{'monitorenabledchkbx'} ne 'monitor_off')
+ or (!$self->{'gui'} and $self->{'config'}->{'standaloneplot'} eq 'on')
+ ) {
+ my $file = $self->{'config'}->{'output_dir'}."plot.plt";
+ open( my $gnuplotplt, ">", $file )
+ or _usage("ERROR: Could not open ".$file.": ".$!);
+ print $gnuplotplt qq|
+set term png
+set output \"$self->{'config'}->{'output_dir'}plot.png\"
+set size 1.1,0.5
+set pointsize .5
+set xdata time
+set ylabel \"Response Time (seconds)\"
+set yrange [0:]
+set bmargin 2
+set tmargin 2
+set timefmt \"%m %d %H %M %S %Y\"
+plot \"$self->{'config'}->{'output_dir'}plot.log\" using 1:7 title \"Response Times" w $self->{'config'}->{'graphtype'}
+|;
+ close($gnuplotplt);
+
+ }
+ return;
+}
+
+################################################################################
+# do ending tasks
+sub _finaltasks {
+ my $self = shift;
+
+ if ( $self->{'gui'} ) { $self->_gui_stop(); }
+
+ # we suppress most logging when running in a plugin mode
+ if($self->{'config'}->{'reporttype'} eq 'standard') {
+ # write summary and closing tags for results file
+ $self->_write_result_html();
+
+ #write summary and closing tags for XML results file
+ $self->_write_result_xml();
+ }
+
+ # write summary and closing tags for STDOUT
+ $self->_writefinalstdout();
+
+ #plugin modes
+ if($self->{'config'}->{'reporttype'} ne 'standard') {
+ # return value is set which corresponds to a monitoring program
+ # Nagios plugin compatibility
+ if($self->{'config'}->{'reporttype'} =~ /^nagios/mx) {
+ # nagios perf data has following format
+ # 'label'=value[UOM];[warn];[crit];[min];[max]
+ my $crit = 0;
+ if(defined $self->{'config'}->{globaltimeout}) {
+ $crit = $self->{'config'}->{globaltimeout};
+ }
+ my $lastid = 0;
+ my $perfdata = '|time='.$self->{'result'}->{'totalruntime'}.'s;0;'.$crit.';0;0';
+ for my $file (@{$self->{'result'}->{'files'}}) {
+ for my $case (@{$file->{'cases'}}) {
+ my $warn = $case->{'warning'} || 0;
+ my $crit = $case->{'critical'} || 0;
+ my $label = $case->{'label'} || 'case'.$case->{'id'};
+ $perfdata .= ' '.$label.'='.$case->{'latency'}.'s;'.$warn.';'.$crit.';0;0';
+ $lastid = $case->{'id'};
+ }
+ }
+ # report performance data for missed cases too
+ for my $nr (1..($self->{'result'}->{'casecount'} - $self->{'result'}->{'totalruncount'})) {
+ $lastid++;
+ my $label = 'case'.$lastid;
+ $perfdata .= ' '.$label.'=0s;0;0;0;0';
+ }
+
+ my($rc,$message);
+ if($self->{'result'}->{'iscritical'}) {
+ $message = "WebInject CRITICAL - ".$self->{'result'}->{'returnmessage'};
+ $rc = $self->{'exit_codes'}->{'CRITICAL'};
+ }
+ elsif($self->{'result'}->{'iswarning'}) {
+ $message = "WebInject WARNING - ".$self->{'result'}->{'returnmessage'};
+ $rc = $self->{'exit_codes'}->{'WARNING'};
+ }
+ elsif( $self->{'config'}->{globaltimeout} && $self->{'result'}->{'totalruntime'} > $self->{'config'}->{globaltimeout} ) {
+ $message = "WebInject WARNING - All tests passed successfully but global timeout (".$self->{'config'}->{globaltimeout}." seconds) has been reached";
+ $rc = $self->{'exit_codes'}->{'WARNING'};
+ }
+ else {
+ $message = "WebInject OK - All tests passed successfully in ".$self->{'result'}->{'totalruntime'}." seconds";
+ $rc = $self->{'exit_codes'}->{'OK'};
+ }
+
+ if($self->{'result'}->{'iscritical'} or $self->{'result'}->{'iswarning'}) {
+ $message .= "\n".$self->{'out'};
+ $message =~ s/^\-+$//mx;
+ }
+ if($self->{'config'}->{'reporttype'} eq 'nagios2') {
+ $message =~ s/\n/<br>/mxg;
+ }
+ print $message.$perfdata."\n";
+
+ $self->{'result'}->{'perfdata'} = $perfdata;
+ return $rc;
+ }
+
+ #MRTG plugin compatibility
+ elsif( $self->{'config'}->{'reporttype'} eq 'mrtg' )
+ { #report results in MRTG format
+ if( $self->{'result'}->{'totalcasesfailedcount'} > 0 ) {
+ print "$self->{'result'}->{'totalruntime'}\n$self->{'result'}->{'totalruntime'}\n\nWebInject CRITICAL - $self->{'result'}->{'returnmessage'} \n";
+ }
+ else {
+ print "$self->{'result'}->{'totalruntime'}\n$self->{'result'}->{'totalruntime'}\n\nWebInject OK - All tests passed successfully in $self->{'result'}->{'totalruntime'} seconds \n";
+ }
+ }
+
+ #External plugin. To use it, add something like that in the config file:
+ # <reporttype>external:/home/webinject/Plugin.pm</reporttype>
+ elsif ( $self->{'config'}->{'reporttype'} =~ /^external:(.*)/mx ) {
+ our $webinject = $self; # set scope of $self to global, so it can be access in the external module
+ unless( my $return = do $1 ) {
+ croak "couldn't parse $1: $@\n" if $@;
+ croak "couldn't do $1: $!\n" unless defined $return;
+ croak "couldn't run $1\n" unless $return;
+ }
+ }
+
+ else {
+ $self->_usage("ERROR: only 'nagios', 'nagios2', 'mrtg', 'external', or 'standard' are supported reporttype values");
+ }
+
+ }
+
+ return 1 if $self->{'result'}->{'totalcasesfailedcount'} > 0;
+ return 0;
+}
+
+################################################################################
+# delete any files leftover from previous run if they exist
+sub _whackoldfiles {
+ my $self = shift;
+
+ for my $file (qw/plot.log plot.plt plot.png/) {
+ unlink $self->{'config'}->{'output_dir'}.$file if -e $self->{'config'}->{'output_dir'}.$file;
+ }
+
+ # verify files are deleted, if not give the filesystem time to delete them before continuing
+ while (-e $self->{'config'}->{'output_dir'}."plot.log"
+ or -e $self->{'config'}->{'output_dir'}."plot.plt"
+ or -e $self->{'config'}->{'output_dir'}."plot.png"
+ ) {
+ sleep .5;
+ }
+ return;
+}
+
+################################################################################
+# call the external plotter to create a graph (if we are in the appropriate mode)
+sub _plotit {
+ my $self = shift;
+
+ # do this unless: monitor is disabled in gui, or running standalone mode without config setting to turn on plotting
+ if( ( $self->{'gui'} and $self->{'monitorenabledchkbx'} ne 'monitor_off')
+ or (!$self->{'gui'} and $self->{'config'}->{'standaloneplot'} eq 'on')
+ ) {
+ # do this unless its being called from the gui with No Graph set
+ unless ( $self->{'config'}->{'graphtype'} eq 'nograph' )
+ {
+ my $gnuplot;
+ if(defined $self->{'config'}->{gnuplot}) {
+ $gnuplot = $self->{'config'}->{gnuplot}
+ }
+ elsif($^O eq 'MSWin32') {
+ $gnuplot = "./wgnupl32.exe";
+ } else {
+ $gnuplot = "/usr/bin/gnuplot";
+ }
+
+ # if gnuplot exists
+ if( -e $gnuplot ) {
+ system $gnuplot, $self->{'config'}->{output_dir}."plot.plt"; # plot it
+ }
+ elsif( $self->{'gui'} ) {
+ # if gnuplot not specified, notify on gui
+ $self->_gui_no_plotter_found();
+ }
+ }
+ }
+ return;
+}
+
+################################################################################
+# fix a user supplied regex to make it compliant with mx options
+sub _fix_regex {
+ my $self = shift;
+ my $regex = shift;
+
+ $regex =~ s/\\\ / /mx;
+ $regex =~ s/\ /\\ /gmx;
+
+ return $regex;
+}
+
+################################################################################
+# command line options
+sub _getoptions {
+ my $self = shift;
+
+ my( @sets, $opt_version, $opt_help, $opt_configfile );
+ Getopt::Long::Configure('bundling');
+ my $opt_rc = GetOptions(
+ 'h|help' => \$opt_help,
+ 'v|V|version' => \$opt_version,
+ 'c|config=s' => \$opt_configfile,
+ 'o|output=s' => \$self->{'config'}->{'output_dir'},
+ 'n|no-output' => \$self->{'config'}->{'nooutput'},
+ 'r|report-type=s' => \$self->{'config'}->{'reporttype'},
+ 't|timeout=i' => \$self->{'config'}->{'timeout'},
+ 's=s' => \@sets,
+ );
+ if(!$opt_rc or $opt_help) {
+ $self->_usage();
+ }
+ if($opt_version) {
+ print "WebInject version $Webinject::VERSION\nFor more info: http://www.webinject.org\n";
+ exit 3;
+ }
+ $self->_read_config_xml($opt_configfile);
+ for my $set (@sets) {
+ my ( $key, $val ) = split /=/mx, $set, 2;
+ if($key eq 'httpauth') {
+ $self->_set_http_auth($val);
+ } else {
+ $self->{'config'}->{ lc $key } = $val;
+ }
+ }
+ return;
+}
+
+################################################################################
+# _out - print text to STDOUT and save it for later retrieval
+sub _out {
+ my $self = shift;
+ my $text = shift;
+ if($self->{'config'}->{'reporttype'} !~ /^nagios/mx and !$self->{'config'}->{'nooutput'}) {
+ print $text;
+ }
+ $self->{'out'} .= $text;
+ return;
+}
+
+################################################################################
+# print usage
+sub _usage {
+ my $self = shift;
+ my $text = shift;
+
+ print $text."\n\n" if defined $text;
+
+ print <<EOB;
+ Usage:
+ $0
+ [-c|--config config_file]
+ [-o|--output output_location]
+ [-n|--no-output]
+ [-t|--timeout]
+ [-r|--report-type]
+ [-s key=value]
+ [testcase_file [XPath]]
+ $0 --version|-v
+EOB
+ exit 3;
+}
+
+################################################################################
+# make sure we don't keep the cookie temp file
+END {
+ our $cookietempfilename;
+ unlink($cookietempfilename) if $cookietempfilename;
+}
+
+=head1 EXAMPLES
+
+=head2 example test case
+
+ <testcases>
+ <case
+ id = "1"
+ description1 = "Sample Test Case"
+ method = "get"
+ url = "{BASEURL}/test.jsp"
+ verifypositive = "All tests succeded"
+ warning = "5"
+ critical = "15"
+ label = "testpage"
+ errormessage = "got error: {PARSERESPONSE}"
+ />
+ </testcases>
+
+detailed description about the syntax of testcases can be found on the Webinject homepage.
+
+
+=head1 SEE ALSO
+
+For more information about webinject visit http://www.webinject.org
+
+=head1 AUTHOR
+
+Corey Goldberg, E<lt>corey@goldb.orgE<gt>
+
+Sven Nierlein, E<lt>nierlein@cpan.orgE<gt>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2010 by Sven Nierlein
+
+Copyright (C) 2004-2006 by Corey Goldberg
+
+This library is free software; you can redistribute it under the GPL2 license.
+
+=cut
+
+1;
+#!/usr/bin/env perl
+
+# Copyright 2010 Sven Nierlein (nierlein@cpan.org)
+# Copyright 2004-2006 Corey Goldberg (corey@goldb.org)
+#
+# This file is part of WebInject.
+#
+# WebInject is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# WebInject is distributed in the hope that it will be useful,
+# but without any warranty; without even the implied warranty of
+# merchantability or fitness for a particular purpose. See the
+# GNU General Public License for more details.
+
+
+use warnings;
+use strict;
+
+my $webinject = Webinject->new(reporttype => "nagios", timeout => 30, break_on_errors => 1);
+my $rc = $webinject->engine();
+exit $rc;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/control
new file mode 100644
index 0000000..99a5c97
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/control
@@ -0,0 +1,11 @@
+Homepage: http://labs.consol.de/lang/en/nagios/check_webinject/
+Watch: http://labs.consol.de/lang/en/nagios/check_webinject/ check_webinject-([0-9.]+)\.tar\.gz
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Recommends: libwebinject-perl
+Description: plugin for testing web services
+ It uses the WebInject Perl module for automated testing of
+ web applications and web services. It can be used to check
+ individual system components that have HTTP interfaces
+ (JSP, ASP, CGI, PHP, AJAX, Servlets, HTML Forms,
+ XML/SOAP Web Services, REST, etc).
+Version: 1.80
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/copyright
new file mode 100644
index 0000000..2837250
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/copyright
@@ -0,0 +1,15 @@
+Copyright 2010 Sven Nierlein (nierlein@cpan.org)
+Copyright 2004-2006 Corey Goldberg (corey@goldb.org)
+
+This file is part of WebInject.
+
+WebInject is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+WebInject is distributed in the hope that it will be useful,
+but without any warranty; without even the implied warranty of
+merchantability or fitness for a particular purpose. See the
+GNU General Public License for more details.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/webinject.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/webinject.cfg
new file mode 100644
index 0000000..f02139e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_webinject/webinject.cfg
@@ -0,0 +1,12 @@
+# 'check_webinject' command definition
+define command{
+ command_name check_webinject
+ command_line /usr/lib/nagios/plugins/check_webinject '$ARG1$'
+}
+
+
+# 'check_webinject' command definition
+define command{
+ command_name check_webinject_baseurl
+ command_line /usr/lib/nagios/plugins/check_webinject -s 'baseurl=$ARG1$' '$ARG2$'
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/Makefile
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/Makefile
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/check_whois b/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/check_whois
new file mode 100644
index 0000000..4627d8b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/check_whois
@@ -0,0 +1,301 @@
+#!/usr/bin/perl
+# nagios: -epn
+
+# $Id: check_whois,v 1.24 2018/05/01 17:31:04 wessels Exp $
+#
+# check_whois
+#
+# nagios plugin to check the expiration date of a domain.
+
+# Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# Neither the name of The Measurement Factory nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+# usage
+#
+# define command {
+# command_name check-whois
+# command_line /usr/local/libexec/nagios-local/check_whois $HOSTADDRESS$
+# }
+#
+# define service {
+# name whois-service
+# check_command check-whois
+# ...
+# }
+#
+# define host {
+# use dns-zone
+# host_name zone.example.com
+# alias ZONE example.com
+# }
+#
+# define service {
+# use whois-service
+# host_name zone.example.com
+# }
+
+# AUTHORS and CONTRIBUTORS:
+# Duane Wessels
+# Matt Christian
+# John Lines
+
+use strict;
+use warnings;
+
+use Getopt::Std;
+use Date::Manip;
+use POSIX qw(strftime);
+use Env '@PATH';
+
+my %opts;
+getopts('xds:', \%opts);
+
+my $string_found = 0;
+
+my $name = shift or die usage();
+$name =~ s/^zone\.//;
+my $whoiscmd = findwhois();
+print STDERR "$0 version ". '$Id: check_whois,v 1.24 2018/05/01 17:31:04 wessels Exp $'. "\n" if $opts{d};
+print STDERR "Whois command = $whoiscmd\n" if $opts{d};
+grok($whoiscmd, $name);
+exit 0;
+
+sub findwhois {
+ # List of whois commands to find (in order)
+ my @whoiscmds = qw( jwhois whois );
+ foreach my $wc (@whoiscmds) {
+ if (grep { -x "$_/$wc" } @PATH) {
+ $wc .= ' -n ' if ($wc eq 'jwhois');
+ return $wc;
+ }
+ }
+ die "Could not find a whois command!\n";
+}
+
+#
+# the ~ 2013-14-15 era New GTLDs have whois servers at whois.nic.$tld
+# and they are slow to be configured in either whois clients or the
+# whois-servers.net zone.
+#
+sub findnewgtldwhois($) {
+ my $name = shift;
+ my @x = split /\./, $name;
+ my $tld = pop @x;
+ my $whois = "whois.nic.$tld";
+ return gethostbyname($whois) ? $whois : undef;
+}
+
+sub not_in_whois($) {
+ my $line = shift;
+ return 1 if $line =~ /^no match for/;
+ return 1 if $line =~ /^not found/;
+ return 0;
+}
+
+sub grok {
+ my $whoiscmd = shift || die;
+ my $name = shift || die;
+ my $arg = $name;
+ if ($name =~ /\.name$/) {
+ # In order to get useful information out of
+ # the .NAME whois server, the query must
+ # be reformatted
+ $arg = "'domain = $name'";
+ }
+ open (CMD, "$whoiscmd $arg|") || die;
+ my $registrar = undef;
+ my $whoisservice = undef;
+ my $expires = undef;
+ my $status = '';
+ my $state = 0;
+ my $lineno = 0;
+ print STDERR "checking $name\n" if $opts{d};
+ while (<CMD>) {
+ $lineno++;
+ tr/A-Z/a-z/;
+ print STDERR "# $_" if $opts{d};
+ if ($lineno == 1 && not_in_whois($_)) {
+ critical("$name not found in whois");
+ }
+ $registrar = $1 if (/registrar:\s*(\S.*)/);
+ if (!defined($registrar)) {
+ $registrar = $1 if (/registrar id:\s*(\S.*)/);
+ $registrar = $1 if (/registrar handle\.*:\s*(\S.*)/);
+ $registrar = $1 if (/\s+(.*)\s*\[tag\s*=.*\]/);
+ #
+ # CIRA whois output
+ if ($name =~ /\.ca$/ && /^registrar:/) {
+ $_ = <CMD>;
+ tr/A-Z/a-z/;
+ $registrar = $1 if (/name:\s+(.*)/);
+ }
+ }
+
+ if (!defined($whoisservice)) {
+ $whoisservice = $1 if (/the\s+(\w+)\s+whois\s+database/);
+ $whoisservice = $1 if (/^\s+(\w+)\s+whois\s+service/);
+ $whoisservice = $1 if (/record\s+maintained\s+by:\s+(\S.*)/);
+ }
+
+ if (/expiration date:\s*(\d\d-\w\w\w-\d\d\d\d)/) {
+ $expires = $1;
+ } elsif (/(record )?(will )?expires? on[ :](\S.*\S)\.?$/) {
+ $expires = $3;
+ } elsif (/expires:\s+([-\w\s]+)/) {
+ $expires = $1;
+ } elsif (/(domain )?expiration date:\s+(\S.*\S)/) {
+ $expires = $2;
+ } elsif ($name =~ /\.gov\.uk$/ && /renewal date:/) {
+ chomp($_ = <CMD>);
+ tr/A-Z/a-z/;
+ $expires = $_;
+ } elsif (/(expiry|renewal) date:\s+(\S.*\S)/) {
+ $expires = $2;
+ }
+
+ if (defined $opts{s}) {
+ $string_found = 1 if (/$opts{s}/i);
+ }
+ }
+ close(CMD);
+ printf STDERR "Line %d: expires='%s'\n", __LINE__, $expires if $opts{d};
+
+ # Remove any leading/trailing whitespace
+ #
+ $expires =~ s/^\s+// if defined $expires;
+ $expires =~ s/\s+$// if defined $expires;
+
+ # Remove any trailing dot from the expire time
+ #
+ $expires =~ s/\.$// if defined $expires;
+ printf STDERR "Line %d: expires='%s'\n", __LINE__, $expires if $opts{d};
+
+ if (defined $registrar) {
+ $registrar = 'gandi' if ($registrar eq 'r42-lror');
+ $registrar = 'go daddy' if ($registrar =~ /go daddy/);
+ $registrar = 'go daddy' if ($registrar eq 'r91-lror');
+ } elsif (defined $whoisservice) {
+ $registrar = $whoisservice . ' whois service';
+ } elsif ((my $newgltdwhois = findnewgtldwhois($name)) && $whoiscmd !~ / -h /) {
+ print STDERR "retrying with -h $newgltdwhois\n" if $opts{d};
+ $whoiscmd .= " -h $newgltdwhois";
+ grok($whoiscmd, $name);
+ return;
+ } elsif (defined $opts{x}) {
+ $registrar = 'UNKNOWN';
+ } else {
+ critical("Didn't find Registrar");
+ }
+
+ # Date::Manip doesn't like the DD-MM-YYYY format, so we reformat it
+ # as YYYY-MM-DD. Also month might not be numeric.
+ #
+ if ($expires =~ /-\w+-\d\d\d\d$/) {
+ my @p = split(/-/, $expires);
+ if ($p[1] =~ /^[a-zA-Z]+$/ || $p[0] > 12) {
+ # DD-MM-YYYY
+ $expires = join('-', $p[2], $p[1], $p[0]);
+ } elsif ($p[0] =~ /^[a-zA-Z]+$/ || $p[1] > 12) {
+ # MM-DD-YYYY
+ $expires = join('-', $p[2], $p[0], $p[1]);
+ } else {
+ # Unknown, assume DD-MM-YYYY
+ $expires = join('-', $p[2], $p[1], $p[0]);
+ }
+ }
+ printf STDERR "Line %d: expires='%s'\n", __LINE__, $expires if $opts{d};
+
+ # Network Solutions has a bug in their whois output, returning dates like this:
+ # Registrar Registration Expiration Date: Fri Jul 21 00:00:00 EDT 2023T00:00:00Z
+ #
+ if ($expires =~ /[a-z]{3} ([a-z]{3}) (\d\d) 00:00:00 \S+ (\d\d\d\d)T/i) {
+ $expires = join('-', $2,$1,$3);
+ }
+ printf STDERR "Line %d: expires='%s'\n", __LINE__, $expires if $opts{d};
+
+ # Name.com returns dates like this: 2018-12-13T21:27:28-07:00Z
+ # Just remove the timezone offset and call it good enough
+ #
+ if ($expires =~ /(\d{4}-\d\d-\d\dt\d\d:\d\d:\d\d)-\d\d:\d\dz/i) {
+ $expires = $1;
+ }
+ printf STDERR "Line %d: expires='%s'\n", __LINE__, $expires if $opts{d};
+
+ my $t;
+ if (defined $expires) {
+ $expires =~ s/-t/ /i;
+ $expires =~ s/z$//i;
+ printf STDERR "Line %d: expires='%s'\n", __LINE__, $expires if $opts{d};
+ $t = UnixDate($expires, "%s");
+ critical("Invalid expiration time '$expires'") unless defined $t;
+ critical("Invalid expiration time '$expires' (t=$t)") if ($t < 0);
+ $expires = strftime("%Y-%m-%d", localtime($t));
+ } elsif (defined $opts{x}) {
+ $t = time + (86400 * 90);
+ $expires = 'UNKNOWN';
+ } else {
+ critical("Didn't find expiration timestamp");
+ }
+
+ if (defined $opts{s} && 0 == $string_found) {
+ critical ("String '$opts{s}' not found in whois output");
+ }
+
+ my $tense = $t < time ? 'd' : 's';
+ critical("Expire$tense $expires at $registrar") if ($t - time < (86400*7));
+ warning ("Expire$tense $expires at $registrar") if ($t - time < (86400*28));
+ success ("Expires $expires at $registrar");
+}
+
+sub success {
+ output('OK', shift);
+ exit(0);
+}
+
+sub warning {
+ output('WARNING', shift);
+ exit(1);
+}
+
+sub critical {
+ output('CRITICAL', shift);
+ exit(2);
+}
+
+sub output {
+ my $state = shift;
+ my $msg = shift;
+ printf "WHOIS %s: %s\n", $state, $msg;
+}
+
+sub usage {
+ "usage: $0 [-xd] [-s string] domain\n".
+ "\t-d\tDebugging\n".
+ "\t-x\tDon't complain if Registrar cannot be determined.\n".
+ "\t-s str\tRequire that the string 'str' appear in the whois output\n";
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/control
new file mode 100644
index 0000000..31f1b88
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/control
@@ -0,0 +1,9 @@
+Homepage: http://dns.measurement-factory.com/tools/nagios-plugins/check_whois.html
+Watch: http://dns.measurement-factory.com/tools/nagios-plugins/src/check_whois Id: check_whois,v ([0-9.]+)
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to check for the expiration of a domain.
+ The plugin may not yet work with all registrars, since their
+ output formats differ or there is no expiration date in the
+ whois output.
+Recommends: libdate-manip-perl
+Version: 1.24
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/copyright
new file mode 100644
index 0000000..fab5e90
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/copyright
@@ -0,0 +1,27 @@
+Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+Neither the name of The Measurement Factory nor the names of its
+contributors may be used to endorse or promote products derived
+from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/whois.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/whois.cfg
new file mode 100644
index 0000000..3f49e6b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_whois/whois.cfg
@@ -0,0 +1,4 @@
+define command {
+ command_name check_whois
+ command_line /usr/lib/nagios/plugins/check_whois $HOSTADDRESS$
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/Makefile
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/Makefile
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/check_zone_auth b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/check_zone_auth
new file mode 100644
index 0000000..372a2be
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/check_zone_auth
@@ -0,0 +1,324 @@
+#!/usr/bin/perl
+
+# $Id: check_zone_auth,v 1.13 2010/07/23 15:54:08 wessels Exp $
+#
+# check_zone_auth
+#
+# nagios plugin to check that all authoritative nameservers for a zone
+# have the same NS RRset and the same serial number.
+#
+# Can also check that the NS RRset is equal to specific nameservers
+# passed on the command line.
+
+
+# Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# Neither the name of The Measurement Factory nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+# USAGE
+#
+# define command {
+# command_name check-zone-auth
+# command_line /usr/local/libexec/nagios-local/check_zone_auth -Z $HOSTADDRESS$
+# }
+#
+# define service {
+# name dns-auth-service
+# check_command check-zone-auth
+# ...
+# }
+#
+# define host {
+# use dns-zone
+# host_name zone.example.com
+# alias ZONE example.com
+# }
+#
+# define service {
+# use dns-auth-service
+# host_name zone.example.com
+# }
+
+# CONTRIBUTORS:
+#
+# Matt Christian
+
+use warnings;
+use strict;
+
+use Getopt::Std;
+use Net::DNS::Resolver;
+use Net::DNS::Resolver::Recurse;
+use Time::HiRes qw ( gettimeofday tv_interval);
+use List::Util qw ( shuffle );
+
+use vars qw( %opts @refs $zone $expected_ns_rrset $data $start $stop );
+getopts('Z:N:d', \%opts);
+usage() unless $opts{Z};
+usage() if $opts{h};
+$zone = $opts{Z};
+$zone =~ s/^zone\.//;
+$expected_ns_rrset = $opts{N} ? join(',', sort split(',', lc($opts{N}))) : undef;
+
+@refs = qw (
+a.root-servers.net
+b.root-servers.net
+c.root-servers.net
+d.root-servers.net
+e.root-servers.net
+f.root-servers.net
+g.root-servers.net
+h.root-servers.net
+i.root-servers.net
+j.root-servers.net
+k.root-servers.net
+l.root-servers.net
+m.root-servers.net
+);
+
+$start = [gettimeofday()];
+do_recursion();
+do_queries();
+$stop = [gettimeofday()];
+do_analyze();
+
+sub do_recursion {
+ my $done = 0;
+ my $res = Net::DNS::Resolver->new;
+ do {
+ print STDERR "\nRECURSE\n" if $opts{d};
+ my $pkt;
+ foreach my $ns (shuffle @refs) {
+ print STDERR "sending query for $zone SOA to $ns\n" if $opts{d};
+ $res->nameserver($ns);
+ $res->udp_timeout(5);
+ $pkt = $res->send($zone, 'SOA');
+ last if $pkt;
+ }
+ critical("No response to seed query") unless $pkt;
+ critical($pkt->header->rcode . " from " . $pkt->answerfrom)
+ unless ($pkt->header->rcode eq 'NOERROR');
+ add_nslist_to_data($pkt);
+ @refs = ();
+ foreach my $rr ($pkt->authority) {
+ next unless ($rr->type eq 'NS');
+ print STDERR $rr->string, "\n" if $opts{d};
+ push (@refs, $rr->nsdname);
+ next unless names_equal($rr->name, $zone);
+ $done = 1;
+ }
+ } while (! $done);
+}
+
+
+sub do_queries {
+#
+# Net::DNS::Resolver::Recurse has some less-than-desirable
+# properties. For one it seems to generate many more queries
+# than necessary. Also it seems to have a tough time when
+# IPv6 is involved. For now this is disabled in favor
+# of a custom, simple recursor
+#
+# my $recres = Net::DNS::Resolver::Recurse->new;
+# $recres->recursion_callback(sub {
+# my $p = shift;
+# #
+# # This debugging below is commented out because it
+# # generates a 'Variable "%opts" may be unavailable'
+# # warning when ePN (embedded perl nagios) is in use.
+# #
+# #print STDERR $p->string if $opts{d};
+# add_nslist_to_data($p);
+# });
+# my $seed = $recres->query_dorecursion($zone, 'SOA');
+# critical("No response to seed query") unless $seed;
+# $recres = undef;
+#
+# critical($seed->header->rcode . " from " . $seed->answerfrom)
+# unless ($seed->header->rcode eq 'NOERROR');
+# print STDERR $seed->string if $opts{d};
+# add_nslist_to_data($seed);
+
+ my $n;
+ do {
+ $n = 0;
+ foreach my $ns (keys %$data) {
+ next if $data->{$ns}->{done};
+ print STDERR "\nQUERY $ns\n" if $opts{d};
+
+ my $pkt = send_query($zone, 'SOA', $ns);
+ add_nslist_to_data($pkt);
+ $data->{$ns}->{queries}->{SOA} = $pkt;
+
+ if ($pkt && $pkt->header->nscount == 0) {
+ my $ns_pkt = send_query($zone, 'NS', $ns);
+ add_nslist_to_data($ns_pkt);
+ $data->{$ns}->{queries}->{NS} = $ns_pkt;
+ }
+
+ print STDERR "done with $ns\n" if $opts{d};
+ $data->{$ns}->{done} = 1;
+ $n++;
+ }
+ } while ($n);
+}
+
+sub do_analyze {
+ my $maxserial = 0;
+ my $nscount = 0;
+ foreach my $ns (keys %$data) {
+ print STDERR "\nANALYZE $ns\n" if $opts{d};
+ my $soa_pkt = $data->{$ns}->{queries}->{SOA};
+ critical("No response from $ns") unless $soa_pkt;
+ print STDERR $soa_pkt->string if $opts{d};
+ critical($soa_pkt->header->rcode . " from $ns")
+ unless ($soa_pkt->header->rcode eq 'NOERROR');
+ critical("$ns is lame") unless $soa_pkt->header->ancount;
+ my $serial = soa_serial($soa_pkt);
+ $maxserial = $serial if ($serial > $maxserial);
+ $nscount++;
+ }
+ warning("No nameservers found. Is '$zone' a zone?") if ($nscount < 1);
+ warning("Only one auth NS") if ($nscount < 2);
+ if ($expected_ns_rrset) {
+ my $got_ns_rrset = join(',', sort keys %$data);
+ critical("Unexpected NS RRset: $got_ns_rrset")
+ unless $expected_ns_rrset eq $got_ns_rrset;
+ }
+ foreach my $ns (keys %$data) {
+ my $soa_pkt = $data->{$ns}->{queries}->{SOA};
+ my $ns_pkt = $data->{$ns}->{queries}->{NS};
+
+ # see if this nameserver lists all nameservers
+ #
+ my %all_ns;
+ foreach my $data_ns (keys %$data) { $all_ns{$data_ns} = 1; }
+ foreach my $soa_ns (get_nslist($soa_pkt)) { delete $all_ns{$soa_ns}; }
+ foreach my $ns_ns (get_nslist($ns_pkt)) { delete $all_ns{$ns_ns}; }
+ if (keys %all_ns) {
+ warning("$ns does not include " .
+ join(',', keys %all_ns) .
+ " in NS RRset");
+ }
+
+ warning("$ns claims is it not authoritative") unless $soa_pkt->header->aa;
+
+ my $serial = soa_serial($soa_pkt);
+ warning("$ns serial ($serial) is less than the maximum ($maxserial)") if ($serial < $maxserial);
+ }
+ success("$nscount nameservers, serial $maxserial");
+}
+
+sub add_nslist_to_data {
+ my $pkt = shift;
+ foreach my $ns (get_nslist($pkt)) {
+ print STDERR "adding NS $ns\n" if $opts{d};
+ $data->{$ns}->{done} |= 0;
+ }
+}
+
+sub soa_serial {
+ my $pkt = shift;
+ foreach my $rr ($pkt->answer) {
+ next unless ($rr->type eq 'SOA');
+ next unless ($rr->name eq $zone);
+ return $rr->serial;
+ }
+ return 0;
+}
+
+sub success {
+ output('OK', shift);
+ exit(0);
+}
+
+sub warning {
+ output('WARNING', shift);
+ exit(1);
+}
+
+sub critical {
+ output('CRITICAL', shift);
+ exit(2);
+}
+
+sub output {
+ my $state = shift;
+ my $msg = shift;
+ $stop = [gettimeofday()] unless $stop;
+ my $latency = tv_interval($start, $stop);
+ printf "ZONE %s: %s; (%.2fs) |time=%.6fs;;;0.000000\n",
+ $state,
+ $msg,
+ $latency,
+ $latency;
+}
+
+sub usage {
+ print STDERR "usage: $0 -Z zone [-N ns1,ns2,ns3]\n";
+ print STDERR "\t-Z specifies the zone to test\n";
+ print STDERR "\t-N optionally specifies the expected NS RRset\n";
+ exit 3;
+}
+
+sub send_query {
+ my $qname = shift;
+ my $qtype = shift;
+ my $server = shift;
+ my $res = Net::DNS::Resolver->new;
+ $res->nameserver($server) if $server;
+ return $res->send($qname, $qtype);
+}
+
+sub get_nslist {
+ my $pkt = shift;
+ return () unless $pkt;
+ my @nslist = ();
+ foreach my $rr ($pkt->authority) {
+ next unless ($rr->type eq 'NS');
+ next unless names_equal($rr->name, $zone);
+ push(@nslist, lc($rr->nsdname));
+ }
+ return @nslist if @nslist;
+ #
+ # look for NS records in answer section too
+ #
+ foreach my $rr ($pkt->answer) {
+ next unless ($rr->type eq 'NS');
+ next unless names_equal($rr->name, $zone);
+ push(@nslist, lc($rr->nsdname));
+ }
+ return @nslist;
+}
+
+sub names_equal {
+ my $a = shift;
+ my $b = shift;
+ $a =~ s/\.$//;
+ $b =~ s/\.$//;
+ lc($a) eq lc($b);
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/control
new file mode 100644
index 0000000..08a842d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/control
@@ -0,0 +1,7 @@
+Homepage: http://dns.measurement-factory.com/tools/nagios-plugins/check_zone_auth.html
+Watch: http://dns.measurement-factory.com/tools/nagios-plugins/src/check_zone_auth Id: check_zone_auth,v ([0-9.]+)
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to ensure that the authoritative nameservers
+ for a given zone remain in sync.
+Recommends: libnet-dns-perl
+Version: 1.13
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/copyright
new file mode 100644
index 0000000..fab5e90
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/copyright
@@ -0,0 +1,27 @@
+Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+Neither the name of The Measurement Factory nor the names of its
+contributors may be used to endorse or promote products derived
+from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/zone_auth.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/zone_auth.cfg
new file mode 100644
index 0000000..d947dcf
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_auth/zone_auth.cfg
@@ -0,0 +1,4 @@
+define command {
+ command_name check_zone_auth
+ command_line /usr/lib/nagios/plugins/check_zone_auth -Z $HOSTADDRESS$
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/Makefile
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/Makefile
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/check_zone_rrsig_expiration b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/check_zone_rrsig_expiration
new file mode 100644
index 0000000..bed0455
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/check_zone_rrsig_expiration
@@ -0,0 +1,313 @@
+#!/usr/bin/perl
+
+# $Id: check_zone_rrsig_expiration,v 1.14 2015/10/12 16:54:20 wessels Exp $
+#
+# check_zone_rrsig_expiration
+#
+# nagios plugin to check expiration times of RRSIG records. Reminds
+# you if its time to re-sign your zone.
+
+# Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# Neither the name of The Measurement Factory nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+# usage
+#
+# define command {
+# command_name check-zone-rrsig
+# command_line /usr/local/libexec/nagios-local/check_zone_rrsig -Z $HOSTADDRESS$
+# }
+#
+# define service {
+# name dns-rrsig-service
+# check_command check-zone-rrsig
+# ...
+# }
+#
+# define host {
+# use dns-zone
+# host_name zone.example.com
+# alias ZONE example.com
+# }
+#
+# define service {
+# use dns-rrsig-service
+# host_name zone.example.com
+# }
+
+use warnings;
+use strict;
+
+use Getopt::Std;
+use Net::DNS::Resolver;
+use Time::HiRes qw ( gettimeofday tv_interval);
+use Time::Local;
+use List::Util qw ( shuffle );
+
+# options
+# -Z zone Zone to test
+# -t seconds DNS query timeout
+# -d debug
+# -C days Critical if expiring in this many days
+# -W days Warning if expiring in this many days
+# -T type Query type (default SOA)
+# -4 use IPv4 only
+# -U size EDNS0 UDP packet size (default 4096)
+my %opts = (t=>30, C=>2, W=>3, T=>'SOA', U=>4096);
+getopts('4Z:dt:W:C:T:U:', \%opts);
+usage() unless $opts{Z};
+usage() if $opts{h};
+my $zone = $opts{Z};
+$zone =~ s/^zone\.//;
+
+my $data;
+my $start;
+my $stop;
+
+my @refs = qw (
+a.root-servers.net
+b.root-servers.net
+c.root-servers.net
+d.root-servers.net
+e.root-servers.net
+f.root-servers.net
+g.root-servers.net
+h.root-servers.net
+i.root-servers.net
+j.root-servers.net
+k.root-servers.net
+l.root-servers.net
+m.root-servers.net
+);
+
+$start = [gettimeofday()];
+do_recursion();
+do_queries();
+$stop = [gettimeofday()];
+do_analyze();
+
+sub do_recursion {
+ my $done = 0;
+ my $res = Net::DNS::Resolver->new;
+ do {
+ print STDERR "\nRECURSE\n" if $opts{d};
+ my $pkt;
+ foreach my $ns (shuffle @refs) {
+ print STDERR "sending query for $zone $opts{T} to $ns\n" if $opts{d};
+ $res->nameserver($ns);
+ $res->udp_timeout($opts{t});
+ $res->recurse(0);
+ $res->dnssec(1);
+ $res->udppacketsize($opts{U});
+ $res->force_v4(1) if $opts{'4'};
+ $pkt = $res->send($zone, $opts{T});
+ last if $pkt;
+ }
+ critical("No response to seed query") unless $pkt;
+ critical($pkt->header->rcode . " from " . $pkt->answerfrom)
+ unless ($pkt->header->rcode eq 'NOERROR');
+ @refs = ();
+ foreach my $rr ($pkt->authority) {
+ next unless $rr->type eq 'NS';
+ print STDERR $rr->string, "\n" if $opts{d};
+ push (@refs, $rr->nsdname);
+ next unless names_equal($rr->name, $zone);
+ add_nslist_to_data($pkt);
+ $done = 1;
+ }
+ } while (! $done);
+}
+
+
+sub do_queries {
+ my $n;
+ do {
+ $n = 0;
+ foreach my $ns (keys %$data) {
+ next if $data->{$ns}->{done};
+ print STDERR "\nQUERY $ns\n" if $opts{d};
+
+ my $pkt = send_query($zone, $opts{T}, $ns);
+ add_nslist_to_data($pkt);
+ $data->{$ns}->{queries}->{$opts{T}} = $pkt;
+
+ print STDERR "done with $ns\n" if $opts{d};
+ $data->{$ns}->{done} = 1;
+ $n++;
+ }
+ } while ($n);
+}
+
+sub do_analyze {
+ my $nscount = 0;
+ my $NOW = time;
+ my %MAX_EXP_BY_TYPE;
+ foreach my $ns (keys %$data) {
+ print STDERR "\nANALYZE $ns\n" if $opts{d};
+ my $pkt = $data->{$ns}->{queries}->{$opts{T}};
+ critical("No response from $ns") unless $pkt;
+ print STDERR $pkt->string if $opts{d};
+ critical($pkt->header->rcode . " from $ns")
+ unless ($pkt->header->rcode eq 'NOERROR');
+ critical("$ns is lame") unless $pkt->header->ancount;
+ foreach my $rr ($pkt->answer) {
+ next unless $rr->type eq 'RRSIG';
+ my $exp = sigrr_exp_epoch($rr);
+ my $T = $rr->typecovered;
+ if (!defined($MAX_EXP_BY_TYPE{$T}->{exp}) || $exp > $MAX_EXP_BY_TYPE{$T}->{exp}) {
+ $MAX_EXP_BY_TYPE{$T}->{exp} = $exp;
+ $MAX_EXP_BY_TYPE{$T}->{ns} = $ns;
+ }
+ }
+ $nscount++;
+ }
+ warning("No nameservers found. Is '$zone' a zone?") if ($nscount < 1);
+ warning("No RRSIGs found") unless %MAX_EXP_BY_TYPE;
+ my $min_exp = undef;
+ my $min_ns = undef;
+ my $min_type = undef;
+ foreach my $T (keys %MAX_EXP_BY_TYPE) {
+ printf STDERR ("%s RRSIG expires in %.1f days\n", $T, ($MAX_EXP_BY_TYPE{$T}->{exp}-$NOW)/86400) if $opts{d};
+ if (!defined($min_exp) || $MAX_EXP_BY_TYPE{$T}->{exp} < $min_exp) {
+ $min_exp = $MAX_EXP_BY_TYPE{$T}->{exp};
+ $min_ns = $MAX_EXP_BY_TYPE{$T}->{ns};
+ $min_type = $T;
+ }
+ }
+ critical("$min_ns has expired RRSIGs") if ($min_exp < $NOW);
+ if ($min_exp - $NOW < ($opts{C}*86400)) {
+ my $ND = sprintf "%3.1f days", ($min_exp-$NOW)/86400;
+ critical("$min_type RRSIG expires in $ND at $min_ns")
+ }
+ if ($min_exp - $NOW < ($opts{W}*86400)) {
+ my $ND = sprintf "%3.1f days", ($min_exp-$NOW)/86400;
+ warning("$min_type RRSIG expires in $ND at $min_ns")
+ }
+ success("No RRSIGs expiring in the next $opts{W} days");
+}
+
+sub sigrr_exp_epoch {
+ my $rr = shift;
+ die unless $rr->type eq 'RRSIG';
+ my $exp = $rr->sigexpiration;
+ die "bad exp time '$exp'"
+ unless $exp =~ /^(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/;
+ my $exp_epoch = timegm($6,$5,$4,$3,$2-1,$1);
+ return $exp_epoch;
+}
+
+sub add_nslist_to_data {
+ my $pkt = shift;
+ foreach my $ns (get_nslist($pkt)) {
+ next if defined $data->{$ns}->{done};
+ print STDERR "adding NS $ns\n" if $opts{d};
+ $data->{$ns}->{done} |= 0;
+ }
+}
+
+sub success {
+ output('OK', shift);
+ exit(0);
+}
+
+sub warning {
+ output('WARNING', shift);
+ exit(1);
+}
+
+sub critical {
+ output('CRITICAL', shift);
+ exit(2);
+}
+
+sub output {
+ my $state = shift;
+ my $msg = shift;
+ $stop = [gettimeofday()] unless $stop;
+ my $latency = tv_interval($start, $stop);
+ printf "ZONE %s: %s; (%.2fs) |time=%.6fs;;;0.000000\n",
+ $state,
+ $msg,
+ $latency,
+ $latency;
+}
+
+sub usage {
+ print STDERR "usage: $0 -Z zone -d -t timeout -W days -C days\n";
+ print STDERR "\t-Z zone zone to test\n";
+ print STDERR "\t-T type query type (default SOA)\n";
+ print STDERR "\t-d debug\n";
+ print STDERR "\t-t seconds timeout on DNS queries\n";
+ print STDERR "\t-W days warning threshhold\n";
+ print STDERR "\t-C days critical threshold\n";
+ print STDERR "\t-4 use IPv4 only\n";
+ print STDERR "\t-U bytes EDNS0 UDP buffer size (default 4096)\n";
+ exit 3;
+}
+
+sub send_query {
+ my $qname = shift;
+ my $qtype = shift;
+ my $server = shift;
+ my $res = Net::DNS::Resolver->new;
+ $res->nameserver($server) if $server;
+ $res->udp_timeout($opts{t});
+ $res->retry(2);
+ $res->recurse(0);
+ $res->dnssec(1);
+ $res->udppacketsize($opts{U});
+ $res->force_v4(1) if $opts{'4'};
+ my $pkt = $res->send($qname, $qtype);
+ unless ($pkt) {
+ $res->usevc(1);
+ $res->tcp_timeout($opts{t});
+ $pkt = $res->send($qname, $qtype);
+ }
+ return $pkt;
+}
+
+sub get_nslist {
+ my $pkt = shift;
+ return () unless $pkt;
+ return () unless $pkt->authority;
+ my @nslist;
+ foreach my $rr ($pkt->authority) {
+ next unless ($rr->type eq 'NS');
+ next unless names_equal($rr->name, $zone);
+ push(@nslist, lc($rr->nsdname));
+ }
+ return @nslist;
+}
+
+sub names_equal {
+ my $a = shift;
+ my $b = shift;
+ $a =~ s/\.$//;
+ $b =~ s/\.$//;
+ lc($a) eq lc($b);
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/control
new file mode 100644
index 0000000..a19575f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/control
@@ -0,0 +1,7 @@
+Homepage: http://dns.measurement-factory.com/tools/nagios-plugins/check_zone_rrsig_expiration.html
+Watch: http://dns.measurement-factory.com/tools/nagios-plugins/src/check_zone_rrsig_expiration Id: check_zone_rrsig_expiration,v ([0-9.]+)
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to check for expiration of
+ signatures in dnssec-enabled zones.
+Recommends: libnet-dns-perl, libnet-dns-sec-perl
+Version: 1.14
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/copyright
new file mode 100644
index 0000000..fab5e90
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/copyright
@@ -0,0 +1,27 @@
+Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+Neither the name of The Measurement Factory nor the names of its
+contributors may be used to endorse or promote products derived
+from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/zone-rrsig.cfg b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/zone-rrsig.cfg
new file mode 100644
index 0000000..ca10ed4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_zone_rrsig_expiration/zone-rrsig.cfg
@@ -0,0 +1,4 @@
+define command {
+ command_name check_zone_rrsig
+ command_line /usr/lib/nagios/plugins/check_zone_rrsig -Z $HOSTADDRESS$
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/common.mk b/nagios-plugins-contrib-24.20190301~bpo9+1/common.mk
new file mode 100644
index 0000000..cf0fe43
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/common.mk
@@ -0,0 +1,71 @@
+
+# import buildflags
+CFLAGS += $(shell dpkg-buildflags --get CFLAGS)
+CPPFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
+CXXFLAGS += $(shell dpkg-buildflags --get CXXFLAGS)
+LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
+
+# define common directories
+PLUGINDIR := /usr/lib/nagios/plugins
+CRONJOBDIR := /usr/lib/nagios/cronjobs
+CONFIGDIR := /etc/nagios-plugins/config
+PNP4NAGIOSTEMPLATEDIR := /etc/pnp4nagios/templates.d/nagios-plugins-contrib
+INIDIR := /etc/nagios-plugins
+CONFIGFILES := $(wildcard *.cfg)
+
+# guess the name of the plugin to build if not defined
+PLUGINNAME := $(shell basename $(CURDIR))
+ifndef PLUGIN
+PLUGIN := $(PLUGINNAME)
+endif
+
+DOCDIR := /usr/share/doc/nagios-plugins-contrib/$(PLUGINNAME)
+
+# add some default files to clean
+# we actually need strip here. make is weird sometimes.
+CLEANEXTRAFILES := $(strip $(wildcard *.o) $(wildcard *.a) $(wildcard *.so))
+
+# build the stuff actually
+all:: $(PLUGIN) $(MANPAGES) $(INIFILES) $(CRONJOBS)
+
+install::
+ install -d $(DESTDIR)$(PLUGINDIR)
+ install -m 755 -o root -g root $(PLUGIN) $(DESTDIR)$(PLUGINDIR)
+ifdef CONFIGFILES
+ install -d $(DESTDIR)$(CONFIGDIR)
+ install -m 644 -o root -g root $(CONFIGFILES) $(DESTDIR)$(CONFIGDIR)
+endif
+ifdef MANPAGES
+ set -e; for m in $(MANPAGES); do \
+ section=`echo $$m | sed 's,\.gz$$,,;s,.*\.,,'` ;\
+ mandir="/usr/share/man/man$${section}" ;\
+ install -d $(DESTDIR)$${mandir} ;\
+ install -m 644 -o root -g root $${m} $(DESTDIR)$${mandir} ;\
+ done
+endif
+ifdef PNP4NAGIOSTEMPLATES
+ install -d $(DESTDIR)$(PNP4NAGIOSTEMPLATEDIR)
+ install -m 644 -o root -g root $(PNP4NAGIOSTEMPLATES) $(DESTDIR)$(PNP4NAGIOSTEMPLATEDIR)
+endif
+ifdef INIFILES
+ install -d $(DESTDIR)$(INIDIR)
+ install -m 644 -o root -g root $(INIFILES) $(DESTDIR)$(INIDIR)
+endif
+ifdef DOCFILES
+ install -d $(DESTDIR)$(DOCDIR)
+ install -m 644 -o root -g root $(DOCFILES) $(DESTDIR)$(DOCDIR)
+endif
+ifdef CRONJOBS
+ install -d $(DESTDIR)$(CRONJOBDIR)
+ install -m 755 -o root -g root $(CRONJOBS) $(DESTDIR)$(CRONJOBDIR)
+endif
+
+clean::
+ifdef CLEANFILES
+ rm -f $(CLEANFILES)
+endif
+ifneq (,$(CLEANEXTRAFILES))
+ rm -f $(CLEANEXTRAFILES)
+endif
+
+.PHONY: clean
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/README.Debian.plugins.in b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/README.Debian.plugins.in
new file mode 100644
index 0000000..1373b3f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/README.Debian.plugins.in
@@ -0,0 +1,20 @@
+nagios-plugins-contrib
+======================
+
+Some plugins require additional libraries. To prevent you from having to
+install dozens of further packages that you don't actually need, there is no
+strict dependency on those libraries. Rather, they are listed as recommenda-
+tions or suggestions.
+
+apt-get(8) and aptitude(8) will install recommended packages automatically by
+default. If you did not disable this feature you will have everything in place
+to operate all plugins when installing the "nagios-plugins-contrib" package.
+Else you have to install missing dependencies manually (see the section "Plugin
+dependencies" below).
+
+
+Plugin dependencies:
+--------------------
+
+#AUTO_UPDATE_README#
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/README.source b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/README.source
new file mode 100644
index 0000000..a66d688
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/README.source
@@ -0,0 +1,66 @@
+nagios-plugins-contrib - Plugins for nagios compatible monitoring systems
+--------------------------------------------------------------------------
+
+
+This README.source should give a short instruction about the
+way the pkg-nagios-plugins-contrib repository is structured
+and defines basic policies.
+
+* build-system: git-buildpackage. As we build a Debian native
+ package pristine-tar is not necessary.
+
+* debian/changelog:
+ - preferable generated using git-dch
+ - versioning schema: X.$(date '+%Y%m%d'). X will be
+ increased by one with each release. In case there are
+ bugfixes in stable releases necessary, use
+ X.$(date '+%Y%m%d').Y
+ See http://kitenet.net/~joey/blog/entry/version_numbers/
+ for details.
+
+* debian/copyright.in, debian/control.in:
+ Base files we fill automatically with information from
+ all plugins to generate the full files.
+ This is done in the clean target.
+ DO NOT MODIFY debian/control or debian/copyright!
+
+* nagios plugins:
+ - one directory per plugin
+ - required files:
+ * $plugin/control: file format similar to debian/control.
+ - Required is the Description and Uploaders part.
+ Add Build-Depends, Recommends, Suggests
+ and Homepage to have their content added to debian/control/
+ debian/copyright. Don't use Depends as we don't want to force
+ people to install dependencies for a plugin they might not
+ want to use.
+ - Add Version to be able to track an upstream version of
+ the plugin.
+ - Add Watch to check for new versions using
+ ./debian/packaging-helper.py
+ Format:
+ Watch URL python-regex
+ Watch URL SHA1:sha1sum
+ - Don't add empty lines - only the first paragraph will be
+ handled.
+ * $plugin/copyright: copyright information for the files
+ in $plugin. Will be added to debian/copyright
+ automatically, properly indented and with a header which
+ describes that the coming block is for the files in $plugin.
+ ** DEP-5 IS NOT SUPPORTED **
+ - what you should have:
+ Currently there are two options on how to build and install
+ plugins:
+ * you have a single script or file or need some hand-made
+ build system anyway:
+ add $plugin/Makefile and implement the all / install / clean
+ targets. include ../common.mk is there for common tasks.
+ If $plugin/Makefile exists the way described below *will not*
+ be built.
+ * your plugin comes with a fancy build system already:
+ extract the source in $plugin and let a symlink called 'src'
+ point to the subdirectory of $plugin.
+ If dh_auto_* is not able to build the plugin, please use
+ the Makefile way as described above.
+ Please ensure that a proper .cfg file will be installed.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/autoreconf b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/autoreconf
new file mode 100644
index 0000000..23c2f54
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/autoreconf
@@ -0,0 +1,3 @@
+check_hpasm/src/
+check_mysql_health/src/
+check_varnish/src/
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/changelog b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/changelog
new file mode 100644
index 0000000..d720f6e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/changelog
@@ -0,0 +1,997 @@
+nagios-plugins-contrib (24.20190301~bpo9+1) stretch-backports; urgency=medium
+
+ * Rebuild for stretch-backports.
+
+ -- Jan Wagner <waja@cyconet.org> Fri, 01 Mar 2019 14:29:52 +0100
+
+nagios-plugins-contrib (24.20190301) unstable; urgency=medium
+
+ * [94e6962] check_rbl: Update to 1.4.4
+ * [26788d0] d/patches/check_rbl/additional_rbls:
+ Refresh against latest ustream
+ * [1ca8c61] d/patches/check_rbl/additional_rbls:
+ Remove unreliable uribl.com lists
+ * [c3d64f4] check_ssl_cert: Update to 1.83.0
+ * [5d7462d] d/control: Auto update
+
+ -- Jan Wagner <waja@cyconet.org> Fri, 01 Mar 2019 14:22:08 +0100
+
+nagios-plugins-contrib (23.20190206) unstable; urgency=medium
+
+ * [314b5a6] Add patch check_uptime/missing_backslash, thanks Sven Wegener.
+ (Closes: #882982)
+ * [98f42fd] dsa/*: Update to latest upstream
+ * [00a3557] p/dsa/status_directory: Refresh against latest upstream
+ * [f96eeae] check_ssl_cert: Update to 1.80.1
+ * [b0b3391] d/control.in: Update Vcs headers
+ * [f4a960f] d/control.in: Bump Standards-Version to 4.3.0, no changes needed
+ * [cec13f3] Revert "Remove check_varnish for now."
+ * [5388c58] Adding d/p/check_varnish/fix_for_v56,
+ thanks Jean-Louis Dupond <jean-louis@dupond.be>
+ * [1abad16] d/copyright: Auto update
+ * [e30d668] d/tests/control: Auto update
+ * [37ee667] check_varnish/control: Adding automake-1.15 as build dep
+ * [2491dc7] d/control: Auto update
+ * [c3aa205] check_ipmi_sensor: Update to 3.13
+ * [67f7f48] Adding d/p/check_haproxy_stats/interpreter, fixing interpreter
+ * [0d80aa9] check_raid/control: Fixing invalid control statement
+ * [1dfe25a] check_raid: Update to 4.0.9
+ * [23a69f5] d/control: Auto update
+ * [bc48c7b] d/control.in: Using priority optional
+ * [5bb1937] d/control: Auto update
+ * [bc2cc30] check_mongo: Update to 46d27ab
+ * [8375691] dsa/*: Update to latest upstream
+ * [7bb2be2] dsa/checks/dsa-check-cert-expire-dir: Fix permissions
+ * [71b0bfc] check_mongodb: Updating to latest version b33e763
+ * [4fdfeb3] check_ssl_cert: Update to 1.81.0
+ * [cf52b63] check_varnish/control: Update to latest upstream commit,
+ no code changes
+ * [679d52b] d/control: Auto update
+
+ -- Jan Wagner <waja@cyconet.org> Wed, 06 Feb 2019 13:45:06 +0100
+
+nagios-plugins-contrib (22.20181105+1) unstable; urgency=medium
+
+ [ Bernd Zeimetz ]
+ * [f576fb8] Also remove varnish patches
+
+ [ Jan Wagner ]
+ * [1559617] check_httpd_status: Update to rev204
+ * [1b6db55] check_ssl_cert: Update to 1.76.0
+ * [9ec996e] dsa/control: New homepage
+ * [ab393a4] dsa/update-files.sh: Fix upstream URL
+
+ -- Bernd Zeimetz <bzed@debian.org> Mon, 05 Nov 2018 01:02:43 +0100
+
+nagios-plugins-contrib (22.20181105) unstable; urgency=medium
+
+ [ Bernd Zeimetz ]
+ * [5091e4a] Disable EPN for check_raid.
+ Thanks to Daniel Pocock (Closes: #851351)
+ * [5bdff51] check_raid: fix failed mdadm hotspare detection.
+ Thanks to Sascha Steinbiss (Closes: #855054)
+ * [5232be1] percona-nagios-plugins: fix bashism.
+ Thanks to Raphael Geissert (Closes: #772278)
+
+ [ Stefan Schörghofer ]
+ * [6495faa] Fixes check_ssl_cert problems with Openssl > 1.1.x
+ (Closes: 855253)
+
+ [ Bernd Zeimetz ]
+ * [bf4fb49] Add autopkgtest for check_ssl_cert.
+ * [9aacdb6] Auto update of debian/tests/control
+ * [cd24451] Updating changelog.
+ * [0d7ac29] Fix check_cert_expire_dirs to make it work at all.
+ (Closes: #855155)
+ * [dbf85de] Updating changelog
+ * [d6880e6] style fix ;)
+
+ [ Jan Wagner ]
+ * [200548e] check_ssl_cert: Recommend curl and file as they are needed for a
+ working plugin
+ * [be54bd4] Apply check_snmp_environment/epn we missed to do
+
+ [ Leo Antunes ]
+ * [b76423b] add check_libs_ng script
+ * [273f7a0] check_libs_ng: small performance improvement
+
+ [ Stefan Schörghofer ]
+ * [3cea475] Adds new plugin: check-debsecan. (Closes: 725269)
+ * [202376f] Revert "Adds new plugin: check-debsecan." Forgot something and
+ want to make one fine commit.
+ * [447a438] Adds new plugin: check-debsecan. (Closes: 725269)
+ * [059dbba] Revert "Adds new plugin: check-debsecan." Found problem in the
+ copyright file. Will fix it.
+ * [fca4c0b] Adds new plugin: check-debsecan. (Closes: 725269)
+
+ [ Jan Wagner ]
+ * [190c0b7] check_hpasm: Update to 4.7.5.4
+ * [3eb4cf6] check_mongodb: Updating to latest version 3805751
+ * [7fecaf3] check_raid: Update to 4.0.8
+ * [ce7f6fe] check_whois: Update to latest version 1.23
+ * [3e8a34e] check_ssl_cert: Updating to 1.1.57.0
+ * [ae676d3] check_ssl_cert: Drop patch check_ssl_cert/bug-855253-fix
+ * [e83a665] check_rbl: Update to 1.4.1
+ * [1ec29f1] check_rbl: Drop patch check_rbl/spelling_errors
+ * [3c3a375] check_rbl: Drop patch check_rbl/disable_dul.ru
+ * [0883752] check_rbl: Drop patch
+ check_raid/fix_mdadm_hotspare_failure_detection
+ * [dcdb4b3] travis-ci: Allow unstable to fail, since varnish has FTBFS
+ (again)
+ * [b21ae15] Update dsa checks to recent git version 2300473
+ * [759820b] Refresh d/p/dsa/check_running_kernel_jessie_centos_fix
+ * [d3c7d47] Refreshing patches against new upstreams
+ * [44c6db8] check_ssl_cert: Updating to 1.58.0
+ * [169de3b] check_ssl_cert: Updating to 1.58.0
+ * [1314c23] check_ssl_cert: Updating to 1.61.0
+ * [180a845] check_httpd_status: Updating to rev193
+ * [91a482c] check_httpd_status: Drop d/p/check_httpd_status/numeric-uptime,
+ it's in rev193
+ * [5c25f57] d/control: Update VCS-headers
+ * [e9f0da6] check_hpasm: Update to 4.7.5.5
+ * [3e81014] check_rbl: Update to 1.4.3
+ * [ad2be8b] check_ssl_cert: Updating to 1.72.0
+ * [be6e9e8] check_whois: Updating to 1.24
+ * [061b662] percona-nagios-plugins: Update to 1.1.8
+
+ [ Bas Couwenberg ]
+ * [5570872] Bump Standards-Version to 4.1.5, no changes.
+ * [dda67f3] Bump Standards-Version to 4.2.0, no changes.
+ * [db13182] Bump Standards-Version to 4.2.1, no changes.
+
+ [ Jan Wagner ]
+ * [65a0937] check_ssl_cert: Updating to 1.73.0
+ * [eff917b] Update check_hpasm to 4.8
+ * [c7f8ffc] travis-ci: Allow build failing on testing
+
+ [ Bernd Zeimetz ]
+ * [47669a6] Remove check_varnish for now.
+ Does not work with varnish >= 5.2
+ https://github.com/varnish/varnish-nagios/issues/15
+ Thanks to Adrian Bunk (Closes: #878966)
+ * [65f3186] Auto update of debian/copyright
+ * [278c1ee] Auto update of debian/tests/control
+
+ -- Bernd Zeimetz <bzed@debian.org> Mon, 05 Nov 2018 00:45:48 +0100
+
+nagios-plugins-contrib (21.20170222) unstable; urgency=medium
+
+ [ Bernd Zeimetz ]
+ * [5091e4a] Disable EPN for check_raid.
+ Thanks to Daniel Pocock (Closes: #851351)
+ * [5bdff51] check_raid: fix failed mdadm hotspare detection.
+ Thanks to Sascha Steinbiss (Closes: #855054)
+ * [5232be1] percona-nagios-plugins: fix bashism.
+ Thanks to Raphael Geissert (Closes: #772278)
+
+ [ Stefan Schörghofer ]
+ * [6495faa] Fixes check_ssl_cert problems with Openssl > 1.1.x
+ (Closes: #855253)
+
+ [ Bernd Zeimetz ]
+ * [bf4fb49] Add autopkgtest for check_ssl_cert.
+ * [9aacdb6] Auto update of debian/tests/control
+ * [0d7ac29] Fix check_cert_expire_dirs to make it work at all.
+ check_cert_expire_dirs was not able to find
+ check_cert_expire. Fixing that. (Closes: #855155)
+
+ -- Bernd Zeimetz <bzed@debian.org> Wed, 22 Feb 2017 14:32:22 +0100
+
+nagios-plugins-contrib (20.20170118) unstable; urgency=medium
+
+ [ Evgeni Golov ]
+ * [3a9cdf5] more test restrictions
+ * [49b66d4] simplify tests
+ * [3253d36] Auto update of debian/tests/control
+ * [7383aed] cleanup travis.yml
+ travis.d.n already does git fetch and lintian for us
+ * [3b61c62] call lintian with extended flags as before
+ * [8ffd6ec] add python2.7 and python-pymongo to percona control
+ * [8486be7] Auto update of debian/control
+
+ [ Bernd Zeimetz ]
+ * [f84c6a0] Remove check_shutdown.
+ Does not work with systemd.
+ Resolves #54
+ * [9038743] Remove check_ldap_root.
+ This is nothing check_ldap could not handle.
+ Please use check_ldap.
+ * [6083eb6] Updating checks from DSA.
+ * [fbd854d] Enhance check_running_kernel.
+ Support Ubuntu and CentOS, also warn about missing filter utils.
+ Thanks to Jonas Meurer (Closes: #780098)
+ * [0174352] Auto update of debian/copyright
+ * [95b656e] Auto update of debian/control
+ * [1e2803d] Merge remote-tracking branch 'origin/master'
+ * [a238057] Install check_mongodb.py symlink.
+ Resolves #77.
+
+ -- Bernd Zeimetz <bzed@debian.org> Wed, 18 Jan 2017 22:18:18 +0100
+
+nagios-plugins-contrib (19.20170104) unstable; urgency=medium
+
+ [ Jan Wagner ]
+ * [985772d] check_raid: Update to 4.0.5
+ * [59eb257] check_ssl_cert: Updating to 1.37
+ * [19d36d2] Update d/copyright
+ * [2b665d0] check_ssl_cert: Fix vesion in control file
+ * [55e47ca] Updating d/control
+
+ [ Evgeni Golov ]
+ * [2f8ecec] allow Restrictions in tests
+ * [1f127a6] add test restrictions
+ * [225d1df] check_varnish: add test
+ * [00da8b9] fix trailing space
+ * [5ed4f55] Auto update of debian/tests/control
+
+ -- Jan Wagner <waja@cyconet.org> Wed, 04 Jan 2017 13:50:13 +0100
+
+nagios-plugins-contrib (18.20170103) unstable; urgency=medium
+
+ [ Jan Wagner ]
+ * [54e94e9] d/changelog: New changelog
+
+ [ Bernd Zeimetz ]
+ * [92fd6af] Fix HOST_ARCH detection for check_varnish and others.
+ * [9238b6c] Merge remote-tracking branch 'github/master'
+ * [1ade7ce] check_nfsmount: nfs4 support.
+ Resolves #73
+ Thanks to gvogets
+ * [ed6148e] check_httpd_status-digest: make -r option work.
+ Resolves #61
+ Thanks to Michael Weinrich
+ * [609758d] Merge pull request #71 from waja/check_smstools_pr60.
+ Add debian/patches/check_smstools/operator_siglvl, thanks ZyanKLee
+ * [5ddb796] Merge pull request #72 from evgeni/tests
+ add a few tests
+ * [84c0942] Revert "Remove unused check_varnish Makefile."
+ This reverts commit b6f439c44914471004cf8c8af120bd05f3afcb2e.
+ * [8ecb979] Fix percona-nagios-plugins watch line
+ * [b713758] Fix architecture detection in Makefile
+ * [9fab6a3] Updating percona-monitoring-plugins to 1.1.7
+ * [47f82e5] Remove check_varnish for now.
+ It is not compatible to varnish 5.
+ * [f4f72ee] Auto update of debian/control
+ * [67b7308] Auto update of debian/copyright
+ * [55ac3ea] Revert "Remove check_varnish for now."
+ This reverts commit 47f82e5244a1e6a1874cb20dd497b63ea4d51512.
+ * [c8edb54] Update check_varnish to latest git version.
+ * [ce99574] Add autotools stuff for check_varnish.
+ * [f2c1500] Make varnish build with v5
+ * [3cca7ae] Auto update of debian/control
+ * [cab0430] Use default mirror for travis.
+ * [54c9557] Add autopkgtest for check_varnish
+ * [53b8990] Choose random varnish ports.
+ Otherwise test jobs running in parallel will fail.
+ * [87a77dc] avoid output on stderr in test_check_varnish
+ * [cfb86ca] Make Zhenech happy.
+
+ -- Bernd Zeimetz <bzed@debian.org> Tue, 03 Jan 2017 18:36:14 +0100
+
+nagios-plugins-contrib (17.20161211) unstable; urgency=medium
+
+ [ Evgeni Golov ]
+ * [743a7ba] implement tests for check_cups and httpd
+
+ [ Jan Wagner ]
+ * [f2ad81b] travis-ci: Build against unstable, testing and stable; run lintian
+ * [51e1deb] d/control: Bump Standards-Version to 3.9.8, no changes needed
+ * [a316cb8] check_raid: Update to 4.0.3
+ * [3699879] check_mongodb: Updating to latest version 8c5cc99
+ * [a5b2276] check_ipmi: Update to 3.12
+ * [60319ea] check_ssl_cert: Updating to 1.35.0
+
+ [ Evgeni Golov ]
+ * [a16fc7d] stat daemons before running tests
+ * [65c8472] Auto update of debian/tests/control
+ * [5255d54] check_httpd_status: only accept numeric uptime output
+ * [cd76f3a] apache2 tends to be a bit chatty during restart, shut it up
+ * [b34a201] Auto update of debian/tests/control
+
+ [ Jan Wagner ]
+ * [0a4e29e] check_mongodb: Fix version in control file
+ * [2218a15] check_hpasm: Update to 4.7.5.2
+ * [7bd78e4] Adding d/patches/check_cups/ParseDateDelta (Closes: #844319),
+ thanks Manuel Hachtkemper
+
+ [ Petter Reinholdtsen ]
+ * [789bdb5] Improve check_shutdown control file.
+
+ [ Jan Wagner ]
+ * [1c5fbfe] d/control: Update VCS-URLs to https
+
+ [ Evgeni Golov ]
+ * [ac93909] allow tests to run with libnagios-plugin-perl on jessie
+ * [3478a48] Auto update of debian/tests/control
+
+ [ Jan Wagner ]
+ * [171275f] check_printer: Add missing hostname option into check command
+ * [6e1f6c2] check_printer: Disable epn (Closes: #808722)
+ * [63564c7] check_ssl_cert: Updating to 1.36.1
+ * [1d9afb0] Add d/patches/check_libvirt/fix_uom, thanks Björn Lässig
+ * [827da04] check_raid: Update to 4.0.4
+ * [056d78e] check_ssl_cert: Fix version in control file to 1.36.1
+ * [9fea343] d/control.in: Updating to values committed to control
+ * [15d33f8] d/control: Updating to latest plugin versions
+
+ -- Jan Wagner <waja@cyconet.org> Sun, 11 Dec 2016 14:33:04 +0100
+
+nagios-plugins-contrib (16.20151226) unstable; urgency=medium
+
+ [ Jan Wagner ]
+ * [a3207bd] check_mysql_health: Update to 2.2.1
+ * [31c7ed1] check_mysql_health: Remove integrated patches/check_mysql_health/documentation_url
+ * [dfc20c0] travis-ci: Installing newer autoconf
+ * [f55699c] travis-ci: Installing automake1.9
+ * [295f5a4] Generating new control file
+ * [12e0087] Updating debian/changelog
+ * [e5d713c] Revert "Updating debian/changelog"
+ This reverts commit 12e0087eb624f7db93a56483c793bc8d2c28ab3f.
+ * [b9c168a] Creating new changelog entry
+ * [f27768f] debian/control.in: reformating with warp-and-sort
+ * [9362ba8] Rebuild debian/control
+ * [22ddfa6] check_raid: Update to latest version 3.2.5
+ * [c9f64fb] check_multipath: Update to latest version 0.3.0
+ * [fd2e679] check_whois: Update to latest version 1.19
+ * [9b19d0a] check_memcached: Install libmemcached-dev as build dependency on arm64 too (Closes: #798432)
+ * [4a79b7e] Updating debian/control
+
+ -- Bernd Zeimetz <bzed@debian.org> Sat, 26 Dec 2015 18:19:43 +0100
+
+nagios-plugins-contrib (15.20150818) unstable; urgency=medium
+
+ The debconf15 release.
+
+ [ Evgeni Golov ]
+ * [655f77d] fix check_ipmi_sebsor version
+ it was correct in the upload, but not in Git
+
+ [ Jan Wagner ]
+ * [0da5840] Disable rbl.orbitrbl.com, it's offline
+ - Adding check_rbl/disable_orbitrbl.com see
+ http://www.dnsbl.com/2014/10/status-of-rblorbitrblcom-dead.html
+ * [9849824] check_email_delivery: Add libnet-smtpauth-perl as Recommends for
+ CRAM-MD5
+
+ [ Bernd Zeimetz ]
+ * [1151ce3] Add update-check_libs-status cronjob script.
+ * [3479e9d] Update check_apt.cmd to use update-check_libs-status.
+ * [ec49961] snapshot changelog.
+
+ [ Jan Wagner ]
+ * [52030fc] Fixing changelog entries
+
+ [ Bernd Zeimetz ]
+ * [f66a1d8] Remove , from check_packages output.
+
+ [ Jan Wagner ]
+ * [803520c] Adding check_rbl/disable_ahbl.org patch (Closes: #774749)
+
+ [ Bernd Zeimetz ]
+ * [1853853] Updating snapshot changelog.
+ * [b308bb7] Remove duplicate check_apt.cmd file.
+ * [f3e3cee] Add check_libvirt.
+ * [112168d] Auto update of debian/copyright
+ * [40a9288] Auto update of debian/control
+ * [1e398f9] Make check_libs faster.
+ * [d7cf267] Add breaks/replaces for smooth upgrades from squeeze.
+ * [1ae1eee] Add check_redis.
+ * [89a53d3] Auto update of debian/copyright
+ * [09d0cdb] Auto update of debian/control
+ * [bce89a0] Merge remote-tracking branch 'github/master'
+
+ [ Jan Wagner ]
+ * [8733ae5] check_redis: Adding command definition config
+ * [5874628] check_redis: Fixing command definition
+ * [6ed8e1b] check_mongodb: Updating to latest version
+ * [b9544e3] check_mysql_health: Updating to 2.1.9.2
+ * [a2c74a4] check_raid: Updating to 3.2.2
+ * [19e1262] check_raid: Updating to latest git version (5bc04e1822)
+ * [5862270] check_ssl_cert: Updating to 1.17.0
+ * [e4c7bc0] check_cups: Update Homepage
+ * [cc9ce25] check_drbd: Update Homepage and Watch header
+ * [99c5b84] check_rbl: Updating to 1.3.7
+ * [160e8d3] check_rbl: Move back to Nagios::Plugin again by adding
+ patches/check_rbl/nagios-plugins
+ * [8b921f7] check_whois: Updating to 1.16
+ * [90e3211] check_ipmi_sensor: Updating to 3.7
+ * [37d10e7] Drop check_rbl/disable_ahbl.org
+ * [a2b7c69] Drop check_rbl/disable_orbitrbl.com
+
+ [ Bernd Zeimetz ]
+ * [d33acc6] Some better travis scripts.
+ * [22073ab] Handle php4nagios templates
+ * [ec7197a] Install check_redis pnp4nagios template
+ * [f8d59a3] Fix check_ajp to handle non-responding tcp ports.
+ * [2709f46] install equivs in .travis.yml
+ * [d0e0af8] Revert "Fix check_ajp to handle non-responding tcp ports."
+ This reverts commit f8d59a383175bbcf0011b8308d0505868c6b61e4.
+ Change was applied by patch...
+ * [f948c66] Merge branch 'master' of
+ alioth.debian.org:/git/pkg-nagios/pkg-nagios-plugins-contrib
+
+ [ Jan Wagner ]
+ * [8696a41] common.mk: Using TAB instead of white spaces
+
+ [ Bernd Zeimetz ]
+ * [c408dff] Typo fix.
+ * [b41594f] Add check_haproxy_stats.
+ * [5e5ae83] Auto update of debian/copyright
+ * [cb814e2] Auto update of debian/control
+ * [23c7416] Update snapshot changelog.
+ * [53e1b9c] Fix version number in changelog
+
+ [ Jan Wagner ]
+ * [9bcec60] check_hpasm: Update to 4.7.0.2
+ * [9609f87] check_raid: Update to 3.2.3
+ * [c750062] check_ssl_cert: Update to 1.17.1
+ * [ff74dbd] check_rbl: Disable dul.ru
+ * [c11ef66] check_mongo: Update to recent version
+ * [32e8ae4] check_hpasm: Updating to latest 4.7.1.1
+ * [a08beb2] check_ipmi_sensor: Updating to 3.8
+ * [25d1eea] Updating control file
+ * [74ea485] check_uptime: Update check_uptime.cfg to use the correct script
+ (Closes: #787839)
+ * [45d50da] check_raid: Update to 3.2.4
+ * [af3e278] check_ipmi_sensor: Update to version 3.9
+
+ [ Bernd Zeimetz ]
+ * [94ad100] implement git clean support in extras/Makefile
+ * [406aa15] Add makefile to build all plugins.
+ * [2655fe2] Add Makefile.
+ First step to get rid of dh crazyness.
+ * [94c0879] Fixing pthread linking fail for check_memcached.
+
+ [ Jan Wagner ]
+ * [140e08e] check_mongodb: Update to latest upstream
+
+ [ Bernd Zeimetz ]
+ * [22769ea] Let debian/rules use the new Makefile.
+ * [1a74854] build the debian readme again
+
+ -- Bernd Zeimetz <bzed@debian.org> Tue, 18 Aug 2015 18:04:21 +0200
+
+nagios-plugins-contrib (14.20141104) unstable; urgency=medium
+
+ [ Jan Wagner ]
+ * [0b3a2c4] check_email_delivery: Adding libnet-smtp-ssl-perl to Recommends
+ * [7c8eeb2] check_running_kernel: Add binutils to Recommends
+
+ [ Evgeni Golov ]
+ * [4df550b] check_ipmi_sensor: update to v3.5.
+ Thanks to Werner Fischer <debian-bugs@wefi.net> (Closes: #768018)
+
+ -- Evgeni Golov <evgeni@debian.org> Tue, 04 Nov 2014 15:03:27 +0100
+
+nagios-plugins-contrib (13.20141017) unstable; urgency=medium
+
+ * [87b2651] check_rbl: Adding libdata-validate-domain-perl,
+ libdata-validate-ip-perl to Recommends as needed for new upstream
+ * [e6dab92] check_raid: Update to 3.2.1
+ * [486d2f0] check_raid: Updating to latest git master to fix several bugs
+ * [7fdccac] check_raid: Updating to latest git master to fix with arcconf
+ * [c0b9c82] Bump Standards-Version to 3.9.6, no changes needed
+ * [fb6090a] percona-nagios-plugins: Fix typo in package description
+ * [e8aa125] percona-nagios-plugins: Fixing FSF address
+ * [f5d63e9] check_update: Fixing FSF address
+
+ -- Jan Wagner <waja@cyconet.org> Fri, 17 Oct 2014 16:14:40 +0200
+
+nagios-plugins-contrib (12.20141001) unstable; urgency=medium
+
+ * Fix version number.
+ Unfortunately this makes an upload necessary due to
+ older snapshots being in use already.
+
+ -- Bernd Zeimetz <bzed@debian.org> Wed, 01 Oct 2014 13:24:23 +0200
+
+nagios-plugins-contrib (11.20141001) unstable; urgency=medium
+
+ [ Bernd Zeimetz ]
+ * [c48b2fba] Auto update of debian/control
+ * [53787970] Auto update of debian/copyright
+ * [54c6b89b] Add check_hp_bladechassis.
+ * [779307ef] Add missing " " around a filename variable in update_checksums.
+ * [a26ff221] Add check_uptime plugin.
+ * [e2a97b03] Auto update of debian/control
+ * [284db8fa] Auto update of debian/copyright
+ * [02769ec2] Updating changelog.
+
+ [ Jan Wagner ]
+ * [a4e3d3ab] Reorder patch series
+
+ [ Bernd Zeimetz ]
+ * [a1793637] check-libs: Use lsof -nP
+
+ [ Jan Wagner ]
+ * [497cef52] monitoring-plugins is the ways to got, so we recommend/enhance it
+
+ [ Bernd Zeimetz ]
+ * [899be56b] Merge remote-tracking branch 'github/master'
+
+ [ Jan Wagner ]
+ * [6d9f7c6f] check_bgpstate: disable epn via patches/check_bgpstate/epn
+
+ [ Bernd Zeimetz ]
+ * [462d412b] Merge pull request #51 from mstock/bugfix/running-kernel-on-kfreebsd.
+ Escape '+' in 'uname -v' output in freebsd_check_running_version()
+
+ [ Jan Wagner ]
+ * [482b9bfb] Merge branch 'check_httpd_status_153' into update
+ * [5d8c1517] Merge branch 'check_mongodb_60b639ef4c' into update
+ * [fca59f8b] Merge branch 'check_raid_32' into update
+ * [d425c2d1] Merge branch 'check_zone_rrsig_expiration_111' into update
+ * [14476fe2] Merge branch 'percona-nagios-plugins_114' into update
+ * [277a24e1] check_raid: Raise suggest of cciss-vol-status to >= 1.10
+ * [5e3d1834] check_ipmi_sensor: Update watch location
+ * [c2599a4c] Updating VCS-headers
+ * [2ccefe74] check_uptime: Update watch location
+
+ [ Evgeni Golov ]
+ * [2f5c758f] update check_libs homepage and watch url
+ * [cd40ea09] check_libs: fix lsof output parsing for OpenVZ
+ check_libs sometimes parses files incorrectly
+ inside an OpenVZ container (wheezy host and guest, proxmox ve
+ 2.6.32 kernel):
+ Running /usr/bin/lsof -F0 -n
+ adding bash(28081) because of [ (deleted)/tmp/tmpfXKFYTG]:
+ f1aul tREGG0x8002;0x0D0x6ds218i9441399k0n (deleted)/tmp/tmpfXKFYTG
+ adding bash(28081) because of [ (deleted)/tmp/tmpfXKFYTG]:
+ f2aul tREGG0x8002;0x0D0x6ds218i9441399k0n (deleted)/tmp/tmpfXKFYTG
+ adding puppet(28244) because of [ (deleted)/tmp/tmpfXKFYTG]:
+ f1aul tREGG0x8002;0x0D0x6ds218i9441399k0n (deleted)/tmp/tmpfXKFYTG
+ adding puppet(28244) because of [ (deleted)/tmp/tmpfXKFYTG]:
+ f2aul tREGG0x8002;0x0D0x6ds218i9441399k0n (deleted)/tmp/tmpfXKFYTG
+ The following processes have libs linked that were upgraded: root: bash
+ (28081), puppet (28244)
+ So in some cases there is a space in front of "(deleted)".
+ Attached is a patch that fixes this.
+ Thanks to Felix Geyer <felix.geyer@credativ.de> (Closes: #760373)
+
+ [ Bernd Zeimetz ]
+ * [7dccd2a2] Merge pull request #50 from petterreinholdtsen/checks-from-sitesummary.
+ Checks from sitesummary-client
+ * [36c3d9a1] Revert "Add check_kernel_status module from the sitesummary-client package."
+ This reverts commit b63d12999ffa00f6b1108c21fceeeae12e260c77.
+ We have check_kernel for linux and kfreebsd already.
+ * [99cbfb3c] Revert "Add check_cups_queue module from the sitesummary-client package."
+ This reverts commit 99951c619705578470b1786999361d232fa9cba6.
+ check_cups should handle these things just fine.
+ * [5525ee99] Updating check_printer.
+ * [4302e534] Fix version number of check_uptime.
+ * [399a5a40] Updating check_rbl to 1.3.5
+ * [11320c50] Update check_ipmi_sensor to 3.4
+ * [d6d96ff5] Refreshing patches.
+ * [f92be1cf] Auto update of debian/copyright
+ * [b528bd11] Do not depend on perl-base.
+ * [72597951] Auto update of debian/control
+
+ -- Bernd Zeimetz <bzed@debian.org> Wed, 01 Oct 2014 13:05:16 +0200
+
+nagios-plugins-contrib (11.20140704) unstable; urgency=medium
+
+ [ Jan Wagner ]
+ * [106aea0c] Update control file to reflect the shiped check_rbl version 1.3.2
+
+ [ Evgeni Golov ]
+ * [d654cba2] ignore locale-archive in check_libs
+ thanks h01ger!
+ * [4e9f28d2] revert nagios-check-libs source back to the original config path
+ patch our version only once, but with the correct path
+ * [607d1162] update nagios-check-libs to the latest upstream version
+ * [8a40ddb2] update check_libs checksum in control
+ * [9cc86dee] check_libs: add /var/lib/nginx/ to the ignorelist
+
+ [ Bernd Zeimetz ]
+ * [c712680b] Auto update of debian/copyright
+ * [0ff31881] Auto update of debian/control
+ * [be858113] Add percona nagios plugins.
+ * [be3753f9] Suggest percona-toolkit as Suggests.
+ * [09e70d62] Updaring changelog.
+
+ [ Jan Wagner ]
+ * [7e7d34f6] check_mongodb: Update to latest git version
+
+ [ Bernd Zeimetz ]
+ * [f31fc76d] Update check_mysql_health web documentation url.
+ * [101305b6] Update check-multipath to 0.2.1
+ * [111a0b42] Refreshing patches.
+ * [30fe69ff] Auto update of debian/control
+
+ -- Bernd Zeimetz <bzed@debian.org> Fri, 04 Jul 2014 11:36:51 +0200
+
+nagios-plugins-contrib (10.20140427) unstable; urgency=medium
+
+ [ Jan Wagner ]
+ * [0029d09d] check_email_delivery: Use full binary path instead of $ macro in command definition
+
+ [ Evgeni Golov ]
+ * [1028de53] use = instead of == in shell comparisons
+ fixes
+ /bin/sh: 4: [: dh_auto_clean: unexpected operator
+ for /bin/sh != /bin/bash
+
+ [ Bernd Zeimetz ]
+ * [6bc6ae0e] Merge pull request #39 from evgeni/no-bashisms
+ use = instead of == in shell comparisons
+
+ [ Jan Wagner ]
+ * [92a64933] check_raid: Update to latest git version
+ * [646ae3cf] check_ssl_cert: Update to 1.16.0
+ * [5810c290] check_whois: Update to 1.15
+ * [62ed2f18] check_httpd_status: Update to rev148
+ * [b5c5becf] check_mongodb: Update copyright file.
+ Include full copyright to make lintian happy.
+ * [64e5aa8b] check_mysql_health: Update copyright file.
+ Add reference to GPL license file
+ * [ab9066d2] check_hpasm: Update copyright file.
+ Add reference to GPL license file
+ * [a0a47d2a] check_memory: Update copyright file.
+ Update FSF address
+ * [0bbd4521] check_rbl: Update copyright file.
+ Cosmetical changes
+ * [0f533e19] Add '--with autoreconf' to dh calls (Closes: #727468)
+ - Build-depend on dh-autoreconf
+ - Add check_varnish/automake_foreign patch
+ - Specify autoreconf (sub-)dirs in debian/autoreconf
+ * [19c052cc] check_multipath: Update to 0.2.0
+ * [5c94f9c5] Add Travis-CI configuration
+
+ [ Stanislav German-Evtushenko ]
+ * [b04bdeb0] check_drbd: add check for oos and cosmetic.
+ 1) add check for out of sync sectors (report WARNING for non-zero value)
+ 2) cosmetic: sort device list while processing
+ * [13ace27b] small fix: oos is in KiB and not sectors
+
+ [ Jan Wagner ]
+ * [bc434662] check_mongo: Update to latest git version
+ * [dbd5989c] check_raid: Update to latest git version
+ * [3100e689] check_ssl_cert: Update to 1.16.1 (No source changes)
+ * [a7e727c8] check_raid: Update to latest git version (Closes: #742877)
+ * [8fcc4d95] check_ssl_cert: Update to 1.16.1 (No source changes)
+ * [1d17b5da] Update VCS-* field to uncanonical URI
+ * [5529d605] check_memory: Update to new upstream source
+ * [18a708fb] check_memory: Update to version 1.0.1
+ * [b88fd4ae] check_snmp_time: Preventing to use first person in package description
+ * [dfbe25c3] Merge 0f533e1959 and f4cc012a82 into debian/control.in
+ * [5a2dff52] Updating debian/copyright and debian/control
+ * [dfb170cb] Updating standards version to 3.9.5, no changes needed
+
+ [ Bernd Zeimetz ]
+ * [6af00ac0] Merge pull request #43 from giner/patch-1
+ check_drbd: add check for oos and cosmetic
+ * [f5deb224] Move b04bdeb025c77e34fdf8ed9eab2f222240297ca3 into a patch file.
+ * [4b9f4ad4] Merge remote-tracking branch 'origin/master'
+
+ [ Evgeni Golov ]
+ * [9774c695] do not build check_varnish and check_memcached on hurd-i386
+ also do not build check_memcached on arm64 and check_varnish on m68k
+
+ [ Bernd Zeimetz ]
+ * [2a2e8abe] Add closing brackets fix for check_imap_quota.
+ * [244d5d31] Merge pull request #40 from evgeni/hurd
+ do not build check_varnish and check_memcached on hurd-i386
+ * [b032938a] Use sha1 to check check_libs upstream.
+
+ [ Evgeni Golov ]
+ * [eef97dc6] update check_rbl to 1.3.2
+ this is a mere documentation update, but having the latest version is always good
+ * [2049c14d] dsa-check-cert-expire: Make timers configurable (Closes: #744248)
+ * [868f614a] update dsa checks
+ * [cd351102] update dsa-chack-packages (Closes: #744922)
+ * [8a28edeb] check_varnish: add support for varnish 4 (Closes: #745895)
+
+ [ Bernd Zeimetz ]
+ * [7d537eca] Fix plugin name generation.
+ * [5a9e4201] Merge pull request #46 from evgeni/check_rbl_132
+ update check_rbl to 1.3.2
+ * [d9702669] Merge pull request #47 from evgeni/dsa
+ update dsa checks
+ * [306e2109] Merge pull request #48 from evgeni/varnish4
+ check_varnish: add support for varnish 4
+ * [fea80041] Merge remote-tracking branch 'github/master'
+
+ -- Bernd Zeimetz <bzed@debian.org> Sun, 27 Apr 2014 11:25:11 +0200
+
+nagios-plugins-contrib (9.20140106) unstable; urgency=low
+
+ [ Bernd Zeimetz ]
+ * [63ddfa7a] Make checksum file readable for nagios.
+ * [583b6cde] Avoid line overflows due to expansion of $0.
+ * [9895bf1b] Merge pull request #18 from waja/solid.net
+ solid.net seems expired (maybe come back in the future)
+ * [31a0dc1f] Fix POD encoding in check_rbl.
+ Thanks to David Suárez (Closes: #724175)
+ * [a58ff4e7] Run dh_python2 for plugins and normal modules.
+ * [cd30e982] Add check_graphite.
+ * [e234911d] Auto update of debian/copyright
+ * [cb276d08] Auto update of debian/control
+ * [9dc17c93] Merge remote-tracking branch 'github/master'
+ * [4e577da9] Revert accidentally merged, duplicated bugfix.
+ This reverts commit 98008e4aea3687cff8c7ab3f871809e219591cde.
+ * [e8387d2a] Merge pull request #23 from waja/update_check_rbl_1.3.1.
+ Update check rbl 1.3.1
+ * [826a436e] Merge pull request #24 from waja/update_check_webinject_1.80.
+ Update check_webinject to 1.80
+ * [5c2907b0] Merge pull request #25 from waja/update_check_whois_1.14.
+ Update check_whois to 1.14
+ * [e8c11f0a] Merge pull request #26 from waja/fix_check_rbl_patch.
+ Remove accidently double added check_rbl/disable_solid.net in patch seri...
+ * [bfb67e88] Use dh --with autotools_dev. (Closes: #727468)
+ * [363af25f] Auto update of debian/control
+ * [952811b3] Run dh --with autotools_dev in the clean target, too.
+ * [8898d503] Merge pull request #27 from waja/check_cups.
+ Check cups
+ * [8abc4359] Merge pull request #28 from waja/check_mongodb.
+ Add check_mongodb plugin
+ * [423e59f0] Merge pull request #30 from waja/fix_check_rbl.
+ Fix version of check_rbl in control file
+ * [00be70e5] Merge pull request #33 from waja/check_bgpstate.
+ Add check_bgpstate plugin
+ * [9591a3ca] Merge pull request #29 from waja/check_drbd.
+ Add check_drdb plugin
+ * [5f531a44] Merge pull request #32 from waja/fix_check_webinject_epn.
+ Disable epn for check_webinject, cause it leaves temp files around
+ * [ef8ba64d] Remove 'read LICENSE ...' from check_graphite/copyright
+
+ [ Jan Wagner ]
+ * [5c207ef5] Add check_snmp_time plugin
+
+ [ Bernd Zeimetz ]
+ * [a6165e60] Merge remote-tracking branch 'origin/master'
+ * [de5770f4] Merge remote-tracking branch 'github/master'
+ * [41c9df6a] Merge pull request #38 from evgeni/ignore-ganeti
+ check_libs: ignore /var/lib/ganeti/
+ * [4badebed] Merge pull request #37 from evgeni/check-raid-305.
+ Update check_raid to 3.0.5
+
+ -- Bernd Zeimetz <bzed@debian.org> Mon, 06 Jan 2014 12:56:27 +0100
+
+nagios-plugins-contrib (8.20130824) unstable; urgency=low
+
+ [ Jan Wagner ]
+ * [3bce1c4b] Merge remote-tracking branch 'debian/master'
+ * [bcf6f1d9] Merge remote-tracking branch 'bzed/master'
+ * [d436ca0e] Fixing check_raid for 3ware controllers when reporting "NOT-PRESENT" (Closes: #692598)
+ * [8f55cc69] add patch check_raid/3ware_fix_notpresent
+ * [506000a8] Merge remote-tracking branch 'bzed/master'
+ * [62bbdd2f] disable epn
+ * [6c73c15b] Auto update of debian/control
+ * [5e43a9ae] update check_ssl_cert
+ * [ad1c463d] update check_ssl_cert
+ * [4975ff97] Revert "Fixing check_raid for 3ware controllers when reporting "NOT-PRESENT""
+ This reverts commit d436ca0e6a4e3147265627afd256856c9fab3836.
+ * [f6c71f97] drop removed patch
+ * [4e52a4ad] Merge remote-tracking branch 'bzed/master'
+ * [c01cd192] fix typo in patches/check_rbl/epn
+
+ [ Bernd Zeimetz ]
+ * [a61aefc4] Add syslog output to check_checksums
+ * [62d55e7e] New plugin: check_ajp
+ * [5a00818c] Auto update of debian/control
+ * [eb29e6c6] Auto update of debian/copyright
+ * [cf6c7f44] Delete unused patch file check_raid/cciss_bugfix
+ * [a3e036b7] Fix an error message in check_raid if not using cciss_vol_status.
+ Use of uninitialized value in -x at /usr/lib/nagios/plugins/check_raid
+ line 2495.
+ Thanks to Stefan Kaltenbrunner
+ * [6dddc838] Updating changelog.
+ * [192396b7] Fix check_ajp to return CRITICAL on connection errors.
+ * [d8d41faf] Add config file for check_ajp.
+ * [4e092c04] Read 5 bytes only - thats all an AJP pong needs.
+ * [26cb156f] Be nice and close the AJP connection socket.
+ * [ccc8f7d6] check_ajp: print an error message if --app is not specified.
+ * [915d3708] Add -epn to check_packages.
+ Thanks to Salvatore Bonaccorso (Closes: #691012)
+ * [240ca0fc] Updating date/version in changelog.
+ * [8534630e] Update DSA nagios checks/scripts
+ * [5078ff97] Refresh patches for new dsa plugin versions
+
+ -- Bernd Zeimetz <bzed@debian.org> Sat, 24 Aug 2013 00:06:27 +0200
+
+nagios-plugins-contrib (7.20130614) unstable; urgency=low
+
+ [ Bernd Zeimetz ]
+ * [036816ff] Merge pull request #15 from evgeni/master
+ check_packages should find security updates on the official security mirror too
+ * [658a2e93] Add check_checksums nagios plugin.
+ * [9d5d2056] Updating check_raid.
+ * [e3ec1293] Updating check_ssl_cert to 1.14.6
+ * [779543ef] Updating check_hpasm to 4.6.3.2
+ * [0c838ee9] Updating check_multipath to 0.1.9
+ * [bec11251] Updating check_whois to 1.13
+ * [8e0a65d0] Refreshing patches.
+ * [c0b88cdb] Auto update of debian/copyright
+ * [59648a17] Fix src link for check_hpasm
+ * [8c242d0f] Support pre-Wheezy versions of coretutils in check_checksums.
+ * [7d3d2a06] Update release date in changelog (gah!).
+ * [768e463b] Merge pull request #16 from evgeni/master
+ check_libs: ignore /var/lib/postgresql/ and /var/log/
+ * [2b9aace5] Bumping standards-Verison, no changes needed.
+
+ [ Jan Wagner ]
+ * [3bb873e4] disable epn for check_rbl
+
+ [ Evgeni Golov ]
+ * [2a7ab4b8] check_libs: ignore /var/spool/
+
+ -- Bernd Zeimetz <bzed@debian.org> Fri, 14 Jun 2013 20:53:49 +0200
+
+nagios-plugins-contrib (6.20130521) unstable; urgency=low
+
+ * [e68c82e1] check_raid: do not run hpacucli if cciss_vol_status is available.
+ * [4a1c57e8] Also support tw-cli as additional name for the 3ware binary.
+ Thanks to Dennis Hoppe
+ * [eb5e1c7c] Add /run/ to the check_libs ignore file.
+
+ -- Bernd Zeimetz <bzed@debian.org> Tue, 21 May 2013 22:11:50 +0200
+
+nagios-plugins-contrib (5.20130307) experimental; urgency=low
+
+ * [aa113517] Fix typos s/Recommands/Recommends/
+ * [8e2b3019] Ensure typoed fieldnames in control files are not ignored.
+ * [ecead75d] Add extras folder.
+ * [0423b2a4] Add check_memory.
+ * [90ba4bec] Better command example for send_nsca_host_or_service_check_result
+ * [a564c43d] Add check_nfsmounts.
+ * [dc3d5425] Add Recommends for check_nfsmounts.
+ * [bf12e2e0] Add check_apt for check_multi.
+ * [52d46e1a] Add perl dependencies automatically.
+ * [e77b2058] Fix building check_memcached in Ubuntu.
+ * [98c1f4c1] extras needs to Suggests only.
+ * [f84d3678] Add check_clamav.
+ * [05cca8f6] Merge branch 'master' of vasks.debian.org:/git/pkg-nagios/pkg-nagios-plugins-contrib
+ * [80415a76] Add some missing directories to the check-libs config.
+ * [08a91068] Add check_varnish
+ * [15385538] Fix watch line of check_clamav.
+ * [74bf1d94] Update check_raid to version 3.0
+ * [26209f4e] Update check_hpasm to 4.6.3
+ * [6cd0fa8f] Updating check_multipath to 0.1.8
+ * [34fa0ffc] Updating check_mysql_health to 2.1.8.2
+ * [9e3f357d] Updating check_ssl_cert to 1.14.4
+ * [6e6813a9] Refreshing patches.
+ * [b6f439c4] Remove unused check_varnish Makefile.
+ * [6151979b] Rename buggy auto-generated libexec directory.
+ * [4c08976d] Add pkg-config as check_varnish build dependency.
+ * [05f09fee] Auto update of debian/copyright
+ * [9d462776] Auto update of debian/control
+ * [09060a70] Add --enable-stack-protector to default options.
+ * [37896ae4] Add a cciss related bugfix to check_raid.
+
+ -- Bernd Zeimetz <bzed@debian.org> Thu, 07 Mar 2013 00:31:10 +0100
+
+nagios-plugins-contrib (4.20120702) unstable; urgency=low
+
+ * [bf291c63] check_backuppc: move backuppc to Suggests.
+ Thanks to Werner Detter (Closes: #679871)
+ * [0997dfd3] Auto update of debian/control
+
+ -- Bernd Zeimetz <bzed@debian.org> Mon, 02 Jul 2012 19:28:52 +0200
+
+nagios-plugins-contrib (3.20120614) unstable; urgency=low
+
+ * [30fd20be] check_packages should return CRITICAL for outstanding security updates.
+ * [3cd5656f] Fix last patch; refresh others.
+ * [2c3c1626] Remove extra debug print statement.
+ * [4e43ec28] Fix a funky ? : related bug.
+ * [e9172807] Add a check_apt.cmd example config for check_multi.
+ * [15d58b48] Remove unneeded || COUNT(CRITICAL) > 0 in check_apt.cmd
+ * [ea2f8abc] check_ipmi_sensor: updating to 3.1
+ * [d405a206] check_ssl_cert: fix version number (was updated already).
+
+ -- Bernd Zeimetz <bzed@debian.org> Thu, 14 Jun 2012 22:02:34 +0200
+
+nagios-plugins-contrib (2.20120529) unstable; urgency=low
+
+ * [c6b83cea] Fix email_delivery.cfg
+ * [f250c516] Merge pull request #5 from waja/master.
+ Add perl-doc at Suggests, as needed by check_email_delivery --help
+ * [9533beb7] Add check_webinject plugin.
+ * [05a3af45] Auto update of debian/copyright
+ * [255aa819] Auto update of debian/control
+ * [853905cf] Fix CLEANFILES in common.mk
+ * [3e75a059] Better webinject command definitions.
+ * [6275a3f3] check_raid should use cciss_vol_status if available.
+ Only use hpacucli if not.
+ * [9859f269] Add some missing version information.
+ * [d142da3c] Update check_raid to 1.107
+ * [942e9f23] Updating check_email_delivery.
+ * [749c40e1] Auto update of debian/control
+ * [c593192c] Add Enhances: nagios-plugins,.... to the package.
+ * [24486361] Merge pull request #6 from waja/master
+ add check_backuppc
+ * [8d634bb6] Better/fixed CLEANFILES target handling.
+ Please note that CLEANFILES must be defined before including
+ ../common.mk
+ * [558e31aa] Merge branch 'master' of
+ vasks.debian.org:/git/pkg-nagios/pkg-nagios-plugins-contrib.
+ Conflicts:
+ check_backuppc/Makefile
+ * [dea493d7] Add (unfinished) DSA checks and check_libs from weaselutils.
+ * [5d0cf660] Finish integration of the check_libs plugin.
+ * [f2a3d5b6] Add (unfinished) control and copyright file for dsa checks.
+ * [f7c33de6] Auto update of debian/copyright
+ * [fd344412] Auto update of debian/control
+ * [8c9693ee] Updating check_hpasm to 4.5.2
+ * [3f0a95dc] Updating check_raid to rev1.119
+ * [5220084d] Update check_ssl_cert to 1.13.0
+ * [c2c83516] More progress on the DSA plugins
+ * [a9f80a8d] Implement a way to install cronjob scripts.
+ CRONJOBDIR := /usr/lib/nagios/cronjobs
+ * [a8dc3842] Finishing dsa check packaging.
+ * [de999e73] Add config location patch for check_libs.
+ * [336ad307] Auto update of debian/control
+ * [33b86286] Typo fix.
+ * [d0140fd4] Auto update of debian/control
+ * [9059ab99] Don't reset LD/C/CXX/CPPFLAGS when including common.mk
+ * [f0e986fa] Add snmp to check_printer's Recommends.
+ * [f993848c] Add missing recommends for DSA plugins.
+ * [80938fd9] Support checks written in Python.
+ * [cbf5f37f] Auto update of debian/control
+ * [6f5f3157] Updating changelog.
+ * [72492690] Fix location of check_packages in cron script.
+ * [68284bb0] Add patch to fix check_packages output.
+ * [fd32ac40] check_libs needs libyaml-syck-perl.
+ * [63d54efa] Updating changelog.
+ * [f29b76d6] Add check_zone_auth plugin.
+ * [0f95a649] Add check_whois plugin.
+ * [3562b848] Add check_zone_rrsig_expiration plugin.
+
+ -- Bernd Zeimetz <bzed@debian.org> Tue, 29 May 2012 22:33:51 +0200
+
+nagios-plugins-contrib (1.20120228) unstable; urgency=low
+
+ * [9079e12a] Add check-multipath.pl upstream version.
+ * [8e0a5908] Add patch for check_multipath
+ * [6da07d78] Ignore .rej and .orig files.
+ * [4bda0e7c] Upstream included our patch already.
+ * [21e3756b] Add packaging info for check_multipath.
+ * [9f664c91] Link debian/README.source to README for github fancyness.
+ * [a527810c] Add check_snmp_environment (unfinished).
+ * [41052baf] Add some useful error messages for the packaging-helper.py
+ * [afa04c7b] Finish check_snmp_environment plugin.
+ No .cfg file included yet.
+ * [743e5dfd] Add current version info to check_snmp_environment.
+ * [76bccfe3] Fix SHA1 watch in packaging-helper.py
+ * [8f4c4d13] Add check_printer plugin.
+ * [7dc69bf0] Add check_haproxy and check_httpd_status.
+ manually merging the work of Jan Wagner <waja@cyconet.org>.
+ * [2577af3a] Better sorting of the quilt series file.
+ * [0526814c] Add nagios: -epn tags to the non epn checks in
+ check_email_delivery.
+ * [caadc8e7] Don't add a dependency if it is listed already.
+ * [974e8d36] Add check_hpasm.
+ * [0d3b76da] make -j should work for debian/rules now
+ * [6f4593ac] Fix too long description.
+ * [a3cce5ad] check_hpasm needs snmpwalk, recommend it.
+ * [4760a28d] shorter check_snmp_environment desc
+ * [1af8a931] Fix FSF address.
+ * [a2e9282a] Auto update of debian/copyright
+ * [3a702550] Auto update of debian/control
+ * [d4d74a06] Add --parallel to dh calls.
+ * [a41f66fe] Merge remote-tracking branch 'github/master'
+ Conflicts:
+ debian/control
+ * [65d87a13] Merge pull request #3 from waja/master
+ adding check_mysql_health
+ * [573abd8c] Ensure Depends is nto used in plugin control files.
+ * [42d0dcfe] Auto update of debian/control
+ * [58e56a7b] Auto-generate and install README.Debian.plugins
+ * [4a73d8a7] Enhance dependency description in debian/README.source
+ * [69f4e3e9] Merge pull request #4 from waja/master
+ fixing 'check_ipmi_sensor_exclude' command definition
+ (Closes: #661528)
+
+ -- Bernd Zeimetz <bzed@debian.org> Tue, 28 Feb 2012 20:17:06 +0100
+
+nagios-plugins-contrib (1.20120220) unstable; urgency=low
+
+ * [462444da] Removing unused code copies of the install module.
+
+ -- Bernd Zeimetz <bzed@debian.org> Mon, 20 Feb 2012 22:49:53 +0100
+
+nagios-plugins-contrib (1.20120219) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Bernd Zeimetz <bzed@debian.org> Sun, 19 Feb 2012 00:42:17 +0100
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/compat b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/control b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/control
new file mode 100644
index 0000000..213d467
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/control
@@ -0,0 +1,223 @@
+Source: nagios-plugins-contrib
+Section: net
+Priority: optional
+Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
+Uploaders: Bernd Zeimetz <bzed@debian.org>, Jan Wagner <waja@cyconet.org>, Stefan Schoerghofer <amd1212@4md.gr>, Petter Reinholdtsen <pere@hungry.com>, Leo Antunes <leo@costela.net>
+Build-Depends: debhelper (>= 8.0.0),
+ dh-autoreconf,
+ python,
+ python-debian,
+ quilt (>= 0.46-7),
+ autotools-dev, flex, libmemcached-dev [!hurd-i386], libvarnishapi-dev [!hurd-i386 !m68k], pkg-config, automake-1.15
+Standards-Version: 4.3.0
+Vcs-Git: https://salsa.debian.org/nagios-team/pkg-nagios-plugins-contrib.git
+Vcs-Browser: https://salsa.debian.org/nagios-team/pkg-nagios-plugins-contrib
+
+Package: nagios-plugins-contrib
+Architecture: any
+Depends: ${misc:Depends}
+Recommends: libsocket-perl, libmonitoring-plugin-perl | libnagios-plugin-perl, libnet-snmp-perl, whois, nagios-plugins-basic, libnet-dns-perl, libdate-manip-perl, libmonitoring-plugin-perl | libnagios-plugin-perl (>= 0.31), libnet-cups-perl, debsecan, libio-socket-ssl-perl, libmail-imapclient-perl, libnet-smtp-tls-perl, libnet-smtp-ssl-perl, libnet-ssleay-perl, libnet-smtpauth-perl, bind9-host | knot-host, python, liblocale-gettext-perl, liblwp-useragent-determined-perl, snmp, freeipmi-tools, libipc-run-perl, lsof, libyaml-syck-perl, libxml-simple-perl, python-pymongo, libdbd-mysql-perl, libreadonly-perl, libdata-validate-domain-perl, libdata-validate-ip-perl, libredis-perl, libnet-snmp-perl (>= 5), libtimedate-perl, curl, file, openssl, libwebinject-perl, libnet-dns-sec-perl, ruby | ruby-interpreter, binutils,
+ ${perl:Depends},
+ ${python:Depends},
+ ${shlibs:Depends}
+Suggests: backuppc, perl-doc, libsys-virt-perl, cciss-vol-status (>= 1.10), mpt-status, smstools (>= 3~), expect, nagios-plugin-check-multi, moreutils, percona-toolkit, python2.7, python-pymongo
+Enhances: nagios-plugins, nagios-plugins-basic, nagios-plugins-standard
+Description: Plugins for nagios compatible monitoring systems
+ This package provides various plugins for Nagios compatible monitoring
+ systems like Nagios and Icinga.
+ It contains the following plugins:
+ .
+ * check_ajp (1): plugin to monitor the AJP ping response time
+ Should work with all application servers (Tomcat, JBoss,....)
+ which provide an AJPv13 connector.
+ * check_backuppc (1.1.0): plugin for checking on the status of
+ BackupPC backups
+ * check_bgpstate (1.0): plugin to check all BGP session on Cisco routers
+ * check_checksums (20130611): plugin to verify file checksums
+ against (local, not 100% secure) lists.
+ Supports md5 sha1 sha224 sha256 sha384 sha512 checksums.
+ * check_clamav (1.2): plugin to check for clamav signature freshness
+ This script is used to compare the version and signature
+ level of the currently running clamd daemon with the latest
+ available versions listed in the TXT record for
+ current.cvd.clamav.net.
+ * check_cups (0.2): plugin to check queues on a remote CUPS server
+ This plugin is monitoring of queues on a remote CUPS server,
+ which means that it doesn't need to be installed on the print
+ server and run via NRPE.
+ * check_debsecan (1.0.0): plugin to check the Debian CVE lists against your installed packages
+ * check_drbd (0.5.3): plugin to check DRBD device states
+ This plugin is for checking DRBD device states. It parses the
+ /proc/drbd device and analyses the output.
+ * check_email_delivery (0.7.1b): plugin to monitor email delivery
+ Some typical uses of this plugin include:
+ - check SMTP server
+ - check messages and quota on IMAP server
+ - check email delivery loop
+ - check auto-responder function
+ - keep an eye on email lag
+ - monitor automated mailboxes
+ - check email-to-FTP or other special email gateways
+ * check_etc_hosts (?): plugin to check /etc/hosts for DNS consistency
+ Check /etc/hosts, and make sure the content matches the information
+ in DNS. Lookup IP, and check if the names listed in /etc/hosts
+ maches the one in DNS. It will ignore entries with '# NAGIOSIGNORE'
+ at the end.
+ * check_etc_resolv: plugin to check /etc/resolv.conf
+ Check /etc/resolv.conf, and make sure the name servers listed are
+ working. It will ignore entries with '# NAGIOSIGNORE' at the end.
+ * check_graphite: Plugin to monitor graphite metrics
+ * check_haproxy (rev135): plugin to check the HAProxy statistics url
+ * check_haproxy_stats (1.0.1): check haproxy via admin socket
+ Different from check_haproxy this plugin is able to check
+ haproxy via the unix admin socket.
+ * check_hp_bladechassis (1.0.1): plugin to check the hardware health of
+ HP blade enclosures via SNMP.
+ The plugin is only tested with the c7000 enclosure.
+ * check_hpasm (4.8): plugin to check the hardware health of
+ HP Proliant Servers
+ It either uses snmp or - if installed - the hpasm package locally.
+ The plugin checks the health of
+ * Processors
+ * Power supplies
+ * Memory modules
+ * Fans
+ * CPU- and board-temperatures
+ * Raids
+ and alerts you if one of these components is faulty or operates
+ outside its normal parameters.
+ * check_httpd_status (rev204): plugin checking Apache or Lighthttpd
+ server-status page (using mod_status)
+ * check_ipmi_sensor (3.13): IPMI Sensor Monitoring Plugin
+ Plugin to monitor the hardware status (fan speed, temperaturs,
+ voltages, power usage, ...) of a server using IPMI.
+ * check_libs (0.2015012901 ): plugin to report the usage of no longer existing
+ libraries by running processes
+ * check_libs_ng (0.1.0): plugin to report processes using outdated libraries
+ depents on kernel features present in kernels newer than 3.3
+ * check_libvirt (v7.0.3): monitor virtualization solutions using libvirt
+ * check_lm_sensors (4.1.1): plugin to monitor hardware sensors
+ and disk temperatures
+ * check_memcached (1.3): plugin to check memcached instances
+ It will give a critical message if a partiular memcached host is
+ inaccessible and generate a warning if the hit/miss ratio falls
+ below a given threshold or the number of evictions exceeds a given
+ limit.
+ Hit/miss and evictions are measured over a 30 minute interval,
+ using a memcached object to store the earlier statistics.
+ * check_memory (1.0.1): plugin to check for free memory
+ This plugin excludes the system cache and buffer, because
+ on some system with very stable memory usage it is perfectly
+ normal for system cache to fill in all available memory.
+ * check_mongodb (b33e763): Plugin script to monitor your MongoDB server(s)
+ * check_multipath (0.4.7): plugin to monitor the number of available and
+ failed paths of multipath devices
+ * check_mysql_health (2.2.2): plugin to check various parameters of a
+ MySQL database
+ * check_nfsmounts: checks whether there are stale NFS mounts on the host
+ * check_printer: plugin to check printer supply levels using SNMP
+ It outputs performance data for all supplies
+ found, for example toner and drum.
+ * check_raid (4.0.9): plugin to check sw/hw RAID status
+ The plugin looks for any known types of RAID configurations,
+ and checks them all.
+ Supports:
+ - Adaptec AAC RAID via aaccli or afacli or arcconf
+ - AIX software RAID via lsvg
+ - HP/Compaq Smart Array via cciss_vol_status (hpsa supported too)
+ - HP Smart Array Controllers and MSA Controllers via hpacucli
+ - HP Smart Array (MSA1500) via serial line
+ - Linux 3ware SATA RAID via tw_cli
+ - Linux Device Mapper RAID via dmraid
+ - Linux DPT/I2O hardware RAID controllers via /proc/scsi/dpt_i2o
+ - Linux GDTH hardware RAID controllers via /proc/scsi/gdth
+ - Linux LSI MegaRaid hardware RAID via CmdTool2
+ - Linux LSI MegaRaid hardware RAID via megarc
+ - Linux LSI MegaRaid hardware RAID via /proc/megaraid
+ - Linux MegaIDE hardware RAID controllers via /proc/megaide
+ - Linux MPT hardware RAID via mpt-status
+ - Linux software RAID (md) via /proc/mdstat
+ - LSI Logic MegaRAID SAS series via MegaCli
+ - LSI MegaRaid via lsraid
+ - Serveraid IPS via ipssend
+ - Solaris software RAID via metastat
+ - Areca SATA RAID Support via cli64/cli32
+ - Detecting SCSI devices or hosts with lsscsi
+ * check_rbl (1.4.4): plugin to check if a server is blacklisted
+ * check_redis (0.73): Redis Server check plugin
+ This plugin checks Redis NoSQL database status variables,
+ measures its response time and if specified allows one to set thresholds
+ on one or more key data. You can set thresholds for data in stats
+ variables and some of them are also conveniently available as long options
+ with special threshold syntax. Plugin also calculates statistics such as
+ Hitrate (calculated as rate of change of hits/misses) and memory use and
+ can check replication delay.
+ * check_smstools: plugin to check GSM Modems using smstools
+ check_smstools is a plugin to monitor a GSM modem
+ signal quality and registration status with smstools.
+ * check_snmp_environment (0.7): plugin to check various hardware statuses
+ Using snmp the plugin is able to retrieve Fan, power-supply,
+ voltage, temperature, card and module status and various other
+ information from Cisco, Nokia, Blue Coat, IronPort,
+ Foundry Network, Linux (using lm-sensors), Extreme Networks,
+ Juniper Networks, HP ProCurve, Netscreen, Citrix NetScaler
+ and Transmode Systems hardware.
+ * check_snmp_time (1.1): plugin to check the time on a server using SNMP
+ This plugin queries the remote systems time through SNMP and compares
+ it against the local time on the Nagios server. This identifies systems
+ with no correct time set and sends alarms if the time is off to far.
+ HOST-RESOURCES-MIB::hrSystemDate.0 used here returns 8 or 11 byte octets.
+ SNMP translation needs to be switched off and to be converted the
+ received SNMP data into readable strings.
+ * check_ssl_cert (1.83.0): plugin to check the CA and validity of an
+ X.509 certificate
+ * check_uptime (0.521): check_uptime returns uptime of a system
+ in text (readable) format as well as in minutes for performance graphing.
+ The plugin can either run on a local unix system (using 'uptime' command)
+ or check remote system by SNMP. Also it is able to report one CRITICAL
+ or WARNING alert if system has been rebooted since last check.
+ * check_v46 (2013-08-26T07:33:11Z): ipv4/ipv6 Nagios plugin wrapper
+ Nagios plugin wrapper for running the actual plugin for both / either of
+ IPv6 and/or IPv4. The worst result of the actual plugin runs will be
+ the wrapper return value, that is, result will be OK only if all checks
+ returned OK. Compatible with any plugin with standard command line options
+ -6/-4.
+ * check_varnish (672523d): plugin to monitor varnish instances
+ * check_webinject (1.80): plugin for testing web services
+ It uses the WebInject Perl module for automated testing of
+ web applications and web services. It can be used to check
+ individual system components that have HTTP interfaces
+ (JSP, ASP, CGI, PHP, AJAX, Servlets, HTML Forms,
+ XML/SOAP Web Services, REST, etc).
+ * check_whois (1.24): plugin to check for the expiration of a domain.
+ The plugin may not yet work with all registrars, since their
+ output formats differ or there is no expiration date in the
+ whois output.
+ * check_zone_auth (1.13): plugin to ensure that the authoritative nameservers
+ for a given zone remain in sync.
+ * check_zone_rrsig_expiration (1.14): plugin to check for expiration of
+ signatures in dnssec-enabled zones.
+ * dsa (2300473): plugins from the Debian System Administrators
+ nagios plugins repository.
+ * check_cert_expire: check for certificate expiration
+ using openssl on the certificate file
+ * check_cert_expire_dir: checks if any of the *.crt files in
+ a directory on disk will expire soon
+ * check_dnssec_delegation: check for correct DNSSEC
+ delegation
+ * check_entropy: check if there is enough entropy available.
+ * check_packages: replacement for check_apt; needs a cronjob
+ to update the apt database regularly
+ * check_running_kernel: check if a system was rebooted after
+ a kernel upgrade
+ * check_soas: check SOA records
+ * check_statusfile: deliver the content of a status file
+ as check result
+ * extras (1): various scripts and extras
+ Not a plugin, but a collection of various useful
+ event/obsession handlers and similar scripts.
+ * percona-nagios-plugins (1.1.8): Percona Monitoring Plugins (nagios)
+ Nagios MySQL Monitoring plugins writting/provided by Percona.
+ .
+ Some scripts and binaries need more packages installed to work, which is
+ implemented as recommends.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/control.in b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/control.in
new file mode 100644
index 0000000..2b8b9a7
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/control.in
@@ -0,0 +1,33 @@
+Source: nagios-plugins-contrib
+Section: net
+Priority: optional
+Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
+Uploaders: #AUTO_UPDATE_Uploaders#
+Build-Depends: debhelper (>= 8.0.0),
+ dh-autoreconf,
+ python,
+ python-debian,
+ quilt (>= 0.46-7),
+ #AUTO_UPDATE_Build-Depends#
+Standards-Version: 4.3.0
+Vcs-Git: https://salsa.debian.org/nagios-team/pkg-nagios-plugins-contrib.git
+Vcs-Browser: https://salsa.debian.org/nagios-team/pkg-nagios-plugins-contrib
+
+Package: nagios-plugins-contrib
+Architecture: any
+Depends: ${misc:Depends}
+Recommends: #AUTO_UPDATE_Recommends#,
+ ${perl:Depends},
+ ${python:Depends},
+ ${shlibs:Depends}
+Suggests: #AUTO_UPDATE_Suggests#
+Enhances: nagios-plugins, nagios-plugins-basic, nagios-plugins-standard
+Description: Plugins for nagios compatible monitoring systems
+ This package provides various plugins for Nagios compatible monitoring
+ systems like Nagios and Icinga.
+ It contains the following plugins:
+ .
+#AUTO_UPDATE_Description#
+ .
+ Some scripts and binaries need more packages installed to work, which is
+ implemented as recommends.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/copyright
new file mode 100644
index 0000000..2c81a37
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/copyright
@@ -0,0 +1,1209 @@
+
+The Debian packaging is Copyright © 2012 Bernd Zeimetz <bzed@debian.org> and
+is licensed under der GPL, either version 3 of the License, or
+(at your option) any later version.
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
+
+
+Part of the Debian packaging is the content of the debian directory,
+and the following files:
+ common*.mk
+ */control
+ */copyright
+ */Makefile
+
+
+The copyright information for the included plugins is listed below:
+
+
+check_ajp:
+
+The plugin was downloaded from:
+http://blog.devnu11.net/projects/
+
+ Comment: Please send bug fixes and enhancements to <rmichel@devnu11.net>
+
+ check_ajp - nagios plugin for jboss monitoring
+ Copyright (C) 2010 Michel Rode <rmichel@devnu11.net>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+------------------------------------------------------------------------------
+
+check_backuppc:
+
+The plugin was downloaded from:
+http://n-backuppc.sourceforge.net/
+
+ Copyright (C) 2006,2007 Seneca Cunningham
+
+ License: GPL v2
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+
+------------------------------------------------------------------------------
+
+check_bgpstate:
+
+The plugin was downloaded from:
+https://raw.github.com/nagios-plugins/nagios-plugins/ba7615631add0b610ada6a819d6c8f8c46a2d36d/contrib/check_bgpstate.pl
+
+ C) 2000 Christoph Kron <ck@zet.net>
+
+ License: GPL-2
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 1 can be found in "/usr/share/common-licenses/GPL-2".
+
+
+------------------------------------------------------------------------------
+
+check_checksums:
+
+ Copyright (C) 2013 Bernd Zeimetz <b.zeimetz@conova.com>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+
+------------------------------------------------------------------------------
+
+check_clamav:
+
+The plugin was downloaded from:
+http://exchange.nagios.org/directory/Plugins/Anti-2DVirus/ClamAV/ClamAV-check-plugin/details
+
+ Copyright (c) 2005-2008 Darren Spruell <phatbuckett@gmail.com>
+
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+
+------------------------------------------------------------------------------
+
+check_cups:
+
+The plugin was downloaded from:
+https://exchange.icinga.org/oldmonex/1867-check_cups/
+
+ Copyright (C) Steve Huff <shuff@hmdc.harvard.edu>
+
+ This Nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY.
+ It may be used, redistributed and/or modified under the terms of the GNU
+ General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).
+
+
+
+------------------------------------------------------------------------------
+
+check_debsecan:
+
+The plugin was downloaded from:
+https://github.com/AMD1212/check_debsecan
+
+ Copyright (C) 2017 Stefan Schörghofer
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+
+------------------------------------------------------------------------------
+
+check_drbd:
+
+The plugin was downloaded from:
+https://exchange.icinga.org/oldmonex/512-check_drbd/
+
+ Copyright (C) Brandon Lee Poyner <bpoyner@ccac.edu>
+
+ The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
+ copies of the plugins under the terms of the GNU General Public License.
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 1 can be found in "/usr/share/common-licenses/GPL-1".
+
+
+------------------------------------------------------------------------------
+
+check_email_delivery:
+
+The plugin was downloaded from:
+http://buhacoff.net/software/check_email_delivery/
+
+ Copyright (C) 2005-2011 Jonathan Buhacoff
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+
+------------------------------------------------------------------------------
+
+check_etc_hosts:
+
+ Copyright (C) 2002 Petter Reinholdtsen <pere@hungry.com>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+
+------------------------------------------------------------------------------
+
+check_etc_resolv:
+
+ Copyright (C) 2001 Petter Reinholdtsen <pere@hungry.com>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+
+------------------------------------------------------------------------------
+
+check_graphite:
+
+The plugin was downloaded from:
+https://github.com/disqus/nagios-plugins
+
+ Copyright: (c) 2012 DISQUS.
+ License: Apache License 2.0
+
+ On Debian systems, a copy of the Apache License 2.0 can be found in
+ /usr/share/common-licenses/Apache-2.0
+
+
+------------------------------------------------------------------------------
+
+check_haproxy:
+
+The plugin was downloaded from:
+http://cvs.orion.education.fr/viewvc/viewvc.cgi/nagios-plugins-perl/trunk/plugins/check_haproxy.pl?view=log
+
+ 2010 Stéphane Urbanovski <stephane.urbanovski@ac-nancy-metz.fr>
+
+ License: GPL v2
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+
+
+
+------------------------------------------------------------------------------
+
+check_haproxy_stats:
+
+The plugin was downloaded from:
+http://exchange.nagios.org/directory/Plugins/Clustering-and-High-2DAvailability/check_haproxy_stats-2Epl/details
+
+ Copyright (C) 2012, Giacomo Montagner <giacomo@entirelyunlike.net>
+
+ This program is free software; you can redistribute it and/or modify it
+ under the same terms as Perl 5.10.1.
+ For more details, see http://dev.perl.org/licenses/artistic.html
+
+ This program is distributed in the hope that it will be
+ useful, but without any warranty; without even the implied
+ warranty of merchantability or fitness for a particular purpose.
+
+ On Debian systems a copy of the Artistic license can be found
+ in /usr/share/common-licenses/Artistic.
+
+
+
+------------------------------------------------------------------------------
+
+check_hp_bladechassis:
+
+The plugin was downloaded from:
+http://folk.uio.no/trondham/software/check_hp_bladechassis.html
+
+ AUTHOR: Trond H. Amundsen <t.h.amundsen@usit.uio.no>
+
+
+ Copyright (C) 2010 Trond H. Amundsen
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+
+
+------------------------------------------------------------------------------
+
+check_hpasm:
+
+The plugin was downloaded from:
+http://labs.consol.de/lang/en/nagios/check_hpasm/
+
+ AUTHOR: Gerhard Lausser <gerhard.lausser@consol.de>
+ License: GPL v2
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+
+------------------------------------------------------------------------------
+
+check_httpd_status:
+
+The plugin was downloaded from:
+http://cvs.orion.education.fr/viewvc/viewvc.cgi/nagios-plugins-perl/trunk/plugins/check_httpd_status.pl?view=log
+
+ Dennis D. Spreen (dennis at spreendigital.de)
+ De Bodt Lieven (Lieven dot DeBodt at gmail.com)
+ Karsten Behrens (karsten at behrens dot in)
+ Geoff McQueen (geoff dot mcqueen at hiivesystems dot com )
+ Dave Steinberg (dave at redterror dot net)
+ Gerhard Lausser (gerhard dot lausser at consol dot de)
+ Stéphane Urbanovski <stephane.urbanovski@ac-nancy-metz.fr>
+
+ License: GPL v2
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+
+
+
+------------------------------------------------------------------------------
+
+check_ipmi_sensor:
+
+The plugin was downloaded from:
+http://www.thomas-krenn.com/en/oss/ipmi-plugin.html
+
+ Copyright (C) 2009-2013 Thomas-Krenn.AG (written by Werner Fischer),
+ additional contributors see changelog.txt
+
+ This program is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3 of the License, or (at your option) any later
+ version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program; if not, see <http://www.gnu.org/licenses/>.
+
+
+
+ License and copyright for contrib/default-combinedgraph.template:
+
+ Author: Andy Spiegl <pnp4nagios.andy@spiegl.de>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2 as
+ published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+
+------------------------------------------------------------------------------
+
+check_libs:
+
+The plugin was downloaded from:
+https://gitweb.noreply.org/tools/monitoring.git/
+
+
+ check_libs:
+
+ Copyright (C) 2005, 2006, 2007, 2008, 2012 Peter Palfrader <peter@palfrader.org>
+ 2012 Uli Martens <uli@youam.net>
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+ update-check_libs-status:
+
+ Based on update-apt-status
+ Copyright 2009 Peter Palfrader
+
+ Copyright 2014 conova communications GmbH
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+------------------------------------------------------------------------------
+
+check_libs_ng:
+
+
+ check_libs_ng:
+
+ Copyright (c) 2017 Leo Antunes <leo@costela.net>
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+------------------------------------------------------------------------------
+
+check_libvirt:
+
+The plugin was downloaded from:
+http://git.op5.org/gitweb?p=system-addons/plugins/op5/check_libvirt.git;a=summary
+
+ License: GPL 2
+ Copyright (c) 2011 op5 AB
+ Author: Kostyantyn Hushchyn <op5-users@lists.op5.com>
+
+ For direct contact with any of the op5 developers send a mail to
+ op5-users@lists.op5.com
+ Discussions are directed to the mailing list op5-users@op5.com,
+ see http://lists.op5.com/mailman/listinfo/op5-users
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2 as
+ published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+
+
+------------------------------------------------------------------------------
+
+check_lm_sensors:
+
+The plugin was downloaded from:
+https://github.com/matteocorti/check_lm_sensors
+
+ Copyright (c) 2007, ETH Zurich.
+
+ Author: Matteo Corti <matteo.corti@id.ethz.ch>
+
+ This module is free software; you can redistribute it and/or modify it
+ under the terms of GNU general public license (gpl) version 3.
+
+
+------------------------------------------------------------------------------
+
+check_memcached:
+
+The plugin was downloaded from:
+http://exchange.nagios.org/directory/Plugins/Websites,-Forms-and-Transactions/check_memcached-IV/details
+
+ This program was initially developed by Lonely Planet for internal use
+ and has kindly been made available to the Open Source community for
+ redistribution and further development under the terms of the
+ GNU General Public License v3: http://www.gnu.org/licenses/gpl.html
+
+ This program is supplied 'as-is', in the hope that it will be useful, but
+ neither Lonely Planet nor the authors make any warranties or guarantees
+ as to its correct operation, including its intended function.
+
+ Or in other words:
+ Test it yourself, and make sure it works for YOU.
+
+ Author: George Hansper e-mail: George.Hansper@lonelyplanet.com.au
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
+
+
+------------------------------------------------------------------------------
+
+check_memory:
+
+The plugin was downloaded from:
+https://github.com/dermoth/misc-code/blob/master/nagios/plugins/check_memory
+
+ Copyright (C) 2007 Thomas Guyot-Sionnest <tguyot@gmail.com>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301 USA.
+
+
+------------------------------------------------------------------------------
+
+check_mongodb:
+
+The plugin was downloaded from:
+https://github.com/mzupan/nagios-plugin-mongodb
+
+ Copyright: (c) 2012, Mike Zupan <mike@zcentric.com>
+ License: BSD
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+------------------------------------------------------------------------------
+
+check_multipath:
+
+The plugin was downloaded from:
+http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check-2Dmultipath-2Epl/details
+
+ Copyright (C) 2011 Hinnerk Rümenapf, Trond H. Amundsen, Gunther Schlegel, Matija Nalis,
+ Bernd Zeimetz
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+
+------------------------------------------------------------------------------
+
+check_mysql_health:
+
+The plugin was downloaded from:
+http://labs.consol.de/lang/en/nagios/check_mysql_health/
+
+ AUTHOR: Gerhard Lausser <gerhard.lausser@consol.de>
+ License: GPL v2
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+
+------------------------------------------------------------------------------
+
+check_nfsmounts:
+
+The plugin was downloaded from:
+http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_nfsmounts/details
+
+ Author: Clint Byrum <clint@adicio.com>
+
+ Copyright 2007 Adicio, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+
+------------------------------------------------------------------------------
+
+check_printer:
+
+The plugin was downloaded from:
+https://www.secure-computing.net/trac/browser/SCN%20Open%20Source/trunk/nagios/
+
+ Copyright (c) 2007,2011 Eric F Crist
+
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, are permitted provided that the following
+ conditions are met:
+
+ Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+------------------------------------------------------------------------------
+
+check_raid:
+
+The plugin was downloaded from:
+https://github.com/glensc/nagios-plugin-check_raid
+
+ 2004-2006 Steve Shipway, university of auckland,
+ 2009-2013 Elan Ruusamäe <glen@pld-linux.org>
+
+ License: GPL v2
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+
+
+
+------------------------------------------------------------------------------
+
+check_rbl:
+
+The plugin was downloaded from:
+https://github.com/matteocorti/check_rbl
+
+ Copyright (c) 2009 ETH Zurich
+ Copyright (c) 2010 Elan Ruusamae
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301 USA.
+
+
+------------------------------------------------------------------------------
+
+check_redis:
+
+The plugin was downloaded from:
+https://github.com/willixix/WL-NagiosPlugins
+
+ Author : William Leibzon - william@leibzon.org
+ Licence : GPL - summary below, full text at http://www.fsf.org/licenses/gpl.txt
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301 USA.
+
+
+------------------------------------------------------------------------------
+
+check_smstools:
+
+The plugin was downloaded from:
+http://exchange.nagios.org/directory/Plugins/Hardware/Mobile-Devices/check_smstools/details
+
+ Author: Patrick Schoenfeld <schoenfeld@debian.org>
+ This file is licensed under the terms of the GPL v2 or later.
+
+
+------------------------------------------------------------------------------
+
+check_snmp_environment:
+
+The plugin was downloaded from:
+http://exchange.nagios.org/directory/Plugins/Hardware/Network-Gear/Cisco/Check-various-hardware-environmental-sensors/details
+
+
+ Author : Michiel Timmers ( michiel.timmers AT gmx.net)
+ Based on : "check_snmp_env" plugin (version 1.3) from Patrick Proy
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+
+
+
+------------------------------------------------------------------------------
+
+check_snmp_time:
+
+The plugin was downloaded from:
+https://raw.github.com/mludvig/nagios-plugins/master/check_snmp_time.pl
+
+ (c) 2007 Karl Bolingbroke
+ (c) 2010 Frank Migge <support@frank4dd.com>
+
+ License: GPL-1
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 1 can be found in "/usr/share/common-licenses/GPL-1".
+
+
+------------------------------------------------------------------------------
+
+check_ssl_cert:
+
+The plugin was downloaded from:
+https://github.com/matteocorti/check_ssl_cert
+
+ Copyright (c) 2007-2011 ETH Zurich
+
+ Authors:
+
+ Dan Wallis
+ Lawren Quigley-Jones
+ Marc Fournier
+ Marcus Rejås
+ Matteo Corti
+ Matthias Fuhrmeister
+ Raphael Thoma
+ Scott Worthington
+ Sven Nierlein
+ Tuomas Haarala
+ Wolfgang Schricker
+ Yannick Gravel
+
+ This module is free software; you can redistribute it and/or modify it
+ under the terms of GNU general public license (gpl) version 3.
+
+
+------------------------------------------------------------------------------
+
+check_uptime:
+
+The plugin was downloaded from:
+https://github.com/willixix/WL-NagiosPlugins
+
+ Authors : William Leibzon - william@leibzon.org
+ Licence : GPL - summary below, full text at http://www.fsf.org/licenses/gpl.txt
+
+ =========================== PROGRAM LICENSE =================================
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+
+------------------------------------------------------------------------------
+
+check_v46:
+
+The plugin was downloaded from:
+https://gitorious.org/nagios-monitoring-tools/nagios-monitoring-tools/
+
+ 2012-02, 2012-03 Ville.Mattila@csc.fi
+ Copyright (C) 2012-2013 CSC - IT Center for Science Ltd.
+
+ This program is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3 of the License, or (at your option) any later
+ version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program; if not, see <http://www.gnu.org/licenses/>.
+
+
+
+------------------------------------------------------------------------------
+
+check_varnish:
+
+The plugin was downloaded from:
+https://github.com/varnish/varnish-nagios
+
+
+ Copyright (c) 2007-2009 Linpro AS
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+
+------------------------------------------------------------------------------
+
+check_webinject:
+
+The plugin was downloaded from:
+http://labs.consol.de/lang/en/nagios/check_webinject/
+
+ Copyright 2010 Sven Nierlein (nierlein@cpan.org)
+ Copyright 2004-2006 Corey Goldberg (corey@goldb.org)
+
+ This file is part of WebInject.
+
+ WebInject is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ WebInject is distributed in the hope that it will be useful,
+ but without any warranty; without even the implied warranty of
+ merchantability or fitness for a particular purpose. See the
+ GNU General Public License for more details.
+
+
+
+------------------------------------------------------------------------------
+
+check_whois:
+
+The plugin was downloaded from:
+http://dns.measurement-factory.com/tools/nagios-plugins/check_whois.html
+
+ Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ Neither the name of The Measurement Factory nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+
+------------------------------------------------------------------------------
+
+check_zone_auth:
+
+The plugin was downloaded from:
+http://dns.measurement-factory.com/tools/nagios-plugins/check_zone_auth.html
+
+ Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ Neither the name of The Measurement Factory nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+
+------------------------------------------------------------------------------
+
+check_zone_rrsig_expiration:
+
+The plugin was downloaded from:
+http://dns.measurement-factory.com/tools/nagios-plugins/check_zone_rrsig_expiration.html
+
+ Copyright (c) 2008, The Measurement Factory, Inc. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ Neither the name of The Measurement Factory nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+
+------------------------------------------------------------------------------
+
+dsa:
+
+The plugin was downloaded from:
+https://salsa.debian.org/dsa-team/mirror/dsa-nagios
+
+ checks/dsa-check-cert-expire:# Copyright 2009 Peter Palfrader
+ checks/dsa-check-cert-expire-dir:# Copyright 2009,2016 Peter Palfrader
+ checks/dsa-check-dnssec-delegation:# Copyright (c) 2010, 2014, 2015 Peter Palfrader <peter@palfrader.org>
+ checks/dsa-check-entropy:# Copyright 2011 Peter Palfrader, Copyright 2014 Hendrik Koehler
+ checks/dsa-check-soas:# Copyright 2006, 2012 Peter Palfrader
+ checks/dsa-check-packages:# Copyright (C) 2008, 2009 Peter Palfrader <peter@palfrader.org>
+ checks/dsa-check-statusfile:# Copyright 2008, 2012 Peter Palfrader
+ checks/dsa-check-running-kernel:# Copyright 2008,2009,2011 Peter Palfrader
+ checks/dsa-check-running-kernel:# Copyright 2009 Stephen Gran
+ checks/dsa-check-running-kernel:# Copyright 2010 Uli Martens
+ checks/dsa-check-running-kernel:# Copyright 2011 Alexander Reichle-Schmehl
+ sbin/dsa-update-apt-status:# Copyright 2009 Peter Palfrader
+ sbin/dsa-update-unowned-file-status:# Copyright 2012 Peter Palfrader
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+------------------------------------------------------------------------------
+
+extras:
+
+
+ send_nsca_host_or_service_check_result:
+
+ Based on the example in the icinga documentation.
+ Enhanced to handle service and host checks by
+ Bernd Zeimetz <bzed@debian.org>.
+
+ Copyright (c) 1999-2009 Ethan Galstad (nagios@nagios.org)
+ Copyright (c) 2009-2010 Icinga Development Team (info@icinga.org)
+ Copyright (c) 2012 Bernd Zeimetz <bzed@debian.org>
+
+ License:
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2 as
+ published by the Free Software Foundation.
+
+ On Debian systems, the complete text of the GNU General Public
+ License, version 2, can be found in /usr/share/common-licenses/GPL-2.
+
+
+
+------------------------------------------------------------------------------
+
+percona-nagios-plugins:
+
+The plugin was downloaded from:
+http://www.percona.com/doc/percona-monitoring-plugins/
+
+ Copyright 2012-2014 Baron Schwartz, 2012-2014 Percona Inc.
+
+ THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ This program is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free Software
+ Foundation, version 2. You should have received a copy of the GNU General
+ Public License along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/copyright.in b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/copyright.in
new file mode 100644
index 0000000..3635160
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/copyright.in
@@ -0,0 +1,35 @@
+
+The Debian packaging is Copyright © 2012 Bernd Zeimetz <bzed@debian.org> and
+is licensed under der GPL, either version 3 of the License, or
+(at your option) any later version.
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
+
+
+Part of the Debian packaging is the content of the debian directory,
+and the following files:
+ common*.mk
+ */control
+ */copyright
+ */Makefile
+
+
+The copyright information for the included plugins is listed below:
+
+
+#AUTO_UPDATE_Copyright#
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/gbp.conf b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/gbp.conf
new file mode 100644
index 0000000..5c1f8a6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/gbp.conf
@@ -0,0 +1,4 @@
+[git-buildpackage]
+sign-tags = True
+posttag = git push && git push --tags
+postbuild = lintian --info --display-info --display-experimental --pedantic --show-overrides $GBP_CHANGES_FILE
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/nagios-plugins-contrib.docs b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/nagios-plugins-contrib.docs
new file mode 100644
index 0000000..27af518
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/nagios-plugins-contrib.docs
@@ -0,0 +1 @@
+debian/README.Debian.plugins
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/nagios-plugins-contrib.lintian-overrides b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/nagios-plugins-contrib.lintian-overrides
new file mode 100644
index 0000000..6f1557b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/nagios-plugins-contrib.lintian-overrides
@@ -0,0 +1,3 @@
+# as mentioned in the description people need to
+# install whats mentioned in recommends.
+nagios-plugins-contrib: missing-depends-line
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/packaging-helper.py b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/packaging-helper.py
new file mode 100755
index 0000000..3aed5ac
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/packaging-helper.py
@@ -0,0 +1,330 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+import sys
+import os
+import re
+from debian import deb822
+
+ALLOWED_FIELDS = ('Suggests',
+ 'Recommends',
+ 'Depends',
+ 'Uploaders',
+ 'Version',
+ 'Homepage',
+ 'Watch',
+ 'Description',
+ 'Build-Depends')
+
+ALLOWED_TESTS_FIELDS = ('Depends',
+ 'Restrictions',
+ 'Tests',
+ 'Test-Command')
+
+# find all plugins
+__basedir__ = os.path.realpath(os.path.dirname(sys.argv[0]) + os.path.sep + '..')
+__plugins__ = [p for p in os.listdir(__basedir__)
+ if (os.path.isdir(__basedir__ + os.path.sep + p) and p!='debian' and p!='.git' and p!='.pc')]
+__plugins__.sort()
+
+
+__uploaders_re__ = re.compile(r', *')
+__shlibs_re__ = re.compile(r'shlibs:Depends=(.+)')
+
+def __get_control_data__():
+ # returns (plug, parsed control field data)
+ # We look at the first paragraph only!
+ for plugin in __plugins__:
+ data=(plugin, [x for x in deb822.Packages.iter_paragraphs(file(__basedir__ + os.path.sep+ plugin + os.path.sep + 'control'))][0])
+ for key in data[1].iterkeys():
+ if key not in ALLOWED_FIELDS:
+ raise Exception("Unknown control field in plugin %s: %s" %(data[0],key))
+ yield data
+
+def __get_tests_data__():
+ # returns (plug, parsed control field data)
+ # We look at the first paragraph only!
+ for plugin in __plugins__:
+ tests_file = __basedir__ + os.path.sep+ plugin + os.path.sep + 'tests'
+ if os.path.exists(tests_file):
+ data=(plugin, [x for x in deb822.Packages.iter_paragraphs(file(tests_file))][0])
+ for key in data[1].iterkeys():
+ if key not in ALLOWED_TESTS_FIELDS:
+ raise Exception("Unknown tests/control field in plugin %s: %s" %(data[0],key))
+ yield data
+
+def generate_debian_readme_plugins():
+ plugins_depends={}
+ for plugin, _control in __get_control_data__():
+ plugins_depends[plugin]={}
+ # look trough keys we might want to merge
+ for key in ['Suggests', 'Recommends']:
+ if _control.has_key(key):
+ plugins_depends[plugin][key]=deb822.PkgRelation.parse_relations(_control[key])
+
+ # check for generated substvars files
+ substvarsfile = __basedir__ + os.path.sep + 'debian' + os.path.sep + plugin + os.path.sep + 'substvars'
+ if os.path.exists(substvarsfile):
+ with open(substvarsfile, 'r') as fd:
+ substvars = fd.read()
+ try:
+ rel = deb822.PkgRelation.parse_relations(__shlibs_re__.findall(substvars)[0])
+ if plugins_depends[plugin].has_key('Recommends'):
+ plugins_depends[plugin]['Recommends'].extend(rel)
+ else:
+ plugins_depends[plugin]['Recommends']=rel
+ except IndexError:
+ pass
+
+ # generate content
+ result=[]
+ for plugin in __plugins__:
+ if len(plugins_depends[plugin]) > 0:
+ rtext = '%s:' %(plugin,)
+ if plugins_depends[plugin].has_key('Recommends'):
+ rtext = '%s\n Required Packages: %s' %(
+ rtext,
+ deb822.PkgRelation.str(plugins_depends[plugin]['Recommends'])
+ )
+ if plugins_depends[plugin].has_key('Suggests'):
+ rtext = '%s\n Optional Packages: %s' %(
+ rtext,
+ deb822.PkgRelation.str(plugins_depends[plugin]['Suggests'])
+ )
+ result.append(rtext)
+
+ readmefile=__basedir__ + os.path.sep + 'debian' + os.path.sep + 'README.Debian.plugins'
+ with open(readmefile + '.in', 'r') as fd:
+ readme=fd.read()
+
+ readme=readme.replace('#AUTO_UPDATE_README#', '\n\n'.join(result))
+
+ with open(readmefile, 'w') as fd:
+ fd.write(readme)
+
+
+
+def update_control():
+ control_data = {
+ 'Suggests' : [],
+ 'Recommends' : [],
+ 'Build-Depends' : [],
+ 'Description' : [],
+ 'Uploaders' : []
+ }
+
+ for plugin, _control in __get_control_data__():
+ # look trough keys we might want to merge
+ if _control.has_key('Depends'):
+ print "Don't use 'Depends' in %s/control - use 'Recommends' instead" %(plugin,)
+ sys.exit(1)
+ for key in ['Build-Depends', 'Suggests', 'Recommends']:
+ if _control.has_key(key):
+ for rel in deb822.PkgRelation.parse_relations(_control[key]):
+ if not rel in control_data[key]:
+ control_data[key].append(rel)
+ # extract description
+ description = ' * %s' %(plugin,)
+ if _control.has_key('Version'):
+ description = '%s (%s)' %(description, _control['Version'])
+ try:
+ description = '%s: %s' %(description, _control['Description'].replace('\n','\n '))
+ except KeyError:
+ print 'Description for plugin %s missing!' %(plugin,)
+ sys.exit(1)
+
+ try:
+ for uploader in __uploaders_re__.split(_control['Uploaders']):
+ if uploader not in control_data['Uploaders']:
+ control_data['Uploaders'].append(uploader)
+ except KeyError:
+ 'Uploaders for plugin %s missing!' %(plugin,)
+ sys.exit(1)
+
+# disables right now. do we want to have the homepage in the description?
+# if _control.has_key('Homepage'):
+# description = '%s\n Homepage: %s' %(description, _control['Homepage'])
+
+ control_data['Description'].append(description)
+
+
+ with open(__basedir__ + os.path.sep + 'debian' + os.path.sep + 'control.in', 'r') as f:
+ control_in = f.read()
+
+ for k, v in control_data.iteritems():
+ if k == 'Description':
+ control_in = control_in.replace('#AUTO_UPDATE_Description#', u'\n'.join(v))
+ elif k == 'Uploaders':
+ control_in = control_in.replace('#AUTO_UPDATE_Uploaders#', u', '.join(v))
+ else:
+ control_in = control_in.replace('#AUTO_UPDATE_%s#' %(k, ), deb822.PkgRelation.str(v))
+
+ with open(__basedir__ + os.path.sep + 'debian' + os.path.sep + 'control', 'w') as f:
+ f.write(control_in)
+
+
+def update_tests():
+ with open(__basedir__ + os.path.sep + 'debian' + os.path.sep + 'tests' + os.path.sep + 'control', 'w') as f:
+ for plugin, _control in __get_tests_data__():
+ if 'Depends' in _control and '@' not in _control['Depends']:
+ _control['Depends'] += ', @'
+ f.write(str(_control))
+ f.write("\n")
+
+
+def update_copyright():
+
+ copyrights = []
+ for plugin, _control in __get_control_data__():
+ _p_copyright = '%s:\n\n' %(plugin,)
+ if _control.has_key('Homepage'):
+ _p_copyright = '%sThe plugin was downloaded from: \n%s\n\n' %(_p_copyright, _control['Homepage'])
+
+ try:
+ with open(__basedir__ + os.path.sep + plugin + os.path.sep + 'copyright', 'r') as f:
+ _p_copyright = '%s %s' %(_p_copyright, f.read().decode('utf-8').replace('\n','\n '))
+ except IOError:
+ print 'copyright file for plugin %s missing!' %(plugin,)
+ sys.exit(1)
+
+ copyrights.append(_p_copyright)
+
+ with open(__basedir__ + os.path.sep + 'debian' + os.path.sep + 'copyright.in', 'r') as f:
+ copyright_in = f.read().decode('utf-8')
+
+ copyright_in = copyright_in.replace('#AUTO_UPDATE_Copyright#', u'\n\n------------------------------------------------------------------------------\n\n'.join(copyrights))
+
+ with open(__basedir__ + os.path.sep + 'debian' + os.path.sep + 'copyright', 'w') as f:
+ f.write(copyright_in.encode('utf-8'))
+
+
+def watch():
+
+ import apt_pkg
+ apt_pkg.init_system()
+
+ import hashlib
+
+ import urllib2
+ url_opener = urllib2.build_opener()
+ url_opener.addheaders = [('User-agent', 'Debian nagios-plugins-contrib 1.0')]
+
+ watch_re = re.compile(r'([^ ]+) (.+)')
+ whitespace_re = re.compile(r'\s')
+ for plugin, _control in __get_control_data__():
+ if not _control.has_key('Watch'):
+ print 'WARNING: %s - missing watch information!' %(plugin,)
+ continue
+ try:
+ url, check = watch_re.findall(_control['Watch'])[0]
+ except IndexError:
+ print 'WARNING: %s - failed to parse Watch line!' %(plugin,)
+ continue
+ try:
+ f=url_opener.open(url)
+ content = f.read()
+ f.close()
+ except IOError:
+ print 'WARNING: %s - failed to retrieve %s !' %(plugin,url)
+ continue
+ check=check.strip()
+ if check.startswith('SHA1:'):
+ check=check.replace('SHA1:','')
+ new_sha=hashlib.sha1(content).hexdigest()
+ if check != new_sha:
+ print 'UPDATE NECESSARY: %s - SHA1 checksum does not match! New checksum: %s' %(plugin,new_sha)
+ else:
+ print 'OK: %s' %(plugin,)
+ else:
+ if not _control.has_key('Version'):
+ print 'WARNING: %s - missing current version information!' %(plugin,)
+ continue
+ check_re=re.compile(check)
+ # check for simple matches
+ found_versions=check_re.findall(content)
+ # now also see if the regexp author added too many .* parts and the match is a bit buggy
+ # we replace all whitespaces with \n and try again.
+ for v in check_re.findall(whitespace_re.sub('\n',content)):
+ if not v in found_versions:
+ found_versions.append(v)
+ if not found_versions:
+ print "WARNING: %s - regex does not match!" %(plugin)
+ continue
+
+ new_version = found_versions[0]
+ for v in found_versions:
+ if (apt_pkg.version_compare(v, found_versions[0]) > 0):
+ new_version = v
+ if (apt_pkg.version_compare(new_version, _control['Version'].strip()) > 0):
+ print 'UPDATE NECESSARY: %s - found new version %s' %(plugin, new_version)
+ elif (apt_pkg.version_compare(new_version, _control['Version'].strip()) < 0):
+ print 'WARNING: %s - could not find the current version (found: %s, control says: %s)!' %(plugin, new_version, _control['Version'])
+ else:
+ print 'OK: %s' %(plugin,)
+
+
+
+if __name__ == '__main__':
+ from optparse import OptionParser
+ prog = os.path.basename(sys.argv[0])
+ usage = ('%s [--copyright] [--control] [--watch] [--generate-readme] [-h|--help]') %(prog,)
+ parser = OptionParser(usage=usage)
+
+ parser.add_option(
+ '--copyright',
+ dest='copyright',
+ action='store_true',
+ default=False,
+ help='Update debian/copyright'
+ )
+
+ parser.add_option(
+ '--control',
+ dest='control',
+ action='store_true',
+ default=False,
+ help='Update debian/control'
+ )
+
+ parser.add_option(
+ '--tests',
+ dest='tests',
+ action='store_true',
+ default=False,
+ help='Update debian/tests/control'
+ )
+
+ parser.add_option(
+ '--watch',
+ dest='watch',
+ action='store_true',
+ default=False,
+ help='Search for updates'
+ )
+ parser.add_option(
+ '--generate-readme',
+ dest='generate_readme',
+ action='store_true',
+ default=False,
+ help='Generate debian/README.Debian.plugins'
+ )
+ (options, args) = parser.parse_args()
+
+ if not (options.control or options.copyright or options.watch or options.tests or options.generate_readme):
+ parser.print_help()
+ sys.exit(1)
+
+ if options.control:
+ update_control()
+
+ if options.tests:
+ update_tests()
+
+ if options.copyright:
+ update_copyright()
+
+ if options.watch:
+ watch()
+
+ if options.generate_readme:
+ generate_debian_readme_plugins()
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_ajp/return_critical_on_failed_connection b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_ajp/return_critical_on_failed_connection
new file mode 100644
index 0000000..80f18f4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_ajp/return_critical_on_failed_connection
@@ -0,0 +1,79 @@
+--- a/check_ajp/check_ajp
++++ b/check_ajp/check_ajp
+@@ -7,6 +7,7 @@
+ #
+ # check_ajp - nagios plugin for jboss monitoring
+ # Copyright (C) 2010 Michel Rode <rmichel@devnu11.net>
++# Copyright (C) 2013 Bernd Zeimetz <b.zeimetz@conova.com>
+ #
+ # This program is free software: you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+@@ -30,6 +31,8 @@ use strict;
+ use Getopt::Long;
+ use Socket;
+ use Time::HiRes 'time';
++use IO::Socket;
++
+
+ my $app = '';
+ my $port = '8009';
+@@ -37,9 +40,14 @@ my $warntime = '1.5';
+ my $crittime = '3';
+ my $timeout = '10';
+
+-my ($iaddr, $paddr, $proto, $sock, $time1, $time2);
++my ($sock, $time1, $time2);
+ my $pong = 'null';
+
++sub conndie{
++ my $msg = shift;
++ print "CRITICAL : $msg\n";
++ exit 2;
++}
+ sub xdie{
+ my $msg = shift;
+ printf STDERR "Usage: check_ajp --app ip.of.the.app [--port 8009 --warn 1 --crit 2 --timeout 5]\n\n";
+@@ -49,6 +57,10 @@ sub xdie{
+
+ GetOptions("app=s" => \$app, "port=s" => \$port, "warn=f" => \$warntime, "crit=f" => \$crittime, "timeout=f" => \$timeout);
+
++if ($app eq '') {
++ xdie('--app not given')
++}
++
+ my $ping = pack 'C5' # Format template.
+ , 0x12, 0x34 # Magic number for server->container packets.
+ , 0x00, 0x01 # 2 byte int length of payload.
+@@ -61,24 +73,23 @@ my $expected = pack 'C5' # Format tem
+ , 0x09 # Type of packet. 9 = CPong reply.
+ ;
+
+-$iaddr = inet_aton($app) || xdie("No host given !");
+-$paddr = sockaddr_in($port, $iaddr) || xdie("Wrong port !");
+-$proto = getprotobyname 'tcp';
+-
+ $time1 = time();
+
+ eval {
+ local $SIG{ALRM} = sub { die "alarm\n" };
+ alarm($timeout);
+- socket $sock, PF_INET, SOCK_STREAM, $proto || xdie("socket !");
+- connect $sock, $paddr || xdie("connect !");
+- syswrite $sock, $ping || xdie("syswrite !");
+- sysread $sock, $pong, 5 || xdie("sysread !");
++ $sock = IO::Socket::INET->new(Proto => "tcp",
++ PeerAddr => $app,
++ PeerPort => $port) || conndie($@);
++ $sock->autoflush(1);
++ print $sock $ping;
++ $sock->recv($pong,5);
++ close $sock;
+ alarm(0);
+ };
+
+ if ($@) {
+- die unless $@ eq "alarm\n";
++ conndie($@) unless $@ eq "alarm\n";
+ $time2 = (time() - $time1);
+ printf "CRITICAL - AJP - Timeout after %1.0fs\n",$time2;
+ exit 2;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_backuppc/use_nagios_plugins b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_backuppc/use_nagios_plugins
new file mode 100644
index 0000000..15bcf2a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_backuppc/use_nagios_plugins
@@ -0,0 +1,34 @@
+diff --git a/check_backuppc/check_backuppc-1.1.0/check_backuppc b/check_backuppc/check_backuppc-1.1.0/check_backuppc
+index d8ea383..c994c20 100755
+--- a/check_backuppc/check_backuppc-1.1.0/check_backuppc
++++ b/check_backuppc/check_backuppc-1.1.0/check_backuppc
+@@ -32,7 +32,28 @@ no utf8;
+
+ # Nagios
+ use lib "NAGIOS_LIB";
+-use utils qw(%ERRORS $TIMEOUT);
++sub load_module {
++ my @names = @_;
++ my $module;
++ for my $name (@names) {
++ my $file = $name;
++ # requires need either a bare word or a file name
++ $file =~ s{::}{/}gsxm;
++ $file .= '.pm';
++ eval {
++ require $file;
++ $name->import(qw(%ERRORS));
++ $module = $name;
++ };
++ last if $module;
++ }
++ return $module;
++}
++
++my $plugin_module;
++BEGIN {
++ $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' );
++}
+ use POSIX qw(strftime difftime);
+ use Getopt::Long;
+ Getopt::Long::Configure('bundling');
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_bgpstate/epn b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_bgpstate/epn
new file mode 100644
index 0000000..3ef7667
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_bgpstate/epn
@@ -0,0 +1,10 @@
+diff --git a/check_bgpstate/check_bgpstate b/check_bgpstate/check_bgpstate
+index 645d750..6ddf8bf 100644
+--- a/check_bgpstate/check_bgpstate
++++ b/check_bgpstate/check_bgpstate
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w
++# nagios: -epn
+ #
+ # check_bgpstate.pl - nagios plugin
+ #
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_clamav/clamav_locations b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_clamav/clamav_locations
new file mode 100644
index 0000000..c857987
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_clamav/clamav_locations
@@ -0,0 +1,73 @@
+--- a/check_clamav/check_clamav
++++ b/check_clamav/check_clamav
+@@ -16,18 +16,18 @@
+ #
+ ################################################################################
+ # This script is used to compare the version and signature level of the
+-# currently running clamd daemon with the latest available versions listed in
++# currently running clamscan daemon with the latest available versions listed in
+ # the TXT record for current.cvd.clamav.net.
+ #
+ # In order to use this script, you might need to make the following adjustments:
+ # - Set the "use lib" path correctly (where utils.pm is located.)
+-# - Set the path to your clamd binary in $clamd_cmd.
++# - Set the path to your clamscan binary in $clamscan_cmd.
+ #
+ # This plugin requires the Net::DNS Perl module.
+ ################################################################################
+
+ # Plugin directory / home of utils.pm.
+-use lib "/usr/local/libexec/nagios";
++use lib "/usr/lib/nagios/plugins";
+ use utils qw(%ERRORS &print_revision &support &usage);
+ use Getopt::Long qw(:config no_ignore_case bundling);
+ use File::Basename;
+@@ -35,8 +35,8 @@ use Net::DNS;
+
+ use strict;
+
+-# Path to installed clamd binary.
+-my $clamd_cmd = "/usr/local/sbin/clamd";
++# Path to installed clamscan binary.
++my $clamscan_cmd = "/usr/bin/clamscan";
+
+ # Leave the rest of this alone:
+ my $prog_name = basename $0;
+@@ -153,28 +153,28 @@ if ($vers_val != 0) {
+ }
+
+ # Make sure the binary exists.
+-if (-x $clamd_cmd) {
+- &print_debug("Found clamd at $clamd_cmd");
++if (-x $clamscan_cmd) {
++ &print_debug("Found clamscan at $clamscan_cmd");
+ } else {
+- &print_debug("Can't execute clamd at $clamd_cmd");
+- die("FATAL: Unable to execute $clamd_cmd");
++ &print_debug("Can't execute clamscan at $clamscan_cmd");
++ die("FATAL: Unable to execute $clamscan_cmd");
+ }
+
+ &print_debug("Threshhold values: warning=$warn_val, critical=$crit_val");
+
+ # Should return something like: ClamAV 0.87.1/1205/Wed Dec 7 07:00:48 2005
+-chomp(my $clamd_ver = `$clamd_cmd -V`);
++chomp(my $clamscan_ver = `$clamscan_cmd -V`);
+
+ # Should return something like: 0.87.1:34:1206:1134072033:1
+ chomp(my $dnstxt_ver = &lookup_current());
+
+-# Parse what we get from clamd -V and our DNS query
+-my @clamdresults = split(/\//,$clamd_ver);
++# Parse what we get from clamscan -V and our DNS query
++my @clamscanresults = split(/\//,$clamscan_ver);
+ my @txtresults = split(/:/,$dnstxt_ver);
+
+ # Get the currently running ClamAV sig level and cvd date out of this
+-my $local_latest_daily = $clamdresults[1];
+-my $local_latest_date = $clamdresults[2];
++my $local_latest_daily = $clamscanresults[1];
++my $local_latest_date = $clamscanresults[2];
+
+ &print_debug("Local daily.cvd dated $local_latest_date");
+ &print_debug("Local daily.cvd version = $local_latest_daily");
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_cups/ParseDateDelta b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_cups/ParseDateDelta
new file mode 100644
index 0000000..2383896
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_cups/ParseDateDelta
@@ -0,0 +1,11 @@
+--- a/check_cups/check_cups
++++ b/check_cups/check_cups
+@@ -395,7 +395,7 @@
+
+ my( $age, $jobs ) = ( $warning{$queue}->{age}, $warning{$queue}->{jobs} );
+
+- my( $prettyage ) = prettyDelta( parseDateDelta( "$age minutes" ) );
++ my( $prettyage ) = prettyDelta( ParseDateDelta( "$age minutes" ) );
+
+ my( @messages );
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_cups/epn b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_cups/epn
new file mode 100644
index 0000000..cd836f4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_cups/epn
@@ -0,0 +1,8 @@
+--- a/check_cups/check_cups
++++ b/check_cups/check_cups
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl
++# nagios: -epn
+
+ =head1 NAME
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_cups/monitoring-plugin b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_cups/monitoring-plugin
new file mode 100644
index 0000000..ec3439e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_cups/monitoring-plugin
@@ -0,0 +1,46 @@
+--- a/check_cups/check_cups
++++ b/check_cups/check_cups
+@@ -39,13 +39,33 @@
+ # http://search.cpan.org/~rgarcia/perl-5.6.2/pod/perllexwarn.pod
+ no warnings qw( redefine prototype );
+
++sub load_module {
++ my @names = @_;
++ my $module;
++ for my $name (@names) {
++ my $file = $name;
++ # requires need either a bare word or a file name
++ $file =~ s{::}{/}gsxm;
++ $file .= '.pm';
++ eval {
++ require $file;
++ $name->import();
++ $module = $name;
++ };
++ last if $module;
++ }
++ return $module;
++}
++
++my $plugin_module;
++
+ BEGIN {
+
+ # use Opsview libs
+ use lib '/usr/local/nagios/perl/lib';
+ use lib '/usr/local/nagios/lib';
+
+- use Nagios::Plugin;
++ $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' );
+
+ use Data::Dumper;
+
+@@ -95,7 +115,7 @@
+ This plugin was written at The Harvard-MIT Data Center
+ (http://www.hmdc.harvard.edu) by Steve Huff (<shuff\@hmdc.harvard.edu>).
+ LICENSE
+-my( $plugin ) = Nagios::Plugin->new(
++my( $plugin ) = $plugin_module->new(
+ shortname => 'check_cups',
+ usage => $usagemsg,
+ version => '0.2',
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_drbd/fix_for_oos_and_cosmetic b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_drbd/fix_for_oos_and_cosmetic
new file mode 100644
index 0000000..317555b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_drbd/fix_for_oos_and_cosmetic
@@ -0,0 +1,62 @@
+commit b04bdeb025c77e34fdf8ed9eab2f222240297ca3
+Author: Stanislav German-Evtushenko <ginermail@gmail.com>
+Date: Mon Mar 3 08:11:31 2014 +0300
+
+ check_drbd: add check for oos and cosmetic
+
+ 1) add check for out of sync sectors (report WARNING for non-zero value)
+ 2) cosmetic: sort device list while processing
+
+--- a/check_drbd/check_drbd
++++ b/check_drbd/check_drbd
+@@ -12,7 +12,7 @@ use Getopt::Long;
+ my $drbd_proc='/proc/drbd';
+ my $drbd_devices=0;
+ my ($drbd_expect, $drbd_role, $drbd_version, $debug_mode);
+-my (%options, %cs, %st, %ld, %ds, %check, %warning, %critical);
++my (%options, %cs, %st, %ld, %ds, %oos, %check, %warning, %critical);
+
+ my $prog_name=basename($0);
+ my $prog_revision='0.5.3';
+@@ -210,10 +210,17 @@ sub parse_proc {
+ } else {
+ $input = "STDIN";
+ }
++ my $devnum;
+ while(<$input>) {
+ if (/^version: (\d+).(\d+)/) {
+ $drbd_version = "$1.$2";
+ }
++ if (/^\s?(\d+):.*/) {
++ $devnum = $1;
++ }
++ if (defined($devnum) and /\soos:(\d+)/) {
++ $oos{$devnum} = $1;
++ }
+ if (/^\s?(\d+):.* cs:(\w+)/) {
+ $cs{$1} = $2;
+ }
+@@ -248,11 +255,11 @@ sub parse_drbd_devices {
+ #
+ my @devices;
+ if ($drbd_devices =~ /^all$/i) {
+- for my $device ( keys %cs ) {
++ for my $device ( sort keys %cs ) {
+ push(@devices,$device);
+ }
+ } elsif ($drbd_devices =~ /^configured$/i) {
+- for my $device ( keys %cs ) {
++ for my $device ( sort keys %cs ) {
+ next if ($cs{$device} eq "Unconfigured");
+ push(@devices,$device);
+ }
+@@ -264,6 +271,9 @@ sub parse_drbd_devices {
+ &myexit('UNKNOWN',"Could not find device $device");
+ }
+ $check{$device} = 1;
++ if (defined($oos{$device}) and $oos{$device} > 0) {
++ &myexit('WARNING',"Out of sync on device $device: $oos{$device} sectors");
++ }
+ }
+ if (int(keys %check) == 0) {
+ &myexit('UNKNOWN',"No configured devices found");
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_email_delivery/epn b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_email_delivery/epn
new file mode 100644
index 0000000..02d5424
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_email_delivery/epn
@@ -0,0 +1,45 @@
+--- a/check_email_delivery/src/check_email_delivery
++++ b/check_email_delivery/src/check_email_delivery
+@@ -1,4 +1,6 @@
+ #!/usr/bin/perl
++# nagios: -epn
++
+ use strict;
+ my $VERSION = '0.7.1';
+ my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
+--- a/check_email_delivery/src/check_imap_quota
++++ b/check_email_delivery/src/check_imap_quota
+@@ -1,4 +1,6 @@
+ #!/usr/bin/perl
++# nagios: -epn
++
+ use strict;
+ my $VERSION = '0.2';
+ my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
+--- a/check_email_delivery/src/check_imap_receive
++++ b/check_email_delivery/src/check_imap_receive
+@@ -1,4 +1,6 @@
+ #!/usr/bin/perl
++# nagios: -epn
++
+ use strict;
+ my $VERSION = '0.7.5';
+ my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
+--- a/check_email_delivery/src/check_smtp_send
++++ b/check_email_delivery/src/check_smtp_send
+@@ -1,4 +1,6 @@
+ #!/usr/bin/perl
++# nagios: -epn
++
+ use strict;
+ use POSIX qw(strftime);
+ my $VERSION = '0.7.3';
+--- a/check_email_delivery/src/imap_ssl_cert
++++ b/check_email_delivery/src/imap_ssl_cert
+@@ -1,4 +1,6 @@
+ #!/usr/bin/perl
++# nagios: -epn
++
+ use strict;
+ my $VERSION = '0.1';
+ my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff <jonathan@buhacoff.net>';
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_email_delivery/paths b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_email_delivery/paths
new file mode 100644
index 0000000..e4c8fc6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_email_delivery/paths
@@ -0,0 +1,27 @@
+Author: Tom Jampen <tom@cryptography.ch>
+Description:
+ Patches check_email_delivery and check_email_delivery_epn to use debian
+ specific paths.
+
+--- a/check_email_delivery/src/check_email_delivery
++++ b/check_email_delivery/src/check_email_delivery
+@@ -63,7 +63,7 @@ my $default_warn = 15;
+ my $default_wait = 5;
+ my $default_timeout = 60;
+ my $time_hires = "";
+-my $libexec = "/usr/local/nagios/libexec";
++my $libexec = "/usr/lib/nagios/plugins";
+ my $ok;
+ $ok = Getopt::Long::GetOptions(
+ "V|version"=>\$show_version,
+--- a/check_email_delivery/src/check_email_delivery_epn
++++ b/check_email_delivery/src/check_email_delivery_epn
+@@ -61,7 +61,7 @@ my $default_warn = 15;
+ my $default_wait = 5;
+ my $default_timeout = 60;
+ my $time_hires = "";
+-my $libexec = "/usr/local/nagios/libexec";
++my $libexec = "/usr/lib/nagios/plugins";
+ my $ok;
+ $ok = Getopt::Long::GetOptions(
+ "V|version"=>\$show_version,
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_haproxy/epn b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_haproxy/epn
new file mode 100644
index 0000000..1514373
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_haproxy/epn
@@ -0,0 +1,8 @@
+--- a/check_haproxy/check_haproxy
++++ b/check_haproxy/check_haproxy
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w
++# nagios: -epn
+ #
+ # Copyright (c) 2010 Stéphane Urbanovski <stephane.urbanovski@ac-nancy-metz.fr>
+ #
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_haproxy/monitoring-plugin b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_haproxy/monitoring-plugin
new file mode 100644
index 0000000..8e47f4a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_haproxy/monitoring-plugin
@@ -0,0 +1,48 @@
+--- a/check_haproxy/check_haproxy
++++ b/check_haproxy/check_haproxy
+@@ -31,7 +31,28 @@
+ use Time::HiRes qw(time); # get microtime
+ use POSIX qw(mktime);
+
+-use Nagios::Plugin ;
++sub load_module {
++ my @names = @_;
++ my $module;
++ for my $name (@names) {
++ my $file = $name;
++ # requires need either a bare word or a file name
++ $file =~ s{::}{/}gsxm;
++ $file .= '.pm';
++ eval {
++ require $file;
++ $name->import();
++ $module = $name;
++ };
++ last if $module;
++ }
++ return $module;
++}
++
++my $plugin_module;
++BEGIN {
++ $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' );
++}
+
+ use LWP::UserAgent; # http client
+ use HTTP::Request; # used by LWP::UserAgent
+@@ -53,7 +74,7 @@
+ textdomain('nagios-plugins-perl');
+
+
+-my $np = Nagios::Plugin->new(
++my $np = $plugin_module->new(
+ version => $VERSION,
+ blurb => _gt('Plugin to check HAProxy stats url'),
+ usage => "Usage: %s [ -v|--verbose ] -u <url> [-t <timeout>] [-U <username>] [-P <password>] [ -c|--critical=<threshold> ] [ -w|--warning=<threshold> ]",
+@@ -319,4 +340,4 @@
+
+ Stéphane Urbanovski <stephane.urbanovski@ac-nancy-metz.fr>
+
+-=cut
+\ No newline at end of file
++=cut
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_haproxy_stats/interpreter b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_haproxy_stats/interpreter
new file mode 100644
index 0000000..8c533ec
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_haproxy_stats/interpreter
@@ -0,0 +1,16 @@
+commit 7ecba59a47bf3a9276d4bb6ef3976ebc2d809e4d
+Author: Jan Wagner <waja@cyconet.org>
+Date: Tue Jan 29 16:14:46 2019 +0100
+
+ Fixing interpreter
+
+diff --git a/check_haproxy_stats/check_haproxy_stats.pl b/check_haproxy_stats/check_haproxy_stats.pl
+index 9698f78..f776bf6 100644
+--- a/check_haproxy_stats/check_haproxy_stats.pl
++++ b/check_haproxy_stats/check_haproxy_stats.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#/usr/bin/perl
+ # vim: se et ts=4:
+
+ #
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/epn b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/epn
new file mode 100644
index 0000000..661a495
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/epn
@@ -0,0 +1,9 @@
+--- a/check_httpd_status/check_httpd_status
++++ b/check_httpd_status/check_httpd_status
+@@ -1,4 +1,6 @@
+ #!/usr/bin/perl -w
++# nagios: -epn
++#
+ ####################### check_httpd_status.pl #######################
+ # Version : 1.3
+ # Date : 06 Aug 2010
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/htdigest_auth b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/htdigest_auth
new file mode 100644
index 0000000..336b542
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/htdigest_auth
@@ -0,0 +1,17 @@
+--- a/check_httpd_status/check_httpd_status
++++ b/check_httpd_status/check_httpd_status
+@@ -213,7 +213,13 @@
+ logD("Web URL : $url");
+
+ my $req = HTTP::Request->new( GET => $url );
+-if ( defined($o_user) ) {
++if ( defined($o_realm) ) {
++ if ( ! defined($o_port) ) {
++ $o_port = 80;
++ }
++ $ua->credentials("$o_host:$o_port", $o_realm, $o_user, $o_pass);
++}
++elsif ( defined($o_user) ) {
+ $req->authorization_basic($o_user, $o_pass);
+ }
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/monitoring-plugin b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/monitoring-plugin
new file mode 100644
index 0000000..dd8451a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_httpd_status/monitoring-plugin
@@ -0,0 +1,49 @@
+--- a/check_httpd_status/check_httpd_status
++++ b/check_httpd_status/check_httpd_status
+@@ -34,8 +34,28 @@
+ use POSIX qw(setlocale);
+ use Locale::gettext;
+
+-use Nagios::Plugin ;
+-
++sub load_module {
++ my @names = @_;
++ my $module;
++ for my $name (@names) {
++ my $file = $name;
++ # requires need either a bare word or a file name
++ $file =~ s{::}{/}gsxm;
++ $file .= '.pm';
++ eval {
++ require $file;
++ $name->import();
++ $module = $name;
++ };
++ last if $module;
++ }
++ return $module;
++}
++
++my $plugin_module;
++BEGIN {
++ $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' );
++}
+ use LWP::UserAgent;
+ use HTTP::Status; # get status_message()
+ use Time::HiRes qw(gettimeofday tv_interval);
+@@ -92,7 +112,7 @@
+ );
+
+
+-my $np = Nagios::Plugin->new(
++my $np = $plugin_module->new(
+ version => $VERSION,
+ blurb => _gt('Apache / Lighthttpd server status monitor for Nagios'),
+ usage => "Usage: %s [ -H <host> [-p <port>] [-t <timeout>] [-w <warn_level> -c <crit_level>] [-V] [-u <url>] [-U user -P pass -r realm]",
+@@ -438,4 +458,4 @@
+ Warn if less than 100 workers are available
+ Crit if less than 10 workers are available
+ EOT
+-}
+\ No newline at end of file
++}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_imap_quota/syntax_error_fix b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_imap_quota/syntax_error_fix
new file mode 100644
index 0000000..1c4d9b6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_imap_quota/syntax_error_fix
@@ -0,0 +1,17 @@
+commit efd3fb018c2b6d9aacc367ab29dc4b0089ba10a5
+Author: Paul Voss <vosspa@rs211412.rs.hosteurope.de>
+Date: Fri Mar 14 10:43:30 2014 +0100
+
+ - fixed syntax error by added missing closing bracket as mentioned in issue #44
+
+--- a/check_email_delivery/src/check_imap_quota
++++ b/check_email_delivery/src/check_imap_quota
+@@ -153,7 +153,7 @@ eval {
+ }
+ if (!length($quotaUsed) && !length($quotaLimit)) {
+ print "no answer from imap host\n" if $verbose > 2;
+- } elsif (!length($quotaUsed) || !length($quotaLimit) {
++ } elsif (!length($quotaUsed) || !length($quotaLimit)) {
+ print "incorrect answer from imap host\n";
+ $imap->close();
+ exit $status{UNKNOWN};
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libs/config_path b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libs/config_path
new file mode 100644
index 0000000..330d637
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libs/config_path
@@ -0,0 +1,11 @@
+--- a/check_libs/nagios-check-libs
++++ b/check_libs/nagios-check-libs
+@@ -71,7 +71,7 @@ if ($params->{'version'}) {
+ };
+
+ if (! defined $params->{'config'}) {
+- $params->{'config'} = '/etc/nagios/check-libs.conf';
++ $params->{'config'} = '/etc/nagios-plugins/check-libs.conf';
+ } elsif (! -e $params->{'config'}) {
+ dief("Config file $params->{'config'} does not exist.\n");
+ }
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libs/lsof-speedup b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libs/lsof-speedup
new file mode 100644
index 0000000..925aed4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libs/lsof-speedup
@@ -0,0 +1,27 @@
+--- a/check_libs/nagios-check-libs
++++ b/check_libs/nagios-check-libs
+@@ -29,7 +29,7 @@ use Getopt::Long;
+ $ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin';
+ delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
+
+-my $LSOF = '/usr/bin/lsof -F0';
++my $LSOF = '/usr/bin/lsof -nPF0 -a +L1';
+ my $VERSION = '0.2015012901';
+
+ # nagios exit codes
+@@ -141,12 +141,12 @@ sub inVserver() {
+
+ my $INVSERVER = inVserver();
+
+-print STDERR "Running $LSOF -n\n" if $params->{'verbose'};
+-open (LSOF, "$LSOF -n|") or dief ("Cannot run $LSOF -n: $!\n");
++print STDERR "Running $LSOF\n" if $params->{'verbose'};
++open (LSOF, "$LSOF|") or dief ("Cannot run $LSOF: $!\n");
+ my @lsof=<LSOF>;
+ close LSOF;
+ if ($CHILD_ERROR) { # program failed
+- dief("$LSOF -n returned with non-zero exit code: ".($CHILD_ERROR / 256)."\n");
++ dief("$LSOF returned with non-zero exit code: ".($CHILD_ERROR / 256)."\n");
+ };
+
+ my ($process, $pid, $user);
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libs/space_before_deleted b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libs/space_before_deleted
new file mode 100644
index 0000000..0840d48
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libs/space_before_deleted
@@ -0,0 +1,12 @@
+diff -Nur a/check_libs/nagios-check-libs b/check_libs/nagios-check-libs
+--- a/check_libs/nagios-check-libs
++++ b/check_libs/nagios-check-libs
+@@ -170,7 +170,7 @@
+ my $inode = $fields{i};
+ my $path = $fields{n};
+ if ($path =~ m/\.dpkg-/ || $path =~ m/\(deleted\)/ || $path =~ /path inode=/ || $path =~ m#/\.nfs# || $fd eq 'DEL') {
+- $path =~ s/^\(deleted\)//; # in some cases "(deleted)" is at the beginning of the string
++ $path =~ s/^ ?\(deleted\)//; # in some cases "(deleted)" is at the beginning of the string
+ for my $i (@{$config->{'ignorelist'}}) {
+ my $ignore = eval($i);
+ next LINE if $ignore;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libvirt/fix_uom b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libvirt/fix_uom
new file mode 100644
index 0000000..c192353
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libvirt/fix_uom
@@ -0,0 +1,26 @@
+From ebbf45f0dcbe150f4f8ccb306c8e72e95dbe29d9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B6rn=20L=C3=A4ssig?= <b.laessig@pengutronix.de>
+Date: Thu, 1 Dec 2016 13:42:17 +0100
+Subject: [PATCH] fix uom of check_libvirt
+
+ * the actual unit of check_libvirt is 'units', which is not a valid UOM
+ (https://www.monitoring-plugins.org/doc/guidelines.html#AEN201)
+ so tools like icinga2 cannot interprete the performance data
+ * remove the UOM to an empty string
+ -> no unit specified - assume a number (int or float) of things
+ (eg, users, processes, load averages)
+---
+ check_libvirt/check_libvirt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/check_libvirt/check_libvirt
++++ b/check_libvirt/check_libvirt
+@@ -246,7 +246,7 @@
+ chop($output);
+ chop($output);
+ $output = $up . "/" . $cnt . " VMs up: " . $output;
+- $np->add_perfdata(label => "vmcount", value => $up, uom => 'units', threshold => $np->threshold);
++ $np->add_perfdata(label => "vmcount", value => $up, uom => '', threshold => $np->threshold);
+ $result = $np->check_threshold(check => $up);
+ }
+ elsif (uc($command) eq "POOL")
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libvirt/monitoring-plugin b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libvirt/monitoring-plugin
new file mode 100644
index 0000000..c51c873
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_libvirt/monitoring-plugin
@@ -0,0 +1,48 @@
+diff --git a/check_libvirt/check_libvirt b/check_libvirt/check_libvirt
+index 2029c9e..618d1ac 100755
+--- a/check_libvirt/check_libvirt
++++ b/check_libvirt/check_libvirt
+@@ -27,11 +27,33 @@
+ use strict;
+ use warnings;
+ use vars qw($PROGNAME $VERSION $output $result);
+-use Nagios::Plugin;
+ use File::Basename;
+ use Sys::Virt;
+ use XML::Simple;
+
++sub load_module {
++ my @names = @_;
++ my $module;
++ for my $name (@names) {
++ my $file = $name;
++ # requires need either a bare word or a file name
++ $file =~ s{::}{/}gsxm;
++ $file .= '.pm';
++ eval {
++ require $file;
++ $name->import();
++ $module = $name;
++ };
++ last if $module;
++ }
++ return $module;
++}
++
++my $plugin_module;
++BEGIN {
++ $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' );
++}
++
+ $PROGNAME = basename($0);
+ $VERSION = '0.1.0';
+ my $spooldir="/opt/monitor/var/check_libvirt";
+@@ -41,7 +63,7 @@ if (!-d $spooldir)
+ mkdir($spooldir);
+ }
+
+-my $np = Nagios::Plugin->new(
++my $np = $plugin_module->new(
+ usage => "Usage: %s -H <hosturl> [ -N <vmname> ]\n"
+ . " [-u <user> -p <pass>]\n"
+ . " -l <command> [ -s <subcommand> ]\n"
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_lm_sensors/interpreter b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_lm_sensors/interpreter
new file mode 100644
index 0000000..e46ed48
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_lm_sensors/interpreter
@@ -0,0 +1,8 @@
+--- a/check_lm_sensors/src/check_lm_sensors
++++ b/check_lm_sensors/src/check_lm_sensors
+@@ -1,4 +1,4 @@
+-#!perl
++#!/usr/bin/perl
+
+ # check_lm_sensors is a Nagios plugin to monitor the values of on board sensors and hard
+ # disk temperatures on Linux systems
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_lm_sensors/manpage_whatis_fix b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_lm_sensors/manpage_whatis_fix
new file mode 100644
index 0000000..53290de
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_lm_sensors/manpage_whatis_fix
@@ -0,0 +1,12 @@
+--- a/check_lm_sensors/src/check_lm_sensors.pod
++++ b/check_lm_sensors/src/check_lm_sensors.pod
+@@ -2,8 +2,7 @@
+
+ =head1 NAME
+
+-C<check_lm_sensors> is a Nagios plugin to monitor the values of on
+-board sensors and hard disk temperatures on Linux systems
++C<check_lm_sensors> - Nagios plugin to monitor hardware sensors and disk temperatures
+
+ =head1 DESCRIPTION
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_lm_sensors/spelling_errors b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_lm_sensors/spelling_errors
new file mode 100644
index 0000000..b684280
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_lm_sensors/spelling_errors
@@ -0,0 +1,11 @@
+--- a/check_lm_sensors/src/check_lm_sensors.pod
++++ b/check_lm_sensors/src/check_lm_sensors.pod
+@@ -49,7 +49,7 @@ verbosity.
+ =head1 EXIT STATUS
+
+ 0 if OK, 1 in case of a warning, 2 in case of a critical status and 3
+-in case of an unkown problem
++in case of an unknown problem
+
+ =head1 DEPENDENCIES
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_memory/monitoring-plugin b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_memory/monitoring-plugin
new file mode 100644
index 0000000..8303246
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_memory/monitoring-plugin
@@ -0,0 +1,43 @@
+diff --git a/check_memory/check_memory b/check_memory/check_memory
+index bf46711..4f272d1 100644
+--- a/check_memory/check_memory
++++ b/check_memory/check_memory
+@@ -23,14 +23,36 @@
+ use strict;
+ use warnings;
+ use vars qw($PROGNAME $VERSION $FREECMD $UNIT);
+-use Nagios::Plugin;
++
++sub load_module {
++ my @names = @_;
++ my $module;
++ for my $name (@names) {
++ my $file = $name;
++ # requires need either a bare word or a file name
++ $file =~ s{::}{/}gsxm;
++ $file .= '.pm';
++ eval {
++ require $file;
++ $name->import();
++ $module = $name;
++ };
++ last if $module;
++ }
++ return $module;
++}
++
++my $plugin_module;
++BEGIN {
++ $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' );
++}
+
+ $PROGNAME = "check_memory";
+ $VERSION = '1.0.1';
+ $FREECMD = '/usr/bin/free';
+ $UNIT = 'M';
+
+-my $np = Nagios::Plugin->new(
++my $np = $plugin_module->new(
+ usage => "Usage: %s [ -w <warning_threshold> ] [ -c <critical_threshold> ]\n"
+ . ' [ -u <unit> ]',
+ version => $VERSION,
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_memory/new_free b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_memory/new_free
new file mode 100644
index 0000000..86f4335
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_memory/new_free
@@ -0,0 +1,53 @@
+From df189de31d33f40b894c33482dbdf9f61eaf1177 Mon Sep 17 00:00:00 2001
+From: Simon Ruderich <simon@ruderich.org>
+Date: Tue, 26 Jul 2016 18:50:38 +0200
+Subject: [PATCH] Fixing for new free output.
+
+The output of free doesn't anymore contain the "buffers/cache"
+line breaking the check_memory plugin. The attached patch uses
+instead the new "available" column to calculate the free memory
+as it seems to be a better estimation of free (usable) memory.
+---
+ check_memory/check_memory | 20 +++++++++++++++-----
+ 1 file changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/check_memory/check_memory b/check_memory/check_memory
+index 8369a9e..70d0514 100755
+--- a/check_memory/check_memory
++++ b/check_memory/check_memory
+@@ -104,12 +104,23 @@ open(RESULT, "$FREECMD -b |")
+ or $np->nagios_exit('CRITICAL', "Could not run $FREECMD");
+
+ warn("Output from $FREECMD:\n") if ($verbose > 1);
+-my ($used, $free);
++my $new_format = 0;
++my ($total, $used, $free);
+ while (<RESULT>) {
+ warn(" $_") if ($verbose > 1);
+- next unless (m#^\-/\+\ buffers/cache:\s*(\d+)\s+(\d+)#);
+- $used = $1;
+- $free = $2;
++ # New `free` output from procps doesn't provide "buffers/cache" anymore, but
++ # provides a better estimate of available memory ("available" column).
++ $new_format = 1 if m{^\s+total\s+used\s+free\s+shared\s+buff/cache\s+available$};
++
++ if ($new_format and /^Mem:\s+(\d+)\s+\d+\s+\d+\s+\d+\s+\d+\s+(\d+)$/) {
++ $total = $1;
++ $free = $2; # available column
++ $used = $total - $free; # used is everything which is not available
++ } elsif (m#^\-/\+\ buffers/cache:\s*(\d+)\s+(\d+)#) {
++ $used = $1;
++ $free = $2;
++ $total = $used + $free;
++ }
+ }
+
+ close(RESULT);
+@@ -117,7 +128,6 @@ alarm(0);
+
+ $np->nagios_exit('CRITICAL', "Unable to interpret $FREECMD output") if (!defined($free));
+
+-my $total = $used + $free;
+ if (defined($warning) && $warning =~ /^\d+%$/) {
+ if ($warning) {
+ $warning =~ s/%//;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_nfsmounts/nfs4_support b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_nfsmounts/nfs4_support
new file mode 100644
index 0000000..482541f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_nfsmounts/nfs4_support
@@ -0,0 +1,11 @@
+--- a/check_nfsmounts/check_nfsmounts
++++ b/check_nfsmounts/check_nfsmounts
+@@ -101,7 +101,7 @@
+ my @dirs=();
+ my %mountmodes=();
+ while(my $line=<MTAB>) {
+- if($line =~ /^[^ ]+ [^ ]+ nfs /) {
++ if($line =~ /^[^ ]+ [^ ]+ nfs4? /) {
+ my @fields=split(/\s+/,$line);
+ my $mountpoint=$fields[1];
+ push(@dirs,$mountpoint);
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_nfsmounts/nfs_write_location b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_nfsmounts/nfs_write_location
new file mode 100644
index 0000000..feb3e23
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_nfsmounts/nfs_write_location
@@ -0,0 +1,20 @@
+--- a/check_nfsmounts/check_nfsmounts
++++ b/check_nfsmounts/check_nfsmounts
+@@ -45,6 +45,7 @@
+ }
+
+ use Time::HiRes qw{time alarm};
++use Sys::Hostname;
+ use Getopt::Long;
+ use strict;
+
+@@ -129,7 +130,8 @@
+ if($pid==0) {
+ chdir $dir or &bad_mount($dir,$!);
+ if($writemode and exists($mountmodes{$dir}->{"rw"})) {
+- open X,"> $dir/.nfscheck" or exit $?;
++ my $check_filename="$dir/.nfscheck_" . hostname;
++ open X,"> $check_filename" or exit $?;
+ print X $ENV{HOSTNAME}."\n".localtime()."\n"; # XXX Full disk may fail..
+ close X or exit $?;
+ }
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_nfsmounts/perl_module b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_nfsmounts/perl_module
new file mode 100644
index 0000000..86c8c81
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_nfsmounts/perl_module
@@ -0,0 +1,43 @@
+diff --git a/check_nfsmounts/check_nfsmounts b/check_nfsmounts/check_nfsmounts
+index fbfb1f8..51ed625 100644
+--- a/check_nfsmounts/check_nfsmounts
++++ b/check_nfsmounts/check_nfsmounts
+@@ -21,14 +21,36 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #
+
+-use utils qw{$TIMEOUT %ERRORS};
++sub load_module {
++ my @names = @_;
++ my $module;
++ for my $name (@names) {
++ my $file = $name;
++ # requires need either a bare word or a file name
++ $file =~ s{::}{/}gsxm;
++ $file .= '.pm';
++ eval {
++ require $file;
++ $name->import(qw(%ERRORS));
++ $module = $name;
++ };
++ last if $module;
++ }
++ return $module;
++}
++
++my $plugin_module;
++BEGIN {
++ $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' );
++}
++
+ use Time::HiRes qw{time alarm};
+ use Getopt::Long;
+ use strict;
+
+ my $version="1.0";
+
+-my $nfs_timeout=$TIMEOUT;
++my $nfs_timeout=15;
+ my $nfs_warn=-1;
+ my $writemode=0;
+ my $help=0;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/debian_bts b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/debian_bts
new file mode 100644
index 0000000..73ff81a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/debian_bts
@@ -0,0 +1,17 @@
+--- a/check_printer/check_printer
++++ b/check_printer/check_printer
+@@ -267,10 +267,10 @@
+ if ($debug){
+ print Dumper(\%status);
+ print "\n\n############ ATTENTION ############\n";
+- print "You have debug enabled. If asked to enable debug by the developer,\n";
+- print "please send all of the output, including your command line to\n";
+- print "ecrist\@secure-computing.net with the subject line 'check_printer DEBUG' along\n";
+- print "with a description of the problem you're experiencing.\n###################################\n";
++ print "You have debug enabled. If asked to enable debug by the Debian Maintainer,\n";
++ print "please send all of the output to the Debian Bug Tracking System, either by \n";
++ print "replying to an existing bug or by opening a new bug.\n";
++
+ print '$Id: check_printer 363 2014-07-23 14:37:59Z ecrist $'."\n\n";
+ }
+ if ($is_crit){
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/epn b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/epn
new file mode 100644
index 0000000..ea584db
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/epn
@@ -0,0 +1,8 @@
+--- a/check_printer/check_printer
++++ b/check_printer/check_printer
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl
++# nagios: -epn
+ #
+ # Copyright (c) 2007,2011 Eric F Crist
+ #
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/use_data_dumper_if_needed b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/use_data_dumper_if_needed
new file mode 100644
index 0000000..977338e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/use_data_dumper_if_needed
@@ -0,0 +1,18 @@
+--- a/check_printer/check_printer
++++ b/check_printer/check_printer
+@@ -40,7 +40,6 @@ if ($OS =~ m/^\wBSD/){
+ use lib "/usr/local/nagios/libexec";
+ }
+
+-use Data::Dumper;
+ use Getopt::Long;
+ use Pod::Usage;
+
+@@ -109,6 +108,7 @@ foreach(@vars){
+ }
+
+ if ($debug){
++ use Data::Dumper;
+ print Dumper(\@values);
+ }
+ my %finvalues;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/use_nagios_plugin b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/use_nagios_plugin
new file mode 100644
index 0000000..36e7880
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_printer/use_nagios_plugin
@@ -0,0 +1,38 @@
+diff --git a/check_printer/check_printer b/check_printer/check_printer
+index 6d801de..da8e099 100644
+--- a/check_printer/check_printer
++++ b/check_printer/check_printer
+@@ -33,11 +33,27 @@
+ use strict;
+ use warnings;
+
+-my $OS = `uname`;
+-if ($OS =~ m/^\wBSD/){
+- use lib "/usr/local/libexec/nagios";
+-} elsif ($OS =~ m/Linux/){
+- use lib "/usr/local/nagios/libexec";
++sub load_module {
++ my @names = @_;
++ my $module;
++ for my $name (@names) {
++ my $file = $name;
++ # requires need either a bare word or a file name
++ $file =~ s{::}{/}gsxm;
++ $file .= '.pm';
++ eval {
++ require $file;
++ $name->import(qw(%ERRORS));
++ $module = $name;
++ };
++ last if $module;
++ }
++ return $module;
++}
++
++my $plugin_module;
++BEGIN {
++ $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' );
+ }
+
+ use Getopt::Long;
+ use Pod::Usage;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_raid/no_epn b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_raid/no_epn
new file mode 100644
index 0000000..9ce8a44
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_raid/no_epn
@@ -0,0 +1,8 @@
+--- a/check_raid/check_raid
++++ b/check_raid/check_raid
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl
++# nagios: -epn
+
+ # This chunk of stuff was generated by App::FatPacker. To find the original
+ # file's code, look for the end of this BEGIN block or the string 'FATPACK'
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_raid/prefer_cciss_vol_status_over_hpacucli b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_raid/prefer_cciss_vol_status_over_hpacucli
new file mode 100644
index 0000000..c8def56
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_raid/prefer_cciss_vol_status_over_hpacucli
@@ -0,0 +1,15 @@
+--- a/check_raid/check_raid
++++ b/check_raid/check_raid
+@@ -3975,8 +3975,10 @@ sub check {
+ package hpacucli;
+ use base 'plugin';
+
+-# register
+-push(@utils::plugins, __PACKAGE__);
++# register if cciss_vol_status is not available
++if (! utils::which('cciss_vol_status')) {
++ push(@utils::plugins, __PACKAGE__);
++}
+
+ sub program_names {
+ __PACKAGE__;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_rbl/additional_rbls b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_rbl/additional_rbls
new file mode 100644
index 0000000..a804e84
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_rbl/additional_rbls
@@ -0,0 +1,45 @@
+--- a/check_rbl/src/check_rbl.ini
++++ b/check_rbl/src/check_rbl.ini
+@@ -95,6 +95,42 @@
+ server=spam.dnsbl.anonmails.de
+ server=spambot.bls.digibase.ca
+ server=z.mailspike.net
++server=dul.dnsbl.borderware.com
++server=uribl.swinog.ch
++server=dnsbl.inps.de
++server=tor.dan.me.uk
++server=torexit.dan.me.uk
++server=combined.rbl.msrbl.net
++server=rbl.efnetrbl.org
++server=virbl.dnsbl.bit.nl
++server=relays.mail-abuse.org
++server=dev.null.dk
++server=blackholes.mail-abuse.org
++server=dialups.mail-abuse.org
++server=dul.orca.bc.ca
++server=blackholes.five-ten-sg.com
++server=rbl-plus.mail-abuse.org
++server=rbl.jp
++server=virus.rbl.jp
++server=dialup.blacklist.jippg.org
++server=blackholes.intersil.net
++server=assholes.madscience.nl
++server=blackholes.sandes.dk
++server=blocked.hilli.dk
++server=cart00ney.surriel.com
++server=dnsbl.antispam.or.id
++server=dsbl.dnsbl.net.au
++server=duinv.aupads.org
++server=rsbl.aupads.org
++server=intruders.docs.uu.se
++server=map.spam-rbl.com
++server=orvedb.aupads.org
++server=proxy.bl.gweep.ca
++server=pss.spambusters.org.ar
++server=rdts.dnsbl.net.au
++server=relays.bl.gweep.ca
++server=relays.bl.kundenserver.de
++server=spam.olsentech.net
+
+ ; these are rather slow
+ ;server=bl.csma.biz
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_rbl/interpreter b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_rbl/interpreter
new file mode 100644
index 0000000..f67e230
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_rbl/interpreter
@@ -0,0 +1,8 @@
+--- a/check_rbl/src/check_rbl
++++ b/check_rbl/src/check_rbl
+@@ -1,4 +1,4 @@
+-#!perl
++#!/usr/bin/perl
+
+ # nagios: -epn
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_smstools/monitoring-plugin b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_smstools/monitoring-plugin
new file mode 100644
index 0000000..1715f96
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_smstools/monitoring-plugin
@@ -0,0 +1,46 @@
+diff --git a/check_smstools/bin/check_smstools b/check_smstools/bin/check_smstools
+index a7a0336..707d289 100755
+--- a/check_smstools/bin/check_smstools
++++ b/check_smstools/bin/check_smstools
+@@ -13,9 +13,31 @@
+
+ use strict;
+ use warnings;
+-use Nagios::Plugin;
+ use POSIX;
+
++sub load_module {
++ my @names = @_;
++ my $module;
++ for my $name (@names) {
++ my $file = $name;
++ # requires need either a bare word or a file name
++ $file =~ s{::}{/}gsxm;
++ $file .= '.pm';
++ eval {
++ require $file;
++ $name->import();
++ $module = $name;
++ };
++ last if $module;
++ }
++ return $module;
++}
++
++my $plugin_module;
++BEGIN {
++ $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' );
++}
++
+ # Define regular expressions used to find the correct lines from
+ # the status file
+ my $signal_command = 'AT\+CSQ';
+@@ -45,7 +67,7 @@ my $timestamp;
+ my $np;
+
+ sub init_plugin {
+- $np = Nagios::Plugin->new(usage => "usage: %s");
++ $np = $plugin_module->new(usage => "usage: %s");
+
+ $np->add_arg(
+ spec => 'warning|w=f',
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_smstools/operator_siglvl b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_smstools/operator_siglvl
new file mode 100644
index 0000000..7c18cbd
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_smstools/operator_siglvl
@@ -0,0 +1,30 @@
+From 75a6f801a18961b1abd169046a105813da6c3424 Mon Sep 17 00:00:00 2001
+From: ZyanKLee <zyanklee@gmail.com>
+Date: Thu, 28 Apr 2016 12:51:42 +0200
+Subject: [PATCH] operator string, siglvl
+
+operator string has a " at the end, too - removing it
+siglvl at our modem is 31.99 - but still works
+---
+ check_smstools/bin/check_smstools | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/check_smstools/bin/check_smstools
++++ b/check_smstools/bin/check_smstools
+@@ -191,6 +191,7 @@
+ if ($result{'cmd'} =~ /$operator_command/) {
+ $operator = $result{'answer'};
+ $operator =~ s/0,0,"//g;
++ $operator =~ s/"$//g;
+ }
+ }
+ # No need to parse the rest of the file, if signal
+@@ -218,7 +219,7 @@
+ $np->nagios_die("Unable to determine the modem signal strength.");
+ }
+
+- if (($siglvl < 0) or ($siglvl > 31)) {
++ if (($siglvl < 0) or ($siglvl > 32)) {
+ $np->nagios_die("Unable to determine the modem signal strength.");
+ }
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_snmp_environment/epn b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_snmp_environment/epn
new file mode 100644
index 0000000..9273c79
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_snmp_environment/epn
@@ -0,0 +1,10 @@
+diff --git a/check_snmp_environment/check_snmp_environment.pl b/check_snmp_environment/check_snmp_environment.pl
+index 2be3fc0..6022fcb 100644
+--- a/check_snmp_environment/check_snmp_environment.pl
++++ b/check_snmp_environment/check_snmp_environment.pl
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl
++# nagios: -epn
+ # ============================================================================
+ # ============================== INFO ========================================
+ # ============================================================================
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_snmp_time/epn b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_snmp_time/epn
new file mode 100644
index 0000000..f78de4c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_snmp_time/epn
@@ -0,0 +1,8 @@
+--- a/check_snmp_time/check_snmp_time
++++ b/check_snmp_time/check_snmp_time
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w
++# nagios: -epn
+ ############################## check_snmp_time.pl #################
+ my $Version='1.1';
+ # Date : Dec 08 2010
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_uptime/missing_backslash b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_uptime/missing_backslash
new file mode 100644
index 0000000..e49d276
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_uptime/missing_backslash
@@ -0,0 +1,16 @@
+diff --git a/check_uptime/check_uptime b/check_uptime/check_uptime
+index e1e5b99..41b7f26 100644
+--- a/check_uptime/check_uptime
++++ b/check_uptime/check_uptime
+@@ -540,7 +540,7 @@ if ($check_type==1) { # local
+ elsif ($uptime_output =~ /up\s+(\d+)\s+min/) {
+ ($days, $hrs, $mins) = (0,0,$1);
+ }
+- elsif ($uptime_output =~ /up\s+(\d+)s+days?,s+(\d+)s+min/) {
++ elsif ($uptime_output =~ /up\s+(\d+)\s+days?,\s+(\d+)\s+min/) {
+ ($days, $hrs, $mins) = ($1,0,$2);
+ }
+ else {
+diff --git a/dsa/checks/dsa-check-cert-expire-dir b/dsa/checks/dsa-check-cert-expire-dir
+old mode 100755
+new mode 100644
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_v46/no_epn b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_v46/no_epn
new file mode 100644
index 0000000..cd0084f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_v46/no_epn
@@ -0,0 +1,9 @@
+--- a/check_v46/check_v46
++++ b/check_v46/check_v46
+@@ -1,4 +1,6 @@
+ #!/usr/bin/perl
++# nagios: -epn
++#
+ #
+ # check_v46
+ # Nagios plugin wrapper for running the actual plugin for both / either of
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_varnish/fix_for_v56 b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_varnish/fix_for_v56
new file mode 100644
index 0000000..91c93fb
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_varnish/fix_for_v56
@@ -0,0 +1,186 @@
+From d53252d965aaa1889a8b56a681c464c6ca04f632 Mon Sep 17 00:00:00 2001
+From: Jean-Louis Dupond <jean-louis@dupond.be>
+Date: Sat, 23 Dec 2017 13:06:01 +0100
+Subject: [PATCH] Switch to new functions for Varnish 5.2
+
+---
+ check_varnish.c | 54 +++++++++++++++++++++++++++++++++++++++++--------
+ configure.ac | 18 ++++++++++-------
+ 2 files changed, 57 insertions(+), 15 deletions(-)
+
+diff --git a/check_varnish/src/check_varnish.c b/check_varnish/src/check_varnish.c
+index 809657c..83aacdc 100644
+--- a/check_varnish/src/check_varnish.c
++++ b/check_varnish/src/check_varnish.c
+@@ -43,7 +43,7 @@
+ #include <locale.h>
+ #include <assert.h>
+
+-#if defined(HAVE_VARNISHAPI_4) || defined(HAVE_VARNISHAPI_4_1)
++#if defined(HAVE_VARNISHAPI_4) || defined(HAVE_VARNISHAPI_4_1) || defined(HAVE_VARNISHAPI_5)
+ #include <vapi/vsc.h>
+ #include <vapi/vsm.h>
+ #elif defined(HAVE_VARNISHAPI_3)
+@@ -185,7 +185,11 @@ check_stats_cb(void *priv, const struct VSC_point * const pt)
+ if (pt == NULL)
+ return(0);
+
+-#if defined(HAVE_VARNISHAPI_4_1) || defined(HAVE_VARNISHAPI_4)
++#if defined(HAVE_VARNISHAPI_5)
++ assert(sizeof(tmp) > (strlen(pt->name) + 1));
++ snprintf(tmp, sizeof(tmp), "%s", pt->name);
++ p = priv;
++#elif defined(HAVE_VARNISHAPI_4_1) || defined(HAVE_VARNISHAPI_4)
+ assert(sizeof(tmp) > (strlen(pt->section->fantom->type) + 1 +
+ strlen(pt->section->fantom->ident) + 1 +
+ strlen(pt->desc->name) + 1));
+@@ -197,7 +201,9 @@ check_stats_cb(void *priv, const struct VSC_point * const pt)
+ pt->desc->name);
+ p = priv;
+ #endif
+-#if defined(HAVE_VARNISHAPI_4_1)
++#if defined(HAVE_VARNISHAPI_5)
++ assert(!strcmp(pt->ctype, "uint64_t"));
++#elif defined(HAVE_VARNISHAPI_4_1)
+ assert(!strcmp(pt->desc->ctype, "uint64_t"));
+ #elif defined(HAVE_VARNISHAPI_4)
+ assert(!strcmp(pt->desc->fmt, "uint64_t"));
+@@ -216,7 +222,9 @@ check_stats_cb(void *priv, const struct VSC_point * const pt)
+ #endif
+ if (strcmp(tmp, p->param) == 0) {
+ p->found = 1;
+-#if defined(HAVE_VARNISHAPI_4) || defined(HAVE_VARNISHAPI_4_1)
++#if defined(HAVE_VARNISHAPI_5)
++ p->info = pt->sdesc;
++#elif defined(HAVE_VARNISHAPI_4) || defined(HAVE_VARNISHAPI_4_1)
+ p->info = pt->desc->sdesc;
+ #elif defined(HAVE_VARNISHAPI_3)
+ p->info = pt->desc;
+@@ -237,7 +245,11 @@ check_stats_cb(void *priv, const struct VSC_point * const pt)
+ * Check the statistics for the requested parameter.
+ */
+ static void
++#if defined(HAVE_VARNISHAPI_5)
++check_stats(struct vsc *vsc, struct vsm *vsm, char *param)
++#else
+ check_stats(struct VSM_data *vd, char *param)
++#endif
+ {
+ int status;
+ struct stat_priv priv;
+@@ -245,7 +257,9 @@ check_stats(struct VSM_data *vd, char *param)
+ priv.found = 0;
+ priv.param = param;
+
+-#if defined(HAVE_VARNISHAPI_4) || defined(HAVE_VARNISHAPI_4_1)
++#if defined(HAVE_VARNISHAPI_5)
++ (void)VSC_Iter(vsc, vsm, check_stats_cb, &priv);
++#elif defined(HAVE_VARNISHAPI_4) || defined(HAVE_VARNISHAPI_4_1)
+ (void)VSC_Iter(vd, NULL, check_stats_cb, &priv);
+ #elif defined(HAVE_VARNISHAPI_3)
+ (void)VSC_Iter(vd, check_stats_cb, &priv);
+@@ -315,18 +329,25 @@ usage(void)
+ int
+ main(int argc, char **argv)
+ {
++#if defined(HAVE_VARNISHAPI_5)
++ struct vsm *vd;
++ struct vsc *vsc;
++#else
+ struct VSM_data *vd;
++#endif
+ char *param = NULL;
+ int opt;
+
+ setlocale(LC_ALL, "");
+
+ vd = VSM_New();
+-#if defined(HAVE_VARNISHAPI_3)
++#if defined(HAVE_VARNISHAPI_5)
++ vsc = VSC_New();
++#elif defined(HAVE_VARNISHAPI_3)
+ VSC_Setup(vd);
+ #endif
+
+- while ((opt = getopt(argc, argv, VSC_ARGS "c:hn:p:vw:")) != -1) {
++ while ((opt = getopt(argc, argv, "c:hn:p:vw:")) != -1) {
+ switch (opt) {
+ case 'c':
+ if (parse_range(optarg, &critical) != 0)
+@@ -336,7 +357,11 @@ main(int argc, char **argv)
+ help();
+ break;
+ case 'n':
++#if defined(HAVE_VARNISHAPI_5)
++ VSC_Arg(vsc, opt, optarg);
++#else
+ VSC_Arg(vd, opt, optarg);
++#endif
+ break;
+ case 'p':
+ param = strdup(optarg);
+@@ -349,13 +374,22 @@ main(int argc, char **argv)
+ usage();
+ break;
+ default:
++#if defined(HAVE_VARNISHAPI_5)
++ if (VSC_Arg(vsc, opt, optarg) > 0)
++#else
+ if (VSC_Arg(vd, opt, optarg) > 0)
++#endif
+ break;
+ usage();
+ }
+ }
+
+-#if defined(HAVE_VARNISHAPI_4) || defined(HAVE_VARNISHAPI_4_1)
++#if defined(HAVE_VARNISHAPI_5)
++ if (VSM_Attach(vd, -1) < 0) {
++ printf("varnish plugin: Cannot attach to varnish. %s", VSM_Error(vd));
++ exit(1);
++ }
++#elif defined(HAVE_VARNISHAPI_4) || defined(HAVE_VARNISHAPI_4_1)
+ if (VSM_Open(vd))
+ exit(1);
+ #elif defined(HAVE_VARNISHAPI_3)
+@@ -377,7 +411,11 @@ main(int argc, char **argv)
+ if (!param)
+ usage();
+
++#if defined(HAVE_VARNISHAPI_5)
++ check_stats(vsc, vd, param);
++#else
+ check_stats(vd, param);
++#endif
+
+ exit(0);
+ }
+diff --git a/check_varnish/src/configure.ac b/check_varnish/src/configure.ac
+index c7946c2..8b0b2ec 100644
+--- a/check_varnish/src/configure.ac
++++ b/check_varnish/src/configure.ac
+@@ -21,13 +21,17 @@ AC_PROG_LIBTOOL
+ AC_PROG_MAKE_SET
+
+ # Checks for libraries.
+-PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 4.1],
+- [AC_DEFINE([HAVE_VARNISHAPI_4_1], [1], [Use VARNISHAPI v4.1])],
+- [PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 4],
+- [AC_DEFINE([HAVE_VARNISHAPI_4], [1], [Use VARNISHAPI v4])],
+- [PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 3],
+- [AC_DEFINE([HAVE_VARNISHAPI_3], [1], [Use VARNISHAPI v3])],
+- [AC_MSG_ERROR([Could not find neither varnishapi v4 nor v3.])])
++PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 5.2],
++ [AC_DEFINE([HAVE_VARNISHAPI_5], [1], [Use VARNISHAPI v5])],
++ [PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 4.1],
++ [AC_DEFINE([HAVE_VARNISHAPI_4_1], [1], [Use VARNISHAPI v4.1])],
++ [PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 4],
++ [AC_DEFINE([HAVE_VARNISHAPI_4], [1], [Use VARNISHAPI v4])],
++ [PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 3],
++ [AC_DEFINE([HAVE_VARNISHAPI_3], [1], [Use VARNISHAPI v3])],
++ [AC_MSG_ERROR([Could not find neither varnishapi v4 nor v3.])])
++ ]
++ )
+ ]
+ )
+ ]
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_webinject/epn b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_webinject/epn
new file mode 100644
index 0000000..203e5fd
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/check_webinject/epn
@@ -0,0 +1,9 @@
+--- a/check_webinject/check_webinject
++++ b/check_webinject/check_webinject
+@@ -1,5 +1,5 @@
+ #!/usr/bin/perl
+-# nagios: +epn
++# nagios: -epn
+
+ package Webinject;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_cert_expire_dir_check_name_fix b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_cert_expire_dir_check_name_fix
new file mode 100644
index 0000000..6d8cb38
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_cert_expire_dir_check_name_fix
@@ -0,0 +1,14 @@
+--- a/dsa/checks/dsa-check-cert-expire-dir
++++ b/dsa/checks/dsa-check-cert-expire-dir
+@@ -26,9 +26,9 @@
+
+ sn="$0"
+ if [ "${sn%/*}" = "$sn" ]; then
+- CERT_CHECK=dsa-check-cert-expire
++ CERT_CHECK=check_cert_expire
+ else
+- CERT_CHECK="${sn%/*}/dsa-check-cert-expire"
++ CERT_CHECK="${sn%/*}/check_cert_expire"
+ fi
+
+ if [ "$#" != 1 ] ; then
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_packages-inifile b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_packages-inifile
new file mode 100644
index 0000000..056b70a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_packages-inifile
@@ -0,0 +1,13 @@
+--- a/dsa/checks/dsa-check-packages
++++ b/dsa/checks/dsa-check-packages
+@@ -37,8 +37,8 @@ use strict;
+ use warnings;
+ use English;
+
+-my $IGNORE = "/etc/nagios/obsolete-packages-ignore";
+-my $IGNORED = "/etc/nagios/obsolete-packages-ignore.d";
++my $IGNORE = "/etc/nagios-plugins/obsolete-packages-ignore";
++my $IGNORED = "/etc/nagios-plugins/obsolete-packages-ignore.d";
+
+ my %CODE = (
+ 'OK' => 0,
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_packages_,_fix b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_packages_,_fix
new file mode 100644
index 0000000..a000369
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_packages_,_fix
@@ -0,0 +1,30 @@
+--- a/dsa/checks/dsa-check-packages
++++ b/dsa/checks/dsa-check-packages
+@@ -334,7 +334,7 @@ for my $form (@reportform) {
+ push @perfout, sprintf($form->{'perf'}, $num);
+ next unless ($num > 0);
+ if ($form->{'listpackages'}) {
+- my $list = join(", ", keys %$pkgs);
++ my $list = join(" ", keys %$pkgs);
+ push @longout, sprintf($form->{'long'}, $num, $list);
+ } else {
+ push @longout, sprintf($form->{'long'}, $num);
+@@ -344,15 +344,15 @@ for my $form (@reportform) {
+ };
+ if (scalar keys %$packages) {
+ record('WARNING');
+- unshift @shortout, "unk: ".join(", ", keys %$packages);
++ unshift @shortout, "unk: ".join(" ", keys %$packages);
+ for my $status (sort {$b cmp $a} keys %$packages) {
+ my $pkgs = $packages->{$status};
+- my $list = join(", ", keys %$pkgs);
++ my $list = join(" ", keys %$pkgs);
+ unshift @longout, "Unknown package status $status: $list";
+ };
+ }
+
+-my $shortout = $EXITCODE.": ".join(", ", @shortout);
++my $shortout = $EXITCODE.": ".join(" ", @shortout);
+ my $longout = join("\n", @longout);
+ my $perfout = "|".join(" ", @perfout);
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_packages_location b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_packages_location
new file mode 100644
index 0000000..eb71d75
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_packages_location
@@ -0,0 +1,11 @@
+--- a/dsa/sbin/dsa-update-apt-status
++++ b/dsa/sbin/dsa-update-apt-status
+@@ -78,7 +78,7 @@ fi
+ tmp=`tempfile`
+ trap "rm -f '$tmp'" exit
+ #/usr/share/dsa/apt-status-check --noupdate --timeout=600 > "$tmp"
+-/usr/lib/nagios/plugins/dsa-check-packages > "$tmp"
++/usr/lib/nagios/plugins/check_packages > "$tmp"
+ result="$?"
+ case "$result" in
+ 0)
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_running_kernel_jessie_centos_fix b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_running_kernel_jessie_centos_fix
new file mode 100644
index 0000000..e850e2f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/check_running_kernel_jessie_centos_fix
@@ -0,0 +1,42 @@
+--- a/dsa/checks/dsa-check-running-kernel
++++ b/dsa/checks/dsa-check-running-kernel
+@@ -131,6 +131,11 @@
+ filter="$3"
+ hdroff="$4"
+
++ if ! which $filter >/dev/null; then
++ echo "UNKNOWN: filter command '$filter' missing, perhaps install xz-utils?" >&2
++ exit $UNKNOWN
++ fi
++
+ get_offset "$image" $header | head -n 5 | while read off; do
+ (if [ "$off" != 0 ]; then
+ dd ibs="$((off+hdroff))" skip=1 count=0
+@@ -182,9 +187,8 @@
+
+ searched=""
+ for on_disk in \
+- "/boot/vmlinuz-`uname -r`"\
+- "/boot/vmlinux-`uname -r`"\
+- "/boot/kfreebsd-`uname -r`.gz"; do
++ $([ -f "/boot/vmlinuz-$(uname -r)" ] && find /boot/ -name 'vmlinuz*' -and -name "vmlinuz-$(uname -r)" -or -name 'vmlinuz*' -and -newer "/boot/vmlinuz-$(uname -r)" | sort) \
++ $([ -f "/boot/kfreebsd-$(uname -r).gz" ] && find /boot/ -name 'kfreebsd*' -and -name "kfreebsd-$(uname -r).gz" -or -name 'kfreebsd*' -and -newer "/boot/kfreebsd-$(uname -r).gz" | sort); do
+
+ if [ -e "$on_disk" ]; then
+ if [ -z "$STRINGS" ]; then
+@@ -196,12 +200,12 @@
+ if [ -x /usr/bin/lsb_release ] ; then
+ vendor=$(lsb_release -i -s)
+ if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
+- on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
++ on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.-]\+)//")
+ fi
+ fi
+- [ -z "$on_disk_version" ] || break
++ [ -z "$on_disk_version" ] || continue
+ on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
+- [ -z "$on_disk_version" ] || break
++ [ -z "$on_disk_version" ] || continue
+
+ echo "UNKNOWN: Failed to get a version string from image $on_disk"
+ exit $UNKNOWN
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/epn b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/epn
new file mode 100644
index 0000000..7f31e58
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/epn
@@ -0,0 +1,8 @@
+--- a/dsa/checks/dsa-check-packages
++++ b/dsa/checks/dsa-check-packages
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl
++# nagios: -epn
+
+ # dsa-check-packages
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/status_directory b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/status_directory
new file mode 100644
index 0000000..5798d55
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/dsa/status_directory
@@ -0,0 +1,22 @@
+--- a/dsa/sbin/dsa-update-apt-status
++++ b/dsa/sbin/dsa-update-apt-status
+@@ -22,7 +22,7 @@
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ UPDATE_RUNS=3
+-STATUSDIR=/var/cache/dsa/nagios
++STATUSDIR=/var/cache/nagios_status
+ STATUS="${STATUSDIR}"/apt
+ SLEEP_MAX=$(( 15 * 60 ))
+ MAX_AGE=$(( 23 * 60 * 60 ))
+--- a/dsa/sbin/dsa-update-unowned-file-status
++++ b/dsa/sbin/dsa-update-unowned-file-status
+@@ -22,7 +22,7 @@
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ CUTOFF=40
+-STATUSDIR=/var/cache/dsa/nagios
++STATUSDIR=/var/cache/nagios_status
+ STATUS="${STATUSDIR}"/nouser
+
+ mkdir -p "${STATUSDIR}"
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/percona-nagios-plugins/fix_bashism b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/percona-nagios-plugins/fix_bashism
new file mode 100644
index 0000000..ec431a2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/percona-nagios-plugins/fix_bashism
@@ -0,0 +1,8 @@
+--- a/percona-nagios-plugins/nagios/bin/pmp-check-mysql-ts-count
++++ b/percona-nagios-plugins/nagios/bin/pmp-check-mysql-ts-count
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ # ########################################################################
+ # This program is part of $PROJECT_NAME$
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/series b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/series
new file mode 100644
index 0000000..98c8600
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/patches/series
@@ -0,0 +1,54 @@
+dsa/check_cert_expire_dir_check_name_fix
+dsa/check_running_kernel_jessie_centos_fix
+check_ajp/return_critical_on_failed_connection
+check_backuppc/use_nagios_plugins
+check_bgpstate/epn
+check_clamav/clamav_locations
+check_cups/epn
+check_cups/monitoring-plugin
+check_drbd/fix_for_oos_and_cosmetic
+check_email_delivery/epn
+check_email_delivery/paths
+check_haproxy/epn
+check_haproxy/monitoring-plugin
+check_haproxy_stats/interpreter
+check_httpd_status/epn
+check_httpd_status/monitoring-plugin
+check_imap_quota/syntax_error_fix
+check_libs/lsof-speedup
+check_libs/config_path
+check_libs/space_before_deleted
+check_libvirt/monitoring-plugin
+check_libvirt/fix_uom
+check_lm_sensors/manpage_whatis_fix
+check_lm_sensors/spelling_errors
+check_lm_sensors/interpreter
+check_memory/new_free
+check_memory/monitoring-plugin
+check_nfsmounts/perl_module
+check_nfsmounts/nfs_write_location
+check_printer/use_data_dumper_if_needed
+check_printer/use_nagios_plugin
+check_printer/debian_bts
+#check_raid/prefer_cciss_vol_status_over_hpacucli
+check_rbl/interpreter
+check_rbl/additional_rbls
+check_smstools/monitoring-plugin
+check_smstools/operator_siglvl
+check_snmp_environment/epn
+check_snmp_time/epn
+check_uptime/missing_backslash
+check_v46/no_epn
+check_webinject/epn
+dsa/check_packages_location
+dsa/status_directory
+dsa/check_packages-inifile
+dsa/epn
+dsa/check_packages_,_fix
+check_cups/ParseDateDelta
+check_printer/epn
+check_nfsmounts/nfs4_support
+check_httpd_status/htdigest_auth
+check_varnish/fix_for_v56
+check_raid/no_epn
+percona-nagios-plugins/fix_bashism
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/rules b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/rules
new file mode 100755
index 0000000..e6c707a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/rules
@@ -0,0 +1,43 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+PKGNAME = nagios-plugins-contrib
+PLUGINS := $(shell find $(CURDIR) -mindepth 1 -maxdepth 1 -name .git -prune -o -name .pc -prune -o -name debian -prune -o -type d -printf '%f\n' | sort)
+
+%:
+ dh $@ --with quilt,python2
+
+override_dh_auto_build:
+ dh_auto_build
+ $(PACKAGING_HELPER) --generate-readme
+
+PACKAGING_HELPER = /usr/bin/python $(CURDIR)/debian/packaging-helper.py
+
+
+clean: debian/copyright debian/control debian/tests/control
+ dh $@ --with quilt,python2
+ rm -f debian/README.Debian.plugins
+
+CONTROL_FILES := $(shell for p in $(PLUGINS); do echo $$p/control; done)
+COPYRIGHT_FILES := $(shell for p in $(PLUGINS); do echo $$p/copyright; done)
+TESTS_FILES := $(wildcard */tests)
+debian/copyright: debian/copyright.in debian/packaging-helper.py $(CONTROL_FILES) $(COPYRIGHT_FILES)
+ $(PACKAGING_HELPER) --copyright
+ -if [ -d .git ]; then git add $@; git commit -m 'Auto update of $@' $@; fi
+
+debian/control: debian/control.in debian/packaging-helper.py $(CONTROL_FILES)
+ $(PACKAGING_HELPER) --control
+ -if [ -d .git ]; then git add $@; git commit -m 'Auto update of $@' $@; fi
+
+debian/tests/control: debian/packaging-helper.py $(TESTS_FILES)
+ $(PACKAGING_HELPER) --tests
+ -if [ -d .git ]; then git add $@; git commit -m 'Auto update of $@' $@; fi
+
+
+watch:
+ @$(PACKAGING_HELPER) --watch
+
+.PHONY: watch
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/source/format b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/tests/control b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/tests/control
new file mode 100644
index 0000000..1b5c612
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/tests/control
@@ -0,0 +1,37 @@
+Test-Command: mkdir -p /etc/nagios/ && sha256sum /bin/true > /etc/nagios/check_checksums.sha256 && /usr/lib/nagios/plugins/check_checksums
+Restrictions: needs-root, breaks-testbed
+
+Depends: cups, libdate-manip-perl, libmonitoring-plugin-perl | libnagios-plugin-perl, libnet-cups-perl, @
+Test-Command: /usr/lib/nagios/plugins/check_cups -H localhost
+Restrictions: needs-root, isolation-container
+
+Depends: debsecan, @
+Test-Command: /usr/lib/nagios/plugins/check_debsecan -f 9998 -F 9999 -o 9998 -O 9999 -l 9998 -L 9999 -m 9998 -M 9999 -u 9998 -U 9999 -r
+
+Depends: libnet-dns-perl, @
+Test-Command: echo "127.0.0.1 localhost" > /etc/hosts && /usr/lib/nagios/plugins/check_etc_hosts
+Restrictions: needs-root, breaks-testbed
+
+Test-Command: /usr/lib/nagios/plugins/check_etc_resolv
+Depends: bind9-host | knot-host, @
+
+Depends: apache2, liblocale-gettext-perl, libmonitoring-plugin-perl | libnagios-plugin-perl, liblwp-useragent-determined-perl, @
+Test-Command: /usr/lib/nagios/plugins/check_httpd_status -H localhost
+Restrictions: needs-root, allow-stderr, isolation-container
+
+Depends: lsof, libyaml-syck-perl, @
+Test-Command: /usr/lib/nagios/plugins/check_libs
+
+Restrictions: needs-root
+Test-Command: /usr/lib/nagios/plugins/check_libs_ng
+
+Depends: openssl, curl, file, @
+Test-Command: /usr/lib/nagios/plugins/check_ssl_cert -H www.debian.org
+
+Depends: libmonitoring-plugin-perl | libnagios-plugin-perl, @
+Test-Command: /usr/lib/nagios/plugins/check_uptime -f
+
+Depends: varnish, systemd, dbus, @
+Restrictions: needs-root, isolation-container
+Tests: test_check_varnish
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/debian/tests/test_check_varnish b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/tests/test_check_varnish
new file mode 100755
index 0000000..cd373aa
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/debian/tests/test_check_varnish
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+VARNISH_PORT=$(( ($RANDOM % 60000) + 1024 ))
+API_PORT=$(( ($RANDOM % 60000) + 1024 ))
+
+systemctl stop varnish.service 2>/dev/null
+
+cat > /etc/systemd/system/varnish.service << __EOF__
+
+[Unit]
+Description=Varnish HTTP accelerator
+Documentation=https://www.varnish-cache.org/docs/4.1/ man:varnishd
+
+[Service]
+Type=simple
+LimitNOFILE=131072
+LimitMEMLOCK=82000
+ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F -a localhost:${VARNISH_PORT} -T localhost:${API_PORT} -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,50m
+ExecReload=/usr/share/varnish/reload-vcl
+ProtectSystem=full
+ProtectHome=true
+PrivateTmp=true
+PrivateDevices=true
+
+[Install]
+WantedBy=multi-user.target
+
+__EOF__
+
+systemctl daemon-reload 2>/dev/null
+systemctl start varnish.service 2>/dev/null
+
+/usr/lib/nagios/plugins/check_varnish -p MAIN.pools -w 1: -c 1:
+exit $?
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/Makefile
new file mode 100644
index 0000000..18c87c2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/Makefile
@@ -0,0 +1,23 @@
+#!/usr/bin/make -f
+
+PLUGIN:=$(shell cd checks; ls -1 | sed 's,^dsa-,,;s,-,_,g')
+CRONJOBS:=$(shell cd sbin; ls -1 | sed 's,^dsa-,,')
+INIFILES:=etc/obsolete-packages-ignore
+DOCFILES:=$(wildcard *.cmd)
+
+check_%:
+ cp checks/dsa-`echo $@ | sed 's,_,-,g'` $@
+ chmod 755 $@
+
+update-%-status:
+ cp sbin/dsa-$@ $@
+ chmod 755 $@
+
+CLEANFILES=$(PLUGIN) $(CRONJOBS)
+
+
+include ../common.mk
+
+install::
+ install -d $(DESTDIR)$(INIDIR)/obsolete-packages-ignore.d
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-cert-expire b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-cert-expire
new file mode 100644
index 0000000..98a04a2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-cert-expire
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# Checks if a given cert on disk will expire soon
+
+# Copyright 2009 Peter Palfrader
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+set -u
+set -e
+
+# warn if expires within 2 weeks, critical if within a day or already is expired
+warn=1209600
+crit=86400
+
+usage() {
+ echo "Usage: $0 [-w seconds] [-c seconds] <certfile>" >&2
+ exit 3
+}
+
+
+OPTS=`getopt -o w:c: -n "$0" -- "$@"` || usage
+
+eval set -- "$OPTS"
+
+while :; do
+ case "$1" in
+ -w) warn=$2; shift 2 ;;
+ -c) crit=$2; shift 2 ;;
+ --) shift; break; ;;
+ *) usage ;;
+ esac
+done
+if test "$crit" -gt "$warn"; then
+ warn=$crit
+fi
+
+if [ "$#" != 1 ]; then
+ usage
+fi
+
+cert="$1"
+
+if ! [ -r "$cert" ] ; then
+ echo "Cert file ($cert) does not exist or is not readable" >&2
+ exit 3
+fi
+
+expires=`openssl x509 -enddate -noout < "$cert"`
+
+if openssl x509 -checkend "$warn" -noout < "$cert" ; then
+ echo "OK: $expires"
+ exit 0
+fi
+if openssl x509 -checkend "$crit" -noout < "$cert" ; then
+ echo "WARN: $expires"
+ exit 1
+fi
+echo "CRITICAL: $expires"
+exit 2
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-cert-expire-dir b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-cert-expire-dir
new file mode 100644
index 0000000..2c8eaa1
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-cert-expire-dir
@@ -0,0 +1,90 @@
+#!/bin/bash
+
+# Checks if any of the *.crt files in a directory on disk will expire soon
+
+# Copyright 2009,2016 Peter Palfrader
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+sn="$0"
+if [ "${sn%/*}" = "$sn" ]; then
+ CERT_CHECK=dsa-check-cert-expire
+else
+ CERT_CHECK="${sn%/*}/dsa-check-cert-expire"
+fi
+
+if [ "$#" != 1 ] ; then
+ echo >&2 "Usage: $0 <directory>"
+ exit 1
+fi
+
+DIR="$1"
+
+if ! [ -d "$DIR" ]; then
+ echo "Not a directory: $DIR"
+ exit 1
+fi
+
+OK=""
+WARN=""
+CRIT=""
+UNKNOWN=""
+cOK=0
+cWARN=0
+cCRIT=0
+cUNKNOWN=0
+
+t=$(tempfile)
+trap "rm -f '$t'" EXIT
+
+for i in "$DIR"/*.crt; do
+ d="${i%.crt}"
+ d="${d##*/}"
+ echo -n "$d: " >> "$t"
+ "$CERT_CHECK" "$i" >> "$t" 2>&1
+ rc=$?
+ if [ "$rc" = 0 ]; then
+ OK="$OK $d"
+ cOK=$(( cOK + 1 ))
+ elif [ "$rc" = 1 ]; then
+ WARN="$WARN $d"
+ cWARN=$(( cWARN + 1 ))
+ elif [ "$rc" = 2 ]; then
+ CRIT="$CRIT $d"
+ cCRIT=$(( cCRIT + 1 ))
+ else
+ UNKNOWN="$UNKNOWN $d"
+ cUNKNOWN=$(( cUNKNOWN + 1 ))
+ fi
+done
+
+if [ -n "$CRIT" ]; then rc=2;
+elif [ -n "$WARN" ]; then rc=1;
+elif [ -n "$UNKNOWN" ]; then rc=3;
+else rc=0;
+fi
+
+[ -n "$CRIT" ] && echo "CRITICAL ($cCRIT):$CRIT, "
+[ -n "$WARN" ] && echo "WARN ($cWARN):$WARN, "
+[ -n "$UNKNOWN" ] && echo "UNKNOWN ($cUNKNOWN):$UNKNOWN, "
+[ -n "$OK" ] && echo "OK ($cOK):$OK."
+cat "$t"
+exit $rc
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-dnssec-delegation b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-dnssec-delegation
new file mode 100644
index 0000000..65b48b0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-dnssec-delegation
@@ -0,0 +1,301 @@
+#!/usr/bin/perl
+
+# Copyright (c) 2010, 2014, 2015, 2017 Peter Palfrader <peter@palfrader.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+use strict;
+use warnings;
+use English;
+use Net::DNS::Resolver;
+use Getopt::Long;
+use File::Basename;
+
+# taken from Array::Utils
+# http://cpansearch.perl.org/src/ZMIJ/Array-Utils-0.5/Utils.pm
+# This module is Copyright (c) 2007 Sergei A. Fedorov.
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the Perl README file.
+#
+sub intersect(\@\@) {
+ my %e = map { $_ => undef } @{$_[0]};
+ return grep { exists( $e{$_} ) } @{$_[1]};
+}
+sub array_diff(\@\@) {
+ my %e = map { $_ => undef } @{$_[1]};
+ return @{[ ( grep { (exists $e{$_}) ? ( delete $e{$_} ) : ( 1 ) } @{ $_[0] } ), keys %e ] };
+}
+sub array_minus(\@\@) {
+ my %e = map{ $_ => undef } @{$_[1]};
+ return grep( ! exists( $e{$_} ), @{$_[0]} );
+}
+
+
+$SIG{'__DIE__'} = sub { print @_; exit 4; };
+
+my $RES = Net::DNS::Resolver->new;
+my $DLV = 'dlv.isc.org';
+my $params;
+
+sub get_tag_generic {
+ my $zone = shift;
+ my $type = shift;
+ my %options = @_;
+
+ my @result;
+ my @zsks;
+ print "Querying $type $zone\n" if $params->{'verbose'};
+ my $pkt = $RES->send($zone, $type);
+ return () unless $pkt;
+ return () unless $pkt->answer;
+ for my $rr ($pkt->answer) {
+ next unless ($rr->type eq $type);
+ next unless (lc($rr->name) eq lc($zone));
+
+ my $tag = $options{'pretty'} ? sprintf("%5d(%d)", $rr->keytag, $rr->algorithm) : $rr->keytag;
+
+ if ($type eq 'DNSKEY' && ($rr->{'flags'} & (1<<(15-8)))) {
+ # key is revoked
+ next;
+ }
+
+ # for now only handle KSKs, i.e. keys with the SEP flag set
+ if ($type eq 'DNSKEY' && !($rr->sep)) {
+ push @zsks, $tag;
+ next;
+ }
+
+ push @result, $tag;
+ };
+ if ($type eq 'DNSKEY' && (scalar @result) == 0) {
+ # use remaining keys if no keys with the SEP bit are present
+ @result = @zsks;
+ }
+ my %unique = ();
+ @result = sort {$a cmp $b} grep {!$unique{$_}++} @result;
+ return @result
+};
+
+sub get_dnskeytags {
+ my $zone = shift;
+ my %options = @_;
+ return get_tag_generic($zone, 'DNSKEY', %options);
+};
+sub get_dstags {
+ my $zone = shift;
+ my %options = @_;
+ return get_tag_generic($zone, 'DS', %options);
+};
+sub get_dlvtags {
+ my $zone = shift;
+ my %options = @_;
+ $zone .= ".".$DLV;
+ return get_tag_generic($zone, 'DLV', %options);
+};
+sub has_dnskey_parent {
+ my $zone = shift;
+
+ my $potential_parent;
+ if ($zone =~ m/\./) {
+ $potential_parent = $zone;
+ $potential_parent =~ s/^[^.]+\.//;
+ } else {
+ $potential_parent = '.';
+ }
+
+ print "Querying DNSKEY $potential_parent\n" if $params->{'verbose'};
+ my $pkt = $RES->send($potential_parent, 'DNSKEY');
+ return undef unless $pkt;
+ return undef unless $pkt->header;
+
+ unless ($pkt->answer) {
+ return undef unless $pkt->authority;
+ for my $rr ($pkt->authority) {
+ next unless ($rr->type eq 'SOA');
+
+ $potential_parent = $rr->name;
+ print "Querying DNSKEY $potential_parent\n" if $params->{'verbose'};
+ $pkt = $RES->send($potential_parent, 'DNSKEY');
+ return undef unless $pkt;
+ last;
+ };
+ };
+
+ return (0, $potential_parent) unless $pkt->answer;
+ for my $rr ($pkt->answer) {
+ next unless ($rr->type eq 'DNSKEY');
+ return (1, $potential_parent);
+ };
+}
+sub get_parent_dnssec_status {
+ my $zone = shift;
+ my @result;
+
+ while (1) {
+ my ($status, $parent) = has_dnskey_parent($zone);
+ last unless defined $status;
+ push @result, ($status ? "yes" : "no") . ("($parent)");
+ $zone = $parent;
+ last if $zone eq "" || $zone eq '.';
+ };
+
+ return join(', ', @result);
+};
+
+sub usage {
+ my $fd = shift;
+ my $exit = shift;
+
+ print $fd "Usage: $PROGRAM_NAME [--dir <dir>] overview|check-dlv|check-ds|check-header zone [zone...]\n";
+ print $fd " $PROGRAM_NAME --dir <dir> overview|check-dlv|check-ds|check-header\n";
+ print $fd " $PROGRAM_NAME --help\n";
+ exit $exit;
+}
+
+sub what_to_check {
+ my $zone = shift;
+ my $zonefile = shift;
+
+ my $do_dlv = 0;
+ my $do_ds = 0;
+
+ open(F, "<", $zonefile) or die ("Cannot open zonefile $zonefile for $zone: $!\n");
+ while (<F>) {
+ if (/^[#;]\s*dlv-submit\s*=\s*yes\s*$/) { $do_dlv = 1; }
+ if (/^[#;]\s*ds-in-parent\s*=\s*yes\s*$/) { $do_ds = 1; }
+ }
+ close(F);
+
+ return { 'dlv' => $do_dlv,
+ 'ds' => $do_ds };
+}
+sub diff_spec {
+ my $a = shift;
+ my $b = shift;
+
+ my @elems = intersect(@$a, @$b);
+ push @elems, map { '-'.$_ } array_minus(@$a, @$b);
+ push @elems, map { '+'.$_ } array_minus(@$b, @$a);
+ return join(',', @elems);
+}
+
+Getopt::Long::config('bundling');
+GetOptions (
+ '--help' => \$params->{'help'},
+ '--dir=s@' => \$params->{'dir'},
+ '--dlv=s' => \$params->{'dlv'},
+ '--verbose' => \$params->{'verbose'},
+) or usage(\*STDERR, 1);
+usage(\*STDOUT, 0) if ($params->{'help'});
+
+my $mode = shift @ARGV;
+usage(\*STDOUT, 0) unless (defined $mode && $mode =~ /^(overview|check-dlv|check-ds|check-header)$/);
+die ("check-header needs --dir") if ($mode eq 'check-header' && !defined $params->{'dir'});
+
+my %zones;
+if (scalar @ARGV) {
+ if (defined $params->{'dir'} && $mode ne 'check-header') {
+ warn "--dir option ignored"
+ }
+ %zones = map { $_ => $_} @ARGV;
+} else {
+ my $dirs = $params->{'dir'};
+ usage(\*STDOUT, 0) unless (defined $dirs);
+
+ for my $dir (@$dirs) {
+ chdir $dir or die "chdir $dir failed? $!\n";
+ opendir DIR, '.' or die ("Cannot opendir $dir\n");
+ for my $file (readdir DIR) {
+ next if ( -l "$file" );
+ next unless ( -f "$file" );
+ next if $file =~ /^(dsset|keyset)-/;
+
+ my $zone = $file;
+ if ($file =~ /\.zone$/) { # it's one of our yaml things
+ $zone = basename($file, '.zone');
+ };
+ $zones{$zone} = "$dir/$file";
+ }
+ closedir(DIR);
+ };
+};
+
+$DLV = $params->{'dlv'} if $params->{'dlv'};
+
+
+if ($mode eq 'overview') {
+ my %data;
+ for my $zone (keys %zones) {
+ $data{$zone} = { 'dnskey' => join(', ', get_dnskeytags($zone, pretty=>1)),
+ 'ds' => join(', ', get_dstags($zone, pretty=>1)),
+ 'dlv' => join(', ', get_dlvtags($zone, pretty=>1)),
+ 'parent_dnssec' => get_parent_dnssec_status($zone) };
+ }
+
+ my $format = "%60s %-20s %-15s %-3s %-10s\n";
+ printf $format, "zone", "DNSKEY", "DS\@parent", "DLV", "dnssec\@parent";
+ printf $format, "-"x 60, "-"x 20, "-"x 15, "-"x 3, "-"x 10;
+ for my $zone (sort {$a cmp $b} keys %data) {
+ printf $format, $zone,
+ $data{$zone}->{'dnskey'},
+ $data{$zone}->{'ds'},
+ $data{$zone}->{'dlv'},
+ $data{$zone}->{'parent_dnssec'};
+ }
+ exit(0);
+} elsif ($mode eq 'check-dlv' || $mode eq 'check-ds' || $mode eq 'check-header') {
+ my @to_check;
+ push @to_check, 'dlv' if $mode eq 'check-header' || $mode eq 'check-dlv';
+ push @to_check, 'ds' if $mode eq 'check-header' || $mode eq 'check-ds';
+
+ my @warn;
+ my @ok;
+ for my $zone (sort {$a cmp $b} keys %zones) {
+ my $require = { map { $_ => 1 } @to_check };
+ if ($mode eq 'check-header') {
+ $require = what_to_check($zone, $zones{$zone})
+ }
+
+ my @dnskey = get_dnskeytags($zone);
+ for my $thiskey (@to_check) {
+ my @target = $thiskey eq 'ds' ? get_dstags($zone) : get_dlvtags($zone);
+
+ my $spec = diff_spec(\@target, \@dnskey);
+ # if the intersection between DS and KEY is empty,
+ # or if there are DS records for keys we do not have, that's an issue.
+ if (intersect(@dnskey, @target) == 0 || array_minus(@target, @dnskey)) {
+ if ($require->{$thiskey} || scalar @target > 0) {
+ push @warn, "$zone ($spec)";
+ }
+ } else {
+ if ($require->{$thiskey}) {
+ push @ok, "$zone ($spec)";
+ }
+ };
+ }
+ }
+ print "WARNING: ", join(", ", @warn), "\n" if (scalar @warn);
+ print "OK: ", join(", ", @ok), "\n" if (scalar @ok);
+ exit (1) if (scalar @warn);
+ exit (0);
+} else {
+ die ("Invalid mode '$mode'\n");
+};
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-entropy b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-entropy
new file mode 100644
index 0000000..ddf1d92
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-entropy
@@ -0,0 +1,82 @@
+#!/usr/bin/python
+
+# Copyright 2011 Peter Palfrader
+# Copyright 2014 Hendrik Koehler
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+import sys
+import os
+import time
+import optparse
+
+AVAIL = '/proc/sys/kernel/random/entropy_avail'
+
+parser = optparse.OptionParser()
+parser.add_option("-r", "--retries", dest="retries", metavar="NUM",
+ type="int", default=10,
+ help="Max number of retries [10].")
+parser.add_option("-s", "--sleep", dest="sleep", metavar="MSECS",
+ type="int", default=250,
+ help="Amount of time to wait between reads [250msec].")
+parser.add_option("-w", "--watermark", dest="watermark", metavar="BYTES",
+ type="int", default=800,
+ help="Minimum number of expected bytes in the entropy pool [800].")
+(options, args) = parser.parse_args()
+
+if len(args) != 0:
+ parser.print_help()
+ sys.exit(4)
+
+if not os.path.exists(AVAIL):
+ print "File %s does not exist."%(AVAIL)
+ sys.exit(4)
+
+tries = 0
+values = []
+while tries <= options.retries:
+ f = open('/proc/sys/kernel/random/entropy_avail')
+ avail = f.readline().rstrip()
+ if len(avail) == 0:
+ print "Could not read anything from %s"%(AVAIL)
+ sys.exit(4)
+ try:
+ avail = int(avail)
+ except ValueError:
+ print "Did not read a number from %s, got '%s' instead"%(AVAIL, avail)
+ sys.exit(4)
+
+ if avail >= options.watermark:
+ if tries > 0:
+ print "OK: %d bytes in the pool after %d attempts.|entropy=%d bytes"%(avail, tries, avail)
+ else:
+ print "OK: %d bytes in the pool.|entropy=%d bytes"%(avail, avail)
+ sys.exit(0)
+
+ values.append(avail)
+ time.sleep(1.0 * options.sleep / 1000)
+ tries += 1
+
+print "WARNING: Too little entropy in the pool (min: %d, max: %d in %d reads)|entropy=%d bytes"%(min(values), max(values), tries-1, avail)
+sys.exit(1)
+
+# vim:set et:
+# vim:set ts=4:
+# vim:set shiftwidth=4:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-packages b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-packages
new file mode 100644
index 0000000..28844e5
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-packages
@@ -0,0 +1,362 @@
+#!/usr/bin/perl
+
+# dsa-check-packages
+
+# checks for obsolete/local and upgradeable packages.
+#
+# packages for the obsolete/local check can be ignored, by
+# listing their full name in /etc/nagios/obsolete-packages-ignore
+# or by having a regex (starting a line with "/") that matches
+# the packagename in said file.
+#
+# Takes one optional argument, the location of the ignore file.
+
+
+# Copyright (C) 2008, 2009 Peter Palfrader <peter@palfrader.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+use strict;
+use warnings;
+use English;
+
+my $IGNORE = "/etc/nagios/obsolete-packages-ignore";
+my $IGNORED = "/etc/nagios/obsolete-packages-ignore.d";
+
+my %CODE = (
+ 'OK' => 0,
+ 'WARNING' => 1,
+ 'CRITICAL' => 2,
+ 'UNKNOWN' => 3
+);
+my $EXITCODE = 'OK';
+sub record($) {
+ my ($newexit) = @_;
+ die "code $newexit not defined\n" unless defined $CODE{$newexit};
+
+ if ($CODE{$newexit} > $CODE{$EXITCODE}) {
+ $EXITCODE = $newexit;
+ };
+}
+
+
+
+sub get_packages {
+ $ENV{'COLUMNS'} = 1000;
+ $ENV{'LC_ALL'} = 'C';
+ open(F, "dpkg -l|") or die ("Cannot run dpkg: $!\n");
+ my @lines = <F>;
+ close(F);
+ chomp(@lines);
+
+ my $line;
+ my $has_arch = 0;
+ while (defined($line = shift @lines) && ($line !~ /\+\+\+/)) {
+ if ($line =~ /Architecture/) { $has_arch = 1; }
+ }
+
+ my %pkgs;
+ for $line (@lines) {
+ my ($state, $pkg, $version, $arch, undef) = split(/ */, $line);
+ $arch = '' unless $has_arch;
+ $pkgs{$state}{$pkg} = { 'installed' => $version, arch => $arch }
+ }
+
+ my $installed = $pkgs{'ii'};
+ delete $pkgs{'ii'};
+
+ my @installed_packages = keys(%$installed);
+ my @cmd = ("apt-cache", "policy", @installed_packages);
+
+ open my $olderr, ">&STDERR" or die "Can't dup STDERR: $!";
+ open STDERR, ">/dev/null" or die "Can't dup STDOUT: $!";
+ open (F, "-|", @cmd) or die ("Cannot run apt-cache policy: $!\n");
+ @lines = <F>;
+ close(F);
+ open STDERR, ">&", $olderr or die "Can't dup OLDERR: $!";
+ chomp(@lines);
+
+ my $pkgname = undef;
+ my $candidate_found = 0;
+ while (defined($line = shift @lines)) {
+ if ($line =~ /^([^ ]*):$/) {
+ # when we have multi-arch capable fu, we require that
+ # apt-cache policy output is in the same order as its
+ # arguments.
+ #
+ # We needs thi, because the output block in apt-cache
+ # policy does not show the arch:
+ #
+ # | weasel@stanley:~$ apt-cache policy libedit2:amd64
+ # | libedit2:
+ # | Installed: 2.11-20080614-5
+ # | Candidate: 2.11-20080614-5
+ #
+ # We replace the package name in the output with the
+ # one we asked for ($pkg:$arch) - but to match this up
+ # sanely we need the order to be correct.
+ #
+ # For squeeze systems (no m-a), apt-cache policy output
+ # is all different.
+ $pkgname = $1;
+ $candidate_found = 0;
+ if ($has_arch) {
+ my $from_list = shift @installed_packages;
+ next if ($pkgname eq $from_list); # no :$arch in pkgname we asked for
+
+ my $ma_fix_pkgname = $pkgname.':'.$installed->{$from_list}->{'arch'};
+ my $ma_fix_from_list = $from_list.':'.$installed->{$from_list}->{'arch'};
+
+ if ($pkgname eq $ma_fix_from_list || # e.g. ia32-libs-i386. dpkg -l: ia32-libs-i386, apt-cache policy: ia32-libs-i386:i386
+ $ma_fix_pkgname eq $from_list) {
+ $pkgname = $from_list;
+ } else {
+ die "Unexpected order mismatch in apt-cache policy output (apt-cache policy name: $pkgname - dpkg -l name: $from_list)\n";
+ }
+ }
+ } elsif ($line =~ /^ +Installed: (.*)$/) {
+ # etch dpkg -l does not print epochs, so use this info, it's better
+ $installed->{$pkgname}{'installed'} = $1;
+ # initialize security-update
+ $installed->{$pkgname}{'security-update'} = 0;
+ } elsif ($line =~ /^ +Candidate: (.*)$/) {
+ $installed->{$pkgname}{'candidate'} = $1;
+ } elsif ($line =~ / ([^ ]+) [0-9]+/) {
+ # check if the next lines show the sources of our candidate
+ if ($1 eq $installed->{$pkgname}{'candidate'}) {
+ $candidate_found = 1;
+ }
+ } elsif (($line =~ / +[0-9]+ [^ ]+\/(security\.([^ ]+\.)?debian\.org|debian-security).*\/updates\//) && $candidate_found ) {
+ $installed->{$pkgname}{'security-update'} = 1;
+ } elsif ($line =~ /^ +\*\*\*/) {
+ $line = shift @lines;
+ my @l = split(/ +/, $line);
+ $installed->{$pkgname}{'origin'} = $l[2];
+ $candidate_found = 0;
+ }
+ }
+
+ my (%current, %obsolete, %outofdate, %security_outofdate);
+ for my $pkgname (keys %$installed) {
+ my $pkg = $installed->{$pkgname};
+
+ unless (defined($pkg->{'candidate'}) && defined($pkg->{'origin'})) {
+ $obsolete{$pkgname} = $pkg;
+ next;
+ }
+
+ if ($pkg->{'candidate'} ne $pkg->{'installed'}) {
+ if ($pkg->{'security-update'}) {
+ $security_outofdate{$pkgname} = $pkg;
+ } else {
+ $outofdate{$pkgname} = $pkg;
+ }
+ next;
+ };
+ if ($pkg->{'origin'} eq '/var/lib/dpkg/status') {
+ $obsolete{$pkgname} = $pkg;
+ next;
+ }
+ $current{$pkgname} = $pkg;
+ }
+
+ $pkgs{'current'} = \%current;
+ $pkgs{'outofdate'} = \%outofdate;
+ $pkgs{'security_outofdate'} = \%security_outofdate;
+ $pkgs{'obsolete'} = \%obsolete;
+ return \%pkgs;
+}
+
+sub load_ignores {
+ my ($ignorefiles, $require_file) = @_;
+
+ my @ignores;
+
+ for my $ignoreitem (@$ignorefiles) {
+ next if (!$require_file and ! -e $ignoreitem);
+
+ my @filestoopen;
+ if (-d $ignoreitem) {
+ opendir(DIR, $ignoreitem) or die ("Cannot open dir $ignoreitem: $!\n");
+ @filestoopen = readdir(DIR);
+ closedir(DIR);
+
+ @filestoopen = grep { -f ($ignoreitem.'/'.$_) } @filestoopen;
+ @filestoopen = grep { /^([a-z0-9_.-]+)+[a-z0-9]+$/i } @filestoopen;
+ @filestoopen = grep { !/dpkg-(old|dist|new|tmp)$/ } @filestoopen;
+ @filestoopen = map { ($ignoreitem.'/'.$_) } @filestoopen;
+ } else {
+ push @filestoopen, $ignoreitem;
+ }
+
+ for my $f (@filestoopen) {
+ open (F, "< $f") or die ("Cannot open $f: $!\n");
+ push @ignores, <F>;
+ close F;
+ }
+ }
+ chomp(@ignores);
+ return \@ignores;
+}
+
+sub check_ignore {
+ my ($pkg, $ignores) = @_;
+
+ my $ignore_this = 0;
+ for my $ignore (@$ignores) {
+ my $ig = $ignore;
+ return 1 if ($ig eq $pkg);
+ if (substr($ig,0,1) eq '/') {
+ substr($ig, 0, 1, '');
+ $ig =~ s,/$,,;
+ return 1 if ($pkg =~ /$ig/);
+ }
+ }
+ return 0
+}
+
+sub filter_ignored {
+ my ($packages, $ignores) = @_;
+
+ my $obs = $packages->{'obsolete'};
+
+ my (%ignored, %bad);
+ for my $pkg (keys %$obs) {
+ if (check_ignore($pkg, $ignores)) {
+ $ignored{$pkg} = $obs->{$pkg};
+ } else {
+ $bad{$pkg} = $obs->{$pkg};
+ };
+ }
+ delete $packages->{'obsolete'};
+ $packages->{'obsolete'} = \%bad;
+ $packages->{'obsolete-ignored'} = \%ignored;
+};
+
+sub usage {
+ my ($fd, $exit) = @_;
+ print $fd "Usage: $PROGRAM_NAME [<ignorefile|dir> [<ignorefile|dir> ...]]\n";
+ exit $exit;
+}
+
+my $ignorefiles = [$IGNORE, $IGNORED];
+my $ignorefile_userset = 0;
+if (@ARGV >= 1) {
+ usage(\*STDOUT, 0) if ($ARGV[0] eq "-h");
+ usage(\*STDOUT, 0) if ($ARGV[0] eq "--help");
+ $ignorefile_userset = 1;
+ $ignorefiles = \@ARGV;
+};
+
+my $ignores = load_ignores($ignorefiles, $ignorefile_userset);
+my $packages = get_packages();
+
+filter_ignored($packages, $ignores);
+
+
+
+my @reportform = (
+ { 'key' => 'obsolete',
+ 'listpackages' => 1,
+ 'long' => "%d local or obsolete packages: %s",
+ 'short' => "%d obs/loc",
+ 'perf' => "obs_loc=%d;1;5;0",
+ 'status' => 'WARNING' },
+ { 'key' => 'outofdate',
+ 'listpackages' => 1,
+ 'long' => "%d out of date packages: %s",
+ 'short' => "%d updates",
+ 'perf' => "outdated=%d;1;5;0",
+ 'status' => 'WARNING' },
+ { 'key' => 'current',
+ 'listpackages' => 0,
+ 'long' => "%d packages current.",
+ 'short' => "%d ok",
+ 'perf' => "current=%d;;;0",
+ 'status' => 'OK' },
+ { 'key' => 'obsolete-ignored',
+ 'listpackages' => 1,
+ 'long' => "%d whitelisted local or obsolete packages: %s",
+ 'short' => "%d obs/loc(ignored)",
+ 'perf' => "obs_ign=%d;;;0",
+ 'status' => 'OK' },
+ { 'key' => 'rc',
+ 'listpackages' => 1,
+ 'long' => "%d packages removed but not purged: %s",
+ 'short' => "%d rc",
+ 'perf' => "rm_unprg=%d;;;0",
+ 'status' => 'OK' },
+ { 'key' => 'hi',
+ 'listpackages' => 1,
+ 'long' => "%d packages on hold: %s",
+ 'short' => "%d hi",
+ 'perf' => "hold=%d;;;0",
+ 'status' => 'OK' },
+ { 'key' => 'pc',
+ 'listpackages' => 1,
+ 'long' => "%d packages requested to be purged but conffiles still installed: %s",
+ 'short' => "%d pc",
+ 'perf' => "prg_conf=%d;1;;0",
+ 'status' => 'WARNING' },
+ { 'key' => 'security_outofdate',
+ 'listpackages' => 1,
+ 'long' => "%d packages with outstanding security updates: %s",
+ 'short' => "%d security-updates",
+ 'perf' => "security_outdated=%d;;1;0",
+ 'status' => 'CRITICAL' },
+ );
+
+my @longout;
+my @perfout;
+my @shortout;
+for my $form (@reportform) {
+ my $pkgs = $packages->{$form->{'key'}};
+ delete $packages->{$form->{'key'}};
+ my $num = scalar keys %$pkgs;
+ push @perfout, sprintf($form->{'perf'}, $num);
+ next unless ($num > 0);
+ if ($form->{'listpackages'}) {
+ my $list = join(", ", keys %$pkgs);
+ push @longout, sprintf($form->{'long'}, $num, $list);
+ } else {
+ push @longout, sprintf($form->{'long'}, $num);
+ };
+ push @shortout, sprintf($form->{'short'}, $num);
+ record($form->{'status'});
+};
+if (scalar keys %$packages) {
+ record('WARNING');
+ unshift @shortout, "unk: ".join(", ", keys %$packages);
+ for my $status (sort {$b cmp $a} keys %$packages) {
+ my $pkgs = $packages->{$status};
+ my $list = join(", ", keys %$pkgs);
+ unshift @longout, "Unknown package status $status: $list";
+ };
+}
+
+my $shortout = $EXITCODE.": ".join(", ", @shortout);
+my $longout = join("\n", @longout);
+my $perfout = "|".join(" ", @perfout);
+
+print $shortout,"\n";
+print $longout,"\n";
+print $perfout,"\n";
+
+exit $CODE{$EXITCODE};
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-running-kernel b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-running-kernel
new file mode 100644
index 0000000..467c219
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-running-kernel
@@ -0,0 +1,255 @@
+#!/bin/bash
+
+# Check if the running kernel has the same version string as the on-disk
+# kernel image.
+
+# Copyright 2008,2009,2011,2012,2013,2014 Peter Palfrader
+# Copyright 2009 Stephen Gran
+# Copyright 2010,2012,2013 Uli Martens
+# Copyright 2011 Alexander Reichle-Schmehl
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+OK=0;
+WARNING=1;
+CRITICAL=2;
+UNKNOWN=3;
+
+get_offset() {
+ local file needle
+
+ file="$1"
+ needle="$2"
+
+ perl -e '
+ undef $/;
+ $i = 0; $k=<>;
+ while (($i = index($k, "'"$needle"'", $i)) >= 0) {
+ print $i++,"\n";
+ }; ' < "$file"
+}
+
+get_avail() {
+ # This is wrong, but leaves room for when we have to care for machines running
+ # myfirstunix-image-0.1-dsa-arm
+ local prefix="$1"; shift
+
+ local kervers=$(uname -r)
+
+ local metavers=''
+
+ # DSA uses kernel versions of the form 2.6.29.3-dsa-dl380-oldxeon, where
+ # Debian uses versions of the form 2.6.29-2-amd64
+ if [ "${kervers#2}" != "$kervers" ]; then
+ if [ "${kervers//dsa}" != "$kervers" ]; then
+ metavers=$(echo $kervers | sed -r -e 's/^2\.(4|6)\.[0-9]+([\.0-9]+?)-(.*)/2.\1-\3/')
+ else
+ metavers=$(echo $kervers | sed -r -e 's/^2\.(4|6)\.[0-9]+-[A-Za-z0-9\.]+-(.*)/2.\1-\2/')
+ fi
+ else
+ metavers=$(echo $kervers | sed -r -e 's/^[0-9]+\.[0-9]+(\.[0-9])?+-[A-Za-z0-9\.]+-(.*)/\2/')
+ fi
+
+ # Attempt to track back to a metapackage failed. bail
+ if [ "$metavers" = "$kervers" ]; then
+ return 2
+ fi
+
+ # We're just going to give up if we can't find a matching metapackage
+ # I tried being strict once, and it just caused a lot of headaches. We'll see how
+ # being lax does for us
+
+ local output=$(apt-cache policy ${prefix}-image-${metavers} 2>/dev/null)
+ local metaavailvers=$(echo "$output" | grep '^ Candidate:' | awk '{print $2}')
+ local metainstavers=$(echo "$output" | grep '^ Installed:' | awk '{print $2}')
+
+ if [ -z "$metaavailvers" ] || [ "$metaavailvers" = '(none)' ]; then
+ return 2
+ fi
+ if [ -z "$metainstavers" ] || [ "$metainstavers" = '(none)' ]; then
+ return 2
+ fi
+
+ if [ "$metaavailvers" != "$metainstavers" ] ; then
+ echo "${prefix}-image-${metavers} $metaavailvers available but $metainstavers installed"
+ return 1
+ fi
+
+ local imagename=0
+ # --no-all-versions show shows only the candidate
+ for vers in $(apt-cache --no-all-versions show ${prefix}-image-${metavers} | sed -n 's/^Depends: //p' | tr ',' '\n' | tr -d ' ' | grep ${prefix}-image | awk '{print $1}' | sort -u); do
+ if dpkg --compare-versions "1.$vers" gt "1.$imagename"; then
+ imagename=$vers
+ fi
+ done
+
+ if [ -z "$imagename" ] || [ "$imagename" = 0 ]; then
+ return 2
+ fi
+
+ if [ "$imagename" != "${prefix}-image-${kervers}" ]; then
+ if dpkg --compare-versions 1."$imagename" lt 1."${prefix}-image-${kervers}"; then
+ return 2
+ fi
+ echo "$imagename" != "${prefix}-image-${kervers}"
+ return 1
+ fi
+
+ local availvrs=$(apt-cache policy ${imagename} 2>/dev/null | grep '^ Candidate' | awk '{print $2}')
+ local kernelversion
+ for kernelversion in $(apt-cache policy ${prefix}-image-${kervers} ${prefix}-image-${kervers}-unsigned 2>/dev/null | grep '^ Installed:' | awk '{print $2}' | grep -F -v '(none)' ); do
+ if [ "$availvrs" = "$kernelversion" ]; then
+ return 0
+ fi
+ done
+
+ echo "$kernelversion != $availvrs"
+ return 1
+}
+
+cat_vmlinux() {
+ local image header filter hdroff
+
+ image="$1"
+ header="$2"
+ filter="$3"
+ hdroff="$4"
+
+ get_offset "$image" $header | head -n 5 | while read off; do
+ (if [ "$off" != 0 ]; then
+ dd ibs="$((off+hdroff))" skip=1 count=0
+ fi &&
+ dd bs=512k) < "$image" 2>/dev/null | $filter 2>/dev/null
+ done
+}
+
+get_image_linux() {
+ local image
+
+ image="$1"
+
+ # gzip compressed image
+ cat_vmlinux "$image" "\x1f\x8b\x08\x00" "zcat" 0
+ cat_vmlinux "$image" "\x1f\x8b\x08\x08" "zcat" 0
+ # lzma compressed image
+ cat_vmlinux "$image" "\x00\x00\x00\x02\xff" "xzcat" -1
+ cat_vmlinux "$image" "\x00\x00\x00\x04\xff" "xzcat" -1
+ # xz compressed image
+ cat_vmlinux "$image" "\xfd\x37\x7a\x58\x5a " "xzcat" 0
+
+ echo "ERROR: Unable to extract kernel image." 2>&1
+ exit 1
+}
+
+
+freebsd_check_running_version() {
+ local imagefile="$1"; shift
+
+ local r="$(uname -r)"
+ local v="$(uname -v| sed -e 's/^#[0-9]*/&:/')"
+
+ local q='@(#)FreeBSD '"$r $v"
+
+ if zcat "$imagefile" | $STRINGS | grep -F -q "$q"; then
+ echo "OK"
+ else
+ echo "not OK"
+ fi
+}
+
+STRINGS="";
+if [ -x "$(which strings)" ]; then
+ STRINGS="$(which strings)"
+elif [ -x "$(which busybox)" -a "$( echo foobar | $(which busybox) strings 2>/dev/null)" = "foobar" ]; then
+ STRINGS="$(which busybox) strings"
+fi
+
+searched=""
+for on_disk in \
+ "/boot/vmlinuz-`uname -r`"\
+ "/boot/vmlinux-`uname -r`"\
+ "/boot/kfreebsd-`uname -r`.gz"; do
+
+ if [ -e "$on_disk" ]; then
+ if [ -z "$STRINGS" ]; then
+ echo "UNKNOWN: 'strings' command missing, perhaps install binutils or busybox?"
+ exit $UNKNOWN
+ fi
+ if [ "${on_disk/vmlinu}" != "$on_disk" ]; then
+ on_disk_version="`get_image_linux "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
+ if [ -x /usr/bin/lsb_release ] ; then
+ vendor=$(lsb_release -i -s)
+ if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
+ on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
+ fi
+ fi
+ [ -z "$on_disk_version" ] || break
+ on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
+ [ -z "$on_disk_version" ] || break
+
+ echo "UNKNOWN: Failed to get a version string from image $on_disk"
+ exit $UNKNOWN
+ else
+ on_disk_version="$(zcat $on_disk | $STRINGS | grep Debian | head -n 1 | sed -e 's/Debian [[:alnum:]]\+ (\(.*\))/\1/')"
+ fi
+ fi
+ searched="$searched $on_disk"
+done
+
+if ! [ -e "$on_disk" ]; then
+ echo "WARNING: Did not find a kernel image (checked$searched) - I have no idea which kernel I am running"
+ exit $WARNING
+fi
+
+if [ "$(uname -s)" = "Linux" ]; then
+ running_version="`cat /proc/version`"
+ if [ -z "$running_version" ] ; then
+ echo "UNKNOWN: Failed to get a version string from running system"
+ exit $UNKNOWN
+ fi
+
+ if [ "$running_version" != "$on_disk_version" ]; then
+ echo "WARNING: Running kernel does not match on-disk kernel image: [$running_version != $on_disk_version]"
+ exit $WARNING
+ fi
+
+ ret="$(get_avail linux)"
+ if [ $? = 1 ]; then
+ echo "WARNING: Kernel needs upgrade [$ret]"
+ exit $WARNING
+ fi
+else
+ image_current=$(freebsd_check_running_version $on_disk)
+ running_version="`uname -s` `uname -r` `uname -v`"
+ if [ "$image_current" != "OK" ]; then
+ approx_time="$(date -d "@`stat -c '%Y' "$on_disk"`" +"%Y-%m-%d %H:%M:%S")"
+ echo "WARNING: Currently running kernel ($running_version) does not match on disk image (~ $approx_time)"
+ exit $WARNING;
+ fi
+
+ ret="$(get_avail linux)"
+ if [ $? = 1 ]; then
+ echo "WARNING: Kernel needs upgrade [$ret]"
+ exit $WARNING
+ fi
+fi
+
+echo "OK: Running kernel matches on disk image: [$running_version]"
+exit $OK
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-soas b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-soas
new file mode 100644
index 0000000..eb28d8c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-soas
@@ -0,0 +1,218 @@
+#!/usr/bin/ruby
+
+# Copyright 2006, 2012, 2014 Peter Palfrader
+# 2012 Uli Martens
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+# the each_resource function is lifted from ruby 1.9.1's resolv.rb, with the
+# minor modification that we do not unconditionally set the message's RD flag
+# to 1. Its license is:
+#
+# Copyright (C) 1993-2010 Yukihiro Matsumoto. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+
+require 'ipaddr'
+require 'resolv'
+require 'optparse'
+require 'yaml'
+
+NAGIOS_STATUS = { :OK => 0, :WARNING => 1, :CRITICAL => 2, :UNKNOWN => -1 };
+@verbose = 0;
+@additional_nameservers = []
+@check_soa_nameservers = true;
+
+def show_help(parser, code=0, io=STDOUT)
+ program_name = File.basename($0, '.*')
+ io.puts "Usage: #{program_name} [options] <domainname> [<domainname> ...]"
+ io.puts parser.summarize
+ exit(code)
+end
+ARGV.options do |opts|
+ opts.on_tail("-h", "--help" , "Display this help screen") { show_help(opts) }
+ opts.on("-v", "--verbose" , String, "Be verbose") { @verbose += 1 }
+ opts.on("-a", "--add=HOST" , String, "Also check SOA on <nameserver>") { |val| @additional_nameservers << val }
+ opts.on("-n", "--no-soa-ns" , String, "Don't query SOA record for list of nameservers") { @check_soa_nameservers = false }
+ opts.parse!
+end
+show_help(ARGV.options, 1, STDERR) if ARGV.length == 0
+
+if @additional_nameservers.count <= 1 and not @check_soa_nameservers
+ program_name = File.basename($0, '.*')
+ STDERR.puts "#{program_name}: Only know about #{@additional_nameservers.count} nameserver(s) and --no-soa-ns specified. I want at least two."
+ exit(1)
+end
+
+class DSADNS < Resolv::DNS
+ attr_reader :rd
+ attr_writer :rd
+
+ def initialize(*args)
+ super
+ @rd = 1
+ end
+
+ def each_resource(name, typeclass, &proc)
+ lazy_initialize
+ requester = make_udp_requester
+ senders = {}
+ begin
+ @config.resolv(name) {|candidate, tout, nameserver, port|
+ msg = Message.new
+ msg.rd = @rd
+ msg.add_question(candidate, typeclass)
+ unless sender = senders[[candidate, nameserver, port]]
+ sender = senders[[candidate, nameserver, port]] =
+ requester.sender(msg, candidate, nameserver, port)
+ end
+ reply, reply_name = requester.request(sender, tout)
+ case reply.rcode
+ when RCode::NoError
+ if reply.tc == 1 and not Requester::TCP === requester
+ requester.close
+ # Retry via TCP:
+ requester = make_tcp_requester(nameserver, port)
+ senders = {}
+ # This will use TCP for all remaining candidates (assuming the
+ # current candidate does not already respond successfully via
+ # TCP). This makes sense because we already know the full
+ # response will not fit in an untruncated UDP packet.
+ redo
+ else
+ extract_resources(reply, reply_name, typeclass, &proc)
+ end
+ return
+ when RCode::NXDomain
+ raise Config::NXDomain.new(reply_name.to_s)
+ else
+ raise Config::OtherResolvError.new(reply_name.to_s)
+ end
+ }
+ ensure
+ requester.close
+ end
+ end
+end
+
+warnings = []
+oks = []
+
+def resolve_ns(dns, domain, nameserver)
+ puts "Getting A record for nameserver #{nameserver} for #{domain}" if @verbose > 0
+ arecords = dns.getresources(nameserver, Resolv::DNS::Resource::IN::A)
+ warnings << "Nameserver #{nameserver} for #{domain} has #{arecords.length} A records" if arecords.length != 1
+ addresses = arecords.map { |a| a.address.to_s }
+ puts "Addresses for nameserver #{nameserver} for #{domain}: #{addresses.join(', ')}" if @verbose > 0
+ return addresses
+end
+
+dns = Resolv::DNS.new
+ARGV.each{ |domain|
+ serial = {}
+ nameserver_addresses = {}
+ if @check_soa_nameservers
+ nameservers = dns.getresources(domain, Resolv::DNS::Resource::IN::NS)
+ nameservernames = nameservers.collect{ |ns| ns.name.to_s }
+ nameservernames.each do |nameserver|
+ addrs = resolve_ns(dns, domain, nameserver)
+ warnings << "Duplicate nameserver #{nameserver} for #{domain}" if nameserver_addresses[nameserver]
+ nameserver_addresses[nameserver] = addrs
+ end
+ end
+ @additional_nameservers.each do |ns|
+ begin
+ ipa = IPAddr.new(ns) # check if it's an address
+ addrs = [ns]
+ rescue ArgumentError
+ addrs = resolve_ns(dns, domain, ns)
+ end
+ warnings << "Duplicate nameserver #{ns} for #{domain}" if nameserver_addresses[ns]
+ nameserver_addresses[ns] = addrs
+ end
+
+ nameserver_addresses.each_pair do |nameserver, addrs|
+ puts "Testing nameserver #{nameserver} for #{domain}" if @verbose > 0
+ addrs.each do |a|
+ puts " Nameserver #{nameserver} is at #{a}" if @verbose > 0
+ begin
+ resolver = DSADNS.new({:nameserver => a})
+ resolver.rd = 0
+ soas = resolver.getresources(domain, Resolv::DNS::Resource::IN::SOA)
+ rescue SystemCallError => e
+ warnings << "Could not resolve #{domain} on #{nameserver}: #{e.message}"
+ else
+ resolver.close
+ warnings << "Nameserver #{nameserver} for #{domain} returns #{soas.length} SOAs" if soas.length != 1
+ soas.each do |soa|
+ puts " Nameserver #{nameserver} returns serial #{soa.serial} for #{domain}" if @verbose > 0
+ sn = soa.serial.to_i
+ if serial.has_key? sn then
+ serial[sn] << nameserver
+ else
+ serial[sn] = [nameserver]
+ end
+ end
+ end
+ end
+ end
+ case serial.keys.length
+ when 0
+ warnings << "Found no serials for #{domain}"
+ when 1
+ oks << "#{domain} is at #{serial.keys.first}"
+ else
+ text = []
+ serial.keys.sort.each do |sn|
+ text << "#{sn} (#{serial[sn].join(', ')})"
+ end
+ warnings << "Nameservers disagree on serials for #{domain}: found #{text.join(', ')}"
+ end
+}
+dns.close
+
+if warnings.length > 0
+ puts warnings.join('; ')
+ exit NAGIOS_STATUS[:WARNING]
+else
+ puts oks.join('; ')
+ exit NAGIOS_STATUS[:OK]
+end
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-statusfile b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-statusfile
new file mode 100644
index 0000000..4654731
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/checks/dsa-check-statusfile
@@ -0,0 +1,90 @@
+#!/usr/bin/python
+
+# Relay the status of a check that was previously run and which stored
+# its result in a file to nagios.
+#
+# Copyright 2008, 2012 Peter Palfrader
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+import optparse
+import os
+import re
+import sys
+import time
+
+NAGIOS_STATUS = { "OK": 0, "WARNING": 1, "CRITICAL": 2, "UNKNOWN": 3 }
+UNITS_TO_SECONDS = { 's': 1, 'm': 60, 'h': 60*60, 'd': 24*60*60 }
+
+parser = optparse.OptionParser()
+parser.set_usage("%prog [options] <statusfile>")
+parser.add_option("-a", "--age", dest="age", metavar="AGE",
+ type="string", default="26h",
+ help="maximum age, in seconds (or use Nm, Nh or Nd) - default is 26h.")
+(options, args) = parser.parse_args()
+
+if len(args) != 1:
+ parser.print_help(file=sys.stderr)
+ sys.exit(1)
+
+statusfile = args[0]
+
+# find out what the max age is that we accept
+m = re.match('([0-9]+)([smhd])?$', options.age)
+if not m:
+ print >> sys.stderr, "Invalid age %s"%(options.age)
+ parser.print_help(file=sys.stderr)
+ sys.exit(1)
+(count, unit) = m.groups()
+if unit is None: unit = 's'
+max_age = int(count) * UNITS_TO_SECONDS[unit]
+
+# let's see if it exists
+if not os.path.exists(statusfile):
+ print "UNKNOWN: %s does not exist."%(statusfile)
+ sys.exit(NAGIOS_STATUS['UNKNOWN'])
+
+
+mtime = os.path.getmtime(statusfile)
+if mtime + max_age < time.time():
+ print "WARNING: %s is old: %.1f hours."%(statusfile, (time.time() - mtime)/3600)
+ sys.exit(NAGIOS_STATUS['WARNING'])
+
+status = open(statusfile, "r")
+returnvalue = status.readline().strip()
+
+if not returnvalue in NAGIOS_STATUS:
+ print "UNKNOWN: %s has invalid return value: %s."%(statusfile, returnvalue)
+ sys.exit(NAGIOS_STATUS['UNKNOWN'])
+
+linecnt = 0
+for line in status:
+ print line,
+ linecnt += 1
+
+if linecnt == 0:
+ print "Found no output. Something is probably wrong"
+ sys.exit(NAGIOS_STATUS['UNKNOWN'])
+
+sys.exit(NAGIOS_STATUS[returnvalue])
+
+# vim:set et:
+# vim:set ts=4:
+# vim:set shiftwidth=4:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/control b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/control
new file mode 100644
index 0000000..ae028ba
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/control
@@ -0,0 +1,20 @@
+Homepage: https://salsa.debian.org/dsa-team/mirror/dsa-nagios
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugins from the Debian System Administrators
+ nagios plugins repository.
+ * check_cert_expire: check for certificate expiration
+ using openssl on the certificate file
+ * check_cert_expire_dir: checks if any of the *.crt files in
+ a directory on disk will expire soon
+ * check_dnssec_delegation: check for correct DNSSEC
+ delegation
+ * check_entropy: check if there is enough entropy available.
+ * check_packages: replacement for check_apt; needs a cronjob
+ to update the apt database regularly
+ * check_running_kernel: check if a system was rebooted after
+ a kernel upgrade
+ * check_soas: check SOA records
+ * check_statusfile: deliver the content of a status file
+ as check result
+Recommends: ruby | ruby-interpreter, openssl, libnet-dns-perl, binutils
+Version: 2300473
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/copyright
new file mode 100644
index 0000000..6006f7a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/copyright
@@ -0,0 +1,33 @@
+checks/dsa-check-cert-expire:# Copyright 2009 Peter Palfrader
+checks/dsa-check-cert-expire-dir:# Copyright 2009,2016 Peter Palfrader
+checks/dsa-check-dnssec-delegation:# Copyright (c) 2010, 2014, 2015 Peter Palfrader <peter@palfrader.org>
+checks/dsa-check-entropy:# Copyright 2011 Peter Palfrader, Copyright 2014 Hendrik Koehler
+checks/dsa-check-soas:# Copyright 2006, 2012 Peter Palfrader
+checks/dsa-check-packages:# Copyright (C) 2008, 2009 Peter Palfrader <peter@palfrader.org>
+checks/dsa-check-statusfile:# Copyright 2008, 2012 Peter Palfrader
+checks/dsa-check-running-kernel:# Copyright 2008,2009,2011 Peter Palfrader
+checks/dsa-check-running-kernel:# Copyright 2009 Stephen Gran
+checks/dsa-check-running-kernel:# Copyright 2010 Uli Martens
+checks/dsa-check-running-kernel:# Copyright 2011 Alexander Reichle-Schmehl
+sbin/dsa-update-apt-status:# Copyright 2009 Peter Palfrader
+sbin/dsa-update-unowned-file-status:# Copyright 2012 Peter Palfrader
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/etc/obsolete-packages-ignore b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/etc/obsolete-packages-ignore
new file mode 100644
index 0000000..7dd79e5
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/etc/obsolete-packages-ignore
@@ -0,0 +1,4 @@
+/linux-image-.*/
+/kernel-image-.*/
+buildd
+sbuild
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/sbin/dsa-update-apt-status b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/sbin/dsa-update-apt-status
new file mode 100755
index 0000000..c506fea
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/sbin/dsa-update-apt-status
@@ -0,0 +1,100 @@
+#!/bin/bash
+
+# Copyright 2009 Peter Palfrader
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+UPDATE_RUNS=3
+STATUSDIR=/var/cache/dsa/nagios
+STATUS="${STATUSDIR}"/apt
+SLEEP_MAX=$(( 15 * 60 ))
+MAX_AGE=$(( 23 * 60 * 60 ))
+
+# we want to run if any of the following things is true
+# - we have never run before
+# - var/lib/dpkg/status has been touched since the last run
+# - var/cache/apt/pkgcache.bin has been touched since the last run
+# - our last run ended with 'apt-get update failed'
+# - our last run has been more than MAX_AGE (23hrs) ago
+run_required() {
+ local run=0
+ local norun=1
+
+ [ -e "$STATUS" ] || return $run
+ [ /var/lib/dpkg/status -nt "$STATUS" ] && return $run
+ [ /var/cache/apt/pkgcache.bin -nt "$STATUS" ] && return $run
+ grep "apt-get update failed" "$STATUS" > /dev/null && return $run
+
+ local last_mod
+ last_mod=`stat -c "%Y" "$STATUS"`
+ now=`date +%s`
+ age=$(( $now - $last_mod ))
+ [ "$age" -gt "$MAX_AGE" ] && return $run
+
+ return $norun
+}
+
+mkdir -p "${STATUSDIR}"
+
+# do stuff only when required, or when asked to
+if [ "${1:-""}" != "-f" ] ; then
+ run_required || exit 0
+fi
+
+# sleep if called non-interactively
+if [ -z "$TERM" -o "$TERM" = "dumb" ]; then
+ sleep $(( $RANDOM % $SLEEP_MAX ))
+fi
+
+# run apt-get update, retry a few times if it fails
+count=0
+while [ "$count" -lt "$UPDATE_RUNS" ]; do
+ flock -e /var/lib/apt/lists apt-get update -qq >/dev/null >&2
+ if [ "$?" = "0" ]; then break; fi
+ sleep $(( $RANDOM % 600 ))
+ count="$(( $count + 1 ))"
+done
+if [ "$count" -ge "$UPDATE_RUNS" ]; then
+ (echo "WARNING"
+ echo "apt-get update failed") > "$STATUS"
+ exit 1
+fi
+
+# run the apt check itself
+tmp=`tempfile`
+trap "rm -f '$tmp'" exit
+#/usr/share/dsa/apt-status-check --noupdate --timeout=600 > "$tmp"
+/usr/lib/nagios/plugins/dsa-check-packages > "$tmp"
+result="$?"
+case "$result" in
+ 0)
+ st="OK"
+ ;;
+ 1)
+ st="WARNING"
+ ;;
+ 2)
+ st="CRITICAL"
+ ;;
+ *)
+ st="UNKNOWN"
+ ;;
+esac
+(echo "$st"; cat "$tmp") > "$STATUS"
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/sbin/dsa-update-unowned-file-status b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/sbin/dsa-update-unowned-file-status
new file mode 100755
index 0000000..56331ef
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/sbin/dsa-update-unowned-file-status
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+# Copyright 2012 Peter Palfrader
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+CUTOFF=40
+STATUSDIR=/var/cache/dsa/nagios
+STATUS="${STATUSDIR}"/nouser
+
+mkdir -p "${STATUSDIR}"
+
+tmp=`tempfile`
+trap "rm -f '$tmp'" exit
+
+if command -v ionice >/dev/null 2>&1; then
+ prefix="ionice -c 3 -t" # idle priority, ignore errors
+fi
+
+$prefix find / -ignore_readdir_race \( -fstype proc -o -fstype sysfs -o -fstype fdescfs -o -fstype autofs -o -fstype nfs4 \) -prune -o \( -nouser -print \) | head -n "$CUTOFF" > "$tmp"
+
+if [ -s "$tmp" ]; then
+ echo "WARN"
+ c="$(wc -l < "$tmp")"
+ if [ "$c" -lt "$CUTOFF" ] ; then
+ echo "Warn: $c unowned files on system."
+ cat "$tmp"
+ else
+ echo "Warn: Lots of unowned files on system:"
+ cat "$tmp"
+ echo "..."
+ fi
+else
+ echo "OK"
+ echo "OK: No unowned files on system."
+fi > "$STATUS"
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/update-files.sh b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/update-files.sh
new file mode 100755
index 0000000..6539cf3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/dsa/update-files.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# update all files from the dsa nagios git
+find checks sbin share etc -type f | while read i; do
+ tmp=`mktemp`
+ if wget -O "${tmp}" "https://salsa.debian.org/dsa-team/mirror/dsa-nagios/raw/master/dsa-nagios-checks/${i}"; then
+ mv "${tmp}" "$i"
+ else
+ rm -f "${tmp}"
+ fi
+done
+
+chmod 755 sbin/*
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/extras/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/extras/Makefile
new file mode 100644
index 0000000..8563418
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/extras/Makefile
@@ -0,0 +1,16 @@
+#!/usr/bin/make -f
+
+DM_DIR=/usr/share/icinga/plugins/eventhandlers/distributed-monitoring/
+MULTI_DIR=/etc/check_multi
+
+all:
+ #nothing to do.
+
+install:
+ install -d $(DESTDIR)$(MULTI_DIR)
+ install -m 644 -o root -g root check_apt.cmd $(DESTDIR)$(MULTI_DIR)
+ install -d $(DESTDIR)$(DM_DIR)
+ install -m 755 -o root -g root send_nsca_host_or_service_check_result $(DESTDIR)$(DM_DIR)
+
+clean:
+ # nothing to do.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/extras/check_apt.cmd b/nagios-plugins-contrib-24.20190301~bpo9+1/extras/check_apt.cmd
new file mode 100644
index 0000000..aeb8d09
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/extras/check_apt.cmd
@@ -0,0 +1,25 @@
+# check_multi command file implementing a
+# check_apt replacement
+#
+# example nrpe.cfg config:
+# command[check_apt]=/usr/lib/nagios/plugins/check_multi -f /etc/check_multi/check_apt.cmd
+#
+# requirements:
+# - moreutils
+# - the following sudo permissions:
+# nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/check_libs
+# nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/check_running_kernel
+# - cronjobs running update-apt-status and update-check_libs-status:
+# @hourly root [ -x /usr/lib/nagios/cronjobs/update-apt-status ] && /usr/lib/nagios/cronjobs/update-apt-status 2>&1 | logger -t update-apt-status
+# @hourly root [ -x /usr/lib/nagios/cronjobs/update-check_libs-status ] && /usr/lib/nagios/cronjobs/update-check_libs-status 2>&1 | logger -t update-check_libs-status
+
+
+
+command[ packages ] = mispipe "/usr/lib/nagios/plugins/check_statusfile /var/cache/nagios_status/apt" "sed -n '1p;\$p' | paste -s -d ''"
+command[ libs ] = /usr/lib/nagios/plugins/check_statusfile /var/cache/nagios_status/check_libs
+command[ running_kernel ] = sudo /usr/lib/nagios/plugins/check_running_kernel
+
+
+state [ CRITICAL ] = COUNT(CRITICAL) > 0
+state [ WARNING ] = COUNT(WARNING) > 0
+state [ UNKNOWN ] = COUNT(UNKNOWN) > 0
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/extras/control b/nagios-plugins-contrib-24.20190301~bpo9+1/extras/control
new file mode 100644
index 0000000..16e65d4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/extras/control
@@ -0,0 +1,7 @@
+Suggests: nsca-client
+Version: 1
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Suggests: nagios-plugin-check-multi, moreutils
+Description: various scripts and extras
+ Not a plugin, but a collection of various useful
+ event/obsession handlers and similar scripts.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/extras/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/extras/copyright
new file mode 100644
index 0000000..e42c816
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/extras/copyright
@@ -0,0 +1,20 @@
+
+send_nsca_host_or_service_check_result:
+
+ Based on the example in the icinga documentation.
+ Enhanced to handle service and host checks by
+ Bernd Zeimetz <bzed@debian.org>.
+
+ Copyright (c) 1999-2009 Ethan Galstad (nagios@nagios.org)
+ Copyright (c) 2009-2010 Icinga Development Team (info@icinga.org)
+ Copyright (c) 2012 Bernd Zeimetz <bzed@debian.org>
+
+ License:
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2 as
+ published by the Free Software Foundation.
+
+ On Debian systems, the complete text of the GNU General Public
+ License, version 2, can be found in /usr/share/common-licenses/GPL-2.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/extras/send_nsca_host_or_service_check_result b/nagios-plugins-contrib-24.20190301~bpo9+1/extras/send_nsca_host_or_service_check_result
new file mode 100755
index 0000000..b634a25
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/extras/send_nsca_host_or_service_check_result
@@ -0,0 +1,86 @@
+#!/bin/bash
+
+
+# Enhanced version of the send_nsca wrappers to handle service and host checks.
+# Allows to specify the nsca host and send_nsca config file in the command definition.
+
+#define command{
+# command_name obsessive_host_handler
+# command_line /usr/share/icinga/plugins/eventhandlers/distributed-monitoring/send_nsca_host_or_service_check_result '$_HOSTOCHP_HOST$' '$_HOSTOCHP_CONFIG$' '$HOSTNAME$' '$HOSTSTATE$' '$HOSTOUTPUT$\\n$LONGHOSTOUTPUT$|$HOSTPERFDATA$'
+#}
+
+#define command{
+# command_name obsessive_service_handler
+# command_line /usr/share/icinga/plugins/eventhandlers/distributed-monitoring/send_nsca_host_or_service_check_result '$_SERVICEOCSP_HOST$' '$_SERVICEOCSP_CONFIG$' '$HOSTNAME$' '$SERVICEDESC$' '$SERVICESTATE$' '$SERVICEOUTPUT$\\n$LONGSERVICEOUTPUT$|$SERVICEPERFDATA$'
+#}
+
+
+
+NSCA_HOST="$1"
+shift
+SEND_NSCA_CFG="$1"
+shift
+
+# Service check
+# Arguments:
+# $1 = host_name (Short name of host that the service is
+# associated with)
+# $2 = svc_description (Description of the service)
+# $3 = state_string (A string representing the status of
+# the given service - "OK", "WARNING", "CRITICAL"
+# or "UNKNOWN")
+# $4 = plugin_output (A text string that should be used
+# as the plugin output for the service checks)
+#
+
+# Host check
+# Arguments:
+# $1 = host_name (Short name of host that the service is
+# associated with)
+# $2 = state_string (A string representing the status of
+# the given service - "OK", "WARNING", "CRITICAL"
+# or "UNKNOWN")
+# $3 = plugin_output (A text string that should be used
+# as the plugin output for the service checks)
+#
+
+HOSTNAME="$1"
+shift
+
+if [ $# -eq 3 ]; then
+ # we have a service check
+ # append service name to target.
+ SERVICE="${1}"
+ shift
+fi
+
+# Convert the state string to the corresponding return code
+RETURN_CODE=-1
+
+case "$1" in
+ OK|UP)
+ RETURN_CODE=0
+ ;;
+ WARNING)
+ RETURN_CODE=1
+ ;;
+ CRITICAL|DOWN)
+ RETURN_CODE=2
+ ;;
+ UNKNOWN|UNREACHABLE)
+ RETURN_CODE=3
+ ;;
+esac
+
+shift
+
+# pipe the service check info into the send_nsca program, which
+# in turn transmits the data to the nsca daemon on the central
+# monitoring server
+
+if [ -n "${SERVICE}" ]; then
+ /usr/bin/printf "%s\t%s\t%s\t%s\n" "${HOSTNAME}" "${SERVICE}" "$RETURN_CODE" "$1"
+else
+ /usr/bin/printf "%s\t%s\t%s\n" "${HOSTNAME}" "$RETURN_CODE" "$1"
+fi | /usr/sbin/send_nsca -H ${NSCA_HOST} -c ${SEND_NSCA_CFG}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/Changelog b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/Changelog
new file mode 100644
index 0000000..cb12581
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/Changelog
@@ -0,0 +1,115 @@
+2014-03-20: version 1.1.3
+-------------------------
+* Introduced more secure location of PHP script configs to harden a Cacti setup (bug #1295006)
+
+2014-03-14: version 1.1.2
+-------------------------
+* Added Nagios plugin and Cacti template for Amazon RDS
+* Added Nagios config template to the documentation
+* Added an option to pmp-check-pt-table-checksum to check MAX(ts) of latest checksum
+* Added generic Nagios plugin for PT tables
+* Extended pmp-check-mysql-processlist with max user connections check
+* Zabbix MySQL.running-slave item failed with MySQL 5.6 (bug 1272358)
+* ss_get_mysql_stats and MariaDB does not use have_response_time_distribution (bug 1285888)
+* Cacti Monitoring plugins and SNMP via TCP (bug 1268552)
+
+2013-12-30: version 1.1.1
+-------------------------
+* Cacti mysql graphs stop working with data input field "server-id" after 1.1 upgrade (bug 1264814)
+* Non-integer poller errors for MySQL Query Response Time (bug 1264353)
+
+2013-12-16: version 1.1
+-------------------------
+* Added MySQL template for Zabbix 2.0.x (first release)
+* Added FreeBSD support to Nagios plugins, partially rewritten pmp-check-unix-memory (bugs 1249575, 1244081)
+* Added new options to ss_get_mysql_stats.php to better support pt-heartbeat (bugs 1253125, 1253130)
+* ss_get_mysql_stats.php script was opening multiple connections to the server (bug 1255371)
+* sql query for idle_blocker_duraction check in pmp-check-mysql-innodb did not conform sql mode of ONLY_FULL_GROUP_BY (bug #1240417)
+
+2013-10-02: version 1.0.5
+-------------------------
+
+* Added mysql-ca option to ss_get_mysql_stats.php (bug 1213857)
+* Added user info to the idle_blocker_duration check of pmp-check-mysql-innodb (bug 1215317)
+* Extended pmp-check-mysql-processlist with more locking states (bug 1213859)
+* ss_get_mysql_stats.php did not work with custom mysql port (bug 1213862)
+* ss_get_mysql_stats.php silently failed when a query returns too many rows (bug 1225070)
+* Wrong description of percona-cacti-templates deb package (bug 1217782)
+
+2013-07-22: version 1.0.4
+-------------------------
+
+* Added Galera/MySQL Monitoring Template for Cacti
+* Added "Disk Read/Write Time per IO Request (ms)" graph
+* Added "MySQL InnoDB Buffer Pool Efficiency" graph
+* Switched ss_get_mysql_stats.php to PHP MySQLi extension and made it working with SSL (bug 1193097)
+* Added user info to the max_duration check of pmp-check-mysql-innodb plugin (bug 1185513)
+* ss_get_mysql_stats.php default values for '$status' array were null instead of 0 (bug 1070268)
+* Introduction of innodb_read_views_memory overrode the InnoDB total memory allocated output in Cacti (bug 1188519)
+* ss_get_by_ssh.php parsed MongoDB counters incorrectly when replica is set (bug 1087073)
+* Cacti graph "Redis Unsaved Changes" was empty for Redis 2.6 (bug 1110372)
+* Comparison of status variables that are strings didn't work with pmp-check-mysql-status (bug 1191305)
+* pmp-check-mysql-processlist always showed 0 for "copy to table" counter (bug 1197084)
+* percona-nagios-plugins package failed to install on Debian Squeeze when debsums is installed (bug 1194757)
+
+2013-04-17: version 1.0.3
+-------------------------
+
+* MySQL 5.6 compatibility for InnoDB graphs (bug 1124292)
+* Added performance data to Nagios plugins (bugs 1090145, 1102687)
+* Added UTC option to pmp-check-mysql-replication-delay to be compatible with pt-hearbeat 2.1.8+ (bug 1103364)
+* Added 1-second granularity to pmp-check-mysql-deadlocks (bug 1154774)
+* Added package install/update instructions and other documentation updates (bugs 1139652, 1124200, 1015981)
+* Updated documentation with the new Cacti sample images
+* Updated "Network Traffic" to be blue and green and to show bits/sec (bug 1132900)
+* Extended "MySQL Threads" graph with all kind of threads (bug 1157911)
+* Some Cacti single-item graphs were broken due to cacti hexadecimal transformation (bug 1155513)
+* Memcached graphs were broken when the wrong arguments for nc command are passed (bug 1155712)
+* ss_get_by_ssh.php didn't gather mongodb stats without SSH (bug 1050537)
+* ss_get_by_ssh.php didn't timeout commands that hang (bug 1160611)
+* pmp-check-file-privs didn't throw the proper error on directory permissions issue (bug 1024001)
+* pmp-check-mysql-replication-running reported OK when a slave is in "Connecting" state (bug 1089506)
+
+Update note: Cacti templates have to be re-imported together with the updating
+of ss_get_*.php scripts. Then make sure you rebuilt the poller cache under
+Cacti -> System Utilities. Also the following Cacti graphs need to be recreated: MySQL "MySQL
+Threads", Linux "Network Traffic".
+
+2013-02-15: version 1.0.2
+-------------------------
+
+* Created Debian and RPM packages
+* Added "Disk IOPS" graph to Cacti Linux Templates
+* Added an option to pmp-check-unix-memory to disable overriding the status based on the largest process in memory (bug 1052368)
+* Added '!=' comparison operator to pmp-check-mysql-status (bug 1048627)
+* pmp-check-mysql-replication-delay didn't alert if second behing master is NULL (bug 1040528)
+* pmp-check-pt-table-checksum reported OK when checksums table does not exist (bug 1114425)
+* pmp-check-pt-table-checksum threw "Bad substitution" error on Debian (bug 1071802)
+* Minor updates to the documentation (bugs 1021855, 1014814, 1125233)
+
+2012-06-12: version 1.0.1
+-------------------------
+
+* Cacti debug logs had a 12-hour timestamp instead of 24-hour (bug 973320).
+* Nagios checks didn't remove temporary files on some platforms (bug 977514).
+* Nagios plugins didn't use enough XXX in mktemp patterns (bug 2022766).
+* Nagios check for deleted files didn't return 0 on success (bug 1009751).
+* Nagios check for long-running txns didn't show thread ID (bug 1011625).
+
+2012-04-02: version 1.0.0
+-------------------------
+
+* Load average was 15-minute instead of 1-minute (bug 968604).
+* MySQL connection errors weren't logged (bug 958782).
+* The pmp-check-mysql-deadlocks referred to pt-heartbeat (bug 934255).
+* HTTP status was not fetched correctly when $use_ssh was disabled (bug 937017).
+* MongoDB didn't support --port2 (bug 937018).
+* Percona Server response time graph didn't tolerate <> 14 rows (bug 954118).
+* The release tarball had an extra directory (bug 934227).
+* pmp-check-mysql-status didn't remove one of its temp files (bug 959425).
+
+2012-02-16: version 0.9.0
+-------------------------
+
+* Initial release. Not backwards compatible with Better Cacti Templates.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/Makefile
new file mode 100644
index 0000000..dce78e2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/Makefile
@@ -0,0 +1,13 @@
+#/usr/bin/make -f
+
+PLUGIN = $(wildcard nagios/bin/*)
+MANPAGES = $(shell find nagios/bin -type f -printf '%f\n' | sed 's,$$,.7,')
+CLEANFILES = $(MANPAGES)
+
+include ../common.mk
+
+
+%.7: $(PLUGIN)
+ pod2man -s 7 $< > $@
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/control b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/control
new file mode 100644
index 0000000..7b672b3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/control
@@ -0,0 +1,7 @@
+Watch: http://www.percona.com/downloads/percona-monitoring-plugins/LATEST/source/ >percona-monitoring-plugins-([0-9.]+)\.tar\.gz<
+Version: 1.1.8
+Homepage: http://www.percona.com/doc/percona-monitoring-plugins/
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: Percona Monitoring Plugins (nagios)
+ Nagios MySQL Monitoring plugins writting/provided by Percona.
+Suggests: percona-toolkit, python2.7, python-pymongo
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/copyright
new file mode 100644
index 0000000..c0aecd2
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/copyright
@@ -0,0 +1,12 @@
+Copyright 2012-2014 Baron Schwartz, 2012-2014 Percona Inc.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-aws-rds.py b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-aws-rds.py
new file mode 100755
index 0000000..73b7660
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-aws-rds.py
@@ -0,0 +1,562 @@
+#!/usr/bin/env python
+"""Nagios plugin for Amazon RDS monitoring.
+
+This program is part of $PROJECT_NAME$
+License: GPL License (see COPYING)
+
+Author Roman Vynar
+Copyright 2014-2015 Percona LLC and/or its affiliates
+"""
+
+import datetime
+import optparse
+import pprint
+import sys
+
+import boto
+import boto.rds
+import boto.ec2.cloudwatch
+
+# Nagios status codes
+OK = 0
+WARNING = 1
+CRITICAL = 2
+UNKNOWN = 3
+
+
+class RDS(object):
+
+ """RDS connection class"""
+
+ def __init__(self, region, profile=None, identifier=None):
+ """Get RDS instance details"""
+ self.region = region
+ self.profile = profile
+ self.identifier = identifier
+
+ if self.region == 'all':
+ self.regions_list = [reg.name for reg in boto.rds.regions()]
+ else:
+ self.regions_list = [self.region]
+
+ self.info = None
+ if self.identifier:
+ for reg in self.regions_list:
+ try:
+ rds = boto.rds.connect_to_region(reg, profile_name=self.profile)
+ self.info = rds.get_all_dbinstances(self.identifier)
+ except (boto.provider.ProfileNotFoundError, boto.exception.BotoServerError) as msg:
+ debug(msg)
+ else:
+ # Exit on the first region and identifier match
+ self.region = reg
+ break
+
+ def get_info(self):
+ """Get RDS instance info"""
+ if self.info:
+ return self.info[0]
+ else:
+ return None
+
+ def get_list(self):
+ """Get list of available instances by region(s)"""
+ result = dict()
+ for reg in self.regions_list:
+ try:
+ rds = boto.rds.connect_to_region(reg, profile_name=self.profile)
+ result[reg] = rds.get_all_dbinstances()
+ except (boto.provider.ProfileNotFoundError, boto.exception.BotoServerError) as msg:
+ debug(msg)
+
+ return result
+
+ def get_metric(self, metric, start_time, end_time, step):
+ """Get RDS metric from CloudWatch"""
+ cw_conn = boto.ec2.cloudwatch.connect_to_region(self.region, profile_name=self.profile)
+ result = cw_conn.get_metric_statistics(
+ step,
+ start_time,
+ end_time,
+ metric,
+ 'AWS/RDS',
+ 'Average',
+ dimensions={'DBInstanceIdentifier': [self.identifier]}
+ )
+ if result:
+ if len(result) > 1:
+ # Get the last point
+ result = sorted(result, key=lambda k: k['Timestamp'])
+ result.reverse()
+
+ result = float('%.2f' % result[0]['Average'])
+
+ return result
+
+
+def debug(val):
+ """Debugging output"""
+ global options
+ if options.debug:
+ print 'DEBUG: %s' % val
+
+
+def main():
+ """Main function"""
+ global options
+
+ short_status = {
+ OK: 'OK',
+ WARNING: 'WARN',
+ CRITICAL: 'CRIT',
+ UNKNOWN: 'UNK'
+ }
+
+ # DB instance classes as listed on
+ # http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html
+ db_classes = {
+ 'db.t1.micro': 0.615,
+ 'db.m1.small': 1.7,
+ 'db.m1.medium': 3.75,
+ 'db.m1.large': 7.5,
+ 'db.m1.xlarge': 15,
+ 'db.m4.large': 8,
+ 'db.m4.xlarge': 16,
+ 'db.m4.2xlarge': 32,
+ 'db.m4.4xlarge': 64,
+ 'db.m4.10xlarge': 160,
+ 'db.r3.large': 15,
+ 'db.r3.xlarge': 30.5,
+ 'db.r3.2xlarge': 61,
+ 'db.r3.4xlarge': 122,
+ 'db.r3.8xlarge': 244,
+ 'db.t2.micro': 1,
+ 'db.t2.small': 2,
+ 'db.t2.medium': 4,
+ 'db.t2.large': 8,
+ 'db.m3.medium': 3.75,
+ 'db.m3.large': 7.5,
+ 'db.m3.xlarge': 15,
+ 'db.m3.2xlarge': 30,
+ 'db.m2.xlarge': 17.1,
+ 'db.m2.2xlarge': 34.2,
+ 'db.m2.4xlarge': 68.4,
+ 'db.cr1.8xlarge': 244,
+ }
+
+ # RDS metrics http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/rds-metricscollected.html
+ metrics = {
+ 'status': 'RDS availability',
+ 'load': 'CPUUtilization',
+ 'memory': 'FreeableMemory',
+ 'storage': 'FreeStorageSpace'
+ }
+
+ units = ('percent', 'GB')
+
+ # Parse options
+ parser = optparse.OptionParser()
+ parser.add_option('-l', '--list', help='list of all DB instances',
+ action='store_true', default=False, dest='db_list')
+ parser.add_option('-n', '--profile', default=None,
+ help='AWS profile from ~/.boto or /etc/boto.cfg. Default: None, fallbacks to "[Credentials]".')
+ parser.add_option('-r', '--region', default='us-east-1',
+ help='AWS region. Default: us-east-1. If set to "all", we try to detect the instance region '
+ 'across all of them, note this will be slower than if you specify the region explicitly.')
+ parser.add_option('-i', '--ident', help='DB instance identifier')
+ parser.add_option('-p', '--print', help='print status and other details for a given DB instance',
+ action='store_true', default=False, dest='printinfo')
+ parser.add_option('-m', '--metric', help='metric to check: [%s]' % ', '.join(metrics.keys()))
+ parser.add_option('-w', '--warn', help='warning threshold')
+ parser.add_option('-c', '--crit', help='critical threshold')
+ parser.add_option('-u', '--unit', help='unit of thresholds for "storage" and "memory" metrics: [%s].'
+ 'Default: percent' % ', '.join(units), default='percent')
+ parser.add_option('-t', '--time', help='time period in minutes to query. Default: 5',
+ type='int', default=5)
+ parser.add_option('-a', '--avg', help='time average in minutes to request. Default: 1',
+ type='int', default=1)
+ parser.add_option('-f', '--forceunknown', help='force alerts on unknown status. This prevents issues related to '
+ 'AWS Cloudwatch throttling limits Default: False',
+ action='store_true', default=False)
+ parser.add_option('-d', '--debug', help='enable debug output',
+ action='store_true', default=False)
+ options, _ = parser.parse_args()
+
+ if options.debug:
+ boto.set_stream_logger('boto')
+
+ rds = RDS(region=options.region, profile=options.profile, identifier=options.ident)
+
+ # Check args
+ if len(sys.argv) == 1:
+ parser.print_help()
+ sys.exit()
+ elif options.db_list:
+ info = rds.get_list()
+ print 'List of all DB instances in %s region(s):' % (options.region,)
+ pprint.pprint(info)
+ sys.exit()
+ elif not options.ident:
+ parser.print_help()
+ parser.error('DB identifier is not set.')
+ elif options.printinfo:
+ info = rds.get_info()
+ if info:
+ pprint.pprint(vars(info))
+ else:
+ print 'No DB instance "%s" found on your AWS account and %s region(s).' % (options.ident, options.region)
+
+ sys.exit()
+ elif not options.metric or options.metric not in metrics.keys():
+ parser.print_help()
+ parser.error('Metric is not set or not valid.')
+ elif not options.warn and options.metric != 'status':
+ parser.print_help()
+ parser.error('Warning threshold is not set.')
+ elif not options.crit and options.metric != 'status':
+ parser.print_help()
+ parser.error('Critical threshold is not set.')
+ elif options.avg <= 0 and options.metric != 'status':
+ parser.print_help()
+ parser.error('Average must be greater than zero.')
+ elif options.time <= 0 and options.metric != 'status':
+ parser.print_help()
+ parser.error('Time must be greater than zero.')
+
+ now = datetime.datetime.utcnow()
+ status = None
+ note = ''
+ perf_data = None
+
+ # RDS Status
+ if options.metric == 'status':
+ info = rds.get_info()
+ if not info:
+ status = UNKNOWN
+ note = 'Unable to get RDS instance'
+ else:
+ status = OK
+ try:
+ version = info.EngineVersion
+ except:
+ version = info.engine_version
+
+ note = '%s %s. Status: %s' % (info.engine, version, info.status)
+
+ # RDS Load Average
+ elif options.metric == 'load':
+ # Check thresholds
+ try:
+ warns = [float(x) for x in options.warn.split(',')]
+ crits = [float(x) for x in options.crit.split(',')]
+ fail = len(warns) + len(crits)
+ except:
+ fail = 0
+
+ if fail != 6:
+ parser.error('Warning and critical thresholds should be 3 comma separated numbers, e.g. 20,15,10')
+
+ loads = []
+ fail = False
+ j = 0
+ perf_data = []
+ for i in [1, 5, 15]:
+ if i == 1:
+ # Some stats are delaying to update on CloudWatch.
+ # Let's pick a few points for 1-min load avg and get the last point.
+ points = 5
+ else:
+ points = i
+
+ load = rds.get_metric(metrics[options.metric], now - datetime.timedelta(seconds=points * 60), now, i * 60)
+ if not load:
+ status = UNKNOWN
+ note = 'Unable to get RDS statistics'
+ perf_data = None
+ break
+
+ loads.append(str(load))
+ perf_data.append('load%s=%s;%s;%s;0;100' % (i, load, warns[j], crits[j]))
+
+ # Compare thresholds
+ if not fail:
+ if warns[j] > crits[j]:
+ parser.error('Parameter inconsistency: warning threshold is greater than critical.')
+ elif load >= crits[j]:
+ status = CRITICAL
+ fail = True
+ elif load >= warns[j]:
+ status = WARNING
+
+ j = j + 1
+
+ if status != UNKNOWN:
+ if status is None:
+ status = OK
+
+ note = 'Load average: %s%%' % '%, '.join(loads)
+ perf_data = ' '.join(perf_data)
+
+ # RDS Free Storage
+ # RDS Free Memory
+ elif options.metric in ['storage', 'memory']:
+ # Check thresholds
+ try:
+ warn = float(options.warn)
+ crit = float(options.crit)
+ except:
+ parser.error('Warning and critical thresholds should be integers.')
+
+ if crit > warn:
+ parser.error('Parameter inconsistency: critical threshold is greater than warning.')
+
+ if options.unit not in units:
+ parser.print_help()
+ parser.error('Unit is not valid.')
+
+ info = rds.get_info()
+ free = rds.get_metric(metrics[options.metric], now - datetime.timedelta(seconds=options.time * 60),
+ now, options.avg * 60)
+ if not info or not free:
+ status = UNKNOWN
+ note = 'Unable to get RDS details and statistics'
+ else:
+ if options.metric == 'storage':
+ storage = float(info.allocated_storage)
+ elif options.metric == 'memory':
+ try:
+ storage = db_classes[info.instance_class]
+ except:
+ print 'Unknown DB instance class "%s"' % info.instance_class
+ sys.exit(CRITICAL)
+
+ free = '%.2f' % (free / 1024 ** 3)
+ free_pct = '%.2f' % (float(free) / storage * 100)
+ if options.unit == 'percent':
+ val = float(free_pct)
+ val_max = 100
+ elif options.unit == 'GB':
+ val = float(free)
+ val_max = storage
+
+ # Compare thresholds
+ if val <= crit:
+ status = CRITICAL
+ elif val <= warn:
+ status = WARNING
+
+ if status is None:
+ status = OK
+
+ note = 'Free %s: %s GB (%.0f%%) of %s GB' % (options.metric, free, float(free_pct), storage)
+ perf_data = 'free_%s=%s;%s;%s;0;%s' % (options.metric, val, warn, crit, val_max)
+
+ # Final output
+ if status != UNKNOWN and perf_data:
+ print '%s %s | %s' % (short_status[status], note, perf_data)
+ elif status == UNKNOWN and not options.forceunknown:
+ print '%s %s | null' % ('OK', note)
+ sys.exit(0)
+ else:
+ print '%s %s' % (short_status[status], note)
+
+ sys.exit(status)
+
+
+if __name__ == '__main__':
+ main()
+
+# ############################################################################
+# Documentation
+# ############################################################################
+"""
+=pod
+
+=head1 NAME
+
+pmp-check-aws-rds.py - Check Amazon RDS metrics.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-aws-rds.py [options]
+
+ Options:
+ -h, --help show this help message and exit
+ -l, --list list of all DB instances
+ -n PROFILE, --profile-name=PROFILE
+ AWS profile from ~/.boto or /etc/boto.cfg. Default:
+ None, fallbacks to "[Credentials]".
+ -r REGION, --region=REGION
+ AWS region. Default: us-east-1. If set to "all", we
+ try to detect the instance region across all of them,
+ note this will be slower than you specify the region.
+ -i IDENT, --ident=IDENT
+ DB instance identifier
+ -p, --print print status and other details for a given DB instance
+ -m METRIC, --metric=METRIC
+ metric to check: [status, load, storage, memory]
+ -w WARN, --warn=WARN warning threshold
+ -c CRIT, --crit=CRIT critical threshold
+ -u UNIT, --unit=UNIT unit of thresholds for "storage" and "memory" metrics:
+ [percent, GB]. Default: percent
+ -t TIME, --time=TIME time period in minutes to query. Default: 5
+ -a AVG, --avg=AVG time average in minutes to request. Default: 1
+ -f, --forceunknown force alerts on unknown status. This prevents issues
+ related to AWS Cloudwatch throttling limits Default:
+ False
+ -d, --debug enable debug output
+
+=head1 REQUIREMENTS
+
+This plugin is written on Python and utilizes the module C<boto> (Python interface
+to Amazon Web Services) to get various RDS metrics from CloudWatch and compare
+them against the thresholds.
+
+* Install the package: C<yum install python-boto> or C<apt-get install python-boto>
+* Create a config /etc/boto.cfg or ~nagios/.boto with your AWS API credentials.
+ See http://code.google.com/p/boto/wiki/BotoConfig
+
+This plugin that is supposed to be run by Nagios, i.e. under ``nagios`` user,
+should have permissions to read the config /etc/boto.cfg or ~nagios/.boto.
+
+Example:
+
+ [root@centos6 ~]# cat /etc/boto.cfg
+ [Credentials]
+ aws_access_key_id = THISISATESTKEY
+ aws_secret_access_key = thisisatestawssecretaccesskey
+
+If you do not use this config with other tools such as our Cacti script,
+you can secure this file the following way:
+
+ [root@centos6 ~]# chown nagios /etc/boto.cfg
+ [root@centos6 ~]# chmod 600 /etc/boto.cfg
+
+=head1 DESCRIPTION
+
+The plugin provides 4 checks and some options to list and print RDS details:
+
+* RDS Status
+* RDS Load Average
+* RDS Free Storage
+* RDS Free Memory
+
+To get the list of all RDS instances under AWS account:
+
+ # ./pmp-check-aws-rds.py -l
+
+To get the detailed status of RDS instance identified as C<blackbox>:
+
+ # ./pmp-check-aws-rds.py -i blackbox -p
+
+Nagios check for the overall status. Useful if you want to set the rest
+of the checks dependent from this one:
+
+ # ./pmp-check-aws-rds.py -i blackbox -m status
+ OK mysql 5.1.63. Status: available
+
+Nagios check for CPU utilization, specify thresholds as percentage of
+1-min., 5-min., 15-min. average accordingly:
+
+ # ./pmp-check-aws-rds.py -i blackbox -m load -w 90,85,80 -c 98,95,90
+ OK Load average: 18.36%, 18.51%, 15.95% | load1=18.36;90.0;98.0;0;100 load5=18.51;85.0;95.0;0;100 load15=15.95;80.0;90.0;0;100
+
+Nagios check for the free memory, specify thresholds as percentage:
+
+ # ./pmp-check-aws-rds.py -i blackbox -m memory -w 5 -c 2
+ OK Free memory: 5.90 GB (9%) of 68 GB | free_memory=8.68;5.0;2.0;0;100
+ # ./pmp-check-aws-rds.py -i blackbox -m memory -u GB -w 4 -c 2
+ OK Free memory: 5.90 GB (9%) of 68 GB | free_memory=5.9;4.0;2.0;0;68
+
+Nagios check for the free storage space, specify thresholds as percentage or GB:
+
+ # ./pmp-check-aws-rds.py -i blackbox -m storage -w 10 -c 5
+ OK Free storage: 162.55 GB (33%) of 500.0 GB | free_storage=32.51;10.0;5.0;0;100
+ # ./pmp-check-aws-rds.py -i blackbox -m storage -u GB -w 10 -c 5
+ OK Free storage: 162.55 GB (33%) of 500.0 GB | free_storage=162.55;10.0;5.0;0;500.0
+
+By default, the region is set to ``us-east-1``. You can re-define it globally in boto config or
+specify with -r option. The following command will list all instances across all regions under your AWS account:
+
+ # ./pmp-check-aws-rds.py -r all -l
+
+The following command will show the status for the first instance identified as ``blackbox`` in all regions:
+
+ # ./pmp-check-aws-rds.py -r all -i blackbox -p
+
+Remember, scanning regions are slower operation than specifying it explicitly.
+
+=head1 CONFIGURATION
+
+Here is the excerpt of potential Nagios config:
+
+ define host{
+ use mysql-host
+ host_name blackbox
+ alias blackbox
+ address blackbox.abcdefgh.us-east-1.rds.amazonaws.com
+ }
+
+ define servicedependency{
+ host_name blackbox
+ service_description RDS Status
+ dependent_service_description RDS Load Average, RDS Free Storage, RDS Free Memory
+ execution_failure_criteria w,c,u,p
+ notification_failure_criteria w,c,u,p
+ }
+
+ define service{
+ use active-service
+ host_name blackbox
+ service_description RDS Status
+ check_command check_rds!status!0!0
+ }
+
+ define service{
+ use active-service
+ host_name blackbox
+ service_description RDS Load Average
+ check_command check_rds!load!90,85,80!98,95,90
+ }
+
+ define service{
+ use active-service
+ host_name blackbox
+ service_description RDS Free Storage
+ check_command check_rds!storage!10!5
+ }
+
+ define service{
+ use active-service
+ host_name blackbox
+ service_description RDS Free Memory
+ check_command check_rds!memory!5!2
+ }
+
+ define command{
+ command_name check_rds
+ command_line $USER1$/pmp-check-aws-rds.py -i $HOSTALIAS$ -m $ARG1$ -w $ARG2$ -c $ARG3$
+ }
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2014 Percona LLC and/or its affiliates.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-aws-rds.py $VERSION$
+
+=cut
+
+"""
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-lvm-snapshots b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-lvm-snapshots
new file mode 100755
index 0000000..6aa4d11
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-lvm-snapshots
@@ -0,0 +1,187 @@
+#!/bin/sh
+
+# ########################################################################
+# This program is part of $PROJECT_NAME$
+# License: GPL License (see COPYING)
+# Authors:
+# Baron Schwartz
+# ########################################################################
+
+# ########################################################################
+# Redirect STDERR to STDOUT; Nagios doesn't handle STDERR.
+# ########################################################################
+exec 2>&1
+
+# ########################################################################
+# Set up constants, etc.
+# ########################################################################
+STATE_OK=0
+STATE_WARNING=1
+STATE_CRITICAL=2
+STATE_UNKNOWN=3
+STATE_DEPENDENT=4
+
+# ########################################################################
+# Print the name and fullness of every LVM snapshot that is open and
+# nearly full. The input is the file with 'lvs', and the allowable fullness.
+# In many cases lvs will report "File descriptor %d (...) leaked" and we ignore
+# this, as it's only a warning that usually happens from a shell.
+# ########################################################################
+check_lvm_snapshot_fullness() {
+ local FILE="$1"
+ local FULL="$2"
+ awk -v full="$FULL" '
+ $1 != "LV" && $1 != "File" && $6 !~ /[^0-9.]/ && $6 > full {
+ print $2 "/" $1 "[" $5 "]=" $6 "%"
+ }' "${FILE}"
+}
+
+# ########################################################################
+# Run the program.
+# ########################################################################
+main() {
+
+ # Get options
+ for o; do
+ case "${o}" in
+ -w) shift; OPT_WARN="${1}"; shift; ;;
+ -c) shift; OPT_CRIT="${1}"; shift; ;;
+ --version) grep -A2 '^=head1 VERSION' "$0" | tail -n1; exit 0 ;;
+ --help) perl -00 -ne 'm/^ Usage:/ && print' "$0"; exit 0 ;;
+ -*) echo "Unknown option ${o}. Try --help."; exit 1; ;;
+ esac
+ done
+ OPT_WARN=${OPT_WARN:-90}
+ OPT_CRIT=${OPT_CRIT:-95}
+ if is_not_sourced; then
+ if [ -n "$1" ]; then
+ echo "WARN spurious command-line options: $@"
+ exit 1
+ fi
+ fi
+
+ local NOTE="OK no full LVM snapshot volumes"
+ local TEMP=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ trap "rm -f '${TEMP}' >/dev/null 2>&1" EXIT
+
+ # The lvs command is usually in /usr/sbin. But if it's run as a non-root
+ # user, it will print out "WARNING: Running as a non-root user. Functionality
+ # may be unavailable." and exit with success anyway. So we have to detect
+ # this and make the plugin exit UNKNOWN in that case. If there is a $1 it's
+ # the output of lvs.
+ PATH="$PATH:/usr/sbin:/sbin"
+ if [ -z "$1" ]; then
+ lvs > "${TEMP}" 2>&1
+ else
+ cat "$1" > "${TEMP}" 2>/dev/null # For testing only
+ fi
+
+ if grep 'command not found' "${TEMP}" > /dev/null 2>&1; then
+ NOTE="OK $(cat "${TEMP}")"
+ elif grep 'WARNING: Running as a non-root user' "${TEMP}" >/dev/null 2>&1; then
+ NOTE="UNK You must execute lvs with root privileges"
+ else
+ local VOLS=$(check_lvm_snapshot_fullness "${TEMP}" "${OPT_CRIT}")
+ if [ "${VOLS}" ]; then
+ NOTE="CRIT LVM snapshot volumes over ${OPT_CRIT}% full: ${VOLS}"
+ else
+ VOLS=$(check_lvm_snapshot_fullness "${TEMP}" "${OPT_WARN}")
+ if [ "${VOLS}" ]; then
+ NOTE="WARN LVM snapshot volumes over ${OPT_WARN}% full: ${VOLS}"
+ fi
+ fi
+ fi
+
+ echo $NOTE
+}
+
+# ########################################################################
+# Determine whether this program is being executed directly, or sourced/included
+# from another file.
+# ########################################################################
+is_not_sourced() {
+ [ "${0##*/}" = "pmp-check-lvm-snapshots" ] || [ "${0##*/}" = "bash" -a "$_" = "$0" ]
+}
+
+# ########################################################################
+# Execute the program if it was not included from another file.
+# This makes it possible to include without executing, and thus test.
+# ########################################################################
+if is_not_sourced; then
+ OUTPUT=$(main "$@")
+ EXITSTATUS=$STATE_UNKNOWN
+ case "${OUTPUT}" in
+ UNK*) EXITSTATUS=$STATE_UNKNOWN; ;;
+ OK*) EXITSTATUS=$STATE_OK; ;;
+ WARN*) EXITSTATUS=$STATE_WARNING; ;;
+ CRIT*) EXITSTATUS=$STATE_CRITICAL; ;;
+ esac
+ echo "${OUTPUT}"
+ exit $EXITSTATUS
+fi
+
+# ############################################################################
+# Documentation
+# ############################################################################
+: <<'DOCUMENTATION'
+=pod
+
+=head1 NAME
+
+pmp-check-lvm-snapshots - Alert when LVM snapshots are running out of copy-on-write space.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-lvm-snapshots [OPTIONS]
+ Options:
+ -c CRIT Critical threshold; default 95%.
+ -w WARN Warning threshold; default 90%.
+ --help Print help and exit.
+ --version Print version and exit.
+ Options must be given as --option value, not --option=value or -Ovalue.
+ Use perldoc to read embedded documentation with more details.
+
+=head1 DESCRIPTION
+
+This Nagios plugin looks at the output of the 'lvs' command to find LVM snapshot volumes
+that are beginning to run out of copy-on-write space. If a snapshot fills up its
+copy-on-write space, it will fail. This is also a useful way to detect whether
+some process, such as a backup, failed to release a snapshot volume after
+finishing with it.
+
+=head1 PRIVILEGES
+
+This plugin does not access MySQL.
+
+This plugin executes the following UNIX commands that may need special privileges:
+
+=over
+
+=item *
+
+lvs
+
+=back
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2012-$CURRENT_YEAR$ Baron Schwartz, 2012-$CURRENT_YEAR$ Percona Inc.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-lvm-snapshots $VERSION$
+
+=cut
+
+DOCUMENTATION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mongo.py b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mongo.py
new file mode 100755
index 0000000..0de0987
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mongo.py
@@ -0,0 +1,594 @@
+#!/usr/bin/env python2.7
+"""MongoDB Nagios check script
+
+This program is part of $PROJECT_NAME$
+License: GPL License (see COPYING)
+
+Author David Murphy
+Copyright 2014-2015 Percona LLC and/or its affiliates
+"""
+
+import sys
+import time
+import optparse
+import os
+import stat
+import pickle
+import traceback
+import pprint
+
+from types import FunctionType
+# Not yet implemented
+# import DeepDiff
+
+try:
+ import pymongo
+except ImportError, e:
+ print e
+ sys.exit(2)
+
+# As of pymongo v 1.9 the SON API is part of the BSON package, therefore attempt
+# to import from there and fall back to pymongo in cases of older pymongo
+if pymongo.version >= "1.9":
+ import bson.son as son
+else:
+ import pymongo.son as son
+
+
+# Adding special behavior for optparse
+class OptionParsingError(RuntimeError):
+ def __init__(self, msg):
+ self.msg = msg
+
+
+class ModifiedOptionParser(optparse.OptionParser):
+ def error(self, msg):
+ raise OptionParsingError(msg)
+
+def unicode_truncate(s, length, encoding='utf-8'):
+ encoded = s.encode(encoding)[:length]
+ return encoded.decode(encoding, 'ignore')
+
+def parse_options(args):
+ funcList = []
+ for item_name, item_type in NagiosMongoChecks.__dict__.items():
+ if type(item_type) is FunctionType and item_name.startswith("check_") and item_name is not 'check_levels':
+ funcList.append(item_name)
+ p = ModifiedOptionParser()
+
+ p.add_option('-H', '--host', action='store', type='string', dest='host', default='127.0.0.1', help='The hostname you want to connect to')
+ p.add_option('-P', '--port', action='store', type='int', dest='port', default=27017, help='The port mongodb is running on')
+ p.add_option('-u', '--user', action='store', type='string', dest='user', default=None, help='The username you want to login as')
+ p.add_option('-p', '--password', action='store', type='string', dest='passwd', default=None, help='The password you want to use for that user')
+ p.add_option('-W', '--warning', action='store', dest='warning', default=None, help='The warning threshold you want to set')
+ p.add_option('-C', '--critical', action='store', dest='critical', default=None, help='The critical threshold you want to set')
+ p.add_option('-A', '--action', action='store', type='choice', dest='action', default='check_connect',
+ choices=funcList, help="The action you want to take. Valid choices are (%s) Default: %s" % (", ".join(funcList), 'check_connect'))
+ p.add_option('-s', '--ssl', dest='ssl', default=False, help='Connect using SSL')
+ p.add_option('-r', '--replicaset', dest='replicaset', default=None, help='Connect to replicaset')
+ p.add_option('-c', '--collection', action='store', dest='collection', default='foo', help='Specify the collection in check_cannary_test')
+ p.add_option('-d', '--database', action='store', dest='database', default='tmp', help='Specify the database in check_cannary_test')
+ p.add_option('-q', '--query', action='store', dest='query', default='{"_id":1}', help='Specify the query in check_cannary_test')
+ p.add_option('--statusfile', action='store', dest='status_filename', default='status.dat', help='File to current store state data in for delta checks')
+ p.add_option('--backup-statusfile', action='store', dest='status_filename_backup', default='status_backup.dat',
+ help='File to previous store state data in for delta checks')
+ p.add_option('--max-stale', action='store', dest='max_stale', type='int', default=60, help='Age of status file to make new checks (seconds)')
+ # Add options for output stat file
+ try:
+ result = p.parse_args()
+ except OptionParsingError, e:
+ if 'no such option' in e.msg:
+ sys.exit("UNKNOWN - No such options of %s" % e.msg.split(":")[1])
+ if 'invalid choice' in e.msg:
+ error_item = e.msg.split(":")[2].split("'")[1]
+ sys.exit('UNKNOWN - No such action of %s found!' % error_item)
+ return result
+
+
+def return_result(result_type, message):
+ if result_type == "ok":
+ print "OK - " + message
+ sys.exit(0)
+ elif result_type == "critical":
+ print "CRITICAL - " + message
+ sys.exit(2)
+ elif result_type == "warning":
+ print "WARNING - " + message
+ sys.exit(1)
+ else:
+ print "UNKNOWN - " + message
+ sys.exit(2)
+
+
+def main(argv):
+ options, arguments = parse_options(argv)
+ check(options, options.action)
+
+
+def check(args, check_name):
+ try:
+ checksObj = globals()['NagiosMongoChecks'](args)
+ run_check = getattr(checksObj, check_name)
+ result_type, message = run_check(args, args.warning, args.critical)
+ except Exception, e:
+ raise
+ print(traceback.extract_tb(sys.exc_info()[-1], 1))
+ return_result("critical", str(e))
+ return_result(result_type, message)
+
+
+class NagiosMongoChecks:
+ # need to initialize variables and such still
+ def __init__(self, args):
+ # setup inital values from optParse
+ self.host = '127.0.0.1'
+ self.port = 27017
+ self.user = None
+ self.password = None
+ self.warning = None
+ self.critical = None
+ self.action = 'check_connect'
+ self.ssl = False
+ self.replicaset = None
+ self.collection = 'foo'
+ self.database = 'tmp'
+ self.query = '{"_id":1}'
+ self.status_filename = 'status.dat'
+ self.status_filename_backup = 'status_backup.dat'
+ self.max_stale = 60
+
+ for option in vars(args):
+ setattr(self, option, getattr(args, option))
+
+ # Fix filepaths to be relative
+ if not self.status_filename.startswith("/") or not self.status_filename.startswith(".."):
+ self.status_filename_backup = "%s/%s" % (os.curdir, self.status_filename_backup)
+ self.status_filename = "%s/%s" % (os.curdir, self.status_filename)
+
+ # ammend known intenal values we will need
+ self.current_status = {}
+ self.last_status = {}
+ self.connection = None
+ self.connection_time = None
+ self.pyMongoError = None
+
+ self.connect()
+
+ if self.file_age(self.status_filename) <= self.max_stale:
+ # Save status_file contents status as current_status
+ self.get_last_status(True)
+ # Save status_filename_backup contents as last_status
+ self.get_last_status(False, self.status_filename_backup)
+ else:
+ if self.connection is None:
+ raise pymongo.errors.ConnectionFailure(self.pyMongoError or "No connection Found, did connect fail?")
+ # Get fresh current_status from server
+ self.current_status = self.sanatize(self.get_server_status())
+ # user last status_filename contents as last_status
+ self.get_last_status(False, self.status_filename)
+ # Not yet implemented
+ # self.compute_deltas()
+
+ # get last status
+ # check if needs refresh, refresh if needed
+ # set last/current to self.current_status
+ pass
+
+ def get_last_status(self, returnAsCurrent, forceFile=None):
+ # Open file using self.file
+ try:
+ file_name = forceFile if forceFile is not None else self.status_filename
+ fileObject = open(file_name, 'r')
+ if returnAsCurrent is None or returnAsCurrent is False:
+ self.last_status = pickle.load(fileObject)
+ else:
+ self.current_status = pickle.load(fileObject)
+ except Exception:
+ return False
+ return True
+
+ def get_server_status(self):
+ try:
+ data = self.connection['admin'].command(pymongo.son_manipulator.SON([('serverStatus', 1)]))
+ except:
+ try:
+ data = self.connection['admin'].command(son.SON([('serverStatus', 1)]))
+ except Exception, e:
+ if type(e).__name__ == "OperationFailure":
+ sys.exit("UNKNOWN - Not authorized!")
+ else:
+ sys.exit("UNKNOWN - Unable to run serverStatus: %s::%s" % (type(e).__name__, unicode_truncate(e.message, 45)))
+
+ if self.current_status is None:
+ self.current_status = data
+
+ return data
+
+ # figure out how to use this one later
+ def rotate_files(self):
+ # 1)this needs to rename self.status_filename to status_filename_backup
+ # 2) Save current_status to self.status_filename ( new file )
+ if self.last_status == {}:
+ # Build the last status file for future deltas from current data
+ self.save_file(self.status_filename_backup, self.current_status)
+ # Set the current status file to empty to set the aging clock
+ self.save_file(self.status_filename, {})
+ sys.exit("UNKNOWN - No status data present, please try again in %s seconds" % self.max_stale)
+ else:
+ self.save_file(self.status_filename_backup, self.last_status)
+ self.save_file(self.status_filename, self.current_status)
+
+
+ def save_file(self, filename, contents):
+ try:
+ pickle.dump(contents, open(filename, "wb"))
+ except Exception, e:
+ sys.exit("UNKNOWN - Error saving stat file %s: %s" % (filename, e.message))
+
+ # TODO - Fill in all check defaults
+ def get_default(self, key, level):
+
+ defaults = {
+ 'check_connections': {'warning': 15000, 'critical': 19000},
+ 'check_connect': {'warning': 50, 'critical': 100},
+ 'check_queues': {'warning': 30, 'critical': 100},
+ 'check_lock_pct': {'warning': 30, 'critical': 50},
+ 'check_repl_lag': {'warning': 200, 'critical': 500},
+ # 'check_flushing': {'warning':XX, 'critical': XX},
+ 'check_total_indexes': {'warning': 100, 'critical': 300},
+ 'check_cannary_test': {'warning': 30, 'critical': 50},
+ 'check_oplog': {'warning': 36, 'critical': 24},
+ 'check_index_ratio': {'warning': .9, 'critical': .8},
+ }
+ try:
+ return defaults[key][level]
+ except KeyError:
+ sys.exit("UNKNOWN - Missing defaults found for %s please use -w and -c" % key)
+
+ # Not yet implemented
+ # def compute_deltas(self):
+ # deltas = []
+ # for item in DeepDiff(self.last_status, self.current_status)['values_changed']:
+ # name = item.split(":")[0].split("root")[1].replace("['", "").replace("']", ".")[:-1]
+ # if 'time' not in item.lower():
+ # values = item.split(":")[1]
+ # print(values)
+ # old, new = values.split("===>")
+ # print("%s: %s - %s = %s" % (name, new, old, float(new)-float(old)))
+ # deltas[name] = float(new) - float(old)
+ # self.delta_data = deltas
+ # return True
+
+ def file_age(self, filename):
+ try:
+ age = time.time() - os.stat(filename)[stat.ST_CTIME]
+ except OSError:
+ age = 999999
+ return age
+
+ # TODO - Add meat to this if needed, here for future planning
+ def sanatize(self, status_output):
+ return status_output
+
+ def connect(self):
+ start_time = time.time()
+ try:
+ # ssl connection for pymongo > 2.3
+ if self.replicaset is None:
+ con = pymongo.MongoClient(self.host, self.port, ssl=self.ssl, serverSelectionTimeoutMS=2500)
+ else:
+ con = pymongo.MongoClient(self.host, self.port, ssl=self.ssl, replicaSet=self.replicaset, serverSelectionTimeoutMS=2500)
+ if (self.user and self.passwd) and not con['admin'].authenticate(self.user, self.passwd):
+ sys.exit("CRITICAL - Username and password incorrect")
+ except Exception, e:
+ raise
+ if isinstance(e, pymongo.errors.AutoReconnect) and str(e).find(" is an arbiter") != -1:
+ # We got a pymongo AutoReconnect exception that tells us we connected to an Arbiter Server
+ # This means: Arbiter is reachable and can answer requests/votes - this is all we need to know from an arbiter
+ print "OK - State: 7 (Arbiter)"
+ sys.exit(0)
+ con = None
+ self.pyMongoError = str(e)
+ if con is not None:
+ try:
+ con['admin'].command(pymongo.son_manipulator.SON([('ping', 1)]))
+ except Exception, e:
+ sys.exit("UNKNOWN - Unable to run commands, possible auth issue: %s" % e.message)
+ self.connection_time = round(time.time() - start_time, 2)
+ version = con.server_info()['version'].split('.')
+ self.mongo_version = (version[0], version[1], version[2])
+ self.connection = con
+
+ def check_levels(self, check_result, warning_level, critical_level, message):
+ if check_result < warning_level:
+ return "ok", message
+ elif check_result > critical_level:
+ return "critical", message
+ elif check_result > warning_level and check_result < critical_level:
+ return "warning", message
+ else:
+ return "unknown", "Unable to parse %s into a result" % check_result
+
+ def check_connect(self, args, warning_level, critical_level):
+ warning_level = warning_level or self.get_default('check_connect', 'warning')
+ critical_level = critical_level or self.get_default('check_connect', 'critical')
+ con_time = self.connection_time
+ message = "Connection time %.2f ms" % con_time
+ return self.check_levels(float(con_time), float(warning_level), float(critical_level), message)
+
+ def check_connections(self, args, warning_level, critical_level):
+ warning_level = warning_level or self.get_default('check_connections', 'warning')
+ critical_level = critical_level or self.get_default('check_connections', 'critical')
+ connections = self.current_status['connections']
+ connections['total'] = connections['available'] + connections['current']
+ used_percent = int((connections['current'] / connections['total']) * 100)
+ message = "%i%% connections used ( %d of %d )" % (used_percent, connections['current'], connections['total'])
+ return self.check_levels(float(used_percent), int(warning_level), int(critical_level), message)
+
+ def check_lock_pct(self, args, warning_level, critical_level):
+ warning_level = warning_level or self.get_default('check_lock_pct', 'warning')
+ critical_level = critical_level or self.get_default('check_lock_pct', 'critical')
+ if self.mongo_version >= ('2', '7', '0'):
+ return "ok", "Mongo 3.0 and above do not have lock %"
+ lockTime = self.current_status['globalLock']['lockTime'] - self.last_status['globalLock']['lockTime']
+ totalTime = self.current_status['globalLock']['totalTime'] - self.last_status['globalLock']['totalTime']
+ lock_percent = int((lockTime / totalTime) * 100)
+ message = "%i%% locking found (over 100%% is possible)" % (lock_percent)
+ return self.check_levels(lock_percent, warning_level, critical_level, message)
+
+ def check_flushing(self, args, warning_level, critical_level):
+ warning_level = warning_level or self.get_default('check_flushing', 'warning')
+ critical_level = critical_level or self.get_default('check_flushing', 'critical')
+ flushData = self.current_status['backgroundFlushing']
+ if args.average:
+ flush_time = flushData['average_ms']
+ stat_type = "Average"
+ else:
+ flush_time = flushData['last_ms']
+ stat_type = "Last"
+
+ message = "%s Flush Time: %.2fms" % (stat_type, flush_time)
+ return self.check_levels(flush_time, warning_level, critical_level, message)
+
+ def check_index_ratio(self, args, warning_level, critical_level):
+ warning_level = warning_level or self.get_default('check_index_ratio', 'warning')
+ critical_level = critical_level or self.get_default('check_index_ratio', 'critical')
+ message = None
+
+ indexCounters = self.current_status['indexCounters']
+ if 'note' in indexCounters:
+ ratio = 1.0
+ message = "not supported defaulting to 1.0 ratio"
+ elif self.mongo_version >= ('2', '4', '0'):
+ ratio = indexCounters['missRatio']
+ else:
+ ratio = indexCounters['btree']['missRatio']
+ if message is None:
+ message = "Miss Ratio: %.2f" % ratio
+ return self.check_levels(ratio, warning_level, critical_level, message)
+
+ def check_have_primary(self, args, warning_level, critical_level):
+ replset_status = self.connection['admin'].command("replSetGetStatus")
+ for member in replset_status['members']:
+ if member['state'] == 1:
+ return "ok", "Cluster has primary"
+ return "critical", "Cluster has no primary!"
+
+ def check_total_indexes(self, args, warning_level, critical_level):
+ warning_level = warning_level or self.get_default('check_total_indexes', 'warning')
+ critical_level = critical_level or self.get_default('check_total_indexes', 'critical')
+ index_count = 0
+ database_count = 0
+ for database in self.connection.database_names():
+ if database not in ["admin", "local"]:
+ database_count += 1
+ self.connection[database]['system.indexes'].count()
+ index_count += self.connection[database]['system.indexes'].count()
+ message = "Found %d indexes in %d databases" % (index_count, database_count)
+ return self.check_levels(index_count, warning_level, critical_level, message)
+
+ def check_queues(self, args, warning_level, critical_level):
+ warning_level = warning_level or self.get_default('check_queues', 'warning')
+ critical_level = critical_level or self.get_default('check_queues', 'critical')
+ currentQueue = self.current_status['globalLock']['currentQueue']
+ currentQueue['total'] = currentQueue['readers'] + currentQueue['writers']
+ message = "Queue Sizes: read (%d) write(%d) total (%d)" % (currentQueue['readers'], currentQueue['writers'], currentQueue['total'])
+ return self.check_levels(currentQueue['total'], warning_level, critical_level, message)
+
+ def check_oplog(self, args, warning_level, critical_level):
+ warning_level = warning_level or self.get_default('check_oplog', 'warning')
+ critical_level = critical_level or self.get_default('check_oplog', 'critical')
+ if 'local' not in self.connection.database_names() or 'oplog.rs' not in self.connection['local'].collection_names():
+ return "critical", "We do not seem to be in a replset!"
+ oplog = self.connection['local']['oplog.rs']
+ first_ts = oplog.find().sort("$natural", pymongo.ASCENDING).limit(1)[0]['ts']
+ last_ts = oplog.find().sort("$natural", pymongo.DESCENDING).limit(1)[0]['ts']
+ oplog_range = (last_ts.as_datetime() - first_ts.as_datetime())
+ oplog_range_hours = oplog_range.total_seconds() / 60 / 60
+ message = "Oplog Time is %d hours" % (oplog_range_hours)
+ return self.check_levels(int(oplog_range_hours), warning_level, critical_level, message)
+
+ def check_election(self, args, warning_level, critical_level):
+ replset_status = self.connection['admin'].command("replSetGetStatus")
+ for member in replset_status['members']:
+ if member['stateStr'] == "PRIMARY":
+ #last_primary = member.name
+ last_primary = member['name']
+ for member in replset_status['members']:
+ if member['stateStr'] == "PRIMARY":
+ current_primary = member['name']
+ message = "Old PRI: %s New PRI: %s" % (last_primary, current_primary)
+ if current_primary == last_primary:
+ return "ok", message
+ else:
+ return "critical", message
+
+ def is_balanced(self):
+ chunks = {}
+
+ # Loop through each of the chunks, tallying things up
+ for chunk in self.connection["config"]["chunks"].find():
+ namespace = chunk['ns']
+ shard = chunk['shard']
+ if namespace not in chunks:
+ chunks[namespace] = {'shards': {}, 'total': 0}
+ if shard not in chunks[namespace]['shards']:
+ chunks[namespace]['shards'][shard] = 0
+ chunks[namespace]['shards'][shard] += 1
+ chunks[namespace]['total'] += 1
+
+ shardsCount = self.connection["config"]["shards"].count()
+ chunksCount = self.connection["config"]["chunks"].count()
+
+ # Different migration thresholds depending on cluster size
+ # http://docs.mongodb.org/manual/core/sharding-internals/#sharding-migration-thresholds
+ if chunksCount < 20:
+ threshold = 2
+ elif chunksCount < 80 and chunksCount > 21:
+ threshold = 4
+ else:
+ threshold = 8
+
+ # Default to balanced state, any failure will then mark it as False forevermore
+ isBalanced = True
+ # Loop through each ns and determine if it's balanced or not
+ for ns in chunks:
+ balanced = chunks[ns]['total'] / shardsCount
+ for shard in chunks[ns]['shards']:
+ if shard > balanced - threshold and shard < balanced + threshold:
+ pass
+ else:
+ isBalanced = False
+
+ return isBalanced
+
+ def check_balance(self, args, warning_level, critical_level):
+ if self.is_balanced() is True:
+ return "ok", "Shards are balanced by chunk counts"
+ else:
+ return "critcal", "Shards are not balanced by chunk and need review"
+
+ def check_cannary_test(self, args, warning_level, critical_level):
+ warning_level = warning_level or self.get_default('check_cannary_test', 'warning')
+ critical_level = critical_level or self.get_default('check_cannary_test', 'critical')
+ # this does not check for a timeout, we assume NRPE or Nagios will alert on that timeout.
+ try:
+ start = time.time()
+ self.connection[self.database][self.collection].find_one(self.query)
+ time_range = (time.time() - start).total_seconds
+ message = "Collection %s.%s query took: %d s" % (self.database, self.collection, time_range)
+ return self.check_levels(time_range, warning_level, critical_level, message)
+ except Exception, e:
+ message = "Collection %s.%s query FAILED: %s" % (self.database, self.collection, e)
+ return "critical", message
+
+ def check_repl_lag(self, args, warning_level, critical_level):
+ warning_level = warning_level or self.get_default('check_repl_lag', 'warning')
+ critical_level = critical_level or self.get_default('check_repl_lag', 'critical')
+
+ # make a write incase the client is not writing, but us an update to avoid wasting space
+ self.connection['test']['lag_check'].update({"_id":1}, {"_id": 1, "x": 1})
+ # get a fresh status for the replset
+ try:
+ replset_status = self.connection['admin'].command("replSetGetStatus")
+ except Exception, e:
+ return "critical", "Are your running with --replset? - %s" % (e)
+
+ for member in replset_status['members']:
+ if member['stateStr'] == "PRIMARY":
+ primary = member
+ if 'self' in member and member['self'] is True:
+ hostOptimeDate = member['optimeDate']
+
+ if primary is not None:
+ highest_optimeDate = primary['optimeDate']
+ highest_name = primary['name']
+ else:
+ # find the most current secondary as there is not primary
+ highest_optimeDate = time.gmtime(0)
+ for member in replset_status['members']:
+ if member['optimeDate'] > highest_optimeDate:
+ highest_optimeDate = member['optimeDate']
+ highest_name = member['name']
+
+ rep_lag_seconds = (highest_optimeDate - hostOptimeDate).seconds
+ rep_lag_hours = round(rep_lag_seconds/60/60, 4)
+ message = "Lagging %s by %.4f hours" % (highest_name, rep_lag_hours)
+ return self.check_levels(rep_lag_hours, warning_level, critical_level, message)
+
+#
+# main app
+#
+if __name__ == "__main__":
+ sys.exit(main(sys.argv[1:]))
+
+# ############################################################################
+# Documentation
+# ############################################################################
+"""
+=pod
+
+=head1 NAME
+
+pmp-check-mongo.py - MongoDB Nagios check script.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-mongo.py [options]
+
+ Options:
+ -h, --help show this help message and exit
+ -H HOST, --host=HOST The hostname you want to connect to
+ -P PORT, --port=PORT The port mongodb is running on
+ -u USER, --user=USER The username you want to login as
+ -p PASSWD, --password=PASSWD
+ The password you want to use for that user
+ -W WARNING, --warning=WARNING
+ The warning threshold you want to set
+ -C CRITICAL, --critical=CRITICAL
+ The critical threshold you want to set
+ -A ACTION, --action=ACTION
+ The action you want to take. Valid choices are
+ (check_connections, check_election, check_lock_pct,
+ check_repl_lag, check_flushing, check_total_indexes,
+ check_balance, check_queues, check_cannary_test,
+ check_have_primary, check_oplog, check_index_ratio,
+ check_connect) Default: check_connect
+ -s SSL, --ssl=SSL Connect using SSL
+ -r REPLICASET, --replicaset=REPLICASET
+ Connect to replicaset
+ -c COLLECTION, --collection=COLLECTION
+ Specify the collection in check_cannary_test
+ -d DATABASE, --database=DATABASE
+ Specify the database in check_cannary_test
+ -q QUERY, --query=QUERY
+ Specify the query in check_cannary_test
+ --statusfile=STATUS_FILENAME
+ File to current store state data in for delta checks
+ --backup-statusfile=STATUS_FILENAME_BACKUP
+ File to previous store state data in for delta checks
+ --max-stale=MAX_STALE
+ Age of status file to make new checks (seconds)
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2014 Percona LLC and/or its affiliates.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-mongo.py $VERSION$
+
+=cut
+
+"""
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-deadlocks b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-deadlocks
new file mode 100755
index 0000000..0545f06
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-deadlocks
@@ -0,0 +1,189 @@
+#!/bin/sh
+
+# ########################################################################
+# This program is part of $PROJECT_NAME$
+# License: GPL License (see COPYING)
+# Authors:
+# Baron Schwartz
+# Depends-on: pt-deadlock-logger
+# ########################################################################
+
+# ########################################################################
+# Redirect STDERR to STDOUT; Nagios doesn't handle STDERR.
+# ########################################################################
+exec 2>&1
+
+# ########################################################################
+# Set up constants, etc.
+# ########################################################################
+STATE_OK=0
+STATE_OK=0
+STATE_WARNING=1
+STATE_CRITICAL=2
+STATE_UNKNOWN=3
+STATE_DEPENDENT=4
+
+# ########################################################################
+# Run the program.
+# ########################################################################
+main() {
+ # Get options
+ for o; do
+ case "${o}" in
+ -c) shift; OPT_CRIT="${1}"; shift; ;;
+ --defaults-file) shift; OPT_DEFT="${1}"; shift; ;;
+ -H) shift; OPT_HOST="${1}"; shift; ;;
+ -i) shift; OPT_INTERVAL="${1}"; shift; ;;
+ -l) shift; OPT_USER="${1}"; shift; ;;
+ -L) shift; OPT_LOPA="${1}"; shift; ;;
+ -p) shift; OPT_PASS="${1}"; shift; ;;
+ -P) shift; OPT_PORT="${1}"; shift; ;;
+ -S) shift; OPT_SOCK="${1}"; shift; ;;
+ -T) shift; OPT_TABLE="${1}"; shift; ;;
+ -w) shift; OPT_WARN="${1}"; shift; ;;
+ --version) grep -A2 '^=head1 VERSION' "$0" | tail -n1; exit 0 ;;
+ --help) perl -00 -ne 'm/^ Usage:/ && print' "$0"; exit 0 ;;
+ -*) echo "Unknown option ${o}. Try --help."; exit 1; ;;
+ esac
+ done
+ OPT_WARN=${OPT_WARN:-12}
+ OPT_CRIT=${OPT_CRIT:-60}
+ OPT_INTERVAL=${OPT_INTERVAL:-1}
+ OPT_TABLE="${OPT_TABLE:-percona.deadlocks}"
+ if [ -e '/etc/nagios/mysql.cnf' ]; then
+ OPT_DEFT="${OPT_DEFT:-/etc/nagios/mysql.cnf}"
+ fi
+ if is_not_sourced; then
+ if [ -n "$1" ]; then
+ echo "WARN spurious command-line options: $@"
+ exit 1
+ fi
+ fi
+
+ LEVEL=$(mysql_exec "SELECT COUNT(*) FROM ${OPT_TABLE} WHERE server IN ('${OPT_HOST}', @@hostname) AND ts >= NOW() - INTERVAL ${OPT_INTERVAL}*60 SECOND")
+ if [ $? = 0 ]; then
+ NOTE="${LEVEL:-UNKNOWN} deadlocks in last ${OPT_INTERVAL} minutes"
+ if [ "${LEVEL:-0}" -gt "${OPT_CRIT}" ]; then
+ NOTE="CRIT $NOTE"
+ elif [ "${LEVEL:-0}" -gt "${OPT_WARN}" ]; then
+ NOTE="WARN $NOTE"
+ else
+ NOTE="OK $NOTE"
+ fi
+
+ # Build the common perf data output for graph trending
+ PERFDATA="deadlocks=${LEVEL:-0};${OPT_WARN};${OPT_CRIT};0;"
+ NOTE="$NOTE | $PERFDATA"
+ else
+ NOTE="UNK could not count deadlocks"
+ fi
+ echo $NOTE
+}
+
+# ########################################################################
+# Execute a MySQL command.
+# ########################################################################
+mysql_exec() {
+ mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} ${OPT_HOST:+-h"${OPT_HOST}"} ${OPT_USER:+-u"${OPT_USER}"} \
+ ${OPT_PASS:+-p"${OPT_PASS}"} ${OPT_SOCK:+-S"${OPT_SOCK}"} ${OPT_PORT:+-P"${OPT_PORT}"} \
+ ${OPT_LOPA:+--login-path="${OPT_LOPA}"} -ss -e "$1"
+}
+
+# ########################################################################
+# Determine whether this program is being executed directly, or sourced/included
+# from another file.
+# ########################################################################
+is_not_sourced() {
+ [ "${0##*/}" = "pmp-check-mysql-deadlocks" ] || [ "${0##*/}" = "bash" -a "$_" = "$0" ]
+}
+
+# ########################################################################
+# Execute the program if it was not included from another file.
+# This makes it possible to include without executing, and thus test.
+# ########################################################################
+if is_not_sourced; then
+ OUTPUT=$(main "$@")
+ EXITSTATUS=$STATE_UNKNOWN
+ case "${OUTPUT}" in
+ UNK*) EXITSTATUS=$STATE_UNKNOWN; ;;
+ OK*) EXITSTATUS=$STATE_OK; ;;
+ WARN*) EXITSTATUS=$STATE_WARNING; ;;
+ CRIT*) EXITSTATUS=$STATE_CRITICAL; ;;
+ esac
+ echo "${OUTPUT}"
+ exit $EXITSTATUS
+fi
+
+# ############################################################################
+# Documentation
+# ############################################################################
+: <<'DOCUMENTATION'
+=pod
+
+=head1 NAME
+
+pmp-check-mysql-deadlocks - Alert when pt-deadlock-logger has recorded too many recent deadlocks.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-mysql-deadlocks [OPTIONS]
+ Options:
+ -c CRIT Critical threshold; default 60.
+ --defaults-file FILE Only read mysql options from the given file.
+ Defaults to /etc/nagios/mysql.cnf if it exists.
+ -H HOST MySQL hostname.
+ -i INTERVAL Interval over which to count, in minutes; default 1.
+ -l USER MySQL username.
+ -L LOGIN-PATH Use login-path to access MySQL (with MySQL client 5.6).
+ -p PASS MySQL password.
+ -P PORT MySQL port.
+ -S SOCKET MySQL socket file.
+ -T TABLE The database.table that pt-deadlock-logger uses; default percona.deadlocks.
+ -w WARN Warning threshold; default 12.
+ --help Print help and exit.
+ --version Print version and exit.
+ Options must be given as --option value, not --option=value or -Ovalue.
+ Use perldoc to read embedded documentation with more details.
+
+=head1 DESCRIPTION
+
+This Nagios plugin looks at the table that pt-deadlock-logger (part of Percona
+Toolkit) maintains, and when there have been too many recent deadlocks, it
+alerts.
+
+=head1 PRIVILEGES
+
+This plugin executes the following commands against MySQL:
+
+=over
+
+=item *
+
+C<SELECT> from the C<pt-deadlock-logger> table.
+
+=back
+
+This plugin executes no UNIX commands that may need special privileges.
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2012-$CURRENT_YEAR$ Baron Schwartz, 2012-$CURRENT_YEAR$ Percona Inc.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-mysql-deadlocks $VERSION$
+
+=cut
+
+DOCUMENTATION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-deleted-files b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-deleted-files
new file mode 100755
index 0000000..a23c098
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-deleted-files
@@ -0,0 +1,286 @@
+#!/bin/sh
+
+# ########################################################################
+# This program is part of $PROJECT_NAME$
+# License: GPL License (see COPYING)
+# Authors:
+# Baron Schwartz
+# ########################################################################
+
+# ########################################################################
+# Redirect STDERR to STDOUT; Nagios doesn't handle STDERR.
+# ########################################################################
+exec 2>&1
+
+# ########################################################################
+# Set up constants, etc.
+# ########################################################################
+STATE_OK=0
+STATE_WARNING=1
+STATE_CRITICAL=2
+STATE_UNKNOWN=3
+STATE_DEPENDENT=4
+
+# ########################################################################
+# Run the program.
+# ########################################################################
+main() {
+ # Get options
+ for o; do
+ case "${o}" in
+ -c) shift; OPT_CRIT="${1}"; shift; ;;
+ --defaults-file) shift; OPT_DEFT="${1}"; shift; ;;
+ -H) shift; OPT_HOST="${1}"; shift; ;;
+ -l) shift; OPT_USER="${1}"; shift; ;;
+ -L) shift; OPT_LOPA="${1}"; shift; ;;
+ -p) shift; OPT_PASS="${1}"; shift; ;;
+ -P) shift; OPT_PORT="${1}"; shift; ;;
+ -S) shift; OPT_SOCK="${1}"; shift; ;;
+ -t) shift; OPT_TMPDIR="${1}"; shift; ;;
+ -w) shift; OPT_WARN="${1}"; shift; ;;
+ --version) grep -A2 '^=head1 VERSION' "$0" | tail -n1; exit 0 ;;
+ --help) perl -00 -ne 'm/^ Usage:/ && print' "$0"; exit 0 ;;
+ -*) echo "Unknown option ${o}. Try --help."; exit 1; ;;
+ esac
+ done
+ if [ -e '/etc/nagios/mysql.cnf' ]; then
+ OPT_DEFT="${OPT_DEFT:-/etc/nagios/mysql.cnf}"
+ fi
+ if is_not_sourced; then
+ if [ -n "$1" ]; then
+ echo "WARN spurious command-line options: $@"
+ exit 1
+ fi
+ fi
+
+ # If any connection option was given, then try to log in to find the server's
+ # tmpdir.
+ if [ "${OPT_DEFT}${OPT_HOST}${OPT_USER}${OPT_PASS}${OPT_PORT}${OPT_SOCK}" ]; then
+ OPT_TMPDIR=$(mysql_exec "SELECT @@tmpdir") || exit $?
+ elif [ -z "${OPT_TMPDIR}" ]; then
+ OPT_TMPDIR="${TMPDIR:-/tmp/}"
+ fi
+
+ # TODO: We could auto-check every running instance, not just one.
+ local NOTE="OK no deleted files"
+ local PROC_ID=$(_pidof mysqld | head -n1)
+ if [ "${PROC_ID}" ]; then
+ local TEMP=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ trap "rm -f '${TEMP}' >/dev/null 2>&1" EXIT
+ if _lsof "${PROC_ID}" > "${TEMP}" ; then
+ # If lsof exists, but you run it as non-root, you'll get a file with a
+ # bunch of this stuff:
+ # mysqld 15287 ... /proc/15287/cwd (readlink: Permission denied)
+ # We have to detect this and return UNK.
+ if grep -v -e denied -e COMMAND "${TEMP}" >/dev/null 2>&1; then
+ local FILES=$(check_deleted_files "${TEMP}" "${OPT_TMPDIR}")
+ NOTE="open but deleted files: ${FILES}"
+ if [ "${FILES}" -a -z "${OPT_WARN}" ]; then
+ NOTE="CRIT $NOTE"
+ elif [ "${FILES}" ]; then
+ NOTE="WARN $NOTE"
+ else
+ NOTE="OK no deleted files"
+ fi
+ else
+ NOTE="UNK You must execute lsof with root privileges"
+ fi
+ else
+ NOTE="UNK could not list MySQL's open files"
+ fi
+ else
+ NOTE="UNK could not find a mysqld process"
+ fi
+ echo $NOTE
+}
+
+# ########################################################################
+# A wrapper around pidof, which might not exist. The first argument is the
+# command name to match.
+# ########################################################################
+_pidof() {
+ if ! pidof "${1}" 2>/dev/null; then
+ ps axo pid,ucomm | awk -v comm="${1}" '$2 == comm { print $1 }'
+ fi
+}
+
+# ########################################################################
+# Execute a MySQL command.
+# ########################################################################
+mysql_exec() {
+ mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} \
+ ${OPT_LOPA:+--login-path="${OPT_LOPA}"} \
+ ${OPT_HOST:+-h"${OPT_HOST}"} ${OPT_PORT:+-P"${OPT_PORT}"} \
+ ${OPT_USER:+-u"${OPT_USER}"} ${OPT_PASS:+-p"${OPT_PASS}"} \
+ ${OPT_SOCK:+-S"${OPT_SOCK}"} -ss -e "$1"
+}
+
+# ########################################################################
+# A wrapper around lsof, which might not exist. The first argument is the
+# process ID to match. Otherwise, the fallback of listing /proc/pid/fd
+# will probably only work on Linux. For BSD, fstat will be used.
+# ########################################################################
+_lsof() {
+ PATH="$PATH:/usr/sbin:/sbin"
+ if ! lsof -p $1 2>/dev/null; then
+ if ! /bin/ls -l /proc/$1/fd 2>/dev/null; then
+ fstat -p $1 2>/dev/null
+ fi
+ fi
+}
+
+# ########################################################################
+# Generate a list of file handles that MySQL has open, but which are deleted,
+# and are not temp files such as /tmp/ib* files (InnoDB) or /tmp/ML* files
+# (binary logging). The first argument is a file containing the output of lsof
+# or ls -l for the open files. The second argument is the server's tmpdir.
+# ########################################################################
+check_deleted_files() {
+ awk -v tmpdir="${2}" '
+ /\(deleted\)/ { if ( index($0, tmpdir) == 0 ) {
+ if ( $NF ~ /deleted/ ) {
+ lf=NF-1;
+ }
+ else {
+ lf=NF;
+ }
+ print $lf;
+ }}' "${1}"
+}
+
+# ########################################################################
+# Determine whether this program is being executed directly, or sourced/included
+# from another file.
+# ########################################################################
+is_not_sourced() {
+ [ "${0##*/}" = "pmp-check-mysql-deleted-files" ] || [ "${0##*/}" = "bash" -a "$_" = "$0" ]
+}
+
+# ########################################################################
+# Execute the program if it was not included from another file.
+# This makes it possible to include without executing, and thus test.
+# ########################################################################
+if is_not_sourced; then
+ OUTPUT=$(main "$@")
+ EXITSTATUS=$STATE_UNKNOWN
+ case "${OUTPUT}" in
+ UNK*) EXITSTATUS=$STATE_UNKNOWN; ;;
+ OK*) EXITSTATUS=$STATE_OK; ;;
+ WARN*) EXITSTATUS=$STATE_WARNING; ;;
+ CRIT*) EXITSTATUS=$STATE_CRITICAL; ;;
+ esac
+ echo "${OUTPUT}"
+ exit $EXITSTATUS
+fi
+
+# ############################################################################
+# Documentation
+# ############################################################################
+: <<'DOCUMENTATION'
+=pod
+
+=head1 NAME
+
+pmp-check-mysql-deleted-files - Alert when MySQL's files are deleted.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-mysql-deleted-files [OPTIONS]
+ Options:
+ -c CRIT Critical threshold; ignored.
+ --defaults-file FILE Only read mysql options from the given file.
+ Defaults to /etc/nagios/mysql.cnf if it exists.
+ -H HOST MySQL hostname.
+ -l USER MySQL username.
+ -L LOGIN-PATH Use login-path to access MySQL (with MySQL client 5.6).
+ -p PASS MySQL password.
+ -P PORT MySQL port.
+ -S SOCKET MySQL socket file.
+ -w WARN Warning threshold; changes the alert to WARN instead of CRIT.
+ --help Print help and exit.
+ --version Print version and exit.
+ Options must be given as --option value, not --option=value or -Ovalue.
+ Use perldoc to read embedded documentation with more details.
+
+=head1 DESCRIPTION
+
+This Nagios plugin looks at the files that the mysqld process has open, and
+warns if any of them are deleted that shouldn't be. This typically happens when
+there is a poorly written logrotate script or when a human makes a mistake at
+the command line. This can cause several bad effects. If a table has been
+deleted, of course, it is a serious matter. Such a file can also potentially
+fill up the disk invisibly. If the file is the server's log, it might mean that
+logging is effectively broken and any problems the server experiences could be
+undiagnosable.
+
+The plugin accepts the -w and -c options for compatibility with standard Nagios
+plugin conventions, but they are not based on a threshold. Instead, the plugin
+raises a critical alert by default, and if the -w option is given, it raises a
+warning instead, regardless of the option's value.
+
+This plugin doesn't alert about deleted temporary files, which are not a
+problem. By default, this plugin assumes that the server's temporary directory
+is either the TMPDIR environment variable, or if that is not set, then /tmp/.
+If you specify MySQL authentication options, the value will log into the
+specified MySQL instance and look at the C<tmpdir> variable to find the
+temporary directory.
+
+This plugin looks at the first running instance of MySQL, as found in the
+system process table, so it will not work on systems that have multiple
+instances running. It probably works best on Linux, though it might work on
+other operating systems. It relies on either lsof or fstat or the ability to
+list the files in the process's /proc/pid/fd directory.
+
+=head1 PRIVILEGES
+
+This plugin executes the following commands against MySQL:
+
+=over
+
+=item *
+
+C<SELECT> the system variable C<@@tmpdir>.
+
+=back
+
+This plugin executes the following UNIX commands that may need special privileges:
+
+=over
+
+=item *
+
+ps
+
+=item *
+
+C<lsof> or C<ls /proc/$pid/fd> (Linux), C<fstat> (BSD)
+
+=back
+
+The plugin should be able to find mysqld PID using C<ps> command.
+
+On BSD, if C<sysctl> option C<security.bsd.see_other_uids> is set to 0, C<ps>
+will not return mysqld PID if the plugin run from non-root user.
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2012-$CURRENT_YEAR$ Baron Schwartz, 2012-$CURRENT_YEAR$ Percona Inc.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-mysql-deleted-files $VERSION$
+
+=cut
+
+DOCUMENTATION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-file-privs b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-file-privs
new file mode 100755
index 0000000..fa4df1c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-file-privs
@@ -0,0 +1,289 @@
+#!/bin/sh
+
+# ########################################################################
+# This program is part of $PROJECT_NAME$
+# License: GPL License (see COPYING)
+# Authors:
+# Baron Schwartz
+# ########################################################################
+
+# ########################################################################
+# Redirect STDERR to STDOUT; Nagios doesn't handle STDERR.
+# ########################################################################
+exec 2>&1
+
+# ########################################################################
+# Set up constants, etc.
+# ########################################################################
+STATE_OK=0
+STATE_WARNING=1
+STATE_CRITICAL=2
+STATE_UNKNOWN=3
+STATE_DEPENDENT=4
+
+# ########################################################################
+# Run the program.
+# ########################################################################
+main() {
+ # Get options
+ for o; do
+ case "${o}" in
+ -c) shift; OPT_CRIT="${1}"; shift; ;;
+ --defaults-file) shift; OPT_DEFT="${1}"; shift; ;;
+ -g) shift; OPT_UNIX_GROUP="${1}"; shift; ;;
+ -H) shift; OPT_HOST="${1}"; shift; ;;
+ -l) shift; OPT_USER="${1}"; shift; ;;
+ -L) shift; OPT_LOPA="${1}"; shift; ;;
+ -p) shift; OPT_PASS="${1}"; shift; ;;
+ -P) shift; OPT_PORT="${1}"; shift; ;;
+ -S) shift; OPT_SOCK="${1}"; shift; ;;
+ -u) shift; OPT_UNIX_USER="${1}"; shift; ;;
+ -w) shift; OPT_WARN="${1}"; shift; ;;
+ --version) grep -A2 '^=head1 VERSION' "$0" | tail -n1; exit 0 ;;
+ --help) perl -00 -ne 'm/^ Usage:/ && print' "$0"; exit 0 ;;
+ -*) echo "Unknown option ${o}. Try --help."; exit 1; ;;
+ esac
+ done
+ OPT_UNIX_GROUP="${OPT_UNIX_GROUP:-mysql}"
+ OPT_UNIX_USER="${OPT_UNIX_USER:-mysql}"
+ if [ -e '/etc/nagios/mysql.cnf' ]; then
+ OPT_DEFT="${OPT_DEFT:-/etc/nagios/mysql.cnf}"
+ fi
+ if is_not_sourced; then
+ if [ -n "$1" ]; then
+ echo "WARN spurious command-line options: $@"
+ exit 1
+ fi
+ fi
+
+ # Set the exit status in case there are any problems.
+ NOTE="UNK could not determine the datadir location."
+
+ # Set up files to hold one or more data directory locations.
+ local TEMP=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ local DATADIRS=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ trap "rm -f '${TEMP}' '${DATADIRS}' >/dev/null 2>&1" EXIT
+
+ # If any connection option was given, then try to log in to find the datadir.
+ if [ "${OPT_DEFT}${OPT_HOST}${OPT_USER}${OPT_PASS}${OPT_PORT}${OPT_SOCK}" ]; then
+ # If this fails (e.g. we can't log in), then there will be no line in the
+ # file, and later we won't change the exit code / note away from "UNK".
+ mysql_exec "SELECT IF(@@datadir LIKE '/%', @@datadir, CONCAT(@@basedir, @@datadir))" >> "${DATADIRS}"
+ else
+ # Find all MySQL server instances.
+ for pid in $(_pidof mysqld); do
+ ps -p ${pid} -o pid,command | grep "${pid}" >> "${TEMP}"
+ done
+ # The ${TEMP} file may now contain lines like the following sample:
+ # 13822 /usr/sbin/mysqld --defaults-file=/var/lib/mysql/my.cnf \
+ # --basedir=/usr --datadir=/var/lib/mysql/data/ \
+ # --pid-file=/var/run/mysqld/mysqld.pid \
+ # --socket=/var/run/mysqld/mysqld.sock
+ # Now the task is to read find any reference to a --datadir option.
+ # We store these into the $DATADIRS temp file.
+ # TODO: maybe in the future we can detect the user/group under which the
+ # process runs, and assume that is the right value, rather than defaulting
+ # to 'mysql'.
+ while read pid command; do
+ if echo "${command}" | grep datadir >/dev/null 2>&1; then
+ # Strip off everything up to and including --datadir=
+ command="${command##*--datadir=}"
+ # Strip off any options that follow this, assuming that there's not
+ # a space followed by a dash in the datadir's path.
+ echo "${command%% -*}" >> "${DATADIRS}"
+ fi
+ done < "${TEMP}"
+ fi
+
+ WRONG=""
+ NOTE2=""
+ > ${TEMP}
+ while read datadir; do
+ FILES="$(find "${datadir}" \! -group "${OPT_UNIX_GROUP}" -o \! -user "${OPT_UNIX_USER}" 2>>${TEMP})"
+ if [ "${FILES}" ]; then
+ WRONG=1
+ NOTE2="${NOTE2:+${NOTE2} }${FILES}"
+ fi
+ NOTE="OK all files/directories have correct ownership."
+ done < "${DATADIRS}"
+
+ if [ -s "${TEMP}" ]; then
+ NOTE="UNK `cat ${TEMP}`"
+ elif [ "${WRONG}" ]; then
+ if [ "${OPT_CRIT}" ]; then
+ NOTE="CRIT files with wrong ownership: ${NOTE2}"
+ else
+ NOTE="WARN files with wrong ownership: ${NOTE2}"
+ fi
+ fi
+
+ echo $NOTE
+}
+
+# ########################################################################
+# Execute a MySQL command.
+# ########################################################################
+mysql_exec() {
+ mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} \
+ ${OPT_LOPA:+--login-path="${OPT_LOPA}"} \
+ ${OPT_HOST:+-h"${OPT_HOST}"} ${OPT_PORT:+-P"${OPT_PORT}"} \
+ ${OPT_USER:+-u"${OPT_USER}"} ${OPT_PASS:+-p"${OPT_PASS}"} \
+ ${OPT_SOCK:+-S"${OPT_SOCK}"} -ss -e "$1"
+}
+
+# ########################################################################
+# A wrapper around pidof, which might not exist. The first argument is the
+# command name to match.
+# ########################################################################
+_pidof() {
+ if ! pidof "${1}" 2>/dev/null; then
+ ps axo pid,ucomm | awk -v comm="${1}" '$2 == comm { print $1 }'
+ fi
+}
+
+# ########################################################################
+# Determine whether this program is being executed directly, or sourced/included
+# from another file.
+# ########################################################################
+is_not_sourced() {
+ [ "${0##*/}" = "pmp-check-mysql-file-privs" ] || [ "${0##*/}" = "bash" -a "$_" = "$0" ]
+}
+
+# ########################################################################
+# Execute the program if it was not included from another file.
+# This makes it possible to include without executing, and thus test.
+# ########################################################################
+if is_not_sourced; then
+ OUTPUT=$(main "$@")
+ EXITSTATUS=$STATE_UNKNOWN
+ case "${OUTPUT}" in
+ UNK*) EXITSTATUS=$STATE_UNKNOWN; ;;
+ OK*) EXITSTATUS=$STATE_OK; ;;
+ WARN*) EXITSTATUS=$STATE_WARNING; ;;
+ CRIT*) EXITSTATUS=$STATE_CRITICAL; ;;
+ esac
+ echo "${OUTPUT}"
+ exit $EXITSTATUS
+fi
+
+# ############################################################################
+# Documentation
+# ############################################################################
+: <<'DOCUMENTATION'
+=pod
+
+=head1 NAME
+
+pmp-check-mysql-file-privs - Alert if MySQL data directory privileges are wrong.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-mysql-file-privs [OPTIONS]
+ Options:
+ -c CRIT Critical threshold; makes a privilege issue critical.
+ --defaults-file FILE Only read mysql options from the given file.
+ Defaults to /etc/nagios/mysql.cnf if it exists.
+ -g GROUP The Unix group who should own the files; default mysql.
+ -H HOST MySQL hostname.
+ -l USER MySQL username.
+ -L LOGIN-PATH Use login-path to access MySQL (with MySQL client 5.6).
+ -p PASS MySQL password.
+ -P PORT MySQL port.
+ -S SOCKET MySQL socket file.
+ -u USER The Unix user who should own the files; default mysql.
+ -w WARN Warning threshold; ignored.
+ --help Print help and exit.
+ --version Print version and exit.
+ Options must be given as --option value, not --option=value or -Ovalue.
+ Use perldoc to read embedded documentation with more details.
+
+=head1 DESCRIPTION
+
+This Nagios plugin checks to make sure that the MySQL data directory, and its
+contents, is owned by the correct Unix user and group. If the ownership is
+incorrect, then the server might fail due to lack of permission to modify its
+data. For example, suppose a system administrator enters a database directory
+and creates a file that is owned by root. Now a database administrator issues a
+DROP TABLE command, which fails because it is unable to remove the file and thus
+the non-empty directory cannot be removed either.
+
+The plugin accepts the -g and -u options to specify which Unix user and group
+should own the data directory and its contents. This is usually the user account
+under which MySQL runs, which is mysql by default on most systems. The plugin
+assumes that user and group by default, too.
+
+The plugin accepts the -w and -c options for compatibility with standard Nagios
+plugin conventions, but they are not based on a threshold. Instead, the plugin
+raises a warning by default, and if the -c option is given, it raises an error
+instead, regardless of the option's value.
+
+By default, this plugin will attempt to detect all running instances of MySQL,
+and verify the data directory ownership for each one. It does this purely by
+examining the Unix process table with the C<ps> tool. However, in some cases
+the process's command line does not list the path to the data directory. If the
+tool fails to detect the MySQL server process, or if you wish to limit the check
+to a single instance in the event that there are multiple instances on a single
+server, then you can specify MySQL authentication options. This will cause the
+plugin to skip examining the Unix processlist, log into MySQL, and examine the
+datadir variable from SHOW VARIABLES to find the location of the data directory.
+
+In case an user you are calling this plugin from has no permissions to examine
+the datadir the plugin raises an unknown with the explanation.
+
+=head1 PRIVILEGES
+
+This plugin executes the following commands against MySQL:
+
+=over
+
+=item *
+
+C<SELECT> the MySQL system variables C<@@datadir> and C<@@basedir>.
+
+=back
+
+This plugin executes the following UNIX commands that may need special privileges:
+
+=over
+
+=item *
+
+ps
+
+=item *
+
+find C<datadir>
+
+=back
+
+The plugin should be able to either get variables from MySQL or find mysqld
+PID using C<ps> command.
+
+On BSD, if C<sysctl> option C<security.bsd.see_other_uids> is set to 0, C<ps>
+will not return mysqld PID if the plugin run from non-root user.
+
+Also an user you run the plugin from should be able to access MySQL datadir
+files, so you may want to add it into mysql unix group etc.
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2012-$CURRENT_YEAR$ Baron Schwartz, 2012-$CURRENT_YEAR$ Percona Inc.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-mysql-file-privs $VERSION$
+
+=cut
+
+DOCUMENTATION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-innodb b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-innodb
new file mode 100755
index 0000000..038f564
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-innodb
@@ -0,0 +1,368 @@
+#!/bin/sh
+
+# ########################################################################
+# This program is part of $PROJECT_NAME$
+# License: GPL License (see COPYING)
+# Authors:
+# Baron Schwartz, Roman Vynar
+# ########################################################################
+
+# ########################################################################
+# Redirect STDERR to STDOUT; Nagios doesn't handle STDERR.
+# ########################################################################
+exec 2>&1
+
+# ########################################################################
+# Set up constants, etc.
+# ########################################################################
+STATE_OK=0
+STATE_WARNING=1
+STATE_CRITICAL=2
+STATE_UNKNOWN=3
+STATE_DEPENDENT=4
+
+# ########################################################################
+# Run the program.
+# ########################################################################
+main() {
+ # Get options
+ for o; do
+ case "${o}" in
+ -C) shift; OPT_CHEK="${1}"; shift; ;;
+ -c) shift; OPT_CRIT="${1}"; shift; ;;
+ --defaults-file) shift; OPT_DEFT="${1}"; shift; ;;
+ -H) shift; OPT_HOST="${1}"; shift; ;;
+ -l) shift; OPT_USER="${1}"; shift; ;;
+ -L) shift; OPT_LOPA="${1}"; shift; ;;
+ -p) shift; OPT_PASS="${1}"; shift; ;;
+ -P) shift; OPT_PORT="${1}"; shift; ;;
+ -S) shift; OPT_SOCK="${1}"; shift; ;;
+ -w) shift; OPT_WARN="${1}"; shift; ;;
+ --version) grep -A2 '^=head1 VERSION' "$0" | tail -n1; exit 0 ;;
+ --help) perl -00 -ne 'm/^ Usage:/ && print' "$0"; exit 0 ;;
+ -*) echo "Unknown option ${o}. Try --help."; exit 1; ;;
+ esac
+ done
+ OPT_CHEK="${OPT_CHEK:-idle_blocker_duration}"
+ if [ -e '/etc/nagios/mysql.cnf' ]; then
+ OPT_DEFT="${OPT_DEFT:-/etc/nagios/mysql.cnf}"
+ fi
+ if is_not_sourced; then
+ if [ -n "$1" ]; then
+ echo "WARN spurious command-line options: $@"
+ exit 1
+ fi
+ fi
+ NOTE="UNK could not find information about transactions"
+
+ local TEMP=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ trap "rm -f '${TEMP}' >/dev/null 2>&1" EXIT
+
+ case "${OPT_CHEK}" in
+ idle_blocker_duration)
+ OPT_WARN=${OPT_WARN:-60}
+ OPT_CRIT=${OPT_CRIT:-600}
+ OUTPUT=$(mysql_exec "
+ SELECT MAX(COALESCE(p.time, 0)) AS idle_in_trx,
+ p.id,
+ CONCAT(p.user, '@', p.host) AS userhost
+ FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS AS w
+ INNER JOIN INFORMATION_SCHEMA.INNODB_TRX AS b ON b.trx_id = w.blocking_trx_id
+ INNER JOIN INFORMATION_SCHEMA.INNODB_TRX AS r ON r.trx_id = w.requesting_trx_id
+ LEFT JOIN INFORMATION_SCHEMA.PROCESSLIST AS p ON p.id = b.trx_mysql_thread_id AND p.command = 'Sleep'
+ GROUP BY p.id, p.user, p.host
+ ORDER BY idle_in_trx DESC LIMIT 1" 2>"${TEMP}")
+ if [ "$?" != 0 ]; then
+ if grep "Unknown table" "${TEMP}" >/dev/null 2>&1; then
+ # The I_S tables don't exist.
+ NOTE="OK The INFORMATION_SCHEMA.INNODB_% tables don't exist."
+ else
+ cat "${TEMP}"
+ fi
+ elif [ -z "${OUTPUT}" ]; then
+ OUTPUT=0
+ fi
+ ;;
+ waiter_count)
+ OPT_WARN=${OPT_WARN:-10}
+ OPT_CRIT=${OPT_CRIT:-25}
+ OUTPUT=$(mysql_exec "
+ SELECT COUNT(DISTINCT REQUESTING_TRX_ID) AS cnt
+ FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS AS w" 2>"${TEMP}")
+ if [ "$?" != 0 ]; then
+ if grep "Unknown table" "${TEMP}" >/dev/null 2>&1; then
+ # The I_S tables don't exist.
+ mysql_exec "SHOW /*!50000 ENGINE*/ INNODB STATUS\G" > "${TEMP}" || exit $?
+ OUTPUT=$(get_waiter_count "${TEMP}")
+ else
+ cat "${TEMP}"
+ fi
+ fi
+ ;;
+ max_duration)
+ OPT_WARN=${OPT_WARN:-60}
+ OPT_CRIT=${OPT_CRIT:-600}
+ OUTPUT=$(mysql_exec "
+ SET @@time_zone='SYSTEM';
+ SELECT UNIX_TIMESTAMP() - UNIX_TIMESTAMP(t.trx_started),
+ p.id,
+ CONCAT(p.user, '@', p.host)
+ FROM INFORMATION_SCHEMA.INNODB_TRX AS t
+ JOIN INFORMATION_SCHEMA.PROCESSLIST AS p ON p.id = t.trx_mysql_thread_id
+ ORDER BY t.trx_started LIMIT 1" 2>"${TEMP}")
+ if [ "$?" != 0 ]; then
+ if grep "Unknown table" "${TEMP}" >/dev/null 2>&1; then
+ # The I_S tables don't exist.
+ mysql_exec "SHOW /*!50000 ENGINE*/ INNODB STATUS\G" > "${TEMP}" || exit $?
+ OUTPUT=$(get_longest_trx "${TEMP}")
+ if [ -z "${OUTPUT}" ]; then
+ OUTPUT=0
+ fi
+ else
+ cat "${TEMP}"
+ fi
+ elif [ -z "${OUTPUT}" ]; then
+ OUTPUT=0
+ fi
+ ;;
+ *)
+ echo "Unknown value for -C: '${OPT_CHEK}'. Consult the documentation.";
+ exit 1;
+ ;;
+ esac
+
+ # $OUTPUT now contains either an empty string or three words: 1) Age of
+ # oldest transaction, 2) thread ID of oldest transaction, 3) user info.
+ if [ -n "${OUTPUT}" ]; then
+ LEVEL="$(echo ${OUTPUT} | awk '{print $1}')"
+ INFO="$(echo ${OUTPUT} | awk '{print "(thread "$2" by "$3")"}')"
+
+ case "${OPT_CHEK}" in
+ idle_blocker_duration)
+ NOTE="longest blocking idle transaction sleeps for ${LEVEL:-UNKNOWN} seconds"
+ ;;
+ waiter_count)
+ NOTE="${LEVEL:-UNKNOWN} transactions in LOCK WAIT status"
+ INFO=""
+ ;;
+ max_duration)
+ NOTE="longest transaction active for ${LEVEL:-UNKNOWN} seconds"
+ ;;
+ esac
+ if [ "${LEVEL:-0}" -gt "${OPT_CRIT}" ]; then
+ NOTE="CRIT $NOTE $INFO"
+ elif [ "${LEVEL:-0}" -gt "${OPT_WARN}" ]; then
+ NOTE="WARN $NOTE $INFO"
+ else
+ NOTE="OK $NOTE"
+ fi
+ fi
+ echo $NOTE
+}
+
+# ########################################################################
+# Execute a MySQL command.
+# ########################################################################
+mysql_exec() {
+ mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} \
+ ${OPT_LOPA:+--login-path="${OPT_LOPA}"} \
+ ${OPT_HOST:+-h"${OPT_HOST}"} ${OPT_PORT:+-P"${OPT_PORT}"} \
+ ${OPT_USER:+-u"${OPT_USER}"} ${OPT_PASS:+-p"${OPT_PASS}"} \
+ ${OPT_SOCK:+-S"${OPT_SOCK}"} -ss -e "$1"
+}
+
+# ########################################################################
+# Gets max txn time in SHOW INNODB STATUS. File is $1.
+# ########################################################################
+get_longest_trx() {
+ awk '
+ BEGIN {
+ maxtime = 0;
+ thread = 0;
+ userinfo = "nobody";
+ }
+ /^TRANSACTIONS$/ {
+ tseen = 1;
+ }
+ {
+ if ( tseen == 1 && $0 ~ /^---TRANSACTION.*[0-9] sec/ ) {
+ if ( $2 ~ /,/ ) {
+ time = $4;
+ }
+ else {
+ time = $5;
+ }
+ }
+ if ( tseen == 1 && $0 ~ /^MySQL thread id/ ) {
+ if ( time > maxtime ) {
+ maxtime = time;
+ thread = substr($4, 1, length($4) - 1);
+ match($0, /query id [0-9]+ .+/);
+ userinfo = substr($0, RSTART, RLENGTH);
+ split(userinfo, a, " ");
+ userinfo = a[5]"@"a[4];
+ }
+ }
+ }
+ END {
+ print maxtime, thread, userinfo;
+ }
+ ' "${1}"
+}
+
+# ########################################################################
+# Counts the number of LOCK WAIT in SHOW INNODB STATUS. File is $1.
+# ########################################################################
+get_waiter_count() {
+ awk '
+ BEGIN {
+ lock_waits = 0;
+ }
+ /^TRANSACTIONS$/ {
+ tseen = 1;
+ }
+ {
+ if ( tseen == 1 && $0 ~ /TRX HAS BEEN WAITING/ ) {
+ lock_waits++;
+ }
+ }
+ END {
+ print lock_waits;
+ }
+ ' "${1}"
+}
+
+# ########################################################################
+# Determine whether this program is being executed directly, or sourced/included
+# from another file.
+# ########################################################################
+is_not_sourced() {
+ [ "${0##*/}" = "pmp-check-mysql-innodb" ] || [ "${0##*/}" = "bash" -a "$_" = "$0" ]
+}
+
+# ########################################################################
+# Execute the program if it was not included from another file.
+# This makes it possible to include without executing, and thus test.
+# ########################################################################
+if is_not_sourced; then
+ OUTPUT=$(main "$@")
+ EXITSTATUS=$STATE_UNKNOWN
+ case "${OUTPUT}" in
+ UNK*) EXITSTATUS=$STATE_UNKNOWN; ;;
+ OK*) EXITSTATUS=$STATE_OK; ;;
+ WARN*) EXITSTATUS=$STATE_WARNING; ;;
+ CRIT*) EXITSTATUS=$STATE_CRITICAL; ;;
+ esac
+ echo "${OUTPUT}"
+ exit $EXITSTATUS
+fi
+
+# ############################################################################
+# Documentation
+# ############################################################################
+: <<'DOCUMENTATION'
+=pod
+
+=head1 NAME
+
+pmp-check-mysql-innodb - Alert on problems inside InnoDB.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-mysql-innodb [OPTIONS]
+ Options:
+ -C CHECK What to alert on; default idle_blocker_duration.
+ Other options: waiter_count, max_duration.
+ -c CRIT Critical threshold; default varies.
+ --defaults-file FILE Only read mysql options from the given file.
+ Defaults to /etc/nagios/mysql.cnf if it exists.
+ -H HOST MySQL hostname.
+ -l USER MySQL username.
+ -L LOGIN-PATH Use login-path to access MySQL (with MySQL client 5.6).
+ -p PASS MySQL password.
+ -P PORT MySQL port.
+ -S SOCKET MySQL socket file.
+ -w WARN Warning threshold; default varies.
+ --help Print help and exit.
+ --version Print version and exit.
+ Options must be given as --option value, not --option=value or -Ovalue.
+ Use perldoc to read embedded documentation with more details.
+
+=head1 DESCRIPTION
+
+This Nagios plugin alerts on various aspects of InnoDB status in several ways,
+depending on the value of the -C option:
+
+=over
+
+=item idle_blocker_duration
+
+This is the default behavior. It alerts when a long-running transaction is
+blocking another, and the blocker is idle (Sleep). The threshold is based on
+how long the transaction has been idle. Long-running idle transactions that
+have acquired locks but not released them are a frequent cause of application
+downtime due to lock wait timeouts and rollbacks, especially because
+applications are often not designed to handle such errors correctly. The
+problem is usually due to another error that causes a transaction not to be
+committed, such as performing very long tasks in the application while holding
+the transaction open.
+
+This check examines the INFORMATION_SCHEMA tables included with InnoDB version
+1.0 and newer. The default critical level is 600, and warning is 60. If the
+tables do not exist, the exit status is OK, with a note that the tables do not
+exist.
+
+=item waiter_count
+
+Alerts if too many transactions are in LOCK WAIT status. Uses information from
+SHOW ENGINE INNODB STATUS if the INFORMATION_SCHEMA tables are not available.
+The default critical level is 25, and warning is 10.
+
+=item max_duration
+
+Alerts if any transaction is too old. Uses information from SHOW ENGINE INNODB
+STATUS if the INFORMATION_SCHEMA tables are not available. The default critical
+level is 600, and warning is 60.
+
+=back
+
+=head1 PRIVILEGES
+
+This plugin executes the following commands against MySQL:
+
+=over
+
+=item *
+
+C<SHOW ENGINE INNODB STATUS>.
+
+=item *
+
+C<SELECT> against the C<INFORMATION_SCHEMA> InnoDB transaction and lock tables.
+
+=back
+
+This plugin executes no UNIX commands that may need special privileges.
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2012-$CURRENT_YEAR$ Baron Schwartz, 2012-$CURRENT_YEAR$ Percona Inc.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-mysql-innodb $VERSION$
+
+=cut
+
+DOCUMENTATION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-pidfile b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-pidfile
new file mode 100755
index 0000000..bd6c0e5
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-pidfile
@@ -0,0 +1,291 @@
+#!/bin/sh
+
+# ########################################################################
+# This program is part of $PROJECT_NAME$
+# License: GPL License (see COPYING)
+# Authors:
+# Baron Schwartz
+# ########################################################################
+
+# ########################################################################
+# Redirect STDERR to STDOUT; Nagios doesn't handle STDERR.
+# ########################################################################
+exec 2>&1
+
+# ########################################################################
+# Set up constants, etc.
+# ########################################################################
+STATE_OK=0
+STATE_WARNING=1
+STATE_CRITICAL=2
+STATE_UNKNOWN=3
+STATE_DEPENDENT=4
+
+# ########################################################################
+# Run the program.
+# ########################################################################
+main() {
+ # Get options
+ for o; do
+ case "${o}" in
+ -c) shift; OPT_CRIT="${1}"; shift; ;;
+ --defaults-file) shift; OPT_DEFT="${1}"; shift; ;;
+ -H) shift; OPT_HOST="${1}"; shift; ;;
+ -l) shift; OPT_USER="${1}"; shift; ;;
+ -L) shift; OPT_LOPA="${1}"; shift; ;;
+ -p) shift; OPT_PASS="${1}"; shift; ;;
+ -P) shift; OPT_PORT="${1}"; shift; ;;
+ -S) shift; OPT_SOCK="${1}"; shift; ;;
+ -w) shift; OPT_WARN="${1}"; shift; ;;
+ --version) grep -A2 '^=head1 VERSION' "$0" | tail -n1; exit 0 ;;
+ --help) perl -00 -ne 'm/^ Usage:/ && print' "$0"; exit 0 ;;
+ -*) echo "Unknown option ${o}. Try --help."; exit 1; ;;
+ esac
+ done
+ if [ -e '/etc/nagios/mysql.cnf' ]; then
+ OPT_DEFT="${OPT_DEFT:-/etc/nagios/mysql.cnf}"
+ fi
+ if is_not_sourced; then
+ if [ -n "$1" ]; then
+ echo "WARN spurious command-line options: $@"
+ exit 1
+ fi
+ fi
+
+ # Set the exit status in case there are any problems.
+ NOTE="UNK could not determine the PID file location."
+
+ # Set up files to hold one or more PID file locations.
+ local TEMP=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ local FILES=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ trap "rm -f '${TEMP}' '${FILES}' >/dev/null 2>&1" EXIT
+
+ # If any connection option was given, then try to log in to find the PID
+ # file.
+ if [ "${OPT_DEFT}${OPT_HOST}${OPT_USER}${OPT_PASS}${OPT_PORT}${OPT_SOCK}" ]; then
+ # If this fails (e.g. we can't log in), then there will be no line in the
+ # file, and later we won't change the exit code / note away from "UNK".
+ if mysql_exec "SHOW GLOBAL VARIABLES" > "${TEMP}"; then
+ get_pidfile "${TEMP}" >> "${FILES}"
+ fi
+ else
+ # Find all MySQL server instances.
+ for pid in $(_pidof mysqld); do
+ ps -p ${pid} -o pid,command | grep "${pid}" >> "${TEMP}"
+ done
+ # The ${TEMP} file may now contain lines like the following sample:
+ # 13822 /usr/sbin/mysqld --defaults-file=/var/lib/mysql/my.cnf \
+ # --basedir=/usr --datadir=/var/lib/mysql/data/ \
+ # --pid-file=/var/run/mysqld/mysqld.pid \
+ # --socket=/var/run/mysqld/mysqld.sock
+ # Now the task is to read find any reference to a --pid-file or --pid_file option.
+ # We store these into the $FILES temp file.
+ while read pid command; do
+ if echo "${command}" | grep pid.file >/dev/null 2>&1; then
+ # Strip off everything up to and including --pid-file=
+ command="${command##*--pid?file=}"
+ # Strip off any options that follow this, assuming that there's not
+ # a space followed by a dash in the pidfile's path.
+ echo "${command%% -*}" >> "${FILES}"
+ fi
+ done < "${TEMP}"
+ fi
+
+ # TODO: maybe in the future we can also check whether the PID in the file is
+ # correct. TODO: maybe we should also alert on which PID is missing its
+ # pidfile.
+ MISSING=""
+ NOTE2=""
+ while read pidfile; do
+ if [ ! -e "${pidfile}" ]; then
+ MISSING=1
+ NOTE2="${NOTE2:+${NOTE2}; }missing ${pidfile}"
+ fi
+ NOTE="OK all PID files exist."
+ done < "${FILES}"
+
+ if [ "${MISSING}" ]; then
+ if [ "${OPT_CRIT}" ]; then
+ NOTE="CRIT ${NOTE2}"
+ else
+ NOTE="WARN ${NOTE2}"
+ fi
+ fi
+
+ echo $NOTE
+}
+
+# ########################################################################
+# Execute a MySQL command.
+# ########################################################################
+mysql_exec() {
+ mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} \
+ ${OPT_LOPA:+--login-path="${OPT_LOPA}"} \
+ ${OPT_HOST:+-h"${OPT_HOST}"} ${OPT_PORT:+-P"${OPT_PORT}"} \
+ ${OPT_USER:+-u"${OPT_USER}"} ${OPT_PASS:+-p"${OPT_PASS}"} \
+ ${OPT_SOCK:+-S"${OPT_SOCK}"} -ss -e "$1"
+}
+
+# ########################################################################
+# A wrapper around pidof, which might not exist. The first argument is the
+# command name to match.
+# ########################################################################
+_pidof() {
+ if ! pidof "${1}" 2>/dev/null; then
+ ps axo pid,ucomm | awk -v comm="${1}" '$2 == comm { print $1 }'
+ fi
+}
+
+# ########################################################################
+# Unfortunately, MySQL 5.0 doesn't have a system variable @@pid_file, so
+# we have to use SHOW VARIABLES and a temp file. In 5.1 and newer we
+# could have done it in a single SQL statement:
+# SELECT IF(@@pid_file LIKE '/%', @@pid_file,
+# CONCAT(@@basedir, @@pid_file))" >> "${FILES}"
+# The first argument is the file that contains SHOW VARIABLES.
+# ########################################################################
+get_pidfile() {
+ awk '
+ /^pid_file/ { pid_file = $2 }
+ /^basedir/ { basedir = $2 }
+ END {
+ if ( substr(pid_file, 1, 1) != "/" ) {
+ pid_file = basedir pid_file;
+ }
+ print pid_file;
+ }
+ ' "$1"
+}
+
+# ########################################################################
+# Determine whether this program is being executed directly, or sourced/included
+# from another file.
+# ########################################################################
+is_not_sourced() {
+ [ "${0##*/}" = "pmp-check-mysql-pidfile" ] || [ "${0##*/}" = "bash" -a "$_" = "$0" ]
+}
+
+# ########################################################################
+# Execute the program if it was not included from another file.
+# This makes it possible to include without executing, and thus test.
+# ########################################################################
+if is_not_sourced; then
+ OUTPUT=$(main "$@")
+ EXITSTATUS=$STATE_UNKNOWN
+ case "${OUTPUT}" in
+ UNK*) EXITSTATUS=$STATE_UNKNOWN; ;;
+ OK*) EXITSTATUS=$STATE_OK; ;;
+ WARN*) EXITSTATUS=$STATE_WARNING; ;;
+ CRIT*) EXITSTATUS=$STATE_CRITICAL; ;;
+ esac
+ echo "${OUTPUT}"
+ exit $EXITSTATUS
+fi
+
+# ############################################################################
+# Documentation
+# ############################################################################
+: <<'DOCUMENTATION'
+=pod
+
+=head1 NAME
+
+pmp-check-mysql-pidfile - Alert when the mysqld PID file is missing.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-mysql-pidfile [OPTIONS]
+ Options:
+ -c CRIT Critical threshold; makes a missing PID file critical.
+ --defaults-file FILE Only read mysql options from the given file.
+ Defaults to /etc/nagios/mysql.cnf if it exists.
+ -H HOST MySQL hostname.
+ -l USER MySQL username.
+ -L LOGIN-PATH Use login-path to access MySQL (with MySQL client 5.6).
+ -p PASS MySQL password.
+ -P PORT MySQL port.
+ -S SOCKET MySQL socket file.
+ -w WARN Warning threshold; ignored.
+ --help Print help and exit.
+ --version Print version and exit.
+ Options must be given as --option value, not --option=value or -Ovalue.
+ Use perldoc to read embedded documentation with more details.
+
+=head1 DESCRIPTION
+
+This Nagios plugin checks to make sure that the MySQL PID file is not missing.
+The PID file contains the process ID of the MySQL server process, and is used by
+init scripts to start and stop the server. If it is deleted for some reason,
+then it is likely that the init script will not work correctly. The file can be
+deleted by poorly written scripts, an accident, or a mistaken attempt to restart
+MySQL while it is already running, especially if mysqld is executed directly
+instead of using the init script.
+
+The plugin accepts the -w and -c options for compatibility with standard Nagios
+plugin conventions, but they are not based on a threshold. Instead, the plugin
+raises a warning by default, and if the -c option is given, it raises an error
+instead, regardless of the option.
+
+By default, this plugin will attempt to detect all running instances of MySQL,
+and verify the PID file's existence for each one. It does this purely by
+examining the Unix process table with the C<ps> tool. However, in some cases
+the process's command line does not list the path to the PID file. If the tool
+fails to detect the MySQL server process, or if you wish to limit the check to a
+single instance in the event that there are multiple instances on a single
+server, then you can specify MySQL authentication options. This will cause the
+plugin to skip examining the Unix processlist, log into MySQL, and examine the
+pid_file variable from SHOW VARIABLES to find the location of the PID file.
+
+=head1 PRIVILEGES
+
+This plugin executes the following commands against MySQL:
+
+=over
+
+=item *
+
+C<SELECT> the system variables C<@@pid_file> and C<@@basedir>.
+
+=back
+
+This plugin executes the following UNIX commands that may need special privileges:
+
+=over
+
+=item *
+
+ps
+
+=back
+
+The plugin should be able to either get variables from MySQL or find mysqld
+PID using C<ps> command.
+
+On BSD, if C<sysctl> option C<security.bsd.see_other_uids> is set to 0, C<ps>
+will not return mysqld PID if the plugin run from non-root user.
+
+Also an user you run the plugin from should be able to access MySQL PID file
+file, so you may want to add it into mysql unix group etc.
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2012-$CURRENT_YEAR$ Baron Schwartz, 2012-$CURRENT_YEAR$ Percona Inc.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-mysql-pidfile $VERSION$
+
+=cut
+
+DOCUMENTATION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-processlist b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-processlist
new file mode 100755
index 0000000..b2985f0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-processlist
@@ -0,0 +1,323 @@
+#!/bin/sh
+
+# ########################################################################
+# This program is part of $PROJECT_NAME$
+# License: GPL License (see COPYING)
+# Authors:
+# Baron Schwartz, Roman Vynar
+# ########################################################################
+
+# ########################################################################
+# Redirect STDERR to STDOUT; Nagios doesn't handle STDERR.
+# ########################################################################
+exec 2>&1
+
+# ########################################################################
+# Set up constants, etc.
+# ########################################################################
+STATE_OK=0
+STATE_WARNING=1
+STATE_CRITICAL=2
+STATE_UNKNOWN=3
+STATE_DEPENDENT=4
+
+# ########################################################################
+# Run the program.
+# ########################################################################
+main() {
+ # Get options
+ for o; do
+ case "${o}" in
+ -C) shift; OPT_CHEK="${1}"; shift; ;;
+ -c) shift; OPT_CRIT="${1}"; shift; ;;
+ --defaults-file) shift; OPT_DEFT="${1}"; shift; ;;
+ -H) shift; OPT_HOST="${1}"; shift; ;;
+ -l) shift; OPT_USER="${1}"; shift; ;;
+ -L) shift; OPT_LOPA="${1}"; shift; ;;
+ -p) shift; OPT_PASS="${1}"; shift; ;;
+ -P) shift; OPT_PORT="${1}"; shift; ;;
+ -S) shift; OPT_SOCK="${1}"; shift; ;;
+ -w) shift; OPT_WARN="${1}"; shift; ;;
+ --version) grep -A2 '^=head1 VERSION' "$0" | tail -n1; exit 0 ;;
+ --help) perl -00 -ne 'm/^ Usage:/ && print' "$0"; exit 0 ;;
+ -*) echo "Unknown option ${o}. Try --help."; exit 1; ;;
+ esac
+ done
+ OPT_CHEK="${OPT_CHEK:-states_count}"
+ if [ -e '/etc/nagios/mysql.cnf' ]; then
+ OPT_DEFT="${OPT_DEFT:-/etc/nagios/mysql.cnf}"
+ fi
+ if is_not_sourced; then
+ if [ -n "$1" ]; then
+ echo "WARN spurious command-line options: $@"
+ exit 1
+ fi
+ fi
+
+ # Get processlist into a temp file.
+ local TEMP=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ trap "rm -f '${TEMP}' >/dev/null 2>&1" EXIT
+
+ case "${OPT_CHEK}" in
+ states_count)
+ OPT_WARN=${OPT_WARN:-16}
+ OPT_CRIT=${OPT_CRIT:-32}
+
+ # Capture a number of types of states, add some together, take the max,
+ # and compare to the threshold.
+ mysql_exec 'SHOW PROCESSLIST\G' > "${TEMP}"
+ if [ $? = 0 ]; then
+ UNAUTH=$(count_mysql_processlist "${TEMP}" "User" "unauthenticated user")
+ LOCKED1=$(count_mysql_processlist "${TEMP}" "State" "Locked")
+ LOCKED2=$(count_mysql_processlist "${TEMP}" "State" "Waiting for .* lock")
+ LOCKED3=$(count_mysql_processlist "${TEMP}" "State" "Table lock")
+ LOCKED4=$(count_mysql_processlist "${TEMP}" "State" "Waiting for table flush")
+ LOCKED5=$(count_mysql_processlist "${TEMP}" "State" "Waiting for tables")
+ COPYIN=$(count_mysql_processlist "${TEMP}" "State" ".*opy.* to.* table.*")
+ STATIS=$(count_mysql_processlist "${TEMP}" "State" "statistics")
+ LOCKED=$((${LOCKED1:-0} + ${LOCKED2:-0} + ${LOCKED3:-0} + ${LOCKED4:-0} + ${LOCKED5:-0}))
+ NOTE="${UNAUTH} unauthenticated, ${LOCKED} locked,"
+ NOTE="${NOTE} ${COPYIN} copy to table, ${STATIS} statistics"
+ MAX="$(max "${UNAUTH:-0}" "${LOCKED:-0}" "${COPYIN:-0}" "${STATIS:-0}")"
+ if [ "${MAX:-0}" -gt "${OPT_CRIT}" ]; then
+ NOTE="CRIT $NOTE"
+ elif [ "${MAX:-0}" -gt "${OPT_WARN}" ]; then
+ NOTE="WARN $NOTE"
+ else
+ NOTE="OK $NOTE"
+ fi
+
+ # Build the common perf data output for graph trending
+ PERFDATA="processes=${MAX:-0};${OPT_WARN};${OPT_CRIT};0;"
+ NOTE="$NOTE | $PERFDATA"
+ else
+ NOTE="UNK could not retrieve MySQL processlist"
+ fi
+ ;;
+ max_user_conn)
+ OPT_WARN=${OPT_WARN:-90}
+ OPT_CRIT=${OPT_CRIT:-95}
+
+ # Check if @@max_user_connections is set on MySQL
+ MAX_USER_CONN=$(mysql_exec 'SELECT @@max_user_connections')
+ if [ $? = 0 ]; then
+ if [ ${MAX_USER_CONN:-0} -gt 0 ]; then
+ # Capture a number of connections per user from the processlist, take the max,
+ # and compare to the threshold.
+ mysql_exec 'SHOW PROCESSLIST\G' > "${TEMP}"
+ if [ $? = 0 ]; then
+ MAX_USER=$(cat ${TEMP}|grep User|awk '{print $2}'|sort|uniq -c|sort -n|tail -1)
+ CNT=$(echo ${MAX_USER} | awk '{print $1}')
+ USER=$(echo ${MAX_USER} | awk '{print $2}')
+ MAX=$(expr ${CNT} \* 100 / ${MAX_USER_CONN})
+ NOTE="User with max connections: ${USER} (${CNT}) = ${MAX}%"
+ if [ "${MAX:-0}" -gt "${OPT_CRIT}" ]; then
+ NOTE="CRIT $NOTE"
+ elif [ "${MAX:-0}" -gt "${OPT_WARN}" ]; then
+ NOTE="WARN $NOTE"
+ else
+ NOTE="OK $NOTE"
+ fi
+
+ # Build the common perf data output for graph trending
+ PERFDATA="max_user_conn=${MAX:-0};${OPT_WARN};${OPT_CRIT};0;100"
+ NOTE="$NOTE | $PERFDATA"
+ else
+ NOTE="UNK could not retrieve MySQL processlist"
+ fi
+ else
+ NOTE="OK @@max_user_connections is not configured."
+ fi
+ else
+ NOTE="UNK could not retrieve @@max_user_connections"
+ fi
+ ;;
+ *)
+ echo "Unknown value for -C: '${OPT_CHEK}'. Consult the documentation.";
+ exit 1;
+ ;;
+ esac
+
+ echo $NOTE
+}
+
+# ########################################################################
+# Extract a count from MySQL processlist. The arguments are:
+# $1 - file with the processlist.
+# $2 - the column to examine.
+# $3 - the value to count.
+# ########################################################################
+count_mysql_processlist() {
+ local FILE="${1}"
+ local COL="${2}"
+ local MATCH="${3}"
+ grep -c "^ *${COL}: ${MATCH}" "${FILE}"
+}
+
+# ########################################################################
+# Find the maximum argument, assuming nonnegative integers.
+# ########################################################################
+max() {
+ local MAX=0
+ for val; do
+ if [ "${val:-0}" -gt "${MAX}" ]; then
+ MAX="${val}"
+ fi
+ done
+ echo "${MAX:-0}"
+}
+
+# ########################################################################
+# Execute a MySQL command.
+# ########################################################################
+mysql_exec() {
+ mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} \
+ ${OPT_LOPA:+--login-path="${OPT_LOPA}"} \
+ ${OPT_HOST:+-h"${OPT_HOST}"} ${OPT_PORT:+-P"${OPT_PORT}"} \
+ ${OPT_USER:+-u"${OPT_USER}"} ${OPT_PASS:+-p"${OPT_PASS}"} \
+ ${OPT_SOCK:+-S"${OPT_SOCK}"} -ss -e "$1"
+}
+
+# ########################################################################
+# Determine whether this program is being executed directly, or sourced/included
+# from another file.
+# ########################################################################
+is_not_sourced() {
+ [ "${0##*/}" = "pmp-check-mysql-processlist" ] || [ "${0##*/}" = "bash" -a "$_" = "$0" ]
+}
+
+# ########################################################################
+# Execute the program if it was not included from another file.
+# This makes it possible to include without executing, and thus test.
+# ########################################################################
+if is_not_sourced; then
+ OUTPUT=$(main "$@")
+ EXITSTATUS=$STATE_UNKNOWN
+ case "${OUTPUT}" in
+ UNK*) EXITSTATUS=$STATE_UNKNOWN; ;;
+ OK*) EXITSTATUS=$STATE_OK; ;;
+ WARN*) EXITSTATUS=$STATE_WARNING; ;;
+ CRIT*) EXITSTATUS=$STATE_CRITICAL; ;;
+ esac
+ echo "${OUTPUT}"
+ exit $EXITSTATUS
+fi
+
+# ############################################################################
+# Documentation
+# ############################################################################
+: <<'DOCUMENTATION'
+=pod
+
+=head1 NAME
+
+pmp-check-mysql-processlist - Alert when MySQL processlist has dangerous patterns.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-mysql-processlist [OPTIONS]
+ Options:
+ -C CHECK What to alert on; default states_count.
+ Other options: max_user_conn.
+ -c CRIT Critical threshold; default varies.
+ --defaults-file FILE Only read mysql options from the given file.
+ Defaults to /etc/nagios/mysql.cnf if it exists.
+ -H HOST MySQL hostname.
+ -l USER MySQL username.
+ -L LOGIN-PATH Use login-path to access MySQL (with MySQL client 5.6).
+ -p PASS MySQL password.
+ -P PORT MySQL port.
+ -S SOCKET MySQL socket file.
+ -w WARN Warning threshold; default varies.
+ --help Print help and exit.
+ --version Print version and exit.
+ Options must be given as --option value, not --option=value or -Ovalue.
+ Use perldoc to read embedded documentation with more details.
+
+=head1 DESCRIPTION
+
+This Nagios plugin examines MySQL processlist in several ways,
+depending on the value of the -C option:
+
+=over
+
+=item states_count
+
+Alerts when there are too many processes in various states.
+The list of checks is as follows:
+
+Unauthenticated users appear when DNS resolution is slow, and can be a warning
+sign of DNS performance problems that could cause a sudden denial of service to
+the server.
+
+Locked processes are the signature of MyISAM tables, but can also appear for
+other reasons.
+
+Too many processes copying to various kinds of temporary tables at one time is a
+typical symptom of a storm of poorly optimized queries.
+
+Too many processes in the "statistics" state is a signature of InnoDB
+concurrency problems causing query execution plan generation to take too long.
+
+The thresholds should be given as count. The default critical level is 32,
+and warning is 16.
+
+=item max_user_conn
+
+Alerts when C<@@max_user_connections> is configured on MySQL and any user reaches
+this limit. The output of this check will display the user with maximum
+connections consumed, its count and percentage of the actual limit.
+
+The thresholds should be given as percentage. The default critical level is 95,
+and warning is 90.
+
+=back
+
+Examples:
+
+ # /usr/lib64/nagios/plugins/pmp-check-mysql-processlist
+ OK 0 unauthenticated, 0 locked, 0 copy to table, 0 statistics | processes=0;16;32;0;
+
+ # /usr/lib64/nagios/plugins/pmp-check-mysql-processlist -C max_user_conn
+ OK User with max connections: myappuser (70) = 2% | max_user_conn=2;90;95;0;100
+
+=head1 PRIVILEGES
+
+This plugin executes the following commands against MySQL:
+
+=over
+
+=item *
+
+C<SHOW PROCESSLIST;>
+
+=item *
+
+C<SELECT @@max_user_connections;>
+
+=back
+
+This plugin executes no UNIX commands that may need special privileges.
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2012-$CURRENT_YEAR$ Baron Schwartz, 2012-$CURRENT_YEAR$ Percona Inc.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-mysql-processlist $VERSION$
+
+=cut
+
+DOCUMENTATION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-replication-delay b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-replication-delay
new file mode 100755
index 0000000..1f02585
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-replication-delay
@@ -0,0 +1,280 @@
+#!/bin/sh
+
+# ########################################################################
+# This program is part of $PROJECT_NAME$
+# License: GPL License (see COPYING)
+# Authors:
+# Baron Schwartz, Roman Vynar
+# ########################################################################
+
+# ########################################################################
+# Redirect STDERR to STDOUT; Nagios doesn't handle STDERR.
+# ########################################################################
+exec 2>&1
+
+# ########################################################################
+# Set up constants, etc.
+# ########################################################################
+STATE_OK=0
+STATE_WARNING=1
+STATE_CRITICAL=2
+STATE_UNKNOWN=3
+STATE_DEPENDENT=4
+
+# ########################################################################
+# Run the program.
+# ########################################################################
+main() {
+ # Get options
+ OPT_ENSURE_SBM=0
+ MIN_DELAY_SET=0
+ for o; do
+ case "${o}" in
+ -c) shift; OPT_CRIT="${1}"; shift; ;;
+ --defaults-file) shift; OPT_DEFT="${1}"; shift; ;;
+ -H) shift; OPT_HOST="${1}"; shift; ;;
+ -l) shift; OPT_USER="${1}"; shift; ;;
+ -L) shift; OPT_LOPA="${1}"; shift; ;;
+ -m) shift; OPT_MIN="${1}"; MIN_DELAY_SET=1; shift; ;;
+ -p) shift; OPT_PASS="${1}"; shift; ;;
+ -P) shift; OPT_PORT="${1}"; shift; ;;
+ -S) shift; OPT_SOCK="${1}"; shift; ;;
+ -s) shift; OPT_SRVID="${1}"; shift; ;;
+ -T) shift; OPT_TABLE="${1}"; shift; ;;
+ -u) shift; OPT_UTC=1; ;;
+ -w) shift; OPT_WARN="${1}"; shift; ;;
+ --master-conn) shift; OPT_MASTERCONN="${1}"; shift; ;;
+ --channel) shift; OPT_CHANNEL="${1}"; shift; ;;
+ --unconfigured) shift; OPT_REPLNOTSET=1; ;;
+ --ensure-sbm) shift; OPT_ENSURE_SBM=1; ;;
+ --version) grep -A2 '^=head1 VERSION' "$0" | tail -n1; exit 0 ;;
+ --help) perl -00 -ne 'm/^ Usage:/ && print' "$0"; exit 0 ;;
+ -*) echo "Unknown option ${o}. Try --help."; exit 1; ;;
+ esac
+ done
+ OPT_WARN=${OPT_WARN:-300}
+ OPT_CRIT=${OPT_CRIT:-600}
+ OPT_MIN=${OPT_MIN:-0}
+ if [ -e '/etc/nagios/mysql.cnf' ]; then
+ OPT_DEFT="${OPT_DEFT:-/etc/nagios/mysql.cnf}"
+ fi
+ if is_not_sourced; then
+ if [ -n "$1" ]; then
+ echo "WARN spurious command-line options: $@"
+ exit 1
+ fi
+ fi
+
+ # Get replication delay from a heartbeat table or from SHOW SLAVE STATUS.
+ get_slave_status $1
+ if [ "${OPT_TABLE}" ]; then
+ if [ -z "${OPT_UTC}" ]; then
+ NOW_FUNC='UNIX_TIMESTAMP()'
+ else
+ NOW_FUNC='UNIX_TIMESTAMP(UTC_TIMESTAMP)'
+ fi
+ if [ "${OPT_SRVID}" == "MASTER" ]; then
+ if [ "${MYSQL_CONN}" = 0 ]; then
+ OPT_SRVID=$(awk '/Master_Server_Id/{print $2}' "${TEMP_SLAVEDATA}")
+ fi
+ fi
+ SQL="SELECT MAX(${NOW_FUNC} - ROUND(UNIX_TIMESTAMP(ts))) AS delay
+ FROM ${OPT_TABLE} WHERE (${OPT_SRVID:-0} = 0 OR server_id = ${OPT_SRVID:-0})"
+ LEVEL=$(mysql_exec "${SQL}")
+ MYSQL_CONN=$?
+ else
+ if [ "${MYSQL_CONN}" = 0 ]; then
+ LEVEL=$(awk '/Seconds_Behind_Master/{print $2}' "${TEMP_SLAVEDATA}")
+ fi
+ fi
+
+ # Check for SQL thread errors
+ LAST_SLAVE_ERRNO=$(awk '/Last_SQL_Errno/{print $2}' "${TEMP_SLAVEDATA}")
+
+ # Build the common perf data output for graph trending
+ PERFDATA="replication_delay=${LEVEL:-0};${OPT_WARN};${OPT_CRIT};0;"
+
+ # Test whether the delay is too long.
+ if [ "$MYSQL_CONN" = 0 ]; then
+ NOTE="${LEVEL:-0} seconds of replication delay"
+ if [ "${LEVEL:-""}" = "NULL" ]; then
+ test ${MIN_DELAY_SET} -eq 1 && \
+ test ${LAST_SLAVE_ERRNO} -eq 0 && \
+ test ${OPT_ENSURE_SBM} -eq 0 && \
+ NOTE="OK NULL seconds of replication delay" || NOTE="UNK replica is stopped"
+ elif [ -z "${LEVEL}" -a "${OPT_REPLNOTSET}" ]; then
+ NOTE="UNK This server is not configured as a replica."
+ # pt-slave-delayed slave
+ elif [ ${MIN_DELAY_SET} -eq 1 ] && [ "${LEVEL:-0}" -lt "${OPT_MIN}" ]; then
+ NOTE="CRIT (delayed slave) $NOTE | $PERFDATA"
+ elif [ "${LEVEL:-0}" -gt "${OPT_CRIT}" ]; then
+ NOTE="CRIT $NOTE | $PERFDATA"
+ elif [ "${LEVEL:-0}" -gt "${OPT_WARN}" ]; then
+ NOTE="WARN $NOTE | $PERFDATA"
+ else
+ NOTE="OK $NOTE | $PERFDATA"
+ fi
+ else
+ NOTE="UNK could not determine replication delay"
+ fi
+ echo $NOTE
+}
+
+# ########################################################################
+# Execute a MySQL command.
+# ########################################################################
+mysql_exec() {
+ mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} \
+ ${OPT_LOPA:+--login-path="${OPT_LOPA}"} \
+ ${OPT_HOST:+-h"${OPT_HOST}"} ${OPT_PORT:+-P"${OPT_PORT}"} \
+ ${OPT_USER:+-u"${OPT_USER}"} ${OPT_PASS:+-p"${OPT_PASS}"} \
+ ${OPT_SOCK:+-S"${OPT_SOCK}"} -ss -e "$1"
+}
+
+# ########################################################################
+# Determine whether this program is being executed directly, or sourced/included
+# from another file.
+# ########################################################################
+is_not_sourced() {
+ [ "${0##*/}" = "pmp-check-mysql-replication-delay" ] || [ "${0##*/}" = "bash" -a "$_" = "$0" ]
+}
+
+# ########################################################################
+# Captures the "SHOW SLAVE STATUS" output into a temp file.
+# ########################################################################
+get_slave_status() {
+ TEMP_SLAVEDATA=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ trap "rm -f '${TEMP_SLAVEDATA}' >/dev/null 2>&1" EXIT
+ if [ -z "$1" ]; then
+ if [ "${OPT_MASTERCONN}" ]; then
+ # MariaDB multi-source replication
+ mysql_exec "SHOW SLAVE '${OPT_MASTERCONN}' STATUS\G" > "${TEMP_SLAVEDATA}"
+ elif [ "${OPT_CHANNEL}" ]; then
+ mysql_exec "SHOW SLAVE STATUS FOR CHANNEL '${OPT_CHANNEL}'\G" > "${TEMP_SLAVEDATA}"
+ else
+ # Leverage lock-free SHOW SLAVE STATUS if available
+ mysql_exec "SHOW SLAVE STATUS NONBLOCKING\G" > "${TEMP_SLAVEDATA}" 2>/dev/null ||
+ mysql_exec "SHOW SLAVE STATUS NOLOCK\G" > "${TEMP_SLAVEDATA}" 2>/dev/null ||
+ mysql_exec "SHOW SLAVE STATUS\G" > "${TEMP_SLAVEDATA}"
+ fi
+ MYSQL_CONN=$?
+ else
+ # This is for testing only.
+ cat "$1" > "${TEMP_SLAVEDATA}" 2>/dev/null
+ MYSQL_CONN=0
+ fi
+}
+
+# ########################################################################
+# Execute the program if it was not included from another file.
+# This makes it possible to include without executing, and thus test.
+# ########################################################################
+if is_not_sourced; then
+ OUTPUT=$(main "$@")
+ EXITSTATUS=$STATE_UNKNOWN
+ case "${OUTPUT}" in
+ UNK*) EXITSTATUS=$STATE_UNKNOWN; ;;
+ OK*) EXITSTATUS=$STATE_OK; ;;
+ WARN*) EXITSTATUS=$STATE_WARNING; ;;
+ CRIT*) EXITSTATUS=$STATE_CRITICAL; ;;
+ esac
+ echo "${OUTPUT}"
+ exit $EXITSTATUS
+fi
+
+# ############################################################################
+# Documentation
+# ############################################################################
+: <<'DOCUMENTATION'
+=pod
+
+=head1 NAME
+
+pmp-check-mysql-replication-delay - Alert when MySQL replication becomes delayed.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-mysql-replication-delay [OPTIONS]
+ Options:
+ -c CRIT Critical threshold; default 600.
+ --defaults-file FILE Only read mysql options from the given file.
+ Defaults to /etc/nagios/mysql.cnf if it exists.
+ -H HOST MySQL hostname.
+ -l USER MySQL username.
+ -L LOGIN-PATH Use login-path to access MySQL (with MySQL client 5.6).
+ -m CRIT Minimal threshold to ensure for delayed slaves; default 0.
+ -p PASS MySQL password.
+ -P PORT MySQL port.
+ -S SOCKET MySQL socket file.
+ -s SERVERID MySQL server ID of master, if using pt-heartbeat table. If
+ the parameter is set to "MASTER" the plugin will lookup the
+ server_id of the master
+ -T TABLE Heartbeat table used by pt-heartbeat.
+ -u Use UTC time to count the delay in case pt-heartbeat is run
+ with --utc option.
+ -w WARN Warning threshold; default 300.
+ --master-conn NAME Master connection name for MariaDB multi-source replication.
+ --channel NAME Master channel name for multi-source replication (MySQL 5.7.6+).
+ --unconfigured Alert when replica is not configured at all; default no.
+ --ensure-sbm Disallow Seconds_Behind_Master to be NULL for delayed slaves when -m is used
+ --help Print help and exit.
+ --version Print version and exit.
+ Options must be given as --option value, not --option=value or -Ovalue.
+ Use perldoc to read embedded documentation with more details.
+
+=head1 DESCRIPTION
+
+This Nagios plugin examines whether MySQL replication is delayed too much. By
+default it uses SHOW SLAVE STATUS, but the output of the Seconds_behind_master
+column from this command is unreliable, so it is better to use pt-heartbeat from
+Percona Toolkit instead. Use the -T option to specify which table pt-heartbeat
+updates. Use the -s option to specify the master's server_id to compare
+against; otherwise the plugin reports the maximum delay from any server. Use
+the -s options with the value "MASTER" to have plugin lookup the master's server_id
+
+If you want to run this check against the delayed slaves, e.g. those running
+with pt-slave-delay tool, you may want to use -m option specifying the minimal
+delay that should be ongoing, otherwise the plugin will alert critical.
+
+=head1 PRIVILEGES
+
+This plugin executes the following commands against MySQL:
+
+=over
+
+=item *
+
+C<SHOW SLAVE STATUS [NONBLOCKING|NOLOCK]>
+
+or
+
+=item *
+
+C<SELECT> from the C<pt-heartbeat> table.
+
+=back
+
+This plugin executes no UNIX commands that may need special privileges.
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2012-$CURRENT_YEAR$ Baron Schwartz, 2012-$CURRENT_YEAR$ Percona Inc.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-mysql-replication-delay $VERSION$
+
+=cut
+
+DOCUMENTATION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-replication-running b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-replication-running
new file mode 100755
index 0000000..27f2f18
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-replication-running
@@ -0,0 +1,242 @@
+#!/bin/sh
+
+# ########################################################################
+# This program is part of $PROJECT_NAME$
+# License: GPL License (see COPYING)
+# Authors:
+# Baron Schwartz, Roman Vynar
+# ########################################################################
+
+# ########################################################################
+# Redirect STDERR to STDOUT; Nagios doesn't handle STDERR.
+# ########################################################################
+exec 2>&1
+
+# ########################################################################
+# Set up constants, etc.
+# ########################################################################
+STATE_OK=0
+STATE_WARNING=1
+STATE_CRITICAL=2
+STATE_UNKNOWN=3
+STATE_DEPENDENT=4
+
+# ########################################################################
+# Run the program.
+# ########################################################################
+main() {
+ # Get options
+ for o; do
+ case "${o}" in
+ -c) shift; OPT_CRIT="${1}"; shift; ;;
+ --defaults-file) shift; OPT_DEFT="${1}"; shift; ;;
+ -d) shift; OPT_DELD=1; shift; ;;
+ -H) shift; OPT_HOST="${1}"; shift; ;;
+ -l) shift; OPT_USER="${1}"; shift; ;;
+ -L) shift; OPT_LOPA="${1}"; shift; ;;
+ -p) shift; OPT_PASS="${1}"; shift; ;;
+ -P) shift; OPT_PORT="${1}"; shift; ;;
+ -S) shift; OPT_SOCK="${1}"; shift; ;;
+ -w) shift; OPT_WARN="${1}"; shift; ;;
+ --master-conn) shift; OPT_MASTERCONN="${1}"; shift; ;;
+ --channel) shift; OPT_CHANNEL="${1}"; shift; ;;
+ --version) grep -A2 '^=head1 VERSION' "$0" | tail -n1; exit 0 ;;
+ --help) perl -00 -ne 'm/^ Usage:/ && print' "$0"; exit 0 ;;
+ -*) echo "Unknown option ${o}. Try --help."; exit 1; ;;
+ esac
+ done
+ if [ -e '/etc/nagios/mysql.cnf' ]; then
+ OPT_DEFT="${OPT_DEFT:-/etc/nagios/mysql.cnf}"
+ fi
+ if is_not_sourced; then
+ if [ -n "$1" ]; then
+ echo "WARN spurious command-line options: $@"
+ exit 1
+ fi
+ fi
+
+ # Get replication status into a temp file. TODO: move this into a subroutine
+ # and test it. But, if there is a commandline argument left over after
+ # parsing options, then use that as the file instead.
+ local TEMP=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ trap "rm -f '${TEMP}' >/dev/null 2>&1" EXIT
+ if [ -z "$1" ]; then
+ if [ "${OPT_MASTERCONN}" ]; then
+ # MariaDB multi-source replication
+ mysql_exec "SHOW SLAVE '${OPT_MASTERCONN}' STATUS\G" > "${TEMP}"
+ elif [ "${OPT_CHANNEL}" ]; then
+ mysql_exec "SHOW SLAVE STATUS FOR CHANNEL '${OPT_CHANNEL}'\G" > "${TEMP}"
+ else
+ # Leverage lock-free SHOW SLAVE STATUS if available
+ mysql_exec "SHOW SLAVE STATUS NONBLOCKING\G" > "${TEMP}" 2>/dev/null ||
+ mysql_exec "SHOW SLAVE STATUS NOLOCK\G" > "${TEMP}" 2>/dev/null ||
+ mysql_exec "SHOW SLAVE STATUS\G" > "${TEMP}"
+ fi
+ else
+ # This is just for testing. /dev/null it.
+ cat "$1" > "${TEMP}" 2>/dev/null
+ fi
+
+ if [ $? = 0 ]; then
+ # SHOW SLAVE STATUS isn't an error if the server isn't a replica. The file
+ # will be empty if that happens.
+ if [ -s "${TEMP}" ]; then
+ NOTE=$(awk '$1 ~ /_Running:|Last_Error:/{print substr($0, 1, 100)}' "${TEMP}")
+ if grep 'Last_Error: .' "${TEMP}" >/dev/null 2>&1; then
+ NOTE="CRIT $NOTE"
+ # pt-slave-delayed slave
+ elif [ -n "${OPT_DELD}" ] &&
+ grep 'Slave_IO_Running: Yes' "${TEMP}" >/dev/null 2>&1 &&
+ grep 'Slave_SQL_Running: No' "${TEMP}" >/dev/null 2>&1; then
+ NOTE="OK (delayed slave) $NOTE"
+ elif egrep "_Running: (No|Connecting)" "${TEMP}" >/dev/null 2>&1; then
+ if [ "${OPT_CRIT}" ]; then
+ NOTE="CRIT $NOTE"
+ else
+ NOTE="WARN $NOTE"
+ fi
+ else
+ NOTE="OK $NOTE"
+ fi
+ elif [ "${OPT_WARN}" ]; then
+ # Empty file; not a replica, but that's not supposed to happen.
+ NOTE="WARN This server is not configured as a replica."
+ else
+ # Empty file; not a replica.
+ NOTE="OK This server is not configured as a replica."
+ fi
+ else
+ NOTE="UNK could not determine replication status"
+ fi
+
+ echo $NOTE
+}
+
+# ########################################################################
+# Execute a MySQL command.
+# ########################################################################
+mysql_exec() {
+ mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} \
+ ${OPT_LOPA:+--login-path="${OPT_LOPA}"} \
+ ${OPT_HOST:+-h"${OPT_HOST}"} ${OPT_PORT:+-P"${OPT_PORT}"} \
+ ${OPT_USER:+-u"${OPT_USER}"} ${OPT_PASS:+-p"${OPT_PASS}"} \
+ ${OPT_SOCK:+-S"${OPT_SOCK}"} -ss -e "$1"
+}
+
+# ########################################################################
+# Determine whether this program is being executed directly, or sourced/included
+# from another file.
+# ########################################################################
+is_not_sourced() {
+ [ "${0##*/}" = "pmp-check-mysql-replication-running" ] || [ "${0##*/}" = "bash" -a "$_" = "$0" ]
+}
+
+# ########################################################################
+# Execute the program if it was not included from another file.
+# This makes it possible to include without executing, and thus test.
+# ########################################################################
+if is_not_sourced; then
+ OUTPUT=$(main "$@")
+ EXITSTATUS=$STATE_UNKNOWN
+ case "${OUTPUT}" in
+ UNK*) EXITSTATUS=$STATE_UNKNOWN; ;;
+ OK*) EXITSTATUS=$STATE_OK; ;;
+ WARN*) EXITSTATUS=$STATE_WARNING; ;;
+ CRIT*) EXITSTATUS=$STATE_CRITICAL; ;;
+ esac
+ echo "${OUTPUT}"
+ exit $EXITSTATUS
+fi
+
+# ############################################################################
+# Documentation
+# ############################################################################
+: <<'DOCUMENTATION'
+=pod
+
+=head1 NAME
+
+pmp-check-mysql-replication-running - Alert when MySQL replication stops.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-mysql-replication-running [OPTIONS]
+ Options:
+ -c CRIT Report CRITICAL when replication is stopped with or w/o errors.
+ --defaults-file FILE Only read mysql options from the given file.
+ Defaults to /etc/nagios/mysql.cnf if it exists.
+ -d Useful for slaves delayed by pt-slave-delay. It will not alert
+ when IO thread is running, SQL one is not and no errors.
+ -H HOST MySQL hostname.
+ -l USER MySQL username.
+ -L LOGIN-PATH Use login-path to access MySQL (with MySQL client 5.6).
+ -p PASS MySQL password.
+ -P PORT MySQL port.
+ -S SOCKET MySQL socket file.
+ -w WARN Report WARNING when SHOW SLAVE STATUS output is empty.
+ --master-conn NAME Master connection name for MariaDB multi-source replication.
+ --channel NAME Master channel name for multi-source replication (MySQL 5.7.6+).
+ --help Print help and exit.
+ --version Print version and exit.
+ Options must be given as --option value, not --option=value or -Ovalue.
+ Use perldoc to read embedded documentation with more details.
+
+=head1 DESCRIPTION
+
+This Nagios plugin examines whether replication is running. It is separate from
+the check for delay because it is confusing or impossible to handle all of the
+combinations of replication errors and delays correctly, and provide an
+appropriate type of alert, in a single program.
+
+By default, this plugin treats it as critical when the either thread stops with
+an error, and a warning when threads are stopped with no error. You can provide
+critical and warning thresholds with the -c and -w options, for compatibility
+with Nagios plugin conventions, but they don't work as thresholds. Instead, if
+you specify a critical threshold, this plugin will treat it as critical if
+either thread is stopped, with or without an error.
+
+The warning threshold makes the plugin report a warning when SHOW SLAVE STATUS
+produces no output, which means it is not configured as a replica. By default,
+this plugin will report that replication is healthy when a server isn't
+configured as a replica.
+
+If you want to run this check against the delayed slaves, e.g. those running
+with pt-slave-delay tool, you may want to specify -d option. It will not alert
+when Slave_IO_Running is Yes, Slave_SQL_Running is No and there are no errors.
+
+=head1 PRIVILEGES
+
+This plugin executes the following commands against MySQL:
+
+=over
+
+=item *
+
+C<SHOW SLAVE STATUS [NONBLOCKING|NOLOCK]>
+
+=back
+
+This plugin executes no UNIX commands that may need special privileges.
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2012-$CURRENT_YEAR$ Baron Schwartz, 2012-$CURRENT_YEAR$ Percona Inc.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-mysql-replication-running $VERSION$
+
+=cut
+
+DOCUMENTATION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-status b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-status
new file mode 100755
index 0000000..89c2a6a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-status
@@ -0,0 +1,482 @@
+#!/bin/sh
+
+# ########################################################################
+# This program is part of $PROJECT_NAME$
+# License: GPL License (see COPYING)
+# Authors:
+# Baron Schwartz, Roman Vynar
+# ########################################################################
+
+# ########################################################################
+# Redirect STDERR to STDOUT; Nagios doesn't handle STDERR.
+# ########################################################################
+exec 2>&1
+
+# ########################################################################
+# Set up constants, etc.
+# ########################################################################
+STATE_OK=0
+STATE_WARNING=1
+STATE_CRITICAL=2
+STATE_UNKNOWN=3
+STATE_DEPENDENT=4
+
+# ########################################################################
+# Run the program.
+# ########################################################################
+main() {
+ # Get options
+ for o; do
+ case "${o}" in
+ -c) shift; OPT_CRIT="${1}"; shift; ;;
+ --defaults-file) shift; OPT_DEFT="${1}"; shift; ;;
+ -C) shift; OPT_COMP="${1}"; shift; ;;
+ -H) shift; OPT_HOST="${1}"; shift; ;;
+ -I) shift; OPT_INCR="${1}"; shift; ;;
+ -l) shift; OPT_USER="${1}"; shift; ;;
+ -L) shift; OPT_LOPA="${1}"; shift; ;;
+ -o) shift; OPT_OPER="${1}"; shift; ;;
+ -p) shift; OPT_PASS="${1}"; shift; ;;
+ -P) shift; OPT_PORT="${1}"; shift; ;;
+ -S) shift; OPT_SOCK="${1}"; shift; ;;
+ -T) shift; OPT_TRAN="${1}"; shift; ;;
+ -w) shift; OPT_WARN="${1}"; shift; ;;
+ -x) shift; OPT_VAR1="${1}"; shift; ;;
+ -y) shift; OPT_VAR2="${1}"; shift; ;;
+ --version) grep -A2 '^=head1 VERSION' "$0" | tail -n1; exit 0 ;;
+ --help) perl -00 -ne 'm/^ Usage:/ && print' "$0"; exit 0 ;;
+ -*) echo "Unknown option ${o}. Try --help."; exit 1; ;;
+ esac
+ done
+ # Set default option values
+ OPT_COMP="${OPT_COMP:->=}"
+ if [ -e '/etc/nagios/mysql.cnf' ]; then
+ OPT_DEFT="${OPT_DEFT:-/etc/nagios/mysql.cnf}"
+ fi
+ if is_not_sourced; then
+ if [ -n "$1" ]; then
+ echo "WARN spurious command-line options: $@"
+ exit 1
+ fi
+ fi
+
+ # Validate the options.
+ OPT_ERR=""
+ if [ -z "${OPT_CRIT}${OPT_WARN}" ]; then
+ OPT_ERR="you must specify either -c or -w"
+ elif [ -z "${OPT_VAR1}" ]; then
+ OPT_ERR="you must specify -x"
+ elif [ "${OPT_OPER}" -a -z "${OPT_VAR2}" ]; then
+ OPT_ERR="you specified -o but not -y"
+ elif [ "${OPT_VAR2}" -a -z "${OPT_OPER}" ]; then
+ OPT_ERR="you specified -y but not -o"
+ elif [ "${OPT_TRAN}" = 'pct' -a -z "${OPT_VAR2}" ]; then
+ OPT_ERR="you specified -T pct but not -y"
+ elif [ "${OPT_TRAN}" ]; then
+ case "${OPT_TRAN}" in
+ pct|str)
+ ;;
+ *)
+ OPT_ERR="-T must be one of: pct str"
+ ;;
+ esac
+ fi
+ case "${OPT_COMP}" in
+ '=='|'!='|'>='|'>'|'<'|'<=')
+ ;;
+ *)
+ OPT_ERR="-C must be one of: == != >= > < <="
+ ;;
+ esac
+ if [ "${OPT_OPER}" ]; then
+ case "${OPT_OPER}" in
+ /|'*'|+|-)
+ :
+ ;;
+ *)
+ OPT_ERR="-o must be one of: / * + -"
+ ;;
+ esac
+ fi
+ if [ "${OPT_ERR}" ]; then
+ echo "Error: $OPT_ERR. Try --help."
+ exit 1
+ fi
+
+ NOTE="UNK could not evaluate the expression."
+
+ # Set up a temporary file
+ local TEMP1=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ local TEMP2=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ trap "rm -f '${TEMP1}' '${TEMP2}' >/dev/null 2>&1" EXIT
+
+ if get_status_variables "${TEMP1}" "${TEMP2}" "${OPT_INCR}"; then
+ LEVEL=$(compute_result "${TEMP1}" "${OPT_VAR1}" "${OPT_OPER}" "${OPT_VAR2}" "${OPT_TRAN}")
+ if [ $? = 0 -a -n "${LEVEL}" ]; then
+ NOTE="${OPT_VAR1}${OPT_OPER:+ ${OPT_OPER}}${OPT_VAR2:+ ${OPT_VAR2}}${OPT_TRAN:+ (${OPT_TRAN})}"
+ NOTE="${NOTE} = ${LEVEL}"
+
+ # XXX Make sure this line and the "case" don't get separated.
+ compare_result "${LEVEL}" "${OPT_CRIT}" "${OPT_WARN}" "${OPT_COMP}" "${OPT_TRAN}"
+ case $? in
+ $STATE_OK)
+ NOTE="OK $NOTE"
+ ;;
+ $STATE_CRITICAL)
+ NOTE="CRIT $NOTE"
+ ;;
+ $STATE_WARNING)
+ NOTE="WARN $NOTE"
+ ;;
+ esac
+
+ # Build the common perf data output for graph trending
+ if [ "${OPT_TRAN}" = 'pct' ]; then
+ PERFDATA_MAX=100
+ fi
+ PERFDATA="${OPT_VAR1}${OPT_OPER}${OPT_VAR2}=${LEVEL};${OPT_WARN};${OPT_CRIT};0;${PERFDATA_MAX}"
+ NOTE="$NOTE | $PERFDATA"
+ fi
+ else
+ NOTE="UNK could not get MySQL status/variables."
+ fi
+
+ echo $NOTE
+}
+
+# ########################################################################
+# Execute a MySQL command.
+# ########################################################################
+mysql_exec() {
+ mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} \
+ ${OPT_LOPA:+--login-path="${OPT_LOPA}"} \
+ ${OPT_HOST:+-h"${OPT_HOST}"} ${OPT_PORT:+-P"${OPT_PORT}"} \
+ ${OPT_USER:+-u"${OPT_USER}"} ${OPT_PASS:+-p"${OPT_PASS}"} \
+ ${OPT_SOCK:+-S"${OPT_SOCK}"} -ss -e "$1"
+}
+
+# ########################################################################
+# Compares the variable to the thresholds. Arguments: VAR CRIT WARN CMP TRAN
+# Returns nothing; exits with OK/WARN/CRIT.
+# ########################################################################
+compare_result() {
+ local VAR="${1}"
+ local CRIT="${2}"
+ local WARN="${3}"
+ local CMP="${4}"
+ local TRAN="${5}"
+ echo 1 | awk "END {
+ if ( \"${CRIT}\" != \"\" ) {
+ if ( \"${TRAN}\" == \"str\" ) {
+ if ( \"${VAR}\" ${CMP} \"${CRIT:-0}\" ) {
+ exit $STATE_CRITICAL
+ }
+ } else {
+ if ( ${VAR} ${CMP} ${CRIT:-0} ) {
+ exit $STATE_CRITICAL
+ }
+ }
+ }
+ if ( \"${WARN}\" != \"\" ) {
+ if ( \"${TRAN}\" == \"str\" ) {
+ if ( \"${VAR}\" ${CMP} \"${WARN:-0}\" ) {
+ exit $STATE_WARNING
+ }
+ } else {
+ if ( ${VAR} ${CMP} ${WARN:-0} ) {
+ exit $STATE_WARNING
+ }
+ }
+ }
+ exit $STATE_OK
+ }"
+}
+
+# ########################################################################
+# Computes an expression against the file of variables. Returns a float.
+# Arguments: TEMP VAR1 OPER VAR2 TRAN
+# ########################################################################
+compute_result() {
+ local TEMP="$1"
+ local VAR1="$2"
+ local OPER="$3"
+ local VAR2="$4"
+ local TRAN="$5"
+ if [ "${VAR2}" ]; then
+ # Extract two variables, apply an operator, and possibly apply a
+ # transform.
+ awk -F'\t' "
+ BEGIN {
+ got1 = \"Could not find variable ${VAR1}\";
+ got2 = \"Could not find variable ${VAR2}\";
+ }
+ \$1 == \"${VAR1}\" {
+ var1 = \$2;
+ got1 = \"\";
+ }
+ \$1 == \"${VAR2}\" {
+ var2 = \$2;
+ got2 = \"\";
+ }
+ END {
+ if ( got1 == \"\" && got2 == \"\" ) {
+ if ( var2 == 0 && \"${OPER}\" == \"/\" ) {
+ # Divide-by-zero; make the result simply 0
+ val = 0;
+ }
+ else {
+ val = var1 ${OPER} var2;
+ }
+ if ( \"${TRAN}\" == \"pct\" ) {
+ val = val * 100;
+ }
+ if ( val ~ /\.[0-9]/ ) {
+ printf \"%.6f\\n\", val;
+ }
+ else {
+ print val;
+ }
+ }
+ else {
+ print got1, got2 | \"cat 1>&2\";
+ exit 1;
+ }
+ }
+ " "${TEMP}"
+ else
+ # This is the simplest case. We're just extracting a single variable and
+ # returning it.
+ awk -F'\t' -v var1="${VAR1}" '
+ BEGIN {
+ got = 0;
+ }
+ $1 == var1 {
+ val = $2;
+ got = 1;
+ }
+ END {
+ if ( got == 1 ) {
+ print val;
+ }
+ else {
+ print "Unknown variable", var1 | "cat 1>&2";
+ exit 1;
+ }
+ }
+ ' "${TEMP}"
+ fi
+}
+
+# ########################################################################
+# Gets status variables. The first argument is the file to store the results.
+# Optional second argument is another temp file.
+# Optional third argument makes SHOW STATUS incremental/relative, and has the
+# added effect of filtering out non-numeric variables.
+# ########################################################################
+get_status_variables() {
+ if [ "$3" ]; then
+ mysql_exec "SHOW /*!50000 GLOBAL*/ STATUS" > "${2}" || exit 1
+ sleep "$3"
+ # Technically we ought to use another temp file, and check the return
+ # status of this mysql_exec, but if the first one worked it's likely that
+ # this one will too.
+ mysql_exec "SHOW /*!50000 GLOBAL*/ STATUS" | cat "${2}" - \
+ | awk -F'\t' '
+ /Aborted_clients/ { seen++; }
+ {
+ if ( seen > 1 && $2 !~ /[^0-9.]/ ) {
+ print $1 "\t" $2 - var[$1];
+ }
+ else {
+ var[$1] = $2;
+ }
+ }
+ ' > "${1}"
+ else
+ mysql_exec "SHOW /*!50000 GLOBAL*/ STATUS" > "${1}" || exit 1
+ fi
+ mysql_exec "SHOW /*!40101 GLOBAL*/ VARIABLES" >> "${1}"
+}
+
+# ########################################################################
+# Determine whether this program is being executed directly, or sourced/included
+# from another file.
+# ########################################################################
+is_not_sourced() {
+ [ "${0##*/}" = "pmp-check-mysql-status" ] || [ "${0##*/}" = "bash" -a "$_" = "$0" ]
+}
+
+# ########################################################################
+# Execute the program if it was not included from another file.
+# This makes it possible to include without executing, and thus test.
+# ########################################################################
+if is_not_sourced; then
+ OUTPUT=$(main "$@")
+ EXITSTATUS=$STATE_UNKNOWN
+ case "${OUTPUT}" in
+ UNK*) EXITSTATUS=$STATE_UNKNOWN; ;;
+ OK*) EXITSTATUS=$STATE_OK; ;;
+ WARN*) EXITSTATUS=$STATE_WARNING; ;;
+ CRIT*) EXITSTATUS=$STATE_CRITICAL; ;;
+ esac
+ echo "${OUTPUT}"
+ exit $EXITSTATUS
+fi
+
+# ############################################################################
+# Documentation
+# ############################################################################
+: <<'DOCUMENTATION'
+=pod
+
+=head1 NAME
+
+pmp-check-mysql-status - Check MySQL SHOW GLOBAL STATUS output.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-mysql-status [OPTIONS]
+ Options:
+ -c CRIT Critical threshold.
+ --defaults-file FILE Only read mysql options from the given file.
+ Defaults to /etc/nagios/mysql.cnf if it exists.
+ -C COMPARE Comparison operator to apply to -c and -w.
+ Possible values: == != >= > < <=. Default >=.
+ -H HOST MySQL hostname.
+ -I INCR Make SHOW STATUS incremental over this delay.
+ -l USER MySQL username.
+ -L LOGIN-PATH Use login-path to access MySQL (with MySQL client 5.6).
+ -o OPERATOR The operator to apply to -x and -y.
+ -p PASS MySQL password.
+ -P PORT MySQL port.
+ -S SOCKET MySQL socket file.
+ -T TRANS Transformation to apply before comparing to -c and -w.
+ Possible values: pct str.
+ -w WARN Warning threshold.
+ -x VAR1 Required first status or configuration variable.
+ -y VAR2 Optional second status or configuration variable.
+ --help Print help and exit.
+ --version Print version and exit.
+ Options must be given as --option value, not --option=value or -Ovalue.
+ Use perldoc to read embedded documentation with more details.
+
+=head1 DESCRIPTION
+
+This Nagios plugin captures SHOW GLOBAL STATUS and SHOW GLOBAL VARIABLES from
+MySQL and evaluates expressions against them. The general syntax is as follows:
+
+ VAR1 [ OPERATOR VAR2 [ TRANSFORM ] ]
+
+The result of evaluating this is compared against the -w and -c options as usual
+to determine whether to raise a warning or critical alert.
+
+Note that all of the examples provided below are simply for illustrative
+purposes and are not supposed to be recommendations for what to monitor. You
+should get advice from a professional if you are not sure what you should be
+monitoring.
+
+For our first example, we will raise a warning if Threads_running is 20 or over,
+and a critical alert if it is 40 or over:
+
+ -x Threads_running -w 20 -c 40
+
+The threshold is implemented as greater-or-equals by default, not strictly
+greater-than, so a value of 20 is a warning and a value of 40 is critical. You
+can switch this to less-or-equals or other operators with the -C option, which
+accepts the arithmetic comparison operators ==, !=, >, >=, <, and <=.
+
+You can use any variable that is present in SHOW VARIABLES or SHOW STATUS. If
+the variable is not found, there is an error. To warn if Threads_connected
+exceeds 80% of max_connections:
+
+ -x Threads_connected -o / -y max_connections -T pct -w 80
+
+The -T C<pct> option only works when you specify both -x and -y and implements
+percentage transformation. The plugin uses awk to do its
+computations and comparisons, so you can use floating-point math; you are not
+restricted to integers for comparisons. Floating-point numbers are printed with
+six digits of precision. The -o option accepts the arithmetic operators /, *,
++, and -. A division by zero results in zero, not an error.
+
+If you specify the -I option with an integer argument, the SHOW STATUS values
+become incremental instead of absolute. The argument is used as a delay in
+seconds, and instead of capturing a single sample of SHOW STATUS and using it
+for computations, the plugin captures two samples at the specified interval and
+subtracts the second from the first. This lets you evaluate expressions over a
+range of time. For example, to warn when there are 10 disk-based temporary
+tables per second, over a 5-second sampling period:
+
+ -x Created_tmp_disk_tables -o / -y Uptime -I 5 -w 10
+
+That is somewhat contrived, because it could also be written as follows:
+
+ -x Created_tmp_disk_tables -I 5 -w 50
+
+The -I option has the side effect of removing any non-numeric SHOW STATUS
+variables. Be careful not to set the -I option too large, or Nagios will simply
+time the plugin out, usually after about 10 seconds.
+
+This plugin does not support arbitrarily complex expressions, such as computing
+the query cache hit ratio and alerting if it is less than some percentage. If
+you are trying to do that, you might be doing it wrong. A dubious example for
+the query cache might be to alert if the hit-to-insert ratio falls below 2:1, as
+follows:
+
+ -x Qcache_hits -o / -y Qcache_inserts -C '<' -w 2
+
+Some people might suggest that the following is a more useful alert for the
+query cache:
+
+ -x query_cache_size -c 1
+
+To check Percona XtraDB Cluster node status you may want to use the following
+alert similar to what its clustercheck does:
+
+ -x wsrep_local_state -C '!=' -w 4
+
+To compare string variables use -T C<str> transformation. This is required as
+numeric and string comparisons are handled differently. The following example
+warns when the slave_exec_mode is IDEMPOTENT:
+
+ -x slave_exec_mode -C '==' -T str -w IDEMPOTENT
+
+=head1 PRIVILEGES
+
+This plugin executes the following commands against MySQL:
+
+=over
+
+=item *
+
+C<SHOW STATUS>.
+
+=item *
+
+C<SHOW VARIABLES>.
+
+=back
+
+This plugin executes no UNIX commands that may need special privileges.
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2012-$CURRENT_YEAR$ Baron Schwartz, 2012-$CURRENT_YEAR$ Percona Inc.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-mysql-status $VERSION$
+
+=cut
+
+DOCUMENTATION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-ts-count b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-ts-count
new file mode 100755
index 0000000..06ea3f4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-mysql-ts-count
@@ -0,0 +1,210 @@
+#!/bin/sh
+
+# ########################################################################
+# This program is part of $PROJECT_NAME$
+# License: GPL License (see COPYING)
+# Authors:
+# Baron Schwartz, Ben Mildren
+# Depends-on: table with ts column, e.g. table written by pt-deadlock-logger
+# ########################################################################
+
+# ########################################################################
+# Redirect STDERR to STDOUT; Nagios doesn't handle STDERR.
+# ########################################################################
+exec 2>&1
+
+# ########################################################################
+# Set up constants, etc.
+# ########################################################################
+STATE_OK=0
+STATE_OK=0
+STATE_WARNING=1
+STATE_CRITICAL=2
+STATE_UNKNOWN=3
+STATE_DEPENDENT=4
+
+# ########################################################################
+# Run the program.
+# ########################################################################
+main() {
+ # Get options
+ for o; do
+ case "${o}" in
+ -c) shift; OPT_CRIT="${1}"; shift; ;;
+ --defaults-file) shift; OPT_DEFT="${1}"; shift; ;;
+ -H) shift; OPT_HOST="${1}"; shift; ;;
+ -i) shift; OPT_INTERVAL="${1}"; shift; ;;
+ -l) shift; OPT_USER="${1}"; shift; ;;
+ -L) shift; OPT_LOPA="${1}"; shift; ;;
+ -p) shift; OPT_PASS="${1}"; shift; ;;
+ -P) shift; OPT_PORT="${1}"; shift; ;;
+ -S) shift; OPT_SOCK="${1}"; shift; ;;
+ -t) shift; OPT_TIMESTAMP="${1}"; shift; ;;
+ -T) shift; OPT_TABLE="${1}"; shift; ;;
+ -w) shift; OPT_WARN="${1}"; shift; ;;
+ -x) shift; OPT_TARGET="${1}"; shift; ;;
+ --version) grep -A2 '^=head1 VERSION' "$0" | tail -n1; exit 0 ;;
+ --help) perl -00 -ne 'm/^ Usage:/ && print' "$0"; exit 0 ;;
+ -*) echo "Unknown option ${o}. Try --help."; exit 1; ;;
+ esac
+ done
+ OPT_WARN=${OPT_WARN:-12}
+ OPT_CRIT=${OPT_CRIT:-60}
+ OPT_INTERVAL=${OPT_INTERVAL:-1}
+ OPT_TARGET="${OPT_TARGET:-deadlocks}"
+ if [ -e '/etc/nagios/mysql.cnf' ]; then
+ OPT_DEFT="${OPT_DEFT:-/etc/nagios/mysql.cnf}"
+ fi
+ if is_not_sourced; then
+ if [ -n "$1" ]; then
+ echo "WARN spurious command-line options: $@"
+ exit 1
+ fi
+ fi
+ if [ "${OPT_TARGET}" == "kills" ]; then
+ OPT_TABLE="${OPT_TABLE:-percona.kill_log}"
+ OPT_TIMESTAMP="${OPT_TIMESTAMP:-timestamp}"
+ elif [ "${OPT_TARGET}" == "fkerrors" ]; then
+ OPT_TABLE="${OPT_TABLE:-percona.foreign_key_errors}"
+ OPT_TIMESTAMP="${OPT_TIMESTAMP:-ts}"
+ else
+ OPT_TABLE="${OPT_TABLE:-percona.deadlocks}"
+ OPT_TIMESTAMP="${OPT_TIMESTAMP:-ts}"
+ fi
+
+ LEVEL=$(mysql_exec "SELECT COUNT(*) FROM ${OPT_TABLE} WHERE ${OPT_TIMESTAMP} >= NOW() - INTERVAL ${OPT_INTERVAL}*60 SECOND")
+ if [ $? = 0 ]; then
+ NOTE="${LEVEL:-UNKNOWN} ${OPT_TARGET} in last ${OPT_INTERVAL} minutes"
+ if [ "${LEVEL:-0}" -gt "${OPT_CRIT}" ]; then
+ NOTE="CRIT $NOTE"
+ elif [ "${LEVEL:-0}" -gt "${OPT_WARN}" ]; then
+ NOTE="WARN $NOTE"
+ else
+ NOTE="OK $NOTE"
+ fi
+
+ # Build the common perf data output for graph trending
+ PERFDATA="${OPT_TARGET}=${LEVEL:-0};${OPT_WARN};${OPT_CRIT};0;"
+ NOTE="$NOTE | $PERFDATA"
+ else
+ NOTE="UNK could not count ${OPT_TARGET}"
+ fi
+ echo $NOTE
+}
+
+# ########################################################################
+# Execute a MySQL command.
+# ########################################################################
+mysql_exec() {
+ mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} \
+ ${OPT_LOPA:+--login-path="${OPT_LOPA}"} \
+ ${OPT_HOST:+-h"${OPT_HOST}"} ${OPT_PORT:+-P"${OPT_PORT}"} \
+ ${OPT_USER:+-u"${OPT_USER}"} ${OPT_PASS:+-p"${OPT_PASS}"} \
+ ${OPT_SOCK:+-S"${OPT_SOCK}"} -ss -e "$1"
+}
+
+# ########################################################################
+# Determine whether this program is being executed directly, or sourced/included
+# from another file.
+# ########################################################################
+is_not_sourced() {
+ [ "${0##*/}" = "pmp-check-mysql-ts-count" ] || [ "${0##*/}" = "bash" -a "$_" = "$0" ]
+}
+
+# ########################################################################
+# Execute the program if it was not included from another file.
+# This makes it possible to include without executing, and thus test.
+# ########################################################################
+if is_not_sourced; then
+ OUTPUT=$(main "$@")
+ EXITSTATUS=$STATE_UNKNOWN
+ case "${OUTPUT}" in
+ UNK*) EXITSTATUS=$STATE_UNKNOWN; ;;
+ OK*) EXITSTATUS=$STATE_OK; ;;
+ WARN*) EXITSTATUS=$STATE_WARNING; ;;
+ CRIT*) EXITSTATUS=$STATE_CRITICAL; ;;
+ esac
+ echo "${OUTPUT}"
+ exit $EXITSTATUS
+fi
+
+# ############################################################################
+# Documentation
+# ############################################################################
+: <<'DOCUMENTATION'
+=pod
+
+=head1 NAME
+
+pmp-check-mysql-ts-count - Generic alert based on pmp-check-mysql-deadlocks to count number of rows written in the last interval.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-mysql-ts-count [OPTIONS]
+ Options:
+ -c CRIT Critical threshold; default 60.
+ --defaults-file FILE Only read mysql options from the given file.
+ Defaults to /etc/nagios/mysql.cnf if it exists.
+ -H HOST MySQL hostname.
+ -i INTERVAL Interval over which to count, in minutes; default 1.
+ -l USER MySQL username.
+ -L LOGIN-PATH Use login-path to access MySQL (with MySQL client 5.6).
+ -p PASS MySQL password.
+ -P PORT MySQL port.
+ -S SOCKET MySQL socket file.
+ -t TIMESTAMP The name of the timestamp column to be monitored; default ts.
+ -T TABLE The database.table to be monitored; default percona.deadlocks.
+ -w WARN Warning threshold; default 12.
+ -x TARGET Metric monitored; default deadlocks.
+ Other options: kills, fkerrors.
+ --help Print help and exit.
+ --version Print version and exit.
+ Options must be given as --option value, not --option=value or -Ovalue.
+ Use perldoc to read embedded documentation with more details.
+
+=head1 DESCRIPTION
+
+This Nagios plugin looks at a table and counts the number of rows since the
+last interval, and alerts if this exceeds the threshold. This could be the
+table referenced by pt-deadlock-logger, pt-kill, pt-fk-error-logger, or a
+custom table supplied.
+Default behaviour is the same as pmp-check-mysql-deadlocks, can also specify
+target to be C<kills> or C<fkerrors> to monitor default tables created by pt-kill
+or pt-fk-error-logger respectively, or supply custom metric and table.
+
+=head1 PRIVILEGES
+
+This plugin executes the following commands against MySQL:
+
+=over
+
+=item *
+
+C<SELECT> from the supplied table.
+
+=back
+
+This plugin executes no UNIX commands that may need special privileges.
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2012-$CURRENT_YEAR$ Baron Schwartz, 2012-$CURRENT_YEAR$ Percona Inc.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-mysql-ts-count $VERSION$
+
+=cut
+
+DOCUMENTATION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-pt-table-checksum b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-pt-table-checksum
new file mode 100755
index 0000000..f8df9b8
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-pt-table-checksum
@@ -0,0 +1,239 @@
+#!/bin/bash
+
+# ########################################################################
+# This program is part of $PROJECT_NAME$
+# License: GPL License (see COPYING)
+# Authors:
+# Baron Schwartz, Roman Vynar
+# ########################################################################
+
+# ########################################################################
+# Redirect STDERR to STDOUT; Nagios doesn't handle STDERR.
+# ########################################################################
+exec 2>&1
+
+# ########################################################################
+# Set up constants, etc.
+# ########################################################################
+STATE_OK=0
+STATE_WARNING=1
+STATE_CRITICAL=2
+STATE_UNKNOWN=3
+STATE_DEPENDENT=4
+
+# ########################################################################
+# Run the program.
+# ########################################################################
+main() {
+ # Get options
+ for o; do
+ case "${o}" in
+ -c) shift; OPT_CRIT="${1}"; shift; ;;
+ --defaults-file) shift; OPT_DEFT="${1}"; shift; ;;
+ -H) shift; OPT_HOST="${1}"; shift; ;;
+ -i) shift; OPT_INTERVAL="${1}"; shift; ;;
+ -l) shift; OPT_USER="${1}"; shift; ;;
+ -L) shift; OPT_LOPA="${1}"; shift; ;;
+ -p) shift; OPT_PASS="${1}"; shift; ;;
+ -P) shift; OPT_PORT="${1}"; shift; ;;
+ -S) shift; OPT_SOCK="${1}"; shift; ;;
+ -T) shift; OPT_TABLE="${1}"; shift; ;;
+ -w) shift; OPT_WARN="${1}"; shift; ;;
+ --version) grep -A2 '^=head1 VERSION' "$0" | tail -n1; exit 0 ;;
+ --help) perl -00 -ne 'm/^ Usage:/ && print' "$0"; exit 0 ;;
+ -*) echo "Unknown option ${o}. Try --help."; exit 1; ;;
+ esac
+ done
+ OPT_INTERVAL=${OPT_INTERVAL:-0}
+ OPT_TABLE="${OPT_TABLE:-percona.checksums}"
+ if [ -e '/etc/nagios/mysql.cnf' ]; then
+ OPT_DEFT="${OPT_DEFT:-/etc/nagios/mysql.cnf}"
+ fi
+ if is_not_sourced; then
+ if [ -n "$1" ]; then
+ echo "WARN spurious command-line options: $@"
+ exit 1
+ fi
+ fi
+
+ NOTE="UNK couldn't query the checksum table"
+
+ # Set up a temp file to hold error messages from MySQL.
+ TEMP=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ trap "rm -f '${TEMP}' >/dev/null 2>&1" EXIT
+
+ # Get the query from the documentation and execute it.
+ SQL=$(get_magic_query "${0}" checksum_diff_query)
+ PROBLEMS=$(mysql_exec "${SQL/CHECKSUM_TABLE/${OPT_TABLE}}" 2>"${TEMP}")
+ if [ $? = 0 ]; then
+ if [ "${PROBLEMS}" ]; then
+ NOTE="pt-table-checksum found ${PROBLEMS}"
+ if [ "${OPT_CRIT}" ]; then
+ NOTE="CRIT $NOTE"
+ else
+ NOTE="WARN $NOTE"
+ fi
+ else
+ NOTE="OK pt-table-checksum found no out-of-sync tables"
+ if [ "${OPT_INTERVAL}" -gt 0 ]; then
+ RECENT_CHUNKS=$(mysql_exec "SELECT IF(COALESCE(MAX(ts), NOW()) > NOW() - INTERVAL ${OPT_INTERVAL} DAY, 1, 0) FROM ${OPT_TABLE}")
+ if [ "${RECENT_CHUNKS}" = 0 ]; then
+ NOTE="pt-table-checksum was not run over last ${OPT_INTERVAL} days"
+ if [ "${OPT_CRIT}" ]; then
+ NOTE="CRIT $NOTE"
+ else
+ NOTE="WARN $NOTE"
+ fi
+ fi
+ fi
+ fi
+ else
+ if grep "Table '${OPT_TABLE}' doesn't exist" "${TEMP}" >/dev/null 2>&1; then
+ NOTE="UNK table '${OPT_TABLE}' doesn't exist"
+ fi
+ fi
+ echo $NOTE
+}
+
+# ########################################################################
+# Execute a MySQL command.
+# ########################################################################
+mysql_exec() {
+ mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} \
+ ${OPT_LOPA:+--login-path="${OPT_LOPA}"} \
+ ${OPT_HOST:+-h"${OPT_HOST}"} ${OPT_PORT:+-P"${OPT_PORT}"} \
+ ${OPT_USER:+-u"${OPT_USER}"} ${OPT_PASS:+-p"${OPT_PASS}"} \
+ ${OPT_SOCK:+-S"${OPT_SOCK}"} -ss -e "$1"
+}
+
+# ########################################################################
+# Retrieve a paragraph from the given file, which includes MAGIC_$2 as a
+# pattern.
+# ########################################################################
+get_magic_query() {
+ perl -00 -ne"m/MAGIC_$2/ && print" "$1"
+}
+
+# ########################################################################
+# Determine whether this program is being executed directly, or sourced/included
+# from another file.
+# ########################################################################
+is_not_sourced() {
+ [ "${0##*/}" = "pmp-check-pt-table-checksum" ] || [ "${0##*/}" = "bash" -a "$_" = "$0" ]
+}
+
+# ########################################################################
+# Execute the program if it was not included from another file.
+# This makes it possible to include without executing, and thus test.
+# ########################################################################
+if is_not_sourced; then
+ OUTPUT=$(main "$@")
+ EXITSTATUS=$STATE_UNKNOWN
+ case "${OUTPUT}" in
+ UNK*) EXITSTATUS=$STATE_UNKNOWN; ;;
+ OK*) EXITSTATUS=$STATE_OK; ;;
+ WARN*) EXITSTATUS=$STATE_WARNING; ;;
+ CRIT*) EXITSTATUS=$STATE_CRITICAL; ;;
+ esac
+ echo "${OUTPUT}"
+ exit $EXITSTATUS
+fi
+
+# ############################################################################
+# Documentation
+# ############################################################################
+: <<'DOCUMENTATION'
+=pod
+
+=head1 NAME
+
+pmp-check-pt-table-checksum - Alert when pt-table-checksum finds data differences on a replica.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-pt-table-checksum [OPTIONS]
+ Options:
+ -c CRIT Raise a critical error instead of a warning.
+ --defaults-file FILE Only read mysql options from the given file.
+ Defaults to /etc/nagios/mysql.cnf if it exists.
+ -H HOST MySQL hostname.
+ -l USER MySQL username.
+ -L LOGIN-PATH Use login-path to access MySQL (with MySQL client 5.6).
+ -p PASS MySQL password.
+ -P PORT MySQL port.
+ -S SOCKET MySQL socket file.
+ -i INTERVAL Interval over which to ensure pt-table-checksum was run,
+ in days; default - not to check.
+ -T TABLE The checksum table; default percona.checksums
+ -w WARN Warning threshold; ignored.
+ --help Print help and exit.
+ --version Print version and exit.
+ Options must be given as --option value, not --option=value or -Ovalue.
+ Use perldoc to read embedded documentation with more details.
+
+=head1 DESCRIPTION
+
+This Nagios plugin examines whether MySQL replication has drifted out of sync
+with the master's data, according to checks performed by the pt-table-checksum
+tool in Percona Toolkit. It uses the following query to determine whether the
+server's data matches its master's:
+
+ SELECT /* MAGIC_checksum_diff_query */
+ CONCAT(
+ COUNT(*),
+ ' chunks differ in ',
+ COUNT(DISTINCT CONCAT(db, tbl)),
+ ' tables, including ',
+ MIN(CONCAT(db, '.', tbl)))
+ FROM CHECKSUM_TABLE
+ WHERE master_cnt <> this_cnt OR master_crc <> this_crc
+ OR ISNULL(master_crc) <> ISNULL(this_crc)
+ HAVING COUNT(*) > 0
+
+The word CHECKSUM_TABLE is replaced by the value of the -T option. If the table
+specified by -T does not exist, unknown is raised.
+
+Optionally, you can specify an interval in days over which to ensure pt-table-checksum
+was run. It is useful in cases when the cron job doing the checksumming suddenly
+stopped working. This option will have an effect when no diffs are found and the
+checksum table is not empty.
+
+Alerts are raised at a WARNING level by default, but specifying the -c option
+with any value will change this to CRITICAL instead.
+
+=head1 PRIVILEGES
+
+This plugin executes the following commands against MySQL:
+
+=over
+
+=item *
+
+C<SELECT> against the specified table.
+
+=back
+
+This plugin executes no UNIX commands that may need special privileges.
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2012-$CURRENT_YEAR$ Baron Schwartz, 2012-$CURRENT_YEAR$ Percona Inc.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-pt-table-checksum $VERSION$
+
+=cut
+
+DOCUMENTATION
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-unix-memory b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-unix-memory
new file mode 100755
index 0000000..a9a3fdc
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/percona-nagios-plugins/nagios/bin/pmp-check-unix-memory
@@ -0,0 +1,207 @@
+#!/bin/sh
+
+# ########################################################################
+# This program is part of $PROJECT_NAME$
+# License: GPL License (see COPYING)
+# Authors:
+# Baron Schwartz, Roman Vynar
+# ########################################################################
+
+# ########################################################################
+# Redirect STDERR to STDOUT; Nagios doesn't handle STDERR.
+# ########################################################################
+exec 2>&1
+
+# ########################################################################
+# Set up constants, etc.
+# ########################################################################
+STATE_OK=0
+STATE_WARNING=1
+STATE_CRITICAL=2
+STATE_UNKNOWN=3
+STATE_DEPENDENT=4
+
+# ########################################################################
+# Run the program.
+# ########################################################################
+main() {
+
+ # Get options
+ for o; do
+ case "${o}" in
+ -w) shift; OPT_WARN="${1}"; shift; ;;
+ -d) shift; ;; # left for backward-compatibility
+ -c) shift; OPT_CRIT="${1}"; shift; ;;
+ --version) grep -A2 '^=head1 VERSION' "$0" | tail -n1; exit 0 ;;
+ --help) perl -00 -ne 'm/^ Usage:/ && print' "$0"; exit 0 ;;
+ -*) echo "Unknown option ${o}. Try --help."; exit 1; ;;
+ esac
+ done
+ OPT_WARN=${OPT_WARN:-90}
+ OPT_CRIT=${OPT_CRIT:-95}
+ if is_not_sourced; then
+ if [ -n "$1" ]; then
+ echo "WARN spurious command-line options: $@"
+ exit 1
+ fi
+ fi
+
+ NOTE="UNK cannot find memory statistics"
+ TEMP=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
+ trap "rm -f '${TEMP}' >/dev/null 2>&1" EXIT
+ if [ -e /proc/meminfo ] && cat /proc/meminfo > "${TEMP}" ; then
+ USD_PCT=$(get_used_memory_linux "${TEMP}")
+ elif which sysctl > /dev/null && sysctl -a > "${TEMP}" ; then
+ USD_PCT=$(get_used_memory_bsd "${TEMP}")
+ else
+ echo $NOTE
+ exit
+ fi
+
+ NOTE="Memory ${USD_PCT}% used"
+ if [ "${USD_PCT:-0}" -ge "${OPT_CRIT}" ]; then
+ NOTE="CRIT $NOTE. $(get_largest_process)"
+ elif [ "${USD_PCT:-0}" -ge "${OPT_WARN}" ]; then
+ NOTE="WARN $NOTE. $(get_largest_process)"
+ else
+ NOTE="OK $NOTE"
+ fi
+
+ # Build the common perf data output for graph trending
+ PERFDATA="memory_used=${USD_PCT:-0};${OPT_WARN};${OPT_CRIT};0;100"
+ echo "$NOTE | $PERFDATA"
+}
+
+# ########################################################################
+# Find the largest process
+# ########################################################################
+get_largest_process () {
+ ALL_PROCS=$(ps axo pid,%mem,ucomm | sort -k2 -nr)
+ BIGGEST=$(echo $ALL_PROCS | head -n 1)
+ BIG_PID=$(echo $BIGGEST | cut -d' ' -f1)
+ BIG_MEM=$(echo $BIGGEST | cut -d' ' -f2)
+ BIG_COMMAND=$(echo $BIGGEST | cut -d' ' -f3)
+ echo "Largest process: ${BIG_COMMAND} (${BIG_PID}) = ${BIG_MEM}%"
+}
+
+# ########################################################################
+# Get the used memory from /proc/meminfo
+# Consider MemAvailable if available in the file (starting procps-ng 3.3.10).
+# See https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773
+# ########################################################################
+get_used_memory_linux() {
+awk '/^MemTotal:/ {total = $2;}
+ /^MemFree:/ {free = $2;}
+ /^MemAvailable:/ {avail = $2;}
+ /^Buffers:/ {buffers = $2;}
+ /^Cached:/ {cached = $2;
+ if (avail == "") avail = free + buffers + cached;
+ printf "%d\n", (total - avail) / total * 100;}' "$1"
+}
+# ########################################################################
+# Get the used memory from sysctl for BSD systems
+# ########################################################################
+get_used_memory_bsd() {
+ awk '/vm.stats.vm.v_cache_count:/ {cache = $2}
+ /vm.stats.vm.v_inactive_count:/ {inactive = $2}
+ /vm.stats.vm.v_free_count:/ {free = $2}
+ /vm.stats.vm.v_page_count:/ {
+ total = $2;
+ used = total - inactive - cache - free;
+ printf "%d\n", used / total * 100}' "$1"
+}
+
+# ########################################################################
+# Determine whether this program is being executed directly, or sourced/included
+# from another file.
+# ########################################################################
+is_not_sourced() {
+ [ "${0##*/}" = "pmp-check-unix-memory" ] || [ "${0##*/}" = "bash" -a "$_" = "$0" ]
+}
+
+# ########################################################################
+# Execute the program if it was not included from another file.
+# This makes it possible to include without executing, and thus test.
+# ########################################################################
+if is_not_sourced; then
+ OUTPUT=$(main "$@")
+ EXITSTATUS=$STATE_UNKNOWN
+ case "${OUTPUT}" in
+ UNK*) EXITSTATUS=$STATE_UNKNOWN; ;;
+ OK*) EXITSTATUS=$STATE_OK; ;;
+ WARN*) EXITSTATUS=$STATE_WARNING; ;;
+ CRIT*) EXITSTATUS=$STATE_CRITICAL; ;;
+ esac
+ echo "${OUTPUT}"
+ exit $EXITSTATUS
+fi
+
+# ############################################################################
+# Documentation
+# ############################################################################
+: <<'DOCUMENTATION'
+=pod
+
+=head1 NAME
+
+pmp-check-unix-memory - Alert on low memory.
+
+=head1 SYNOPSIS
+
+ Usage: pmp-check-unix-memory [OPTIONS]
+ Options:
+ -c CRIT Critical threshold; default 95%.
+ -w WARN Warning threshold; default 90%.
+ --help Print help and exit.
+ --version Print version and exit.
+ Options must be given as --option value, not --option=value or -Ovalue.
+ Use perldoc to read embedded documentation with more details.
+
+=head1 DESCRIPTION
+
+This Nagios plugin examines C</proc/meminfo> (Linux) or the output of C<sysctl> (BSD)
+to check whether the system is running out of memory and finds the largest
+process in memory from C<ps> output.
+
+The plugin is tested on GNU/Linux and FreeBSD.
+
+=head1 PRIVILEGES
+
+This plugin does not access MySQL.
+
+This plugin executes the following UNIX commands that may need special privileges:
+
+=over
+
+=item *
+
+cat /proc/meminfo (Linux), sysctl (BSD)
+
+=item *
+
+ps
+
+=back
+
+=head1 COPYRIGHT, LICENSE, AND WARRANTY
+
+This program is copyright 2012-$CURRENT_YEAR$ Baron Schwartz, 2012-$CURRENT_YEAR$ Percona Inc.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2. You should have received a copy of the GNU General
+Public License along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+=head1 VERSION
+
+$PROJECT_NAME$ pmp-check-unix-memory $VERSION$
+
+=cut
+
+DOCUMENTATION