From f0705f9ff4a428c42cc7bc2c749f91402b2acea5 Mon Sep 17 00:00:00 2001 From: Wai Yee Wong Date: Thu, 22 Apr 2021 12:22:23 -0400 Subject: [PATCH] Modification of the conditional statement --- xCAT/postscripts/setupntp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xCAT/postscripts/setupntp b/xCAT/postscripts/setupntp index 98ce05f26..1388e5b5f 100755 --- a/xCAT/postscripts/setupntp +++ b/xCAT/postscripts/setupntp @@ -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 "$(