watchcat: fix restart_iface without mmifacename#29659
Open
tk154 wants to merge 1 commit into
Open
Conversation
restart_iface treated an unset mmifacename as the literal string "null", which made watchcat take the ModemManager restart path unless users explicitly configured mmifacename as an empty string. Default mmifacename to empty instead. Signed-off-by: Til Kaiser <mail@tk154.de>
There was a problem hiding this comment.
Pull request overview
Fixes watchcat’s restart_iface behavior when mmifacename is not configured by ensuring the init script defaults mmifacename to an empty value (so the ModemManager restart path is not taken unintentionally). This aligns watchcat.init with watchcat.sh, which treats any non-empty mm_iface_name as “configured”.
Changes:
- Set
mmifacenamedefault to empty (unset) inwatchcat.initinstead of the literal"null". - Update the ModemManager-related validation to check for non-empty
mmifacename(-n) rather than comparing against"null". - Bump
PKG_RELEASEto ship the fix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| utils/watchcat/Makefile | Bumps package release to deliver the behavior fix. |
| utils/watchcat/files/watchcat.init | Ensures unset mmifacename stays empty and adjusts the related validation check accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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: @roger-
Description:
In
restart_ifacemode,watchcatcurrently defaultsmmifacenameto the literal string "null".Since watchcat.sh only checks whether the value is non-empty [1], an unset
mmifacenameis treated as configured and the ModemManager restart path is used unexpectedly.This changes
mmifacenameto default to an empty value.[1] https://github.com/openwrt/packages/blob/master/utils/watchcat/files/watchcat.sh#L170
🧪 Run Testing Details
✅ Formalities