diff --git a/libvirt/destroy_configuration.sh b/libvirt/destroy_configuration.sh index 9b489ad..8444dc4 100755 --- a/libvirt/destroy_configuration.sh +++ b/libvirt/destroy_configuration.sh @@ -34,7 +34,8 @@ fi configuration_check ${CONFIGURATION} destroy_controller ${CONFIGURATION} ${CONTROLLER} -if ([ "$CONFIGURATION" == "controllerstorage" ] || [ "$CONFIGURATION" == "dedicatedstorage" ]); then +WORK_CFGS="duplex controllerstorage dedicatedstorage" +if [[ " $WORK_CFGS " == *" $CONFIGURATION "* ]]; then for ((i=0; i<=$WORKER_NODES_NUMBER; i++)); do destroy_node "worker" ${i} ${CONFIGURATION} done diff --git a/libvirt/setup_configuration.sh b/libvirt/setup_configuration.sh index 632188e..5a7cfd4 100755 --- a/libvirt/setup_configuration.sh +++ b/libvirt/setup_configuration.sh @@ -45,7 +45,8 @@ if [ $? -ne 0 ]; then exit 1 fi -if ([ "$CONFIGURATION" == "controllerstorage" ] || [ "$CONFIGURATION" == "dedicatedstorage" ]); then +WORK_CFGS="duplex controllerstorage dedicatedstorage" +if [[ " $WORK_CFGS " == *" $CONFIGURATION "* ]]; then for ((i=0; i<=$WORKER_NODES_NUMBER; i++)); do create_node "worker" ${i} ${CONFIGURATION} ${BRIDGE_INTERFACE} if [ $? -ne 0 ]; then