Skip to content

Etherwake: simplify the init script and better document its configuration - #29800

Open
kontaxis wants to merge 6 commits into
openwrt:masterfrom
kontaxis:etherwake-simplify-and-document
Open

Etherwake: simplify the init script and better document its configuration#29800
kontaxis wants to merge 6 commits into
openwrt:masterfrom
kontaxis:etherwake-simplify-and-document

Conversation

@kontaxis

@kontaxis kontaxis commented Jun 21, 2026

Copy link
Copy Markdown

📦 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:

  1. Removes the use of sudo by 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 do sudo /etc/init.d/etherwake instead. This change could be breaking but unlikely given the lack of sudo in releases by default.

  2. Removes the use of the pathes option by the init script to locate the etherwake binary at runtime. The Makefile installs the binary at /usr/bin/etherwake so the location is fixed and known ahead of time. If the user wants to use a different location they can edit the PROGRAM variable inside the init script. This change is unlikely to be breaking.

  3. Simplifies how the init script handles WOL SecureOn passwords. Currently the script expects the password option 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 new secureon option 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. The password option 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.

  4. Adds clarity and detail to the example configuration.

    1. Makes sure the default interface value promised in the configuration is enforced by the init script, not the underlying binary.
    2. Removes unnecessary content from the documentation. E.g., how each option translates to a specific command-line argument for the underlying binary.
    3. Rephrases comments to improve clarity.

🧪 Run Testing Details

  • OpenWrt Version:
  • OpenWrt Target/Subtarget:
  • OpenWrt Device:

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

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • Not applicable, this PR does not add or modify an upstream source patch.

P.S.: After this change gets merged the relevant Wiki page should be updated.

@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from 41892e7 to 95addc9 Compare June 21, 2026 22:18
@kontaxis

Copy link
Copy Markdown
Author

@jow- Can you review this?

@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch 7 times, most recently from bd4b4d8 to fa16612 Compare June 25, 2026 00:37
Comment thread net/etherwake/files/etherwake.config
@BKPepe
BKPepe force-pushed the etherwake-simplify-and-document branch from fa16612 to 907b75a Compare June 29, 2026 13:08
@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch 3 times, most recently from 931134b to 2abaa09 Compare June 30, 2026 18:06
@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from 2abaa09 to c3617ee Compare July 1, 2026 05:26
@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from 91e4302 to ec0ac65 Compare July 1, 2026 05:40
@BKPepe
BKPepe requested a review from Copilot July 1, 2026 06:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_RELEASE to reflect init/config behavior changes.
  • Simplify etherwake.init by hardcoding /usr/bin/etherwake, enforcing a default interface, and adding a new secureon option path.
  • Rewrite etherwake.config comments/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.

Comment thread net/etherwake/files/etherwake.init
Comment thread net/etherwake/files/etherwake.init
Comment thread net/etherwake/files/etherwake.init
@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from ec0ac65 to 9653486 Compare July 1, 2026 12:35
@kontaxis

kontaxis commented Jul 1, 2026

Copy link
Copy Markdown
Author

I would be interested in getting commit access. This is my second code change in OpenWrt. @BKPepe can you facilitate?

@BKPepe

BKPepe commented Jul 1, 2026

Copy link
Copy Markdown
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.

@BKPepe
BKPepe force-pushed the etherwake-simplify-and-document branch from 9653486 to 12722b9 Compare July 1, 2026 12:45
@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch 2 times, most recently from 8e06c86 to 12e2353 Compare July 1, 2026 21:27
@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from 04bf45e to c6dae96 Compare July 6, 2026 14:56
@kontaxis

kontaxis commented Jul 6, 2026

Copy link
Copy Markdown
Author

Gentle ping @tripolar, Cc @BKPepe, can this review move forward?

@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 6 new commits; no new issues found.


Generated by Claude Code

@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from c6dae96 to 10516b9 Compare July 21, 2026 05:20

@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.

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

@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from 10516b9 to 89dfda9 Compare July 23, 2026 18:33

@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.

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

@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from 89dfda9 to 736d588 Compare July 31, 2026 07:26

@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.

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

@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from 736d588 to cd9cd30 Compare August 11, 2026 03:19

@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.

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

@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from cd9cd30 to dff54f0 Compare August 14, 2026 00:13

@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.

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

@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from dff54f0 to ac8ceaa Compare August 16, 2026 16:34

@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.

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

@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from ac8ceaa to 6e3affd Compare August 19, 2026 14:20

@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.

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

@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from 6e3affd to 4a0281c Compare August 23, 2026 19:20

@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.

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

@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from 4a0281c to 101b04b Compare August 28, 2026 16:48

@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.

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>
@kontaxis
kontaxis force-pushed the etherwake-simplify-and-document branch from 101b04b to 15a520a Compare September 4, 2026 20:19
@kontaxis

kontaxis commented Sep 4, 2026

Copy link
Copy Markdown
Author

What's the next step to merge?

@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 6 new commits; no new issues found.


Generated by Claude Code

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.

6 participants