more rubust check in prerequisites
This commit is contained in:
parent
351a23ce0d
commit
ec208ba22a
@ -156,8 +156,11 @@ function suse_install_codecs(){
|
||||
}
|
||||
|
||||
function check_prerequisites(){
|
||||
set +e
|
||||
local answer
|
||||
if !type git > /dev/null 2>&1;then
|
||||
type git > /dev/null 2>&1
|
||||
RESULT=$?
|
||||
if [[ $RESULT != 0 ]];then
|
||||
printf "git is not installed, do your want to install it [y/N]?"
|
||||
read -r -n 1 -s answer;
|
||||
printf "\n"
|
||||
@ -166,7 +169,9 @@ function check_prerequisites(){
|
||||
fi
|
||||
fi
|
||||
|
||||
if type !salt-call > /dev/null 2>&1;then
|
||||
type salt-call > /dev/null 2>&1
|
||||
RESULT=$?
|
||||
if [[ $RESULT != 0 ]];then
|
||||
printf "salt-minion is not installed, do your want to install it [y/N]?"
|
||||
read -r -n 1 -s answer;
|
||||
printf "\n"
|
||||
@ -174,6 +179,7 @@ function check_prerequisites(){
|
||||
sudo zypper install --non-interactive salt-minion
|
||||
fi
|
||||
fi
|
||||
set -e
|
||||
}
|
||||
|
||||
#initialize all options
|
||||
|
Loading…
Reference in New Issue
Block a user