* Wed Apr 17 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-6.sme
- update package for ntpsec [SME: 12590]master 11_0_0-6_el8_sme
parent
63e4669589
commit
42c535335d
@ -1,19 +0,0 @@
|
||||
{
|
||||
my $NTPenabled = $ntpd{'status'} || 'disabled';
|
||||
my $server = $ntpd{NTPServer} || '';
|
||||
if ($NTPenabled eq 'enabled')
|
||||
{
|
||||
if ($server =~ /pool.ntp.org/)
|
||||
{
|
||||
$OUT .= "0.$server";
|
||||
}
|
||||
else
|
||||
{
|
||||
$OUT .= "$server";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$OUT .= "# ntpd service is disabled";
|
||||
}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
my $timezone = $TimeZone || "US/Eastern";
|
||||
|
||||
$OUT .= "ZONE=\"$timezone\"";
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
$OUT .= "UTC=true";
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
$OUT .= "ARC=false";
|
||||
}
|
@ -1,25 +1,11 @@
|
||||
#!/bin/bash
|
||||
#first move old drift file if in the way
|
||||
OLDFILE='/etc/ntp/drift'
|
||||
NEWFILE='/var/lib/ntp/drift'
|
||||
if [ -f "$NEWFILE" ]; then
|
||||
if [ -f "$OLDFILE" ];then
|
||||
/usr/bin/rm -f $OLDFILE
|
||||
fi
|
||||
else
|
||||
if [ -f "$OLDFILE" ];then
|
||||
/usr/bin/mv $OLDFILE $NEWFILE
|
||||
fi
|
||||
fi
|
||||
if [ -f "$NEWFILE" ]; then
|
||||
/usr/bin/chown ntp:ntp $NEWFILE
|
||||
fi
|
||||
|
||||
# Run ntpdate so we're not way off on startup.
|
||||
ntpstep=/etc/ntp/step-tickers
|
||||
tickers=`/bin/sed -e 's/\#.*$//g' $ntpstep`
|
||||
#get current date (will need to update this command soon to be retired : ntpd -q -x -g -g -g -g
|
||||
/usr/sbin/ntpdate -b -p 8 $tickers
|
||||
# force sync date and time
|
||||
/usr/sbin/ntpd -q -x -g -g -g -g >/dev/null
|
||||
# set hardware clock to the current time
|
||||
/usr/sbin/hwclock --systohc
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue