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"