2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-23 19:50:21 +00:00

Remove pidfile /dev/null for chronyd in setupntp on Ubuntu systems

This commit is contained in:
Wai Yee Wong
2021-04-21 15:50:17 -04:00
parent 405319b49b
commit 82a2e8afd6

View File

@@ -167,6 +167,18 @@ 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 ..."
OS_name=`cat /etc/os-release | grep "NAME=\"Ubuntu\""`
if [ -z $OS_name ]
then
pidfile_option="pidfile /dev/null"
else
# Some versions of chronyd on Ubuntu distros have an issue
# with the valid option "pidfile /dev/null".
pidfile_option=""
fi
chronyd -f /dev/null -q "$(
if [ "${#NTP_SERVERS[@]}" -gt "0" ]
then
@@ -174,7 +186,7 @@ chronyd -f /dev/null -q "$(
else
echo "pool pool.ntp.org iburst"
fi
)" "pidfile /dev/null"
)" "$pidfile_option"
rm -f /etc/adjtime
# Set the hardware clock from the system clock