From c9ceae7dd4eec7436300f37dc1ba9dae61944b87 Mon Sep 17 00:00:00 2001 From: linggao Date: Sat, 22 Nov 2008 04:03:24 +0000 Subject: [PATCH] fix for scaling git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2523 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/syslog | 21 +++++++++++++++++++-- xCAT/postscripts/xcataixpost | 2 ++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/syslog b/xCAT/postscripts/syslog index 179d54784..3c7045dc0 100755 --- a/xCAT/postscripts/syslog +++ b/xCAT/postscripts/syslog @@ -213,11 +213,28 @@ if [ $isLinux -eq 0 ]; then if [[ -n "$state" && "$state" = "active" ]];then stopsrc -s syslogd fi - startsrc -s syslogd + + #wait for syslogd to fully started + RETRY_LIMIT=30 # number of 2 second retry intervals (60 second total) + let i=$RETRY_LIMIT + while : + do + ret=`LC_ALL=C startsrc -s syslogd 2>&1` + if [[ $ret == *PID* ]];then + break + fi + + i=$((i - 1)) + if (( i > 0 ));then + sleep 2 + else + break + fi + done else $init restart fi #keep a record -logger -t xcat "Install: syslog setup" +logger -t xCAT "Install: syslog setup" exit 0 diff --git a/xCAT/postscripts/xcataixpost b/xCAT/postscripts/xcataixpost index bccde47e5..cdc9438f9 100755 --- a/xCAT/postscripts/xcataixpost +++ b/xCAT/postscripts/xcataixpost @@ -9,6 +9,8 @@ use File::Path; use IO::Socket; +sleep int(rand(10)); + # since we don't have syslog set up yet we'll # just save msgs in a local log file $logdir = "/var/log/xcat";