###############################################################################
# #
# 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';
&Header::openpage($Lang::tr{'pakfire configuration'}, 1);
&Header::openbigbox('100%', 'left', '', $errormessage);
-# check if reboot is necessary
-my $reboot = 0;
-if (`find /var/run/need_reboot 2>/dev/null`) {
- $reboot = 1;
-}
-
if ($pakfiresettings{'ACTION'} eq 'install'){
$pakfiresettings{'INSPAKS'} =~ s/\|/\ /g;
if ("$pakfiresettings{'FORCE'}" 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 ($reboot == 1) {
+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>"
}
<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>