diff --git a/xCAT-server/lib/xcat/plugins/makentp.pm b/xCAT-server/lib/xcat/plugins/makentp.pm index 35d20ee84..47aeca6cc 100755 --- a/xCAT-server/lib/xcat/plugins/makentp.pm +++ b/xCAT-server/lib/xcat/plugins/makentp.pm @@ -253,7 +253,8 @@ sub process_request { } # Handle chronyd here, - if (-f "/usr/sbin/chronyd") { + if (-x "/usr/sbin/chronyd" && + (-x "/usr/bin/systemctl" || -x "/bin/systemctl")) { send_msg(\%request, 0, "Will configure chronyd instead."); my $cmd = "/install/postscripts/setupntp " . diff --git a/xCAT/postscripts/setupntp b/xCAT/postscripts/setupntp index 75809581a..a95c621da 100755 --- a/xCAT/postscripts/setupntp +++ b/xCAT/postscripts/setupntp @@ -130,6 +130,7 @@ then fi check_executes chronyd >/dev/null 2>&1 || USE_NTPD="yes" +check_executes systemctl >/dev/null 2>&1 || USE_NTPD="yes" if [ -n "${USE_NTPD}" ] then