]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/pakfire.cgi
Fixed language string on pakfire.cgi.
[people/teissler/ipfire-2.x.git] / html / cgi-bin / pakfire.cgi
index 8f20d57767293835e1a036e177784ef73c016ed5..da761f085e140592abe86854f9f3513242097909 100755 (executable)
@@ -57,13 +57,20 @@ 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") {
                my $command = "/usr/local/bin/pakfire install --non-interactive --no-colors $pakfiresettings{'INSPAKS'} &>/dev/null &";
                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'}
@@ -101,8 +108,9 @@ END
        if ("$pakfiresettings{'FORCE'}" eq "on") {
                my $command = "/usr/local/bin/pakfire remove --non-interactive --no-colors $pakfiresettings{'DELPAKS'} &>/dev/null &";
                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'}
@@ -138,10 +146,11 @@ END
 } elsif ($pakfiresettings{'ACTION'} eq 'update') {
 
        system("/usr/local/bin/pakfire update --force --no-colors &>/dev/null &");
-
+       system("/bin/sleep 1");
 } elsif ($pakfiresettings{'ACTION'} eq 'upgrade') {
        my $command = "/usr/local/bin/pakfire upgrade -y --no-colors &>/dev/null &";
        system("$command");
+       system("/bin/sleep 1");
 } elsif ($pakfiresettings{'ACTION'} eq "$Lang::tr{'save'}") {
 
        if ($pakfiresettings{'AUTOUPDATE'} eq 'on') {
@@ -226,13 +235,19 @@ 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 />
-                                       $Lang::tr{'pakfire last update'} $core_update_age ago<br />
-                                       $Lang::tr{'pakfire last serverlist update'} $server_update_age ago<br />
-                                       $Lang::tr{'pakfire last core list update'} $corelist_update_age ago<br />
-                                       $Lang::tr{'pakfire last package update'} $packages_update_age ago
+                                       $Lang::tr{'pakfire last update'} $core_update_age $Lang::tr{'pakfire ago'}<br />
+                                       $Lang::tr{'pakfire last serverlist update'} $server_update_age $Lang::tr{'pakfire ago'}<br />
+                                       $Lang::tr{'pakfire last core list update'} $corelist_update_age $Lang::tr{'pakfire ago'}<br />
+                                       $Lang::tr{'pakfire last package update'} $packages_update_age $Lang::tr{'pakfire ago'}
                                        <form method='post' action='$ENV{'SCRIPT_NAME'}'>
                                                <input type='hidden' name='ACTION' value='update' />
                                                <input type='submit' value='$Lang::tr{'calamaris refresh list'}' /><br />