/[smeserver]/rpms/smeserver-support/sme7/smeserver-support-1.6.0-statusreport.patch
ViewVC logotype

Contents of /rpms/smeserver-support/sme7/smeserver-support-1.6.0-statusreport.patch

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


Revision 1.1 - (show annotations) (download)
Tue Jun 12 17:38:22 2007 UTC (17 years, 4 months ago) by slords
Branch: MAIN
CVS Tags: smeserver-support-1_6_0-39_el4_sme, smeserver-support-1_6_0-38_el4_sme, smeserver-support-1_6_0-44_el4_sme, smeserver-support-1_6_0-41_el4_sme, smeserver-support-1_6_0-43_el4_sme, smeserver-support-1_6_0-48_el4_sme, smeserver-support-1_6_0-50_el4_sme, smeserver-support-1_6_0-49_el4_sme, smeserver-support-1_6_0-40_el4_sme, smeserver-support-1_6_0-45_el4_sme, smeserver-support-1_6_0-53_el4_sme, smeserver-support-1_6_0-46_el4_sme, smeserver-support-1_6_0-52_el4_sme, smeserver-support-1_6_0-47_el4_sme, smeserver-support-1_6_0-51_el4_sme
Import on branch sme7 of package smeserver-support-1.6.0-38.el4.sme.src.rpm

