2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 01:56:39 +00:00

Modification of the conditional statement

This commit is contained in:
Wai Yee Wong 2021-04-22 12:22:23 -04:00
parent 82a2e8afd6
commit f0705f9ff4

View File

@ -168,15 +168,13 @@ 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 ]
if [ -f /etc/os-release ] && cat /etc/os-release |grep NAME|grep Ubuntu>/dev/null
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=""
else
pidfile_option="pidfile /dev/null"
fi
chronyd -f /dev/null -q "$(