]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/pakfire.cgi
Added messages into the webif to tell the user a reboot is required
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / pakfire.cgi
index ca7a4ad4d918aa52f5f885edb91a5e85018b17e2..414958e501319ab03f98602282c0e002ad665ca3 100644 (file)
@@ -57,6 +57,12 @@ sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' cont
 &Header::openpage($Lang::tr{'pakfire configuration'}, 1);
 &Header::openbigbox('100%', 'left', '', $errormessage);
 
+# check if reboot is necessary
+my $reboot = 0;
+if (`find /var/run/need_reboot 2>/dev/null`) {
+       $reboot = 1;    
+}
+
 if ($pakfiresettings{'ACTION'} eq 'install'){
        $pakfiresettings{'INSPAKS'} =~ s/\|/\ /g;
        if ("$pakfiresettings{'FORCE'}" eq "on") {
@@ -64,7 +70,7 @@ if ($pakfiresettings{'ACTION'} eq 'install'){
                system("$command");
                system("/bin/sleep 1");
        } else {
-               &Header::openbox("100%", "center", "Abfrage");
+               &Header::openbox("100%", "center", $Lang::tr{'request'});
        my @output = `/usr/local/bin/pakfire resolvedeps --no-colors $pakfiresettings{'INSPAKS'}`;
                print <<END;
                <table><tr><td colspan='2'>$Lang::tr{'pakfire install package'}.$pakfiresettings{'INSPAKS'}.$Lang::tr{'pakfire possible dependency'}
@@ -104,7 +110,7 @@ END
                system("$command");
                system("/bin/sleep 1");
        } else {
-               &Header::openbox("100%", "center", "Abfrage");
+               &Header::openbox("100%", "center", $Lang::tr{'request'});
        my @output = `/usr/local/bin/pakfire resolvedeps --no-colors $pakfiresettings{'DELPAKS'}`;
                print <<END;
                <table><tr><td colspan='2'>$Lang::tr{'pakfire uninstall package'}.$pakfiresettings{'DELPAKS'}.$Lang::tr{'pakfire possible dependency'}
@@ -229,6 +235,12 @@ my $packages_update_age = &General::age("/opt/pakfire/db/lists/packages_list.db"
 
 print <<END;
        <table width='95%' cellpadding='5' >
+END
+if ($reboot == 1) {
+       print "<tr><td align='center' colspan='2'><font color='red'>$Lang::tr{'needreboot'}!</font></td></tr>";
+       print "<tr><td colspan='2'>&nbsp;</font></td></tr>"
+}
+print <<END;
                <tr><td width="50%" bgcolor='$color{'color20'}' align="center"><b>$Lang::tr{'pakfire system state'}:</b>
                                <td width="50%">
                <tr><td align="center">$Lang::tr{'pakfire core update level'}: $core_release<hr />