From d29713b817f86c3823347c198a8cba906ae931b4 Mon Sep 17 00:00:00 2001 From: linggao Date: Wed, 27 Oct 2010 18:22:21 +0000 Subject: [PATCH] updating all other packages before installing new in otherpkgs git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7946 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/otherpkgs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/xCAT/postscripts/otherpkgs b/xCAT/postscripts/otherpkgs index 9e471aa9d..6efc77041 100755 --- a/xCAT/postscripts/otherpkgs +++ b/xCAT/postscripts/otherpkgs @@ -232,6 +232,25 @@ while [ $op_index -le $OTHERPKGS_INDEX ]; do fi done + #now update all the existing rpms + if [ $hasyum -eq 1 ]; then + echo "yum -y upgrade" + result=`yum -y upgrade 2>&1` + logger -t xcat "$result" + if [ $? -ne 0 ]; then + logger -t xcat "otherpkgs: $result" + fi + 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` + logger -t xcat "$result" + if [ $? -ne 0 ]; then + logger -t xcat "otherpkgs: $result" + fi + echo "$result" + fi + #echo "repo_pkgs=$repo_pkgs,\nrepo_pkgs_preremove=$repo_pkgs_preremove,\nrepo_pkgs_postremove=$repo_pkgs_postremove" #echo "plain_pkgs=$plain_pkgs,\nplain_pkgs_preremove=$plain_pkgs_preremove,\nplain_pkgs_postremove=$plain_pkgs_postremove"