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:
parent
0ba9832d0e
commit
289d0d36c8
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user