diff mbox

[36/40] external/boot_tests: remove lid from the BMC after flashing

Message ID 1476089061-15197-37-git-send-email-stewart@linux.vnet.ibm.com
State Accepted
Headers show

Commit Message

Stewart Smith Oct. 10, 2016, 8:44 a.m. UTC
From: Claudio Carvalho <cclaudio@linux.vnet.ibm.com>

Usually, BMC systems doesn't have too much space for storage.
This removes the lid from the BMC after the lid is flashed.

Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 external/boot-tests/bmc_support.sh | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/external/boot-tests/bmc_support.sh b/external/boot-tests/bmc_support.sh
index e28ce7f..4b1c004 100644
--- a/external/boot-tests/bmc_support.sh
+++ b/external/boot-tests/bmc_support.sh
@@ -80,6 +80,8 @@  function flash {
 		if [ "$?" -ne "0" ] ; then
 			error "An unexpected pflash error has occurred";
 		fi
+		msg "Removing /tpm/image.pnor"
+		$SSHCMD "rm /tmp/image.pnor"
 	fi
 
 	if [ ! -z "${LID[0]}" ] ; then
@@ -87,7 +89,9 @@  function flash {
 		$SSHCMD "$PFLASH_BINARY -e -f -P PAYLOAD -p /tmp/skiboot.lid"
 		if [ "$?" -ne "0" ] ; then
                         error "An unexpected pflash error has occurred";
-                fi
+		fi
+		msg "Removing /tpm/skiboot.lid"
+		$SSHCMD "rm /tmp/skiboot.lid"
 	fi
 
         if [ ! -z "${LID[1]}" ] ; then
@@ -95,7 +99,9 @@  function flash {
                 $SSHCMD "$PFLASH_BINARY -e -f -P BOOTKERNEL -p /tmp/bootkernel"
                 if [ "$?" -ne "0" ] ; then
                         error "An unexpected pflash error has occurred";
-                fi
+		fi
+		msg "Removing /tmp/bootkernel"
+		$SSHCMD "rm /tmp/bootkernel"
         fi
 
 	if [ ! -z "${arbitrary_lid[0]}" -a ! -z "${arbitrary_lid[1]}" ] ; then
@@ -104,6 +110,8 @@  function flash {
                 if [ "$?" -ne "0" ] ; then
                         error "An unexpected pflash error has occurred";
 		fi
+		msg "Removing /tmp/$(basename ${arbitrary_lid[1]})"
+		$SSHCMD "rm /tmp/$(basename ${arbitrary_lid[1]})"
 	fi
 
 }