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

Merge pull request #7080 from peterwywong/devnull

Do not write the pid of chronyd to /dev/null for all distros
This commit is contained in:
besawn 2022-01-06 13:51:36 -05:00 committed by GitHub
commit 6af3394818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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