If someone has used owut to install an image with a modified rootfs
partition size, then using LuCI Attended Sysupgrade would change
it back, causing either a build failure or loss of configuration.
We fix this by simply adding the value from the owut config to the
build request (or 'null' if it doesn't exist). The ASU server
then builds the image with the correct rootfs size, avoiding
these issues.
This value is not and should not be exposed in the LuCI app's
options, as it is quite advanced, very fragile and should only be
used by those who have researched the issues involved, typically
by reading the owut documentation and testing with owut first.
Signed-off-by: Eric Fahlgren <[email protected]>
target: promises[1].release.target,
version: promises[1].release.version,
diff_packages: true,
- filesystem: promises[1].rootfs_type
+ filesystem: promises[1].rootfs_type,
+
+ // If the user has changed the rootfs partition size via owut,
+ // then make sure to keep new image the same size. A null value
+ // is interpreted by the ASU server as "default".
+ rootfs_size_mb: uci.get('attendedsysupgrade', 'owut', 'rootfs_size'),
};
return [data, firmware];
},