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
This commit is contained in:
jjhua 2012-12-14 08:11:20 +00:00
parent 0ba9832d0e
commit 289d0d36c8
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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"