From: Arne Fitzenreiter Date: Thu, 28 Jan 2010 23:09:33 +0000 (+0100) Subject: Add delay to pakfire.cgi to prevent pakfire run's twice. X-Git-Tag: v2.9-beta1~483^2 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=25dea62ac0410f129840a752544040abd7182953 Add delay to pakfire.cgi to prevent pakfire run's twice. --- diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index 8f20d57767..ca7a4ad4d9 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -62,6 +62,7 @@ if ($pakfiresettings{'ACTION'} eq 'install'){ 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"); my @output = `/usr/local/bin/pakfire resolvedeps --no-colors $pakfiresettings{'INSPAKS'}`; @@ -101,6 +102,7 @@ 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"); my @output = `/usr/local/bin/pakfire resolvedeps --no-colors $pakfiresettings{'DELPAKS'}`; @@ -138,10 +140,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') {