From b2e32a8f15c85a0da50a3a91730b8759221bf79a Mon Sep 17 00:00:00 2001 From: jjhua Date: Mon, 8 Mar 2010 06:54:45 +0000 Subject: [PATCH] 1. modified , 2. handle the Not Available case git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5398 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/lpar_netboot.expect | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xCAT-server/sbin/lpar_netboot.expect b/xCAT-server/sbin/lpar_netboot.expect index e771246f2..eef5c191d 100644 --- a/xCAT-server/sbin/lpar_netboot.expect +++ b/xCAT-server/sbin/lpar_netboot.expect @@ -99,7 +99,7 @@ proc run_lssyscfg {} { nc_msg "$PROGRAM Status: run_lssyscg : partition status : $msg\n" regexp "$node:\[ ]*(.*)" $msg tmp1 tmp set msg $tmp - send_user "####msg:$msg#########" + nc_msg "####msg:$msg#########\n" # Slow down the requests speed to hcp, so that hcp will not busy on @@ -1827,7 +1827,7 @@ proc Firmware_Dump { device_path phandle } { # Main MAIN main # set BINPATH "/opt/xcat/bin" -set PROGRAM "lpar_netboot.expect" +set PROGRAM "lpar_netboot" set CONSOLEBIN "/opt/xcat/bin/rcons" @@ -2132,6 +2132,13 @@ send_user "# Checking for power off.\n" run_lssyscfg +if { [string compare "$msg" "Not Available"] == 0 } { + send_user "$PROGRAM: LPAR is Not Available. Please make sure the CEC's state\n" + set rc 1 + exit 1 +} + + if { ([string compare "$msg" "Off"] == 0) || ([string compare "$msg" "off"] == 0) || ([string compare "$msg" "Not Activated"] == 0) } { send_user "# Power off complete.\n" } else {