/[smeserver]/rpms/smeserver-yum/sme8/smeserver-yum-1.2.0-check4updates.patch2
ViewVC logotype

Contents of /rpms/smeserver-yum/sme8/smeserver-yum-1.2.0-check4updates.patch2

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Tue Oct 7 14:47:50 2008 UTC (15 years, 7 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
New streams

1 diff -Nur -x '*.orig' -x '*.rej' smeserver-yum-1.2.0/root/etc/e-smith/templates/etc/crontab/check4updates mezzanine_patched_smeserver-yum-1.2.0/root/etc/e-smith/templates/etc/crontab/check4updates
2 --- smeserver-yum-1.2.0/root/etc/e-smith/templates/etc/crontab/check4updates 2008-01-11 11:27:57.000000000 -0700
3 +++ mezzanine_patched_smeserver-yum-1.2.0/root/etc/e-smith/templates/etc/crontab/check4updates 2008-01-11 11:27:30.000000000 -0700
4 @@ -2,15 +2,12 @@
5 return "\n# yum check for updates is disabled\n" unless $yum{status} eq 'enabled';
6
7 my $freq = $yum{check4updates} || 'daily';
8 - my $min = int(rand(60));
9 - my $hour = int(rand(5));
10 - my $dow = substr(localtime,0,3);
11
12 if ($freq eq 'weekly') {
13 - return "\n$min $hour * * $dow root check4updates -m\n";
14 + return "\n22 4 * * 0 root /sbin/e-smith/check4updates -m\n";
15 } elsif ($freq eq 'monthly') {
16 - return "\n$min $hour 15 * * root check4updates -m\n";
17 + return "\n42 4 1 * * root /sbin/e-smith/check4updates -m\n";
18 } else {
19 - return "\n$min $hour * * * root check4updates -m\n"
20 + return "\n02 4 * * * root /sbin/e-smith/check4updates -m\n"
21 }
22 }
23 diff -Nur -x '*.orig' -x '*.rej' smeserver-yum-1.2.0/root/sbin/e-smith/check4updates mezzanine_patched_smeserver-yum-1.2.0/root/sbin/e-smith/check4updates
24 --- smeserver-yum-1.2.0/root/sbin/e-smith/check4updates 1969-12-31 17:00:00.000000000 -0700
25 +++ mezzanine_patched_smeserver-yum-1.2.0/root/sbin/e-smith/check4updates 2008-01-11 11:24:47.000000000 -0700
26 @@ -0,0 +1,25 @@
27 +#! /bin/bash
28 +
29 +mkdir -p /tmp/check4updates.$$
30 +TMPFILE=`mktemp /tmp/check4updates.$$/XXXXXXXXXX` || exit 1
31 +TMP1=`mktemp /tmp/check4updates.$$/XXXXXXXXXX` || exit 1
32 +
33 +MAILADDR=admin-yum
34 +
35 +yum -e 0 -d 0 check-update > $TMP1
36 +if [ $? = 100 ]; then
37 + echo -e "===\n=== yum reports available updates:\n===" >> $TMPFILE
38 + cat $TMP1 >> $TMPFILE
39 +fi
40 +
41 +if [ -s $TMPFILE ]; then
42 + if [ "$1" = "-m" ]; then
43 + mail $MAILADDR -s "Updates available for `hostname`" < $TMPFILE
44 + else
45 + echo "Updates available for `hostname`"
46 + cat $TMPFILE
47 + fi
48 +fi
49 +
50 +rm -f $TMPFILE $TMP1
51 +rm -fr /tmp/check4updates.*

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed