From c642e22556a4b3c5aeb49b261f75879b9f419963 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Wed, 10 Jul 2013 08:30:39 +0000 Subject: [PATCH] Fixing bug 3669: passing envlist to yum upgrade command git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16925 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/otherpkgs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT/postscripts/otherpkgs b/xCAT/postscripts/otherpkgs index 8632f0961..df609bdb0 100755 --- a/xCAT/postscripts/otherpkgs +++ b/xCAT/postscripts/otherpkgs @@ -719,8 +719,8 @@ while [ $op_index -le $OTHERPKGS_INDEX ]; do #now update all the existing rpms if [ $hasyum -eq 1 ]; then - echo "yum -y upgrade" - result=`yum -y upgrade 2>&1` + echo "$envlist yum -y upgrade" + result=`eval $envlist yum -y upgrade 2>&1` R=$? if [ $R -ne 0 ]; then RETURNVAL=$R @@ -728,8 +728,8 @@ while [ $op_index -le $OTHERPKGS_INDEX ]; do logger -p local4.info -t xcat "$result" echo "$result" elif [ $haszypper -eq 1 ]; then - echo "zypper --non-interactive update --auto-agree-with-license" - result=`zypper --non-interactive update --auto-agree-with-license 2>&1` + echo "$envlist zypper --non-interactive update --auto-agree-with-license" + result=`eval $envlist zypper --non-interactive update --auto-agree-with-license 2>&1` R=$? if [ $R -ne 0 ]; then @@ -739,8 +739,8 @@ while [ $op_index -le $OTHERPKGS_INDEX ]; do echo "$result" elif [ $hasapt -eq 1 ]; then apt_get_update_if_repos_changed $REPOFILE - echo "apt-get -y upgrade" - result=`apt-get -y upgrade 2>&1` + echo "$envlist apt-get -y upgrade" + result=`eval $envlist apt-get -y upgrade 2>&1` R=$? if [ $R -ne 0 ]; then RETURNVAL=$R