The current script doesn't reset the deferral counter. This causes the behaviour that, if ever a new desiredOS is set in the XML file, the update will be forced immediately, since the deferral counter is already at the limit.
This PR resets the deferral counter to 0 as late as possible before finalising the update, so that any future updates will also allow deferrals.
The current script doesn't reset the deferral counter. This causes the behaviour that, if ever a new desiredOS is set in the XML file, the update will be forced immediately, since the deferral counter is already at the limit.
This PR resets the deferral counter to 0 as late as possible before finalising the update, so that any future updates will also allow deferrals.