1 %define name lxc-sliceimage
5 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
8 Packager: PlanetLab Central <support@planet-lab.org>
9 Distribution: PlanetLab %{plrelease}
12 Summary: lxc-specific node code for slice families
16 Source0: %{name}-%{version}.tar.bz2
18 Group: Applications/System
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
24 A simple package to deploy reference images for lxc
32 rm -rf $RPM_BUILD_ROOT
33 install -D -m 755 initscripts/lxc-sliceimage ${RPM_BUILD_ROOT}/%{_initrddir}/lxc-sliceimage
34 install -D -m 644 cron.d/lxc-sliceimage $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/lxc-sliceimage
35 install -D -m 644 logrotate/lxc-sliceimage $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/lxc-sliceimage
36 install -D -m 644 lxc_template.xml $RPM_BUILD_ROOT/vservers/.lvref/lxc_template.xml
39 rm -rf $RPM_BUILD_ROOT
42 %{_initrddir}/lxc-sliceimage
43 %{_sysconfdir}/cron.d/lxc-sliceimage
44 %{_sysconfdir}/logrotate.d/lxc-sliceimage
48 chkconfig --add lxc-sliceimage
49 chkconfig lxc-sliceimage on
50 # Randomize daily run time
51 M=$((60 * $RANDOM / 32768))
52 H=$((24 * $RANDOM / 32768))
53 sed -i -e "s/@M@/$M/" -e "s/@H@/$H/" %{_sysconfdir}/cron.d/lxc-sliceimage