Skip to content

Commit

Permalink
Ntpd Error Log Caught by Log Analyzer Results in Test Cases Failure (#…
Browse files Browse the repository at this point in the history
…19580)

Fix NTP error log which causes many test failure caught by log analyzer
  • Loading branch information
wumiaont authored Oct 23, 2024
1 parent 8d09a2b commit d4779a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions files/image_config/ntp/ntp-systemd-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
DAEMON=/usr/sbin/ntpd
PIDFILE=/run/ntpd.pid
LOCKFILE=/run/lock/ntpsec-ntpdate
NTPLOGDIR=/var/log/ntpsec

if [ -r /etc/default/ntpsec ]; then
. /etc/default/ntpsec
Expand All @@ -24,6 +25,11 @@ fi

NTPD_OPTS="$NTPD_OPTS -u ntpsec:ntpsec"

if [ ! -e $NTPLOGDIR ]; then
mkdir $NTPLOGDIR
chmod 777 $NTPLOGDIR
fi

# Protect the service startup against concurrent ntpdate ifup hooks
(
if flock -w 180 9; then
Expand Down

0 comments on commit d4779a8

Please sign in to comment.