summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Hesse2015-06-29 09:38:02 +0200
committerChristian Hesse2015-06-29 09:38:02 +0200
commit9733a1b54d1e5cd198f983e5c2cc5b689cdd60b4 (patch)
treeac1c8f69cd447fe9d49bf8862a57f581a830f6dd
downloadaur-9733a1b54d1e5cd198f983e5c2cc5b689cdd60b4.tar.gz
initial import of check_ipmi_sensor 3.3-4
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD36
-rw-r--r--localhost.patch34
-rw-r--r--sudo1
4 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f4faca77577
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = check_ipmi_sensor
+ pkgdesc = IPMI Sensor Monitoring Plugin
+ pkgver = 3.3
+ pkgrel = 4
+ url = http://exchange.nagios.org/directory/Plugins/Hardware/Server-Hardware/IPMI-Sensor-Monitoring-Plugin/details
+ arch = any
+ license = GPL
+ depends = nagios
+ depends = freeipmi
+ depends = perl-ipc-run
+ optdepends = sudo: check localhost without authentication
+ source = check_ipmi_sensor-3.3.tar.gz::http://git.thomas-krenn.com/?p=check_ipmi_sensor_v3.git;a=snapshot;h=refs/tags/v3.3;sf=tgz
+ source = localhost.patch
+ source = sudo
+ sha256sums = 470ec6c228018bf246df5b5b063a12beccc90a780fd921d7542a86282e469966
+ sha256sums = b0defc4ac4c4252178dcdedfcaa01a45a96a04b8c7ee7b575081ff86e1f2a82e
+ sha256sums = 41208e539ede1180c638be8381712fe2b7149fdc92c90fe80e335f4f7c560a9e
+
+pkgname = check_ipmi_sensor
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..75de344bef2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Christian Hesse <mail@eworm.de>
+
+pkgname=check_ipmi_sensor
+pkgver=3.3
+pkgrel=4
+pkgdesc="IPMI Sensor Monitoring Plugin"
+arch=('any')
+url="http://exchange.nagios.org/directory/Plugins/Hardware/Server-Hardware/IPMI-Sensor-Monitoring-Plugin/details"
+license=('GPL')
+depends=('nagios' 'freeipmi' 'perl-ipc-run')
+optdepends=('sudo: check localhost without authentication')
+source=("${pkgname}-${pkgver}.tar.gz::http://git.thomas-krenn.com/?p=check_ipmi_sensor_v3.git;a=snapshot;h=refs/tags/v${pkgver};sf=tgz"
+ 'localhost.patch'
+ 'sudo')
+sha256sums=('470ec6c228018bf246df5b5b063a12beccc90a780fd921d7542a86282e469966'
+ 'b0defc4ac4c4252178dcdedfcaa01a45a96a04b8c7ee7b575081ff86e1f2a82e'
+ '41208e539ede1180c638be8381712fe2b7149fdc92c90fe80e335f4f7c560a9e')
+
+prepare() {
+ cd "${srcdir}/${pkgname}_v3-v${pkgver}"
+
+ patch -Np1 < ${srcdir}/localhost.patch
+}
+
+package() {
+ cd "${srcdir}/${pkgname}_v3-v${pkgver}"
+
+ install -D -m 0755 check_ipmi_sensor ${pkgdir}/usr/lib/monitoring-plugins/check_ipmi_sensor
+ install -D -m 0644 changelog.txt ${pkgdir}/usr/share/doc/${pkgname}/changelog.txt
+ install -D -m 0644 README ${pkgdir}/usr/share/doc/${pkgname}/README
+ install -D -m 0644 gpl.txt ${pkgdir}/usr/share/licenses/${pkgname}/gpl.txt
+
+ install -d -m 0750 ${pkgdir}/etc/sudoers.d
+ install -D -m 0440 ${srcdir}/sudo ${pkgdir}/etc/sudoers.d/check_ipmi_sensor
+}
+
diff --git a/localhost.patch b/localhost.patch
new file mode 100644
index 00000000000..42276062f9f
--- /dev/null
+++ b/localhost.patch
@@ -0,0 +1,34 @@
+--- a/check_ipmi_sensor 2014-10-24 21:01:02.757595862 +0200
++++ b/check_ipmi_sensor 2014-10-24 21:10:04.548108407 +0200
+@@ -356,9 +356,8 @@ MAIN: {
+
+ my @basecmd; #variable for command to call ipmi
+ if( !(defined $ipmi_host) ){
+- $abort_text= $abort_text . " -H <hostname>"
++ $ipmi_host = 'localhost';
+ }
+- else{
+ if( $ipmi_host eq 'localhost' ){
+ @basecmd = ('sudo', $IPMICOMMAND);
+ }
+@@ -373,7 +372,6 @@ MAIN: {
+ $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();
+@@ -414,10 +412,9 @@ MAIN: {
+ 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(defined($lanVersion)){
++ push @getstatus, "--driver-type=$lanVersion";
+ }
+- push @getstatus, "--driver-type=$lanVersion";
+
+ ################################################################################
+ #execute status command and redirect stdout and stderr to ipmioutput
diff --git a/sudo b/sudo
new file mode 100644
index 00000000000..d21660e195f
--- /dev/null
+++ b/sudo
@@ -0,0 +1 @@
+nagios ALL = NOPASSWD: /usr/sbin/ipmi-sensors