From ac86d0a4fc86c5c9367039216e09603b4aac463a Mon Sep 17 00:00:00 2001 From: zet809 Date: Fri, 18 Jan 2019 18:10:24 +0800 Subject: [PATCH] Don't do vpdupdate for updatenode (#5957) * Don't do vpdupdate for updatenode --- xCAT/postscripts/xcatdsklspost | 42 ++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 38ac8ca6a..a06539bbd 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -83,26 +83,6 @@ echolog() } - - - -update_VPD() -{ - if [ -f /usr/sbin/vpdupdate ]; then - vpdupdate - #logger -t xCAT -p local4.info "xcatdsklspost: updating VPD database" - echolog "info" "updating VPD database" - fi -} - -# Run updatevpd only when necessary -if [ -f /usr/sbin/lsvpd ]; then - /usr/sbin/lsvpd | grep -i -E 'cpu|processor' 2>&1 1>/dev/null - if [ "$?" = "1" ]; then - update_VPD - fi -fi - download_postscripts() { server=$1 @@ -304,6 +284,28 @@ else 3|6) MODE=$1;; esac fi + +update_VPD() +{ + if [ -f /usr/sbin/vpdupdate ]; then + echolog "info" "updating VPD database" + vpdupdate + #logger -t xCAT -p local4.info "xcatdsklspost: updating VPD database" + else + echolog "warning" "/usr/sbin/vpdupdate is not available, please check and do VPD update later" + fi +} + +if [ $NODE_DEPLOYMENT -eq 1 ] || [ "$MODE" = "4" ] || [ "$MODE" = "6" ]; then + # Run updatevpd only when necessary + if [ -f /usr/sbin/lsvpd ]; then + /usr/sbin/lsvpd | grep -i -E 'cpu|processor' 2>&1 1>/dev/null + if [ "$?" = "1" ]; then + update_VPD + fi + fi +fi + if [ $NODE_DEPLOYMENT -ne 1 ] && [ $MODE -ne 4 ] ; then echolog "info" "=============updatenode starting====================" fi