]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Pakfire Remove Funktion in der CGI aktiviert
authormaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 12 Aug 2007 08:32:30 +0000 (08:32 +0000)
committermaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 12 Aug 2007 08:32:30 +0000 (08:32 +0000)
Pakfire autorefresh bei install/uninstall eingebaut

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@760 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

html/cgi-bin/pakfire.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index 42be29b77d4aa5d4d0fd88513bce2630d68b7343..a1a14c7acf96eb8cc8a6689fefdaea93c457a1ab 100644 (file)
@@ -45,7 +45,7 @@ if ($pakfiresettings{'ACTION'} eq 'install'){
                sleep(2);
        } else {
                &Header::openbox("100%", "center", "Abfrage");
-               my @output = `/usr/local/bin/pakfire resolvedeps --no-colors $pakfiresettings{'INSPAKS'}`;
+       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'}
                <pre>           
@@ -77,6 +77,44 @@ END
        }
 } elsif ($pakfiresettings{'ACTION'} eq 'remove') {
 
+       $pakfiresettings{'DELPAKS'} =~ s/\|/\ /g;
+       if ("$pakfiresettings{'FORCE'}" eq "on") {
+               my $command = "/usr/local/bin/pakfire remove --non-interactive --no-colors $pakfiresettings{'DELPAKS'} &>/dev/null &";
+               system("$command");
+               sleep(2);
+       } else {
+               &Header::openbox("100%", "center", "Abfrage");
+       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'}
+               <pre>           
+END
+               foreach (@output) {
+                       print "$_\n";
+               }
+               print <<END;
+               </pre>
+               <tr><td colspan='2'>$Lang::tr{'pakfire accept all'}
+               <tr><td colspan='2'>&nbsp;
+               <tr><td align='right'><form method='post' action='$ENV{'SCRIPT_NAME'}'>
+                                                       <input type='hidden' name='DELPAKS' value='$pakfiresettings{'DELPAKS'}' />
+                                                       <input type='hidden' name='FORCE' value='on' />
+                                                       <input type='hidden' name='ACTION' value='remove' />
+                                                       <input type='image' alt='$Lang::tr{'uninstall'}' src='/images/go-next.png' />
+                                               </form>
+                               <td align='left'>
+                                               <form method='post' action='$ENV{'SCRIPT_NAME'}'>
+                                                       <input type='hidden' name='ACTION' value='' />
+                                                       <input type='image' alt='$Lang::tr{'abort'}' src='/images/dialog-error.png' />
+                                               </form>
+               </table>
+END
+               &Header::closebox();
+               &Header::closebigbox();
+               &Header::closepage();
+               exit;
+       }
+
 } elsif ($pakfiresettings{'ACTION'} eq 'update') {
        
        system("/usr/local/bin/pakfire update --force --no-colors");
@@ -113,7 +151,7 @@ if ($errormessage) {
 my $return = `pidof pakfire`;
 chomp($return);
 if ($return) {
-       &Header::openbox("100%", "center", "Aktiv");
+       &Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='5;'>" );
        print <<END;
        <table>
                <tr><td>
index ba638327e2594df4ea7a8a62333af7adc29bc0a3..15e562c1752e6701dc9b853a0f1c54659e21555c 100644 (file)
 'pakfire installed addons' => 'Installierte Addons:',
 'pakfire possible dependency' => ' Möglicherweise haben diese Pakete Abhängigkeiten, d.h. andere Pakete müssen zusätzlich installiert werden. Dazu sehen sie unten eine Liste.',
 'pakfire register' => 'Registrierung am Master-Server:',
+'pakfire uninstall package' => 'Sie möchten folgende Pakete deinstallieren: ',
 'pakfire update daily' => 'Automatische Updates täglich ausführen:',
 'pakfire updates' => 'Zur Verfügung stehende Updates:',
 'pakfire working' => 'Pakfire führt gerade eine Aufgabe aus... Bitte warten sie, bis diese erfolgreich beendet wurde.',
 'unable to alter profiles while red is active' => 'Profile können nicht geändert werden, solange ROT aktiv ist.',
 'unable to contact' => 'Kann nicht erreicht werden',
 'unencrypted' => 'Nichtverschlüsselt',
+'uninstall' => 'Deinstallieren',
 'unix group' => ' UNIX Benutzergruppe',
 'unix password sync' => 'Unix Password Sync',
 'unix shell' => 'UNIX Shell',
index c48537bcdab15d3e283b6da9876319bb53351ff6..04e42bbfc5f1380688b2509da51b7d4cf08c1635 100644 (file)
 'pagerefresh' => 'Page is beeing refreshed, please wait.',
 'pakfire accept all' => 'Do you want to install all packages?',
 'pakfire configuration' => 'Pakfire Configuration',
-'pakfire install package' => 'You want ti install the following packages: ',
+'pakfire install package' => 'You want to install the following packages: ',
 'pakfire installed addons' => 'Installed Addons:',
 'pakfire possible dependency' => ' There may be depending packages, here is a list of packages that need to be installed.',
 'pakfire register' => 'Register at master server:',
+'pakfire uninstall package' => 'You want to uninstall the following packages: ',
 'pakfire update daily' => 'Run automatic Update daily:',
 'pakfire updates' => 'Available Update:',
 'pakfire working' => 'Pakfire ist working ... Please wait until everything is done successfull.',
 'unable to alter profiles while red is active' => 'Unable to alter profiles while RED is active.',
 'unable to contact' => 'Unable to contact',
 'unencrypted' => 'Unencrypted',
+'uninstall' => 'Uninstall',
 'unix group' => ' UNIX usergroup',
 'unix password sync' => 'Unix Password Sync',
 'unix shell' => 'UNIX Shell',