mirror of
https://github.com/iiab/iiab.git
synced 2025-02-14 12:12:12 +00:00
add stage lockout from iiab-configure
This commit is contained in:
parent
cc5674a922
commit
ad5d4c4f73
1 changed files with 23 additions and 0 deletions
23
iiab-network
23
iiab-network
|
@ -15,6 +15,29 @@ OS="unknown" # will be overridden below, if /etc/iiab/iiab.env is legit
|
|||
if [ -f /etc/iiab/iiab.env ]; then
|
||||
echo "Reading /etc/iiab/iiab.env"
|
||||
source /etc/iiab/iiab.env
|
||||
STAGE=0
|
||||
if grep -q STAGE= /etc/iiab/iiab.env ; then
|
||||
echo -e "\nExtracted STAGE=$STAGE (counter) from /etc/iiab/iiab.env"
|
||||
if ! [ "$STAGE" -eq "$STAGE" ] 2> /dev/null; then
|
||||
echo -e "\nEXITING: STAGE (counter) value == ""$STAGE"" is non-integer"
|
||||
exit 1
|
||||
elif [ "$STAGE" -lt 0 ] || [ "$STAGE" -gt 9 ]; then
|
||||
echo -e "\nEXITING: STAGE (counter) value == ""$STAGE"" is out-of-range"
|
||||
exit 1
|
||||
elif [ "$STAGE" -lt 3 ]; then
|
||||
echo -e "\nEXITING: STAGE (counter) value == ""$STAGE"
|
||||
echo -e "\nIIAB Stage 3 not complete."
|
||||
echo -e "\nPlease run: ./iiab-install"
|
||||
exit 1
|
||||
else
|
||||
echo -e "\nEXITING: STAGE (counter) not found"
|
||||
echo -e "\nIIAB not installed."
|
||||
echo -e "\nPlease run: ./iiab-install"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo -e "\nEXITING: /etc/iiab/iiab.env not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Ansible will now run iiab-network.yml -- log file is iiab-network.log"
|
||||
|
|
Loading…
Reference in a new issue