diff -Nur smeserver-yum-2.6.0.bz1502.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/yum smeserver-yum-2.6.0.bz1502.new/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/yum
--- smeserver-yum-2.6.0.bz1502.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/yum 2016-07-28 04:12:13.658914687 +0200
+++ smeserver-yum-2.6.0.bz1502.new/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/yum 2016-07-28 04:46:33.447541676 +0200
@@ -272,4 +272,16 @@
operations consume considerably more CPU cycles
+
+ LABEL_YUM_DOWNLOADONLY
+ Predownload updates
+
+
+
+ LABEL_YUM_DOWNLOADONLY_DESCRIPTION
+ The rpm updates can be downloaded during the night,
+ this will ease and give faster the yum update process
+ (only enabled repositories will be used).
+
+
diff -Nur smeserver-yum-2.6.0.bz1502.old/root/etc/e-smith/templates/etc/crontab/YumDownloadOnly smeserver-yum-2.6.0.bz1502.new/root/etc/e-smith/templates/etc/crontab/YumDownloadOnly
--- smeserver-yum-2.6.0.bz1502.old/root/etc/e-smith/templates/etc/crontab/YumDownloadOnly 1970-01-01 01:00:00.000000000 +0100
+++ smeserver-yum-2.6.0.bz1502.new/root/etc/e-smith/templates/etc/crontab/YumDownloadOnly 2016-07-28 13:02:49.834325243 +0200
@@ -0,0 +1,11 @@
+{
+ return "\n# yum status is disabled\n" unless $yum{status} eq 'enabled';
+
+ my $downloadonly = $yum{DownloadOnly} || 'disabled';
+
+ return "\n# Yum download only is disabled" if ($downloadonly eq 'disabled');
+ my $hour = $yum{DownloadOnlyHour} || '4';
+ return "2 $hour * * * root "
+ . q{sleep $[ $RANDOM \\% 3600 ]; /sbin/e-smith/yumdownloadonly -m };
+
+}
diff -Nur smeserver-yum-2.6.0.bz1502.old/root/etc/e-smith/web/functions/yum smeserver-yum-2.6.0.bz1502.new/root/etc/e-smith/web/functions/yum
--- smeserver-yum-2.6.0.bz1502.old/root/etc/e-smith/web/functions/yum 2016-07-28 04:12:13.658914687 +0200
+++ smeserver-yum-2.6.0.bz1502.new/root/etc/e-smith/web/functions/yum 2016-07-28 04:37:51.303650209 +0200
@@ -133,6 +133,13 @@
+
+
+
+
DESC_BUTTON_CONFIGURATION
@@ -261,6 +268,15 @@
LABEL_YUM_DELTARPM
+
+
+ LABEL_YUM_DOWNLOADONLY_DESCRIPTION
+
+
diff -Nur smeserver-yum-2.6.0.bz1502.old/root/sbin/e-smith/yumdownloadonly smeserver-yum-2.6.0.bz1502.new/root/sbin/e-smith/yumdownloadonly
--- smeserver-yum-2.6.0.bz1502.old/root/sbin/e-smith/yumdownloadonly 1970-01-01 01:00:00.000000000 +0100
+++ smeserver-yum-2.6.0.bz1502.new/root/sbin/e-smith/yumdownloadonly 2016-07-28 21:06:47.775676555 +0200
@@ -0,0 +1,26 @@
+#! /bin/bash
+
+mkdir -p /tmp/downloadonly.$$
+TMPFILE=`mktemp /tmp/downloadonly.$$/XXXXXXXXXX` || exit 1
+TMP1=`mktemp /tmp/downloadonly.$$/XXXXXXXXXX` || exit 1
+
+MAILADDR=admin-yum
+
+yum -e 0 -d 0 check-update >/dev/null
+if [ $? = 100 ]; then
+ yum update -e 0 -d 1 --downloadonly -y > $TMP1
+ echo -e "===\n=== yum reports downloaded files:\n===" >> $TMPFILE
+ cat $TMP1 >> $TMPFILE
+fi
+
+if [ -s $TMPFILE ]; then
+ if [ "$1" = "-m" ]; then
+ mail -s "Downloaded updates for `hostname`" $MAILADDR < $TMPFILE
+ else
+ echo "Downloaded updates for `hostname`"
+ cat $TMPFILE
+ fi
+fi
+
+rm -f $TMPFILE $TMP1
+rm -fr /tmp/downloadonly.*
diff -Nur smeserver-yum-2.6.0.bz1502.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/yum.pm smeserver-yum-2.6.0.bz1502.new/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/yum.pm
--- smeserver-yum-2.6.0.bz1502.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/yum.pm 2016-07-28 04:12:13.659914685 +0200
+++ smeserver-yum-2.6.0.bz1502.new/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/yum.pm 2016-07-28 04:36:48.019784562 +0200
@@ -210,6 +210,9 @@
my $deltarpm = $q->param("yum_DeltaRpmProcess");
$db->set_prop('yum', 'DeltaRpmProcess', $deltarpm);
+ my $downloadonly = $q->param("yum_DownloadOnly");
+ $db->set_prop('yum', 'DownloadOnly', $downloadonly);
+
my %selected = map {$_ => 1} $q->param('SelectedRepositories');
foreach my $repos (