From: Eric Fahlgren Date: Wed, 28 May 2025 16:09:33 +0000 (-0700) Subject: luci-app-attendedsysupgrade: maintain value of owut.rootfs_size in LuCI app X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=42d32dff7f718d27ae7ccc65ebc83d001ebf14e3;p=project%2Fluci.git luci-app-attendedsysupgrade: maintain value of owut.rootfs_size in LuCI app 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 --- diff --git a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js index 4a724c6af6..148ef97e3b 100644 --- a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js +++ b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js @@ -646,7 +646,12 @@ return view.extend({ 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]; },