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 --- smeserver-yum-1.2.0/root/etc/e-smith/web/functions/yum 2006-11-17 12:46:47.559580512 +1100 +++ mezzanine_patched_smeserver-yum-1.2.0/root/etc/e-smith/web/functions/yum 2006-11-17 12:27:38.278754377 +1100 @@ -40,6 +40,16 @@ exit(0); } +if ($f->get_prop('yum', 'PostUpgradeRequired')) +{ + $f->success('HEADER_POSTUPGRADE_REQUIRED', 'YUM_PAGE_POSTUPGRADE'); + + $f->{cgi}->param(-name => "page", -value => 0); + $f->{cgi}->param(-name => "page_stack", -value => ''); + $f->{cgi}->param(-name => "Next", -value => 'Next'); + $f->{cgi}->param(-name => "wherenext", -value =>'YUM_PAGE_POSTUPGRADE'); +} + $f->display(); =head1 TESTING 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 --- smeserver-yum-1.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/yum.pm 2006-11-17 12:46:47.560580338 +1100 +++ 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 @@ -217,27 +217,12 @@ $db->set_prop("yum", $_, join(',', ($q->param($_) ))); } -# my $system_status = system("/sbin/e-smith/signal-event", "yum-$function"); - esmith::util::backgroundCommand(0, "/sbin/e-smith/signal-event", "yum-$function"); $db->reload; -# my $page = ($function eq 'modify') ? 'First' -# : 'YUM_PAGE_POSTUPGRADE'; - -# $fm->success('SUCCESS', 'YUM_PAGE_EVENTINPROGRESS'); print_yum_status_page(); - -# if ($system_status == 0) -# { -# $fm->success('SUCCESS', $page); -# } -# else -# { -# $fm->error('ERROR_UPDATING', $page); -# } } sub print_skip_header @@ -247,15 +232,26 @@ sub print_yum_status_page { - my ($yum_stat); + my @yum_status; open(YUM_STATUS, ") { $yum_stat = $_; } + @yum_status = ; close(YUM_STATUS); + my $yum_log = $db->get_prop('yum', 'LogFile'); + my @yum_log; + + if ($yum_log) + { + open(YUM_LOG, "<", "$yum_log"); + + @yum_log = ; + close YUM_LOG + } + my $page_output = << "EOF"; Expires: 0 -Refresh: 10; URL=/server-manager/cgi-bin/yum +Refresh: 3; URL=/server-manager/cgi-bin/yum Content-type: text/html @@ -268,7 +264,10 @@ HREF="/server-common/css/sme_core.css"> -

Please Wait - Yum Running ($yum_stat)

+

Please Wait - Yum Running (@yum_status)

+
+  @yum_log
+  
EOF @@ -323,6 +322,8 @@ { my $fm = shift; + $db->delete_prop('yum', 'LogFile'); + system( "( /sbin/e-smith/signal-event post-upgrade ; /sbin/e-smith/signal-event reboot ) &" ); $fm->success('SYSTEM_BEING_RECONFIGURED'); @@ -332,7 +333,7 @@ { my $fm = shift; - my $yum_log = $db->get_prop_and_delete('yum', 'LogFile'); + my $yum_log = $db->get_prop('yum', 'LogFile'); return unless $yum_log and -f $yum_log;