diff --git a/src/confd/bin/bootstrap b/src/confd/bin/bootstrap index 41bacd9a3..f26f1aa96 100755 --- a/src/confd/bin/bootstrap +++ b/src/confd/bin/bootstrap @@ -31,7 +31,7 @@ FACTORY_GEN="$(dirname "$FACTORY_CFG")/$(basename "$FACTORY_CFG" .cfg).gen" FAILURE_GEN="$(dirname "$FAILURE_CFG")/$(basename "$FAILURE_CFG" .cfg).gen" # Generate device's factory-config at first boot or on override -if [ ! -d "$FACTORY_D" ] || [ "$FACTORY_OVERRIDE" = "true" ]; then +if [ ! -f "$FACTORY_GEN" ] || [ "$FACTORY_OVERRIDE" = "true" ]; then mkdir -p "$FACTORY_D" # Save the original templates (from the original image) used to create factory-config @@ -65,7 +65,7 @@ if [ ! -d "$FACTORY_D" ] || [ "$FACTORY_OVERRIDE" = "true" ]; then fi # Generate device's failure-config at first boot -if [ ! -d "$FAILURE_D" ] || [ "$FAILURE_OVERRIDE" = "true" ]; then +if [ ! -f "$FAILURE_GEN" ] || [ "$FAILURE_OVERRIDE" = "true" ]; then mkdir -p "$FAILURE_D" # Save the original templates (from the original image) used to create failure-config