mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 09:13:08 +00:00
do not set exit_code to 1 when the clock is not synced before the timeout (#4362)
This commit is contained in:
parent
ded43107e2
commit
f5437609d4
@ -116,11 +116,14 @@ if [ $OS_TYPE = Linux ]; then
|
||||
stopservice ntpserver
|
||||
fi
|
||||
|
||||
logger -t xcat "setting current time"
|
||||
msg='syncing the clock ...'
|
||||
logger -t xcat $msg
|
||||
echo $msg
|
||||
if ! timeout 120 ntpd -gq > /dev/null 2>&1 ; then
|
||||
if ! ntpdate -t5 $master > /dev/null 2>&1; then
|
||||
logger -t xcat "WARNING: NTP Sync Failed!!"
|
||||
exit_code=1
|
||||
msg='WARNING: NTP Sync Failed before timeout. ntp server will try to sync...'
|
||||
logger -t xcat $msg
|
||||
echo $msg
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user