Skip to content

watchcat: fix restart_iface without mmifacename#29659

Open
tk154 wants to merge 1 commit into
openwrt:masterfrom
tk154:watchcat
Open

watchcat: fix restart_iface without mmifacename#29659
tk154 wants to merge 1 commit into
openwrt:masterfrom
tk154:watchcat

Conversation

@tk154

@tk154 tk154 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

📦 Package Details

Maintainer: @roger-

Description:
In restart_iface mode, watchcat currently defaults mmifacename to the literal string "null".
Since watchcat.sh only checks whether the value is non-empty [1], an unset mmifacename is treated as configured and the ModemManager restart path is used unexpectedly.

This changes mmifacename to default to an empty value.

[1] https://github.com/openwrt/packages/blob/master/utils/watchcat/files/watchcat.sh#L170


🧪 Run Testing Details

  • OpenWrt Version: Snapshot r34792-a317079b57
  • OpenWrt Target/Subtarget: ramips/mt76x8
  • OpenWrt Device: Teltonika RUT976

✅ Formalities

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

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>

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

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 mmifacename default to empty (unset) in watchcat.init instead of the literal "null".
  • Update the ModemManager-related validation to check for non-empty mmifacename (-n) rather than comparing against "null".
  • Bump PKG_RELEASE to 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.

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.

2 participants