[Devel] [PATCH] Relocate cron master file from pkgdatadir to pkgconfdir

Dmitry V. Levin ldv at altlinux.org
Mon Mar 5 16:35:42 PST 2007


Configuration files should not be placed in datadir, and the
cron master file is marked with %config(noreplace) attribute.

Signed-off-by: Dmitry V. Levin <ldv at altlinux.org>
---
 paths.am   |    2 +-
 vzctl.spec |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/paths.am b/paths.am
index b8354c9..9f65692 100644
--- a/paths.am
+++ b/paths.am
@@ -20,7 +20,7 @@ bashcdir    = $(sysconfdir)/bash_completion.d
 endif
 
 if ENABLE_CRON
-cronddir    = $(pkgdatadir)/cron
+cronddir    = $(pkgconfdir)/cron
 dst_cronddir= $(sysconfdir)/cron.d
 endif
 
diff --git a/vzctl.spec b/vzctl.spec
index 9dc219f..d2253f3 100644
--- a/vzctl.spec
+++ b/vzctl.spec
@@ -1,5 +1,4 @@
 %define _initddir %_sysconfdir/init.d
-%define _crondir /usr/share/vzctl/cron
 %define _vzdir /vz
 %define _lockdir %{_vzdir}/lock 
 %define _dumpdir %{_vzdir}/dump 
@@ -11,6 +10,7 @@
 %define _vpsconfdir %_sysconfdir/sysconfig/vz-scripts
 %define _netdir	%_sysconfdir/sysconfig/network-scripts
 %define _logrdir %_sysconfdir/logrotate.d
+%define _crondir %{_configdir}/cron
 %define _distconfdir %{_configdir}/dists
 %define _namesdir %{_configdir}/names 
 %define _distscriptdir %{_distconfdir}/scripts
@@ -76,13 +76,13 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(-,root,root)
 %attr(755,root,root) %{_initddir}/vz
-%attr(644,root,root) %config(noreplace) %{_crondir}/vz
 %ghost /etc/cron.d/vz
 %dir %attr(755,root,root) %{_lockdir}
 %dir %attr(755,root,root) %{_dumpdir}
 %dir %attr(755,root,root) %{_cachedir}
 %dir %attr(755,root,root) %{_veipdir}
 %dir %attr(755,root,root) %{_configdir}
+%dir %attr(755,root,root) %{_crondir}
 %dir %attr(755,root,root) %{_namesdir}
 %dir %attr(755,root,root) %{_vpsconfdir}
 %dir %attr(755,root,root) %{_distconfdir}
@@ -128,6 +128,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %config(noreplace) %{_configdir}/vz.conf
 %config(noreplace) %{_distconfdir}/*.conf
+%attr(644,root,root) %config(noreplace) %{_crondir}/vz
 %config %{_vpsconfdir}/ve-vps.basic.conf-sample
 %config %{_vpsconfdir}/ve-light.conf-sample
 %config %{_vpsconfdir}/0.conf
-- 
1.5.0.3.GIT
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/devel/attachments/20070306/f2108bba/attachment-0001.sig>


More information about the Devel mailing list