SPECS: mrtg.spec - changed the way to start multiple configs. Shou...

blues blues at pld-linux.org
Thu Jul 26 15:18:48 CEST 2007


Author: blues                        Date: Thu Jul 26 13:18:48 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- changed the way to start multiple configs. Should be backward compatible,
  but requires massive testings.

---- Files affected:
SPECS:
   mrtg.spec (1.143 -> 1.144) 

---- Diffs:

================================================================
Index: SPECS/mrtg.spec
diff -u SPECS/mrtg.spec:1.143 SPECS/mrtg.spec:1.144
--- SPECS/mrtg.spec:1.143	Thu Jul 26 14:22:44 2007
+++ SPECS/mrtg.spec	Thu Jul 26 15:18:43 2007
@@ -14,7 +14,7 @@
 Summary(ru.UTF-8):	MRTG - программа изображения граффиков, изображающих траффик на множестве роутеров
 Name:		mrtg
 Version:	2.15.2
-Release:	1.1
+Release:	1.5
 License:	GPL
 Group:		Applications/Networking
 Source0:	http://oss.oetiker.ch/mrtg/pub/%{name}-%{version}.tar.gz
@@ -109,9 +109,9 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/{cron.d,rc.d/init.d,sysconfig,logrotate.d},%{_sysconfdir}/mrtg,%{_htmldir}} \
+install -d $RPM_BUILD_ROOT{/etc/{cron.d,rc.d/init.d,sysconfig,logrotate.d},%{_sysconfdir}/mrtg/conf.d,%{_htmldir}} \
 	$RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{perl_vendorlib},%{_mandir}/man1} \
-	$RPM_BUILD_ROOT{/var/log/{mrtg,archive/mrtg},/var/run/mrtg}
+	$RPM_BUILD_ROOT{/var/log/{mrtg,archive/mrtg},/var/{lib,run}/mrtg}
 
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mrtg
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mrtg
@@ -128,6 +128,8 @@
 install lib/mrtg2/MRTG_lib.pm $RPM_BUILD_ROOT%{perl_vendorlib}
 install doc/*.1	$RPM_BUILD_ROOT%{_mandir}/man1
 
+ln -sf ../mrtg.cfg $RPM_BUILD_ROOT%{_sysconfdir}/mrtg/conf.d
+
 tar -cf contrib.tar contrib
 
 cat  << EOF > $RPM_BUILD_ROOT/etc/cron.d/mrtg
@@ -152,7 +154,9 @@
 %defattr(644,root,root,755)
 %doc contrib.tar doc/*.txt
 %attr(751,root,stats) %dir %{_sysconfdir}/mrtg
+%attr(751,root,stats) %dir %{_sysconfdir}/mrtg/conf.d
 %attr(640,root,stats) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mrtg/mrtg.cfg
+%attr(640,root,stats) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/mrtg/conf.d/*
 %attr(640,root,stats) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mrtg
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mrtg
 %attr(755,stats,logs) %dir %{_htmldir}
@@ -164,6 +168,7 @@
 %attr(1751,stats,logs) %dir /var/log/mrtg
 %attr(751,root,logs) %dir /var/log/archive/mrtg
 %attr(755,stats,stats) %dir /var/run/mrtg
+%attr(755,stats,stats) %dir /var/lib/mrtg
 %{_mandir}/man1/*
 
 %files cron
@@ -180,6 +185,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.144  2007/07/26 13:18:43  blues
+- changed the way to start multiple configs. Should be backward compatible,
+  but requires massive testings.
+
 Revision 1.143  2007/07/26 12:22:44  blues
 - start daemon as stats user.
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/mrtg.spec?r1=1.143&r2=1.144&f=u



More information about the pld-cvs-commit mailing list