]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/pakfire.cgi
DHCP und Squid-Initscripts optimiert fuer ein schnelleres starten und stoppen.
[ipfire-2.x.git] / html / cgi-bin / pakfire.cgi
index f9144a316a329348c882ddad1fa50064be4fd159..478a490661423e68e01ae395dfb0521d9f66905b 100644 (file)
@@ -79,9 +79,9 @@ END
        
        system("/usr/local/bin/pakfire update --force");
 
-} elsif ($pakfiresettings{'ACTION'} eq 'unlock') {
+} elsif ($pakfiresettings{'ACTION'} eq 'upgrade') {
        
-       &Pakfire::lock("off");
+       system("/usr/local/bin/pakfire upgrade -y");
        
 } elsif ($pakfiresettings{'ACTION'} eq "$Lang::tr{'save'}") {
 
@@ -108,23 +108,32 @@ if ($errormessage) {
        &Header::closebox();
 }
 
-if ( -e "/opt/pakfire/pakfire.lock" ) {
+my $return = `pidof pakfire`;
+chomp($return);
+if ($return) {
        &Header::openbox("100%", "center", "Aktiv");
        print <<END;
        <table>
                <tr><td>
-                       <form method='post' action='$ENV{'SCRIPT_NAME'}'>
-                               <input type='hidden' name='ACTION' value='unlock' />
-                               <input type='image' src='/images/indicator.gif' alt='$Lang::tr{'aktiv'}' />&nbsp;
-                       </form>
+                               <img src='/images/indicator.gif' alt='$Lang::tr{'aktiv'}' />&nbsp;
                        <td>
                                Pakfire fuehrt gerade eine Aufgabe aus... Bitte warten sie, bis diese erfolgreich beendet wurde.
                <tr><td colspan='2' align='center'>
                        <form method='post' action='$ENV{'SCRIPT_NAME'}'>
                                <input type='image' alt='$Lang::tr{'reload'}' src='/images/view-refresh.png' />
                        </form>
+               ### TO BE CONTINUED.... WE HAVE TO BEAUTIFY THIS A LITTLE BIT :D
+               <tr><td colspan='2' align='left'><pre>
+END
+my @output = `tail /var/log/messages | grep pakfire`;
+foreach (@output) {
+       print "$_";
+}
+print <<END;
+               </pre>
        </table>
 END
+       ### TO BE CONTINUED.... WE HAVE TO BEAUTIFY THIS A LITTLE BIT :D
        &Header::closebox();
        &Header::closebigbox();
        &Header::closepage();
@@ -133,6 +142,8 @@ END
 
 &Header::openbox("100%", "center", "Pakfire");
 
+system("pakfire update &>dev/null");
+
 print <<END;
        <table width='100%'>
                <tr><td width='40%' align="center">Verfuegbare Addons:<br />