Skip to content

webui: install add-ons without a forced reboot - #160

Merged
jens-maus merged 1 commit into
mainfrom
jens-maus/webui-addon-install-no-reboot
Oct 11, 2026
Merged

jens-maus merged 1 commit into
mainfrom
jens-maus/webui-addon-install-no-reboot

Conversation

@jens-maus

@jens-maus jens-maus commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Original OpenCCU rootfs patch: 0040
Original filename: 0040-WebUI-AddonInstallNoReboot.patch
Original patch: https://github.com/OpenCCU/OpenCCU/blob/c0e41619b/buildroot-external/package/openccu-base/rootfs-patches/0040-WebUI-AddonInstallNoReboot.patch
Original changes: OpenCCU/OpenCCU@a9c600de2 and OpenCCU/OpenCCU@8e63411ba

Installing an add-on always restarted the CCU: action_install_start created /usr/local/.doAddonInstall and rebooted, and the add-on was installed during the next boot. Many add-ons do not need a restart.

This applies the patch 1:1:

  • src/webui/www/config/cp_software.cgi:
    • action_install_go runs /bin/install_addon on the CCU3 platform (getProduct == 3) and evaluates its exit code:
      • 0: success message without a restart (new key dialogSettingsExtraSoftwareHintPerformInstallationContentNoReboot, button "OK").
      • 10: the former message, and the CCU reboots after 2 seconds (/sbin/reboot -d 2).
      • Any other code: the error message dialogSettingsExtraSoftwareHintPerformInstallationFailure, titled Error (<code>).
    • On other platforms the former message is shown and the CCU reboots.
    • action_install_start, which the dialog still requests afterwards, no longer touches .doAddonInstall or reboots; it only returns an empty response.
    • The "Install" button submits the upload form directly instead of calling installAddon(), which first showed the liability hint in a yes/no dialog. This extra confirmation was removed on purpose (OpenCCU/OpenCCU@8e63411ba); after the upload the installation still has to be confirmed in the existing install_confirm dialog. installAddon() stays defined but is no longer called.
  • src/webui/www/webui/js/lang/de/translate.lang.js and en/translate.lang.js: the two new keys, and the selection hint dialogSettingsExtraSoftwareHintSelectExtraSoftware now says the CCU might have to be restarted instead of always being restarted. That hint was only shown by installAddon(), so it is not visible anymore. It is kept as in the rootfs patch.

/bin/install_addon is not part of OpenCCU-Base. It is provided by the OpenCCU overlay (buildroot-external/overlay/base/bin/install_addon): it unpacks /usr/local/tmp/new_addon.tar.gz, verifies the included *.sha256 files, runs the add-on's update_script and returns its exit code, or 101-106 if a step before it fails (archive missing or not unpackable, no executable update_script, checksum mismatch). The upload already stores the archive at that path. Exit code 10 as "installed, reboot required" is the add-on convention of OpenCCU since 2018 (OpenCCU/OpenCCU@a9c600de2).

Line endings (CRLF in cp_software.cgi, LF in the language files) and encodings are preserved. The root www/ copies are unused legacy files and are left unchanged.

The other OpenCCU rootfs patch that modifies cp_software.cgi (0031) and the patches that modify the two language files still apply with zero fuzz.

Validation

  • OpenCCU scripts/base-patch-migration.py validate with the canonical Buildroot 2026.08 git4 archive of this branch (2cd0a930, sha256 89218d469c77aa540275730ed0d143e192476fcddf0339e4162ea2c26f96f36b) and --skip-patch 0040, on OpenCCU master (c0e41619b, current pin 570566e3): PASS (the other 62 rootfs patches apply with zero fuzz).
  • compare against the validation of the current pin 570566e3 with all 63 patches: IDENTICAL (4668 entries).

Generated by Claude Code

Summary by CodeRabbit

  • New Features
    • Add-on installations can now complete successfully without restarting the central unit.
    • Installation messages provide clearer guidance for success, errors, and cases that may require a restart.
  • Bug Fixes
    • The upload form now starts installation directly instead of displaying a confirmation dialog.

OpenCCU cleanup PR (removing patch 0040 and updating the pin): OpenCCU/OpenCCU#4412


Generated by Claude Code

Run /bin/install_addon directly from the add-on upload dialog and
evaluate its exit code instead of always rebooting the CCU: 0 reports a
successful installation without a reboot, 10 shows the former message
and reboots the CCU, any other value shows an error message. The
"Install" button submits the upload form directly and the selection
hint no longer states that the CCU is always restarted.

Applies OpenCCU rootfs patch 0040-WebUI-AddonInstallNoReboot.
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 42e99077-e8eb-4cbb-9f22-6548e716511e

📥 Commits

Reviewing files that changed from the base of the PR and between 570566e and 2cd0a93.


📒 Files selected for processing (3)
  • src/webui/www/config/cp_software.cgi
  • src/webui/www/webui/js/lang/de/translate.lang.js
  • src/webui/www/webui/js/lang/en/translate.lang.js

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.



📝 Walkthrough

Walkthrough

The add-on upload flow now submits directly. Product 3 installations handle success, reboot-required success, and errors according to the installer exit code. Other products retain scheduled reboot behavior. English and German messages describe restart requirements and installation outcomes.

Changes

Add-on installation

Layer / File(s) Summary
Submit and handle add-on installation
src/webui/www/config/cp_software.cgi, src/webui/www/webui/js/lang/{en,de}/translate.lang.js
The upload form submits directly. Product 3 runs /bin/install_addon; exit code 0 reports success without reboot, and code 10 reports success and schedules a reboot. Other exit codes and unexpected failures report errors without reboot. Other products retain scheduled reboot behavior. The start procedure no longer creates the former install marker or sends SIGQUIT to init. English and German messages describe restart requirements and installation outcomes.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature


Merge Risk: ⚪ Minimal · up to 2cd0a

No confirmed issue blocks merging. Whether a plain CCU2 reboot processes the staged add-on archive remains unverified.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: add-on installation no longer forces a reboot when the installation completes without one.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR


🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jens-maus
jens-maus merged commit 79b2ab5 into main Oct 11, 2026
5 checks passed
@jens-maus
jens-maus deleted the jens-maus/webui-addon-install-no-reboot branch October 11, 2026 17:45
jens-maus added a commit to OpenCCU/OpenCCU that referenced this pull request Oct 11, 2026
This removes OpenCCU rootfs patch 0040-WebUI-AddonInstallNoReboot.patch, now that OpenCCU/OpenCCU-Base#160 is merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant