1 |
snetram |
1.1 |
diff -up smeserver-yum-2.2.0/root/etc/e-smith/templates/etc/crontab/check4updates.add-wait-timer smeserver-yum-2.2.0/root/etc/e-smith/templates/etc/crontab/check4updates |
2 |
|
|
--- smeserver-yum-2.2.0/root/etc/e-smith/templates/etc/crontab/check4updates.add-wait-timer 2008-10-07 16:25:45.000000000 +0200 |
3 |
|
|
+++ smeserver-yum-2.2.0/root/etc/e-smith/templates/etc/crontab/check4updates 2011-03-01 19:44:38.000000000 +0100 |
4 |
|
|
@@ -3,11 +3,23 @@ |
5 |
|
|
|
6 |
|
|
my $freq = $yum{check4updates} || 'daily'; |
7 |
|
|
|
8 |
|
|
+ my $min; |
9 |
|
|
+ my $dom; |
10 |
|
|
+ my $dow; |
11 |
|
|
+ |
12 |
|
|
if ($freq eq 'weekly') { |
13 |
|
|
- return "\n22 4 * * 0 root /sbin/e-smith/check4updates -m\n"; |
14 |
|
|
+ $min = 22; |
15 |
|
|
+ $dom = '*'; |
16 |
|
|
+ $dow = 0; |
17 |
|
|
} elsif ($freq eq 'monthly') { |
18 |
|
|
- return "\n42 4 1 * * root /sbin/e-smith/check4updates -m\n"; |
19 |
|
|
+ $min = 42; |
20 |
|
|
+ $dom = 1; |
21 |
|
|
+ $dow = '*'; |
22 |
|
|
} else { |
23 |
|
|
- return "\n02 4 * * * root /sbin/e-smith/check4updates -m\n" |
24 |
|
|
+ $min = 2; |
25 |
|
|
+ $dom = '*'; |
26 |
|
|
+ $dow = '*'; |
27 |
|
|
} |
28 |
|
|
+ return "$min 4 $dom * $dow root " |
29 |
|
|
+ . q{sleep $[ $RANDOM \\% 3600 ]; /sbin/e-smith/check4updates -m }; |
30 |
|
|
} |