bdc444596167a889129929a4b1375be2d98a8aec
The ifupdown hooks /etc/network/if-up.d/resolved and if-down.d/resolved (Debian 12 and 13) use 'return' outside of a function. With /bin/sh -> dash this ends the script with 0, with /bin/sh -> bash (set by our Ansible role common/tasks/basic.yml) it fails with exit code 2, so 'ifup lo' fails and networking.service ends up as 'failed'. The script replaces top-level 'return' by 'exit 0' (same behaviour as under dash), keeps a backup in /root/ifupdown-backup/ and resets the failed state of networking.service. Dry-run by default, --apply to change the files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Languages
Shell
100%