1 %define name vserver-sliceimage
5 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
8 Packager: PlanetLab Central <support@planet-lab.org>
9 Distribution: PlanetLab %{plrelease}
12 Summary: vserver-specific node code for slice families
16 Source0: %{name}-%{version}.tar.bz2
18 Group: Applications/System
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
20 Requires: util-vserver, e2fsprogs, yum
24 vserver-specific initscript for handling slice images
25 initializes vrefs from stubs for system slices
26 handles cow flags, and various cleanups
34 rm -rf $RPM_BUILD_ROOT
36 install -D -m 755 initscripts/vserver-sliceimage $RPM_BUILD_ROOT/%{_initrddir}/vserver-sliceimage
37 install -D -m 644 cron.d/vserver-sliceimage $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/vserver-sliceimage
38 install -D -m 644 logrotate/vserver-sliceimage $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/vserver-sliceimage
41 rm -rf $RPM_BUILD_ROOT
44 %{_initrddir}/vserver-sliceimage
45 %{_sysconfdir}/cron.d/vserver-sliceimage
46 %{_sysconfdir}/logrotate.d/vserver-sliceimage
49 chkconfig --add vserver-sliceimage
50 chkconfig vserver-sliceimage on
51 # Randomize daily run time
52 M=$((60 * $RANDOM / 32768))
53 H=$((24 * $RANDOM / 32768))
54 sed -i -e "s/@M@/$M/" -e "s/@H@/$H/" %{_sysconfdir}/cron.d/vserver-sliceimage