[pnp4nagios] Updated renaming of "-sample" config files.

Ján ONDREJ ondrejj at fedoraproject.org
Tue Oct 11 13:37:19 UTC 2011


commit 6fb82930208ffa37bf1593370f616519ddc10150
Author: Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
Date:   Tue Oct 11 15:37:05 2011 +0200

    Updated renaming of "-sample" config files.

 pnp4nagios.spec |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/pnp4nagios.spec b/pnp4nagios.spec
index 62e05eb..a3003cd 100644
--- a/pnp4nagios.spec
+++ b/pnp4nagios.spec
@@ -1,6 +1,6 @@
 Name:           pnp4nagios
 Version:        0.6.1
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Nagios performance data analysis tool
 
 Group:          Applications/System
@@ -75,9 +75,10 @@ make %{?_smp_mflags} all
 rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT 
 make install-config DESTDIR=$RPM_BUILD_ROOT 
-#find $RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios -name *-sample -exec rename "-sample" "" {} ';'
-rename '-sample' "" $RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios/*-sample \
-  $RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios/*/*-sample
+# remove -sample from filename suffix
+for i in $RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios/*-sample; do
+  mv ${i} ${i%-sample}
+done
 #sed -i -e 's|/usr/libexec/process_perfdata.pl|/usr/libexec/pnp4nagios/process_perfdata.pl|' \
 #       -e 's|^log_type = syslog|log_type = file|' \
 #       $RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios/npcd.cfg
@@ -135,6 +136,9 @@ fi
 %{_libdir}/kohana/system
 
 %changelog
+* Tue Oct 11 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.1-2
+- updated renaming of "-sample" scripts
+
 * Wed Sep 14 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.1-1
 - Update to 0.6.1.
 


More information about the scm-commits mailing list