Pakfire Remove Funktion in der CGI aktiviert

Pakfire autorefresh bei install/uninstall eingebaut


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@760 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
maniacikarus
2007-08-12 08:32:30 +00:00
parent 9fa83d33e6
commit 74693811db
3 changed files with 45 additions and 3 deletions

View 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>

View File

@@ -1213,6 +1213,7 @@
'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.',
@@ -1561,6 +1562,7 @@
'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',

View File

@@ -1237,10 +1237,11 @@
'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.',
@@ -1593,6 +1594,7 @@
'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',