Swap condition blocks
This commit is contained in:
parent
489adc762e
commit
5db88c59aa
12
install.sh
12
install.sh
|
@ -457,17 +457,17 @@ checkForSystemdUnit() {
|
|||
forceExit=false
|
||||
calcWidthAndRun "whiptail --infobox \"Waiting for the ${1} to finish. Please wait.\" 7 WIDTH"
|
||||
if [ "${3}" = "oneshot" ]; then
|
||||
systemctl is-active --quiet ${2}
|
||||
while [ $? -ne 0 ] && [ $forceExit = false ]; do
|
||||
sleep 1
|
||||
systemctl is-active --quiet ${2}
|
||||
done
|
||||
else
|
||||
while [ $forceExit = false ]; do
|
||||
result=$(systemctl show -p ActiveState --value ${2})
|
||||
[ "$result" = "activating" ] && break
|
||||
sleep 1
|
||||
done
|
||||
else
|
||||
systemctl is-active --quiet ${2}
|
||||
while [ $? -ne 0 ] && [ $forceExit = false ]; do
|
||||
sleep 1
|
||||
systemctl is-active --quiet ${2}
|
||||
done
|
||||
fi
|
||||
trap - INT
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue