Detect system_mode while sysinv-agent init script
Check /etc/platform/platform.conf for an "simplex" system and disable the network check for the controller-platform-nfs host since its all on the same host. This results in a significant boot speed up. Test Plan PASS Build sysinv-agent package PASS Build ISO PASS Bootstrap/unlock Story: 2009221 Task: 45759 Signed-off-by: Charles Short <charles.short@windriver.com> Change-Id: Ia2c2884a07ca2bd237039a906a01fcadb73caae4
This commit is contained in:
@@ -36,11 +36,13 @@ daemon_pidfile="/var/run/${DAEMON_NAME}.pid"
|
|||||||
|
|
||||||
if [ -f ${PLATFORM_CONF} ] ; then
|
if [ -f ${PLATFORM_CONF} ] ; then
|
||||||
NODETYPE=`cat ${PLATFORM_CONF} | grep nodetype | cut -f2 -d'='`
|
NODETYPE=`cat ${PLATFORM_CONF} | grep nodetype | cut -f2 -d'='`
|
||||||
|
SYSTEM_MODE=`cat ${PLATFORM_CONF} | grep system_mode | cut -f2 -d'='`
|
||||||
else
|
else
|
||||||
logger "$0: ${PLATFORM_CONF} is missing"
|
logger "$0: ${PLATFORM_CONF} is missing"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ ! -e "${SYSINVAGENT}" ] ; then
|
if [ ! -e "${SYSINVAGENT}" ] ; then
|
||||||
logger "$0: ${SYSINVAGENT} is missing"
|
logger "$0: ${SYSINVAGENT} is missing"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -106,6 +108,10 @@ case "$1" in
|
|||||||
FOUND=0
|
FOUND=0
|
||||||
while [ $(date +%s) -lt $(( ${START} + ${DELAY_SEC} )) ]
|
while [ $(date +%s) -lt $(( ${START} + ${DELAY_SEC} )) ]
|
||||||
do
|
do
|
||||||
|
if [ ${SYSTEM_MODE} = "simplex" ]
|
||||||
|
then
|
||||||
|
break
|
||||||
|
fi
|
||||||
ping -c 1 controller-platform-nfs > /dev/null 2>&1 || ping6 -c 1 controller-platform-nfs > /dev/null 2>&1
|
ping -c 1 controller-platform-nfs > /dev/null 2>&1 || ping6 -c 1 controller-platform-nfs > /dev/null 2>&1
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
|
Reference in New Issue
Block a user