Fix bug: Was asking for brick ip address after selecting auto-generate ips
authorAndy Witter <awitter@georgialibraries.org>
Tue, 8 Jul 2014 20:21:00 +0000 (16:21 -0400)
committerAndy Witter <awitter@georgialibraries.org>
Tue, 8 Jul 2014 20:21:00 +0000 (16:21 -0400)
GenaSYS.sh

index 7b020af..588a5bc 100755 (executable)
@@ -25,7 +25,7 @@
     PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
    SYNOPSIS_="$NAME_"
    REQUIRES_="standard GNU commands, apt, dpkg"
-    VERSION_="1.32"
+    VERSION_="1.33"
        DATE_="2010-09-23; last update: 2014-05-19"
      AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
         URL_="http://evergreen-ils.org"
@@ -472,15 +472,17 @@ while true; do
        echo "   **Note that seperate drone servers are not supported if you enter IPs for the bricks manually."
        echo -e "Do you want GenaSYS to generate the IP addresses for the bricks?"
        echo -en $COL_BR_CYAN
-       read -n 1 -p "[y/n] :" MANUAL_BRICKS
+       read -n 1 -p "[y/n] :" GENERATE_BRICKS_IPS
        echo -e $COL_RESET
-
-       case $MANUAL_BRICKS in
+echo generate bricks ips: $GENERATE_BRICKS_IPS
+       case $GENERATE_BRICKS_IPS in
                [Yy]* ) echo ; break;;
                 [Nn]* ) echo ; break;;
                 * ) echo " Please answer yes or no.";;
         esac
 done
+
+echo generate bricks ips: $GENERATE_BRICKS_IPS
 }
 
 Get_Brick_IP_Addresses () { ### Get IP addresses for the bricks.
@@ -1106,14 +1108,14 @@ Write_Config_File BRICKCOUNT
 
 if [ "$DRONELESS" = "1" ]
 then
-       if [ -z $MANUAL_BRICKS ] || [ "$USE_CONFIG_FILE" == "0" ]
+       if [ -z $GENERATE_BRICKS_IPS ] || [ "$USE_CONFIG_FILE" == "0" ]
        then
                Ask_Use_Manual_Brick_Addresses
        fi
 fi
-Write_Config_File MANUAL_BRICKS
+Write_Config_File GENERATE_BRICKS_IPS
 
-if [ "$MANUAL_BRICKS" = "n" ] || [ "$USE_CONFIG_FILE" == "0" ]
+if [ "$GENERATE_BRICKS_IPS" = "n" ] #|| [ "$USE_CONFIG_FILE" == "0" ]
 then
        Get_Brick_IP_Addresses
 fi
@@ -1727,7 +1729,7 @@ for BRICK in $(seq $BRICKCOUNT)
         echo "Brick${BRICK} hostname set to: $(eval echo \$BRICKHOSTNAME${BRICK})" >> "$NETCFGFILE"
         typeset BRICKHOSTNAME${BRICK}_HEAD="$(eval echo \$BRICKHOSTNAME${BRICK}-head)"
         echo "Brick${BRICK} Head hostname set to: $(eval echo \$BRICKHOSTNAME${BRICK}_HEAD)" >> "$NETCFGFILE"
-       if [ "$MANUAL_BRICKS" = "n" ]
+       if [ "$GENERATE_BRICKS_IPS" = "n" ]
        then
                typeset BRICKHOSTNAME${BRICK}_HEAD_IP=$(eval echo "\$MANUAL_BRICK_IP_0${BRICK}")
        else