Commit 5666ebcb authored by bertagaz's avatar bertagaz

Fix for real the logical bug for real-only persistence.

The problem was not that live-persist must error out when read-only
persistence is activated rather than issue a warning. In the bug raised
by #10431, the problem was that it *already did* because it tried to
make the new persistence config anyway. So fixing #10431 by erroring out
just lead to the same situation.

In this case, we don't want to error out but warn out that the migration did not
happen, and just go on with the boot without trying to migrate anything.

Will-fix: #10431
parent c1b46347
......@@ -85,12 +85,13 @@ migrate_persistence_preset()
warning "Need to make $NEW_PRESET persistent"
if [ "$PERSISTENCE_READONLY" = true ]
then
error "Persistence configuration needs to be migrated, but read only was selected; please retry in read-write mode"
warning "Persistence configuration needs to be migrated, but read only was selected; please retry in read-write mode"
else
echo "$NEW_PRESET source=$NEW_PRESET_SOURCE" \
>> "$CONFIG" \
|| error "Failed to make $NEW_PRESET: $?"
warning "Successfully made $NEW_PRESET persistent"
fi
echo "$NEW_PRESET source=$NEW_PRESET_SOURCE" \
>> "$CONFIG" \
|| error "Failed to make $NEW_PRESET: $?"
warning "Successfully made $NEW_PRESET persistent"
fi
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment