]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/index.cgi
Added messages into the webif to tell the user a reboot is required
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / index.cgi
old mode 100644 (file)
new mode 100755 (executable)
index dfe65bf..b85b22c
@@ -39,6 +39,7 @@ my $warnmessage = '';
 my $refresh = "";
 my $ipaddr='';
 
+
 &Header::showhttpheaders();
 
 $cgiparams{'ACTION'} = '';
@@ -57,6 +58,12 @@ my %mainsettings = ();
 
 my $connstate = &Header::connectionstatus();
 
+# check if reboot is necessary
+my $reboot = 0;
+if (`find /var/run/need_reboot 2>/dev/null`) {
+       $reboot = 1;    
+}
+
 if ($cgiparams{'ACTION'} eq $Lang::tr{'shutdown'} || $cgiparams{'ACTION'} eq $Lang::tr{'reboot'}) {
        $refresh = "<meta http-equiv='refresh' content='300;'>";
 } elsif ($connstate =~ /$Lang::tr{'connecting'}/ || /$Lang::tr{'connection closed'}/ ){
@@ -428,6 +435,7 @@ foreach my $file (@files) {
        }
 }
 
+
 if ($warnmessage) {
        print "<tr><td align='center' bgcolor=$Header::colourred colspan='3'><font color='white'>$warnmessage</font></table>";
 }
@@ -437,8 +445,10 @@ END
 ;
 &Pakfire::dblist("upgrade", "notice");
 print <<END;
-
 END
+if ($reboot == 0) {
+       print "<br /><font color='red'>$Lang::tr{'needreboot'}!</font>";
+}
 } else {
        my $message='';
        if ($death) {