2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-18 12:20:40 +00:00

Let makentp fall back to use ntpd when systemctl is not available.

This commit is contained in:
GONG Jie
2019-04-22 17:36:40 +08:00
parent 84bd7691e8
commit ca3251aaf1
2 changed files with 3 additions and 1 deletions

View File

@ -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 " .

View File

@ -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