X-Git-Url: http://git.onelab.eu/?p=vserver-reference.git;a=blobdiff_plain;f=lxc-sliceimage.spec;h=d7af545d839e9aa413991d083857532d044f8400;hp=de8e5ae251c0814b2f334371a1c3bc87af9aace2;hb=HEAD;hpb=06b4c1d5d3a1100adc5cf8d8772949107cc48ecd diff --git a/lxc-sliceimage.spec b/lxc-sliceimage.spec index de8e5ae..d7af545 100644 --- a/lxc-sliceimage.spec +++ b/lxc-sliceimage.spec @@ -1,6 +1,6 @@ %define name lxc-sliceimage %define version 5.1 -%define taglevel 8 +%define taglevel 12 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} @@ -48,19 +48,19 @@ rm -rf $RPM_BUILD_ROOT %{_sysconfdir}/logrotate.d/lxc-sliceimage /vservers/.lvref +# observed on a f23 node on jan-15-2016 +# it feels like this call to restarting the service does not trigger +# or not reliably +# the daily crontab job should save the day though +# also just in case, we don't anymore disable the service when uninstalling either %post systemctl enable lxc-sliceimage.service if [ "$PL_BOOTCD" != "1" ] ; then systemctl restart lxc-sliceimage.service fi -%preun -# 0 = erase, 1 = upgrade -if [ $1 -eq 0 ] ; then - systemctl disable lxc-sliceimage.service -fi - -# Randomize daily run time +# Randomize hourly run time (used to be daily) +#H=$((24 * $RANDOM / 32768)) +#sed -i -e "s/@M@/$M/" -e "s/@H@/$H/" %{_sysconfdir}/cron.d/lxc-sliceimage M=$((60 * $RANDOM / 32768)) -H=$((24 * $RANDOM / 32768)) -sed -i -e "s/@M@/$M/" -e "s/@H@/$H/" %{_sysconfdir}/cron.d/lxc-sliceimage +sed -i -e "s/@M@/$M/" %{_sysconfdir}/cron.d/lxc-sliceimage