From 289d0d36c8061188a31c1d7f97ac3e9bf02dcb7b Mon Sep 17 00:00:00 2001 From: jjhua Date: Fri, 14 Dec 2012 08:11:20 +0000 Subject: [PATCH] use rpm/dpkg --version , instead of which git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14656 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/ospkgs | 2 +- xCAT/postscripts/otherpkgs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT/postscripts/ospkgs b/xCAT/postscripts/ospkgs index 1942dcc87..bfdb78179 100755 --- a/xCAT/postscripts/ospkgs +++ b/xCAT/postscripts/ospkgs @@ -660,7 +660,7 @@ elif ( pmatch "$OSVER" "sles11*" ); then fi elif ( pmatch "$OSVER" "ubuntu*" ); then # verify dpkg is installed - result=`which dpkg` + result=`dpkg --version` if [ $? -ne 0 ]; then echo "Please install dpkg on $NODE." exit 1 diff --git a/xCAT/postscripts/otherpkgs b/xCAT/postscripts/otherpkgs index 485e09ca8..c6b8e57a6 100755 --- a/xCAT/postscripts/otherpkgs +++ b/xCAT/postscripts/otherpkgs @@ -272,7 +272,7 @@ hasdpkg=0 supdatecommand="rpm -Uvh --replacepkgs" sremovecommand="rpm -ev" -result=`which rpm` +result=`rpm --version` if [ $? -eq 0 ]; then hasrpm=1 result=`rpm -q yum` @@ -285,7 +285,7 @@ if [ $? -eq 0 ]; then fi fi else - result=`which dpkg` + result=`dpkg --version` if [ $? -eq 0 ]; then hasdpkg=1 supdatecommand="dpkg -i"