watchcat: use logical network to fix restart_interface
authorDaniel F. Dickinson <redacted>
Sun, 5 Apr 2026 15:21:22 +0000 (11:21 -0400)
committerHannu Nyman <redacted>
Sat, 11 Apr 2026 06:13:01 +0000 (09:13 +0300)
commitc3a85b96de31a8aa888443b1c57d31907e8eb74d
tree8df9e0fd2710f927953187d32b89d205a7bd9707
parente4130e53bfad3338e405ffd4a0f59bfe71aa05c1
watchcat: use logical network to fix restart_interface

Watchcat was failing to restart layer-3 interfaces when in mode
'restart_iface'. The previously attempted fix made the situation
worse in that it resulted in layer 2 interfaces also failing to
start.

This was because we are passed the interface name (e.g. eth0,
l2p0, or br-lan), but ifup needs the logical network (e.g. 'lan'
which corresponds to the network device).

Update to use find_config from /lib/network/config.sh to find the
logical network from the interface name, and use ifup on the
logical network to restart the underlying interface(s) associated
with the logical network.

Signed-off-by: Daniel F. Dickinson <redacted>
utils/watchcat/Makefile
utils/watchcat/files/watchcat.sh
git clone https://git.99rst.org/PROJECT