###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
+# Copyright (C) 2007-2011 Michael Tremer & Christian Schmidt #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
$pakfiresettings{'INSPAKS'} = '';
$pakfiresettings{'DELPAKS'} = '';
$pakfiresettings{'AUTOUPDATE'} = 'off';
-$pakfiresettings{'AUTOUPGRADE'} = 'off';
$pakfiresettings{'HEALTHCHECK'} = 'on';
$pakfiresettings{'UUID'} = 'on';
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'}
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'}
} 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') {
system("/usr/local/bin/pakfire disable updates >/dev/null 2>&1");
}
- if ($pakfiresettings{'AUTOUPGRADE'} eq 'on') {
- system("/usr/local/bin/pakfire enable upgrades >/dev/null 2>&1");
- } else {
- system("/usr/local/bin/pakfire disable upgrades >/dev/null 2>&1");
- }
-
&General::writehash("${General::swroot}/pakfire/settings", \%pakfiresettings);
}
$checked{'AUTOUPDATE'}{'off'} = '';
$checked{'AUTOUPDATE'}{'on'} = '';
$checked{'AUTOUPDATE'}{$pakfiresettings{'AUTOUPDATE'}} = "checked='checked'";
-$checked{'AUTOUPGRADE'}{'off'} = '';
-$checked{'AUTOUPGRADE'}{'on'} = '';
-$checked{'AUTOUPGRADE'}{$pakfiresettings{'AUTOUPGRADE'}} = "checked='checked'";
$checked{'HEALTHCHECK'}{'off'} = '';
$checked{'HEALTHCHECK'}{'on'} = '';
$checked{'HEALTHCHECK'}{$pakfiresettings{'HEALTHCHECK'}} = "checked='checked'";
print <<END;
<table width='95%' cellpadding='5' >
+END
+if ( -e "/var/run/need_reboot") {
+ print "<tr><td align='center' colspan='2'><font color='red'>$Lang::tr{'needreboot'}!</font></td></tr>";
+ print "<tr><td colspan='2'> </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 />
<tr><td align='left' width='45%'>$Lang::tr{'pakfire update daily'}</td><td width="55%" align="left">
on <input type='radio' name='AUTOUPDATE' value='on' $checked{'AUTOUPDATE'}{'on'} /> |
<input type='radio' name='AUTOUPDATE' value='off' $checked{'AUTOUPDATE'}{'off'} /> off </td></tr>
- <tr><td align='left' width='45%'>$Lang::tr{'pakfire core update auto'}</td><td align="left">
- on <input type='radio' name='AUTOUPGRADE' value='on' $checked{'AUTOUPGRADE'}{'on'} /> |
- <input type='radio' name='AUTOUPGRADE' value='off' $checked{'AUTOUPGRADE'}{'off'} /> off </td></tr>
<tr><td align='left' width='45%'>$Lang::tr{'pakfire health check'}</td><td align="left">
on <input type='radio' name='HEALTHCHECK' value='on' $checked{'HEALTHCHECK'}{'on'} /> |
<input type='radio' name='HEALTHCHECK' value='off' $checked{'HEALTHCHECK'}{'off'} /> off </td></tr>