2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

Do not write the pid of chronyd to /dev/null for all distros

This commit is contained in:
Wai Yee Wong 2021-12-14 17:57:02 -05:00
parent 7c22110a7e
commit 82801016ac

View File

@ -168,15 +168,6 @@ warn_if_bad "$?" "Failed to configure the system to maintain the RTC in universa
# Synchronize and set the system clock once
logger -t $log_label -p local4.info "Syncing the clock ..."
if [ -f /etc/os-release ] && cat /etc/os-release |grep NAME|grep Ubuntu>/dev/null
then
# Some versions of chronyd on Ubuntu distros have an issue
# with the valid option "pidfile /dev/null".
pidfile_option=""
else
pidfile_option="pidfile /dev/null"
fi
chronyd -f /dev/null -q "$(
if [ "${#NTP_SERVERS[@]}" -gt "0" ]
then
@ -184,7 +175,7 @@ chronyd -f /dev/null -q "$(
else
echo "pool pool.ntp.org iburst"
fi
)" "$pidfile_option"
)"
rm -f /etc/adjtime
# Set the hardware clock from the system clock