mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-18 20:30:56 +00:00
Let makentp fall back to use ntpd when systemctl is not available.
This commit is contained in:
@ -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 " .
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user