1 diff -Nur -x '*.orig' -x '*.rej' smeserver-support-1.6.0/root/etc/e-smith/db/configuration/defaults/statusreport/status mezzanine_patched_smeserver-support-1.6.0/root/etc/e-smith/db/configuration/defaults/statusreport/status
2 --- smeserver-support-1.6.0/root/etc/e-smith/db/configuration/defaults/statusreport/status 1970-01-01 10:00:00.000000000 +1000
3 +++ mezzanine_patched_smeserver-support-1.6.0/root/etc/e-smith/db/configuration/defaults/statusreport/status 2006-05-23 15:57:02.197881061 +1000
4 @@ -0,0 +1 @@
5 +enabled
6 diff -Nur -x '*.orig' -x '*.rej' smeserver-support-1.6.0/root/etc/e-smith/db/configuration/defaults/statusreport/type mezzanine_patched_smeserver-support-1.6.0/root/etc/e-smith/db/configuration/defaults/statusreport/type
7 --- smeserver-support-1.6.0/root/etc/e-smith/db/configuration/defaults/statusreport/type 1970-01-01 10:00:00.000000000 +1000
8 +++ mezzanine_patched_smeserver-support-1.6.0/root/etc/e-smith/db/configuration/defaults/statusreport/type 2006-05-23 15:57:15.092660083 +1000
9 @@ -0,0 +1 @@
10 +service
11 diff -Nur -x '*.orig' -x '*.rej' smeserver-support-1.6.0/root/etc/e-smith/db/configuration/migrate/20InstallEpoch mezzanine_patched_smeserver-support-1.6.0/root/etc/e-smith/db/configuration/migrate/20InstallEpoch
12 --- smeserver-support-1.6.0/root/etc/e-smith/db/configuration/migrate/20InstallEpoch 1970-01-01 10:00:00.000000000 +1000
13 +++ mezzanine_patched_smeserver-support-1.6.0/root/etc/e-smith/db/configuration/migrate/20InstallEpoch 2006-05-23 16:11:43.147705337 +1000
14 @@ -0,0 +1,7 @@
15 +{
16 + my $sysconfig = $DB->get('sysconfig')
17 + || $DB->new_record('sysconfig', { type => 'configuration' });
18 +
19 + $sysconfig->prop('InstallEpoch')
20 + || $sysconfig->set_prop('InstallEpoch', time);
21 +}
22 diff -Nur -x '*.orig' -x '*.rej' smeserver-support-1.6.0/root/etc/e-smith/db/configuration/migrate/20StatusReport mezzanine_patched_smeserver-support-1.6.0/root/etc/e-smith/db/configuration/migrate/20StatusReport
23 --- smeserver-support-1.6.0/root/etc/e-smith/db/configuration/migrate/20StatusReport 1970-01-01 10:00:00.000000000 +1000
24 +++ mezzanine_patched_smeserver-support-1.6.0/root/etc/e-smith/db/configuration/migrate/20StatusReport 2006-05-23 16:10:52.332530794 +1000
25 @@ -0,0 +1,11 @@
26 +{
27 + my $rec = $DB->get('statusreport')
28 + || $DB->new_record('statusreport', { type => 'service' });
29 +
30 + my %props = $rec->props;
31 +
32 + exists $props{DayOfWeek} or $props{DayOfWeek} = int(rand(7));
33 + exists $props{Hour} or $props{Hour} = int(rand(24));
34 + exists $props{Minute} or $props{Minute} = int(rand(60));
35 + $rec->merge_props(%props);
36 +}
37 diff -Nur -x '*.orig' -x '*.rej' smeserver-support-1.6.0/root/etc/e-smith/templates/etc/crontab/statusreport mezzanine_patched_smeserver-support-1.6.0/root/etc/e-smith/templates/etc/crontab/statusreport
38 --- smeserver-support-1.6.0/root/etc/e-smith/templates/etc/crontab/statusreport 1970-01-01 10:00:00.000000000 +1000
39 +++ mezzanine_patched_smeserver-support-1.6.0/root/etc/e-smith/templates/etc/crontab/statusreport 2006-05-23 16:16:57.476210399 +1000
40 @@ -0,0 +1,10 @@
41 +{
42 + return "# statusreport disabled"
43 + unless ${statusreport}{status} eq 'enabled';
44 +
45 + my $dow = ${statusreport}{DayOfWeek};
46 + my $hour = ${statusreport}{Hour};
47 + my $minute = ${statusreport}{Minute};
48 +
49 + return "$minute $hour * * $dow root /sbin/e-smith/statusreport";
50 +}
51 diff -Nur -x '*.orig' -x '*.rej' smeserver-support-1.6.0/root/sbin/e-smith/console-menu-items/testInternet.pl mezzanine_patched_smeserver-support-1.6.0/root/sbin/e-smith/console-menu-items/testInternet.pl
52 --- smeserver-support-1.6.0/root/sbin/e-smith/console-menu-items/testInternet.pl 2006-01-05 16:58:14.000000000 +1100
53 +++ mezzanine_patched_smeserver-support-1.6.0/root/sbin/e-smith/console-menu-items/testInternet.pl 2006-05-23 16:58:58.609081633 +1000
54 @@ -26,13 +26,6 @@
55
56 sub doit
57 {
58 - use LWP;
59 - use HTTP::Request::Common;
60 - use Digest::SHA1 qw(sha1_hex);
61 -
62 - use esmith::ConfigDB;
63 - my $db = esmith::ConfigDB->open_ro or die "Couldn't open ConfigDB\n";
64 -
65 my $console = new esmith::console;
66
67 ($rc, $choice) = $console->yesno_page
68 @@ -50,38 +43,12 @@
69
70 return unless ($rc == 0);
71
72 - use constant SERVERTEST => 'http://www.contribs.org/servertest/';
73 -
74 - my $release = esmith::util::determineRelease();
75 - my $sysid_hash = sha1_hex($db->get_prop('sysconfig','SystemID'));
76 -
77 - my $url = SERVERTEST . "?" . "ReleaseVersion=$release" .
78 - "&SystemIDHash=$sysid_hash";
79 -
80 - my $ua = LWP::UserAgent->new;
81 -
82 - # add proxy arguments if appropriate
83 - if ($db->get_value('SquidParent'))
84 - {
85 - my $parent = $db->get_value('SquidParent');
86 - my $port = $db->get_value('SquidParentPort') || "3128";
87 - $ua->proxy(['http', 'ftp'], "http://$parent:$port/");
88 - }
89 -
90 print '-' x 75 . "\n";
91 print gettext("Attempting to test Internet connection.") . "\n";
92 print gettext("If this test takes too long, please halt it by typing Ctrl-C.") . "\n";
93 print '-' x 75 . "\n";
94
95 - my $response;
96 -
97 - eval {
98 - local $SIG{INT} = sub {die 1};
99 -
100 - $response = $ua->get($url);
101 - };
102 -
103 - if ($response->is_success)
104 + if (system("/sbin/e-smith/statusreport") == 0)
105 {
106 ($rc, $choice) = $console->message_page
107 (
108 @@ -92,10 +59,6 @@
109 }
110 else
111 {
112 - warn gettext("Response to Internet test was"), ": ",
113 - $response->message,
114 - "\n";
115 -
116 ($rc, $choice) = $console->message_page
117 (
118 title => "Internet connection failed",
119 diff -Nur -x '*.orig' -x '*.rej' smeserver-support-1.6.0/root/sbin/e-smith/statusreport mezzanine_patched_smeserver-support-1.6.0/root/sbin/e-smith/statusreport
120 --- smeserver-support-1.6.0/root/sbin/e-smith/statusreport 1970-01-01 10:00:00.000000000 +1000
121 +++ mezzanine_patched_smeserver-support-1.6.0/root/sbin/e-smith/statusreport 2006-05-23 17:08:45.918042833 +1000
122 @@ -0,0 +1,74 @@
123 +#!/usr/bin/perl
124 +#----------------------------------------------------------------------
125 +# statusreport
126 +# copyright (C) 1999-2006 Mitel Corporation
127 +# Copyright (C) 2006 Gordon Rowell <gordonr@gormand.com.au>
128 +#
129 +# This program is free software; you can redistribute it and/or modify
130 +# it under the terms of the GNU General Public License as published by
131 +# the Free Software Foundation; either version 2 of the License, or
132 +# (at your option) any later version.
133 +#
134 +# This program is distributed in the hope that it will be useful,
135 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
136 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
137 +# GNU General Public License or more details.
138 +#
139 +# You should have received a copy of the GNU General Public License
140 +# along with this program; if not, write to the Free Software
141 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
142 +#----------------------------------------------------------------------
143 +
144 +use strict;
145 +use warnings;
146 +
147 +use Locale::gettext;
148 +use LWP;
149 +use HTTP::Request::Common;
150 +use Digest::SHA1 qw(sha1_hex);
151 +
152 +use esmith::ConfigDB;
153 +my $db = esmith::ConfigDB->open_ro or die "Couldn't open ConfigDB\n";
154 +
155 +use constant SERVERTEST => 'http://www.contribs.org/servertest/';
156 +
157 +my $sysid_hash = sha1_hex($db->get_prop('sysconfig','SystemID'));
158 +
159 +my $url = SERVERTEST
160 + . "?"
161 + . "ReleaseVersion=" . $db->get_prop('sysconfig', 'ReleaseVersion')
162 + . "&SystemIDHash=" . $sysid_hash
163 + . "&CurrentEpoch=" . time
164 + . "&InstallEpoch=" . $db->get_prop('sysconfig', 'InstallEpoch')
165 + . "&SystemMode=" . $db->get_value('SystemMode');
166 +
167 +my $ua = LWP::UserAgent->new;
168 +
169 +#return add proxy arguments if appropriate
170 +if ($db->get_value('SquidParent'))
171 +{
172 + my $parent = $db->get_value('SquidParent');
173 + my $port = $db->get_value('SquidParentPort') || "3128";
174 + $ua->proxy(['http', 'ftp'], "http://$parent:$port/");
175 +}
176 +
177 +my $response;
178 +
179 +eval {
180 + local $SIG{INT} = sub {die 1};
181 +
182 + $response = $ua->get($url);
183 + };
184 +
185 +if ($response->is_success)
186 +{
187 + exit 0;
188 +}
189 +else
190 +{
191 + warn gettext("Response to Internet test was"), ": ",
192 + $response->message,
193 + "\n";
194 +
195 + exit 1;
196 +}

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