Quellcode durchsuchen

Arreglamos sentencia de control y bucle

El -z necesita negarse para entrar en el bucle de chequeo, creacion y
envio del snapshot.
Incluye el resto de sentencias de control if dentro de la sentencia de control if inicial para que tenga sentido el resto de acciones
pull/1/head
Pablo Sarria vor 5 Jahren
Ursprung
Commit
9afb4a4f35
1 geänderte Dateien mit 9 neuen und 9 gelöschten Zeilen
  1. +9
    -9
      zonebackuptozone.sh

+ 9
- 9
zonebackuptozone.sh Datei anzeigen

@@ -103,18 +103,18 @@ echo "Looking for addtional datasets in ${UUID}..."
DATASET=`vmadm get ${UUID} | json datasets.0 | sed 's/zones\///' | tr -d '\n'`
echo "done."

if [ -z "${DATASET}" ]; then
if [ ! -z "${DATASET}" ]; then
check_snap ${DATASET}
fi

if [ $? -ne 0 ]; then
create_snap ${DATASET}
else
echo "Snapshot of ${DATASET} already available"
echo "Skipping create snapshot..."
fi
if [ $? -ne 0 ]; then
create_snap ${DATASET}
else
echo "Snapshot of ${DATASET} already available"
echo "Skipping create snapshot..."
fi

send_snap ${DATASET}
send_snap ${DATASET}
fi

# we send the config



Laden…
Abbrechen
Speichern