Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attendedsysupgrade-common: give the uci-defaults script a run level #25234

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

efahl
Copy link
Contributor

@efahl efahl commented Oct 31, 2024

Maintainer: @aparcar
Compile tested: x86/64 snapshot
Run tested: x86/64 snapshot

Description:
Move the init script to '50-attendedsysupgrade', so it is run in the middle of the init sequence, rather than after all the explicitly ordered ones. This allows later scripts, specifically the 99-level ones, to modify the contents of the attendedsysupgrade configuration.

A user reported issues with setting values in their ASU-generated custom init script 99-asu-defaults, and it turned out that the attendedsysupgrade-common script was run after everything else. Since it's not really important where it runs, I just chose to put it at 50, seems as good a place as any as long as it's after the custom 99- ones.

Ref: https://forum.openwrt.org/t/owut-openwrt-upgrade-tool/200035/191
Our solution there was to rewrite their custom script to source the file, which seems sort of hacky:

...
. /rom/etc/uci-defaults/attendedsysupgrade
uci set attendedsysupgrade.blah=blah     <<< throws an error unless you've sourced the file above

Move the init script to '50-attendedsysupgrade', so it is run in the
middle of the init sequence, rather than after all the explicitly
ordered ones.  This allows later scripts, specifically the 99-level
ones, to modify the contents of the attendedsysupgrade configuration.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
@aparcar aparcar merged commit 2255c9b into openwrt:master Oct 31, 2024
13 checks passed
@efahl efahl deleted the snapshot-attendedsysupgrade-common branch October 31, 2024 01:10
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.

2 participants