mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-18 12:20:40 +00:00
modified depending on comments
This commit is contained in:
@ -271,14 +271,19 @@ fi
|
||||
|
||||
# rv 0 state does not work with the new ntp versions
|
||||
while [ "`ntpq -c 'rv 0 offset' | awk -F '=' '/offset=/ { print $2 }' | awk -F '.' '{ print $1 }' | sed s/-//`" -ge 1000 ]; do
|
||||
echo `ntpq -c 'rv 0 offset`
|
||||
sleep 1
|
||||
done
|
||||
|
||||
kill `cat /var/run/syslogd.pid`
|
||||
sleep 3
|
||||
RSYSLOGD_VERSION=`rsyslogd -v | grep "rsyslogd" | cut -d" " -f2 | cut -d"." -f1`
|
||||
if [ $RSYSLOGD_VERSION -ge 8 ]; then
|
||||
read -r RSYSLOG_PID </var/run/syslogd.pid 2>/dev/null
|
||||
kill "$RSYSLOG_PID" 2>/dev/null
|
||||
while kill -0 "$RSYSLOG_PID" 2>/dev/null
|
||||
do
|
||||
sleep 0.5
|
||||
done
|
||||
unset RSYSLOG_PID
|
||||
|
||||
RSYSLOGD_VERSION=`rsyslogd -v | awk '/rsyslogd/ { split($2, a, "."); print a[1]; }'`
|
||||
if [ "$RSYSLOGD_VERSION" -ge 8 ]; then
|
||||
/sbin/rsyslogd
|
||||
else
|
||||
/sbin/rsyslogd -c4
|
||||
@ -330,7 +335,8 @@ while :; do
|
||||
/bin/getcert $XCATMASTER:$XCATPORT
|
||||
destiny=''
|
||||
dest=''
|
||||
touch /tmp/xcatgenesisdiscovery
|
||||
DISCOVERYDONE=1
|
||||
export DISCOVERYDONE
|
||||
elif [ "$dest" = shell ]; then
|
||||
logger -s -t $log_label -p local4.info "Dropping to debug shell(exit to run next destiny)..."
|
||||
destiny=''
|
||||
@ -394,7 +400,7 @@ while :; do
|
||||
delay=$((30+$RANDOM%270))
|
||||
while [ $delay -gt 0 ]; do
|
||||
if [ $((delay%10)) == 0 ]; then
|
||||
if [ -e "/tmp/xcatgenesisdiscovery" ]; then
|
||||
if [ $DISCOVERYDONE == 1 ]; then
|
||||
logger -s -t $log_label -p local4.info "Received request=$dest, will call xCAT back in $delay seconds. Discovery is complete, run nodeset on this node to provision an Operating System"
|
||||
else
|
||||
logger -s -t $log_label -p local4.info "Received request to retry in a bit, will call xCAT back in $delay seconds"
|
||||
|
Reference in New Issue
Block a user