###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
+# Copyright (C) 2010 IPFire Team #
# #
# 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 #
$timesettings{'UPDATE_VALUE'} = '0';
$timesettings{'UPDATE_PERIOD'} = '';
$timesettings{'ENABLECLNTP'} = 'off';
+$timesettings{'ENABLESETONBOOT'} = 'off';
&Header::getcgihash(\%timesettings);
$timesettings{'UPDATE_PERIOD'} = 'daily';
$timesettings{'NTP_ADDR_1'} = 'de.pool.ntp.org';
$timesettings{'NTP_ADDR_2'} = 'pool.ntp.org';
+ $timesettings{'ENABLESETONBOOT'} = 'off';
}
unless ($errormessage) {
$checked{'ENABLECLNTP'}{'on'} = '';
$checked{'ENABLECLNTP'}{$timesettings{'ENABLECLNTP'}} = "checked='checked'";
+$checked{'ENABLESETONBOOT'}{'off'} = '';
+$checked{'ENABLESETONBOOT'}{'on'} = '';
+$checked{'ENABLESETONBOOT'}{$timesettings{'ENABLESETONBOOT'}} = "checked='checked'";
+
$checked{'UPDATE_METHOD'}{'manually'} = '';
$checked{'UPDATE_METHOD'}{'periodically'} = '';
$checked{'UPDATE_METHOD'}{$timesettings{'UPDATE_METHOD'}} = "checked='checked'";
</tr>
<tr>
<td> </td>
- <td class='base' colspan='2'>$Lang::tr{'set time now help'}</td>
+ <td class='base' colspan='3'>$Lang::tr{'set time now help'}</td>
+</tr>
+<tr>
+ <td class='base' colspan='4'><input type='checkbox' name='ENABLESETONBOOT' $checked{'ENABLESETONBOOT'}{'on'} /> $Lang::tr{'Set time on boot'}</td>
</tr>
<tr>
<td class='base'><input type='radio' name='UPDATE_METHOD' value='periodically' $checked{'UPDATE_METHOD'}{'periodically'} /></td>
'ConnSched add action' => 'Aktion hinzufügen',
'ConnSched change profile title' => 'Wechsle zu Profil:',
'ConnSched days' => 'Tage:',
+'Set time on boot' => 'Erzwinge das Setzen der Systemzeit im Bootvorgang',
'ConnSched down' => 'Runter',
'ConnSched ipsecstart' => 'IPSec (neu)starten',
'ConnSched ipsecstop' => 'IPSec stop',
'mpfire search' => 'MPFire Search',
'repeat' => 'Repeat',
'shuffle' => 'Shuffle',
+'Set time on boot' => 'Force setting the system clock on boot',
'Port Rule' => 'Port-Rule',
'qos add subclass' => 'Add subclass',
'The source IP address is invalid.' => 'The source IP address is invalid.',
'ConnSched change profile title' => 'Change to profile:',
'ConnSched days' => 'Days:',
'ConnSched down' => 'Down',
+'Set time on boot' => 'Fixé l'heure en botte',
'ConnSched ipsecstart' => 'IPSec (re)start',
'ConnSched ipsecstop' => 'IPSec stop',
'ConnSched reconnect' => 'Reconnect',
. /etc/sysconfig/rc
. $rc_functions
+eval $(/usr/local/bin/readhash /var/ipfire/time/settings)
+
case "$1" in
start)
+ if [ "$ENABLESETONBOOT" == "on" ]; then
+ boot_mesg "Setting time on booot..."
+ loadproc /usr/local/bin/settime $(cat /var/ipfire/time/settime.conf)
+ fi
+
boot_mesg "Starting ntpd..."
loadproc /usr/bin/ntpd -Ap /var/run/ntpd.pid
;;