summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-03 20:05:44 +0100
committerSam James <sam@gentoo.org>2021-04-03 20:52:48 +0100
commitdc5f5393bd2a32529396f2707c17d3607c62bab9 (patch)
tree8d1b7cecb5621d556acc2f8559400cf425ae00db /net-analyzer/nagios-plugin-check_raid/nagios-plugin-check_raid-4.0.10-r1.ebuild
parentnet-analyzer/tsung: eutils-- (diff)
downloadgentoo-dc5f5393bd2a32529396f2707c17d3607c62bab9.tar.gz
gentoo-dc5f5393bd2a32529396f2707c17d3607c62bab9.tar.bz2
gentoo-dc5f5393bd2a32529396f2707c17d3607c62bab9.zip
net-analyzer/nagios-plugin-check_raid: eutils--, missing dies
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer/nagios-plugin-check_raid/nagios-plugin-check_raid-4.0.10-r1.ebuild')
-rw-r--r--net-analyzer/nagios-plugin-check_raid/nagios-plugin-check_raid-4.0.10-r1.ebuild66
1 files changed, 66 insertions, 0 deletions
diff --git a/net-analyzer/nagios-plugin-check_raid/nagios-plugin-check_raid-4.0.10-r1.ebuild b/net-analyzer/nagios-plugin-check_raid/nagios-plugin-check_raid-4.0.10-r1.ebuild
new file mode 100644
index 000000000000..a7b1bfc31c27
--- /dev/null
+++ b/net-analyzer/nagios-plugin-check_raid/nagios-plugin-check_raid-4.0.10-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit perl-module
+
+DESCRIPTION="Nagios/Icinga plugin to check current server's RAID status"
+HOMEPAGE="https://github.com/glensc/nagios-plugin-check_raid"
+#COMMIT=""
+MY_PV="${COMMIT:-${PV}}"
+MY_P="${PN}-${MY_PV}"
+SRC_URI="https://github.com/glensc/nagios-plugin-check_raid/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE="3ware aacraid dmraid hpa hpsa megaraid-sas megaraid-scsi mpt mpt-sas2"
+
+DEPEND="dev-perl/Monitoring-Plugin
+ dev-perl/Module-Pluggable"
+RDEPEND="${DEPEND}
+ sys-apps/smartmontools
+ sys-fs/lsscsi
+ 3ware? ( sys-block/tw_cli )
+ aacraid? ( sys-block/arcconf )
+ dmraid? ( sys-fs/dmraid )
+ hpa? ( sys-block/hpacucli )
+ hpsa? ( sys-apps/cciss_vol_status )
+ megaraid-sas? ( sys-block/megacli )
+ megaraid-scsi? ( sys-block/megarc )
+ mpt-sas2? ( sys-block/sas2ircu )
+ mpt? ( sys-block/mpt-status )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ # Upstream has a custom Makefile that is meant to build bundles.
+ mv -f Makefile Makefile.upstream || die
+ sed -i '/CPANfile/d' Makefile.PL || die
+ default
+}
+
+src_install() {
+ default
+ plugindir="/usr/$(get_libdir)/nagios/plugins"
+ dodir "${plugindir}"
+ mv -f "${ED}"/usr/bin/check_raid.pl "${ED}"/"${plugindir}" || die
+ dodoc README.md CHANGELOG.md CONTRIBUTING.md check_raid.cfg
+}
+
+pkg_postinst() {
+ einfo "The following RAID controllers are supported without special tools:"
+ einfo "GDT (Intel/ICP) RAID Controller"
+ einfo "HP MSA (special configuration needed)"
+ einfo "The following RAID controllers do not have tools packaged in Gentoo, but ARE supported by this tool:"
+ einfo "Intel: CmdTool2"
+ einfo "Areca: areca-cli"
+ einfo "See https://github.com/glensc/nagios-plugin-check_raid/issues/10"
+ einfo "Marvell RAID: mvcli"
+ einfo "See https://github.com/glensc/nagios-plugin-check_raid/issues/92"
+ einfo "Adaptec ServeRAID: aaccli"
+ einfo "Adaptec AACRAID: afacli (* some controllers supported by USE=aacraid, sys-block/arcconf)"
+ einfo "Adaptec ServeRAID 7k: ipssend"
+}