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

Contents of /rpms/smeserver-yum/sme8/smeserver-yum-1.2.0-yumplugin.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:51 2008 UTC (16 years ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
Error occurred while calculating annotation data.
FILE REMOVED
New streams

1 diff -Nur -x '*.orig' -x '*.rej' smeserver-yum-1.2.0/root/etc/e-smith/web/functions/yum mezzanine_patched_smeserver-yum-1.2.0/root/etc/e-smith/web/functions/yum
2 --- smeserver-yum-1.2.0/root/etc/e-smith/web/functions/yum 2006-11-17 12:46:47.559580512 +1100
3 +++ mezzanine_patched_smeserver-yum-1.2.0/root/etc/e-smith/web/functions/yum 2006-11-17 12:27:38.278754377 +1100
4 @@ -40,6 +40,16 @@
5 exit(0);
6 }
7
8 +if ($f->get_prop('yum', 'PostUpgradeRequired'))
9 +{
10 + $f->success('HEADER_POSTUPGRADE_REQUIRED', 'YUM_PAGE_POSTUPGRADE');
11 +
12 + $f->{cgi}->param(-name => "page", -value => 0);
13 + $f->{cgi}->param(-name => "page_stack", -value => '');
14 + $f->{cgi}->param(-name => "Next", -value => 'Next');
15 + $f->{cgi}->param(-name => "wherenext", -value =>'YUM_PAGE_POSTUPGRADE');
16 +}
17 +
18 $f->display();
19
20 =head1 TESTING
21 diff -Nur -x '*.orig' -x '*.rej' smeserver-yum-1.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/yum.pm mezzanine_patched_smeserver-yum-1.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/yum.pm
22 --- smeserver-yum-1.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/yum.pm 2006-11-17 12:46:47.560580338 +1100
23 +++ mezzanine_patched_smeserver-yum-1.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/yum.pm 2006-11-17 12:46:21.126184500 +1100
24 @@ -217,27 +217,12 @@
25 $db->set_prop("yum", $_, join(',', ($q->param($_) )));
26 }
27
28 -# my $system_status = system("/sbin/e-smith/signal-event", "yum-$function");
29 -
30 esmith::util::backgroundCommand(0,
31 "/sbin/e-smith/signal-event", "yum-$function");
32
33 $db->reload;
34
35 -# my $page = ($function eq 'modify') ? 'First'
36 -# : 'YUM_PAGE_POSTUPGRADE';
37 -
38 -# $fm->success('SUCCESS', 'YUM_PAGE_EVENTINPROGRESS');
39 print_yum_status_page();
40 -
41 -# if ($system_status == 0)
42 -# {
43 -# $fm->success('SUCCESS', $page);
44 -# }
45 -# else
46 -# {
47 -# $fm->error('ERROR_UPDATING', $page);
48 -# }
49 }
50
51 sub print_skip_header
52 @@ -247,15 +232,26 @@
53
54 sub print_yum_status_page
55 {
56 - my ($yum_stat);
57 + my @yum_status;
58
59 open(YUM_STATUS, "</var/run/yum.status");
60 - while (<YUM_STATUS>) { $yum_stat = $_; }
61 + @yum_status = <YUM_STATUS>;
62 close(YUM_STATUS);
63
64 + my $yum_log = $db->get_prop('yum', 'LogFile');
65 + my @yum_log;
66 +
67 + if ($yum_log)
68 + {
69 + open(YUM_LOG, "<", "$yum_log");
70 +
71 + @yum_log = <YUM_LOG>;
72 + close YUM_LOG
73 + }
74 +
75 my $page_output = << "EOF";
76 Expires: 0
77 -Refresh: 10; URL=/server-manager/cgi-bin/yum
78 +Refresh: 3; URL=/server-manager/cgi-bin/yum
79 Content-type: text/html
80
81 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
82 @@ -268,7 +264,10 @@
83 HREF="/server-common/css/sme_core.css">
84 </HEAD>
85 <BODY TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
86 - <BR><center><H2>Please Wait - Yum Running ($yum_stat)</H2></center>
87 + <BR><center><H2>Please Wait - Yum Running (@yum_status)</H2></center>
88 + <PRE>
89 + @yum_log
90 + </PRE>
91 </BODY>
92 </HTML>
93 EOF
94 @@ -323,6 +322,8 @@
95 {
96 my $fm = shift;
97
98 + $db->delete_prop('yum', 'LogFile');
99 +
100 system( "( /sbin/e-smith/signal-event post-upgrade ; /sbin/e-smith/signal-event reboot ) &" );
101
102 $fm->success('SYSTEM_BEING_RECONFIGURED');
103 @@ -332,7 +333,7 @@
104 {
105 my $fm = shift;
106
107 - my $yum_log = $db->get_prop_and_delete('yum', 'LogFile');
108 + my $yum_log = $db->get_prop('yum', 'LogFile');
109
110 return unless $yum_log and -f $yum_log;
111

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