Etherwake: simplify the init script and better document its configuration#29800
Open
kontaxis wants to merge 6 commits into
Open
Etherwake: simplify the init script and better document its configuration#29800kontaxis wants to merge 6 commits into
kontaxis wants to merge 6 commits into
Conversation
41892e7 to
95addc9
Compare
Author
|
@jow- Can you review this? |
bd4b4d8 to
fa16612
Compare
dhrm1k
reviewed
Jun 26, 2026
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
Author
Member
|
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
c2ed4a1 to
04bf45e
Compare
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>
04bf45e to
c6dae96
Compare
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📦 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.