Etherwake: simplify the init script and better document its configuration - #29800
Etherwake: simplify the init script and better document its configuration#29800kontaxis wants to merge 6 commits into
Conversation
41892e7 to
95addc9
Compare
|
@jow- Can you review this? |
bd4b4d8 to
fa16612
Compare
fa16612 to
907b75a
Compare
931134b to
2abaa09
Compare
2abaa09 to
c3617ee
Compare
91e4302 to
ec0ac65
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the net/etherwake OpenWrt package to simplify the init script (removing sudo and runtime binary path searching) and to improve/clarify the example UCI configuration for Wake-on-LAN targets, including SecureOn password usage.
Changes:
- Bump
PKG_RELEASEto reflect init/config behavior changes. - Simplify
etherwake.initby hardcoding/usr/bin/etherwake, enforcing a default interface, and adding a newsecureonoption path. - Rewrite
etherwake.configcomments/examples to better document typical usage and SecureOn formats.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| net/etherwake/Makefile | Bumps package release to ship the init/config changes. |
| net/etherwake/files/etherwake.init | Removes sudo/path-search logic; adds secureon handling and simplifies interface defaults. |
| net/etherwake/files/etherwake.config | Updates example configuration and documentation, including SecureOn formats. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ec0ac65 to
9653486
Compare
|
Sorry, but requesting commit access after just two changes seems a bit premature. If we did that, we'd be handing out commit access to just anyone, which definitely isn't ideal. |
9653486 to
12722b9
Compare
8e06c86 to
12e2353
Compare
04bf45e to
c6dae96
Compare
c6dae96 to
10516b9
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
The only change since the last review is a rebase onto a newer master; the PR's own files (net/etherwake/) are unchanged. No new issues found.
Generated by Claude Code
10516b9 to
89dfda9
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
The only change since the last review is a rebase onto a newer master; the PR's own files (net/etherwake/) are unchanged (identical tree). No new issues found.
Generated by Claude Code
89dfda9 to
736d588
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
The only change since the last review is another rebase onto a newer master; the six etherwake commits carry new SHAs but the net/etherwake/ tree is byte-identical (same tree object 753af32) and commit messages are unchanged. No new issues found.
Generated by Claude Code
736d588 to
cd9cd30
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
The only change since the last review is another rebase onto a newer master. The six etherwake commits carry new SHAs, but the net/etherwake/ tree is byte-identical (same tree object 753af32) and the commit messages are unchanged. FormalityCheck is green on cd9cd30. No new issues found.
Generated by Claude Code
cd9cd30 to
dff54f0
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
The only change since the last review is another rebase onto a newer master. The six etherwake commits carry new SHAs, but the net/etherwake/ tree is byte-identical (same tree object 753af32) and the commit messages are unchanged. All three FormalityCheck runs are green on dff54f0. No new issues found.
Generated by Claude Code
dff54f0 to
ac8ceaa
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
The only change since the last review is another rebase onto a newer master. The six etherwake commits carry new SHAs, but the net/etherwake/ tree is byte-identical (same tree object 753af32) and all six commit messages are unchanged. All three FormalityCheck runs are green on ac8ceaa. No new issues found.
Generated by Claude Code
ac8ceaa to
6e3affd
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
The only change since the last review is another rebase onto a newer master. The six etherwake commits carry new SHAs, but the net/etherwake/ tree is byte-identical (same tree object 753af32) and all six commit messages are unchanged. Master introduced no changes under net/etherwake/ in the rebase range, so there is nothing new to reconcile. All three FormalityCheck runs are green on 6e3affd. No new issues found.
Generated by Claude Code
6e3affd to
4a0281c
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
The only change since the last review is another rebase onto a newer master (35 new master commits, none touching net/etherwake/). The six etherwake commits carry new SHAs, but the net/etherwake/ tree is byte-identical (same tree object 753af32) and all six commit messages are unchanged. All three FormalityCheck runs are green on 4a0281c. No new issues found.
Generated by Claude Code
4a0281c to
101b04b
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
The only change since the last review is another rebase onto a newer master (38 new master commits, none touching net/etherwake/). The six etherwake commits carry new SHAs, but the net/etherwake/ tree is byte-identical (same tree object 753af32) and all six commit messages are unchanged. All three FormalityCheck runs are green on 101b04b. No new issues found.
Generated by Claude Code
OpenWrt defaults to using root to run init scripts so there is no need to elevate privileges. A non-privileged user can prefix the script's execution command with 'sudo'. Signed-off-by: Georgios Kontaxis <geko1702+commits@99rst.org>
Installation places the 'etherwake' binary at a known, fixed location. Signed-off-by: Georgios Kontaxis <geko1702+commits@99rst.org>
- Unnecessary transformation of the 'password' option when configuration can use the proper format. - Support for 4-byte passwords. Signed-off-by: Georgios Kontaxis <geko1702+commits@99rst.org>
- Make sure the default interface value promised in the configuration is enforced by the init script, not the underlying binary. - Remove comments on how each option translates to a specific command-line argument for the underlying 'etherwake' binary. - Rephrase comments to improve clarity. Signed-off-by: Georgios Kontaxis <geko1702+commits@99rst.org>
Log 'name' when referring to a configuration 'target'. Signed-off-by: Georgios Kontaxis <geko1702+commits@99rst.org>
Reworking of the init script internals and changes to the ways it can be configured warrant a new release version. Signed-off-by: Georgios Kontaxis <geko1702+commits@99rst.org>
101b04b to
15a520a
Compare
|
What's the next step to merge? |
📦 Package Details
Maintainer: Peter Wagner (@tripolar)
Description:
The Etherwake package offers Wake-on-LAN functionality. This change simplifies the init script logic and improves documentation in the example configuration file.
Specifically:
Removes the use of
sudoby the init script and the relevant configuration option. OpenWrt defaults to using root to run init scripts so there is no need to elevate privileges. A non-privileged user that wants to invoke the init script can dosudo /etc/init.d/etherwakeinstead. This change could be breaking but unlikely given the lack of sudo in releases by default.Removes the use of the
pathesoption by the init script to locate theetherwakebinary at runtime. The Makefile installs the binary at/usr/bin/etherwakeso the location is fixed and known ahead of time. If the user wants to use a different location they can edit thePROGRAMvariable inside the init script. This change is unlikely to be breaking.Simplifies how the init script handles WOL SecureOn passwords. Currently the script expects the
passwordoption to be in hex format but without colon delimiters and then adds the colon delimiters itself before passing the value to the binary. This seems unnecessary. Also, the script's logic doesn't support 4-byte passwords that must be in a different format that's using dots not colons. This change introduces a newsecureonoption which the script simply passes to the underlying binary. This way we eliminate the handling logic from the script and support both 6-byte and 4-byte passwords. Thepasswordoption is still honored by the script but removed from the example configuration. If both options are configured then the new option takes effect. This change is unlikely to be breaking.Adds clarity and detail to the example configuration.
interfacevalue promised in the configuration is enforced by the init script, not the underlying binary.🧪 Run Testing Details
Tested multiple combinations of new and old options locally. Did not notice any regressions in functionality.
Read through the code of luci-app-wol and confirmed this change is compatible with that package.
✅ Formalities
If your PR contains a patch:
P.S.: After this change gets merged the relevant Wiki page should be updated.