# Copyright (C) 2008 Platform Computing Inc # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License 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, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # Summary: Nagios(R) installer component Name: component-nagios-installer-v2_12 Version: 2.12 Release: 2 License: GPLv2 Group: System Environment/Base Vendor: Platform Computing Corporation BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildArchitectures: noarch URL: http://www.nagios.org/ Requires: nagios, kusu-nagios-config, nagios-plugins, nagios-plugins-apt, nagios-plugins-breeze, nagios-plugins-by_ssh Requires: nagios-plugins-dhcp, nagios-plugins-dig, nagios-plugins-disk, nagios-plugins-disk_smb, nagios-plugins-dns Requires: nagios-plugins-dummy, nagios-plugins-file_age, nagios-plugins-flexlm, nagios-plugins-hpjd, nagios-plugins-http Requires: nagios-plugins-icmp, nagios-plugins-ide_smart, nagios-plugins-ircd, nagios-plugins-ldap, nagios-plugins-linux_raid Requires: nagios-plugins-load, nagios-plugins-log, nagios-plugins-mailq, nagios-plugins-mrtg, nagios-plugins-mrtgtraf Requires: nagios-plugins-mysql, nagios-plugins-nagios, nagios-plugins-nrpe, nagios-plugins-nt, nagios-plugins-ntp Requires: nagios-plugins-nwstat, nagios-plugins-oracle, nagios-plugins-overcr, nagios-plugins-perl, nagios-plugins-pgsql Requires: nagios-plugins-ping, nagios-plugins-procs, nagios-plugins-real, nagios-plugins-rpc, nagios-plugins-sensors Requires: nagios-plugins-smtp, nagios-plugins-snmp, nagios-plugins-ssh, nagios-plugins-swap, nagios-plugins-tcp Requires: nagios-plugins-time, nagios-plugins-udp, nagios-plugins-ups, nagios-plugins-users, nagios-plugins-wave Requires: nagios-mem-plugin Requires: httpd, kusu-nagios-config Requires: coreutils, shadow-utils Requires: /sbin/service #Requires: perl-Crypt-DES, perl-Net-SNMP %description Nagios(R) component for installer node. %prep %build %install rm -rf %{buildroot} %files %pre %post # Re-create the users if they don't already exist. /usr/sbin/useradd -d /var/spool/nagios -r -s /sbin/nologin -c "nagios" nagios 2> /dev/null || : # Add apache to the nagios group. /usr/sbin/usermod -a -G nagios apache > /dev/null 2>&1 || : # Finally, re-set ownership of files in case we now have new [UG]IDs. /bin/chown -R nagios:nagios /var/log/nagios /var/spool/nagios /bin/chgrp -R nagios /etc/nagios/private /bin/cat << 'EOF' > /opt/kusu/lib/plugins/cfmclient/nagios-restart #!/bin/sh # 'Fix permissions' for nagios /usr/sbin/kusu-nagios_user_restore if [ ! -f /var/lock/subsys/nagios ]; then /sbin/service httpd restart /sbin/service nagios start fi EOF %preun /bin/rm /opt/kusu/lib/plugins/cfmclient/nagios-restart %postun /bin/cat << 'EOF' > /opt/kusu/lib/plugins/cfmclient/nagios-installer-v2_12.remove #!/bin/sh rpm -e nagios nagios-plugins nagios-plugins-mysql nagios-plugins-nrpe \ kusu-nagios-config nagios-plugins-apt nagios-plugins-breeze nagios-plugins-by_ssh nagios-plugins-dhcp \ nagios-plugins-dig nagios-plugins-disk nagios-plugins-disk_smb nagios-plugins-dns nagios-plugins-dummy \ nagios-plugins-file_age nagios-plugins-flexlm nagios-plugins-hpjd nagios-plugins-http \ nagios-plugins-icmp nagios-plugins-ide_smart nagios-plugins-ircd nagios-plugins-ldap nagios-plugins-linux_raid \ nagios-plugins-load nagios-plugins-log nagios-plugins-mailq nagios-plugins-mrtg nagios-plugins-mrtgtraf \ nagios-plugins-nagios nagios-plugins-nt nagios-plugins-ntp nagios-plugins-nwstat nagios-plugins-oracle \ nagios-plugins-overcr nagios-plugins-perl nagios-plugins-pgsql nagios-plugins-ping nagios-plugins-procs \ nagios-plugins-real nagios-plugins-rpc nagios-plugins-sensors nagios-plugins-smtp nagios-plugins-snmp \ nagios-plugins-ssh nagios-plugins-swap nagios-plugins-tcp nagios-plugins-time nagios-plugins-udp \ nagios-plugins-ups nagios-plugins-users nagios-plugins-wave nagios-mem-plugin kusu-nagios-config rm -f /opt/kusu/lib/plugins/cfmclient/nagios-installer-v2_12.remove EOF %clean rm -rf %{buildroot} %changelog * Wed Jan 7 2009 Mark Black 2.12-2 - Added missing post section requirements * Fri May 23 2008 Shawn Starr 2.12-1 - Bump version. * Mon May 12 2008 Shawn Starr 2.11-1 - Bump version. * Thu Jan 31 2008 Shawn Starr 2.10-1 - Initial release.