mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 23:43:20 +02:00
confd: regenerate factory-config if factory-config.gen is missing
Regenerate if either factory-config.gen or failure-config.gen is missing. This should not happen, but is better to check for the result rather than the intermediate result. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user