Skip to content

luci-app-rustdesk-server: fixes firmware update causes configuration loss. - #8941

Closed
smallprogram wants to merge 1 commit into
openwrt:masterfrom
smallprogram:luci-app-rustdesk-server
Closed

luci-app-rustdesk-server: fixes firmware update causes configuration loss.#8941
smallprogram wants to merge 1 commit into
openwrt:masterfrom
smallprogram:luci-app-rustdesk-server

Conversation

@smallprogram

@smallprogram smallprogram commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #8935
This fixes the issue where configuration settings were lost during a firmware upgrade.
Signed-off-by: David Mandy smallprogramzhusir@gmail.com

Pull request details

Description

fixes firmware update causes configuration loss.


Tested on

OpenWrt version: OpenWrt 25.12.2
LuCI version: LuCI openwrt-25.12 branch
Web browser(s): Chrome


Checklist

  • (Nice to have) Includes what Issue it closes (e.g. openwrt/luci#issue-number).
  • (Nice to have) Includes what it depends on (e.g. openwrt/packages#pr-number in sister repo).

@openwrt openwrt Bot added the not following guidelines Pull request does not follow formatting guidelines label Aug 13, 2026
@smallprogram
smallprogram force-pushed the luci-app-rustdesk-server branch 4 times, most recently from 7f8c227 to bc36bd5 Compare August 13, 2026 16:10
@openwrt openwrt Bot removed the not following guidelines Pull request does not follow formatting guidelines label Aug 13, 2026

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; the diagnosis is right — uci-defaults scripts ship in the new rootfs and re-run on the first boot after sysupgrade, so the unguarded batch was resetting enabled/enabled_relay back to 0. Comments inline on the implementation.


Generated by Claude Code

@openwrt openwrt Bot added the not following guidelines Pull request does not follow formatting guidelines label Aug 13, 2026
@openwrt

openwrt Bot commented Aug 13, 2026

Copy link
Copy Markdown

Formality Check: Failed

We checked this pull request against the contribution guidelines. Here is what needs your attention:

🛑 CRITICAL ERRORS

Commit 5c4400c - luci-app-rustdesk-server: fixes firmware update causes config loss:

  • No Signed-off-by matches commit author (David Mandy <smallprogramzhusir@gmail.com>). Please add a 'Signed-off-by: David Mandy smallprogramzhusir@gmail.com' line that matches this name and email exactly.

Tip

Do not close this pull request to make corrections. Instead, modify your existing commits (e.g. git commit --amend) and update the branch using git push --force-with-lease --force-if-includes. The checks will re-run automatically.


Something broken? Consider reporting an issue.
Running version 0e15d1c deployed on 2026-08-12 22:36:32 CEST

@smallprogram
smallprogram force-pushed the luci-app-rustdesk-server branch 3 times, most recently from 191861f to c33e042 Compare August 13, 2026 17:40

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 new commits. The touch removal and the indentation change both address the earlier inline comments, and the guard itself is correct now.

The design question from the previous review is still open, though: the shipped conffile root/etc/config/rustdesk-server already contains the rustdesk-server section with enabled '0' and enabled_relay '0', so @rustdesk-server[0] resolves on a fresh install too and the guarded batch is unreachable on every path. That thread was resolved without a reply — if the script is being kept deliberately rather than deleted, the commit message is the place to say why.

Commit checks

  • c33e042 "luci-app-rustdesk-server: fixes firmware update causes config loss" — the subject and body describe the sysupgrade fix, but this commit's diff contains only the re-indentation of the here-doc body; the actual fix landed in bc36bd5. Squashing the series (see inline) makes the message match the change.

Generated by Claude Code

set rustdesk-server.@rustdesk-server[0].enabled='0'
set rustdesk-server.@rustdesk-server[0].enabled_relay='0'
commit rustdesk-server
EOF

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the re-indent in c33e042 moved the here-doc body but left the terminator at column 0, so the block now reads as unbalanced. It still works — <<- strips leading tabs from the delimiter line as well as the body — so this is cosmetic only, but indenting it to match the uci -q batch line it closes is what the rest of the block now does.

Suggested change
EOF
EOF

Generated by Claude Code

set rustdesk-server.@rustdesk-server[0].enabled='0'
set rustdesk-server.@rustdesk-server[0].enabled_relay='0'
commit rustdesk-server
if ! uci -q get rustdesk-server.@rustdesk-server[0] >/dev/null; then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this guard is now spread over three commits for what is a single 7-line change — bc36bd5 introduces it together with a touch line, ebd811f deletes that touch line again, and c33e042 only re-indents the here-doc body. Neither of the last two stands on its own; they are review fixups to the first.

Squashing all three into one commit would make the series bisectable and would also clear the FormalityCheck / Git & Commits failure, since the offending Update applications/... subject on ebd811f disappears with the commit.


Generated by Claude Code

@efahl

efahl commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

I think if you squash the commits, and add
Fixes: https://github.com/openwrt/luci/issues/8935
to the commit message, you'll have it.

This fixes the issue where configuration settings were lost during a firmware upgrade
Co-authored-by: OpenWrt AI review account <openwrt-ai@hauke-m.de>
Signed-off-by: David Mandy <smallprogram@foxmail.com>
@smallprogram
smallprogram force-pushed the luci-app-rustdesk-server branch from c33e042 to 5c4400c Compare August 14, 2026 17:31
@smallprogram

Copy link
Copy Markdown
Contributor Author

I think if you squash the commits, and add Fixes: https://github.com/openwrt/luci/issues/8935 to the commit message, you'll have it.

Resubmitted the PR. #8946

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not following guidelines Pull request does not follow formatting guidelines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

luci-app-rustdesk-server: retaining configuration updates will revert the configuration

3 participants