File monitoring-plugins-multipath.spec of Package monitoring-plugins-multipath

# spec file for package monitoring-plugins-multipath
# Copyright (c) 2012-2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           monitoring-plugins-multipath
Version:        1.12
Release:        100
Summary:        Checks multipath connections to SAN storage
License:        GPL-3.0+
Group:          System/Monitoring
Source0:        check_multipath
Source1:        nrpe_check_multipath
Source2:        sudo_check_multipath
Patch1:         check_multipath.patch
BuildRequires:  nagios-rpm-macros
Provides:       nagios-plugins-multipath = %{version}-%{release}
Obsoletes:      nagios-plugins-multipath < %{version}-%{release}
Requires:       multipath-tools
Requires:       sudo
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

Checks multipath connections to SAN storage on your GNU/Linux box, also has
working support for specifying required redundancy level

It is updated and fixed version of:

%setup -q -T -c %{name}
install -m755 %{SOURCE0} .


mkdir -p %{buildroot}/%{nagios_plugindir}
install -m 755 check_multipath %{buildroot}/%{nagios_plugindir}/check_multipath
cd %{buildroot}/%{nagios_plugindir}/
cd -
install -Dm644 %{SOURCE1} %{buildroot}/%{nrpe_sysconfdir}/check_multipath.cfg 
%if 0%{?suse_version} > 1310
install -Dm400 %{SOURCE2} %{buildroot}/%{_sysconfdir}/sudoers.d/check_multipath

rm -rf %{buildroot}

# avoid build dependecy of nagios - own the dirs
%dir %{nrpe_sysconfdir}
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%config(noreplace) %{nrpe_sysconfdir}/check_multipath.cfg
%if 0%{?suse_version} > 1310
%dir %{_sysconfdir}/sudoers.d
%config(noreplace) %{_sysconfdir}/sudoers.d/check_multipath

openSUSE Build Service is sponsored by