1 Commits
Author SHA1 Message Date
chrisandClaude Opus 5.5 bdc4445961 add script 'fix-ifupdown-resolved.sh'.
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>
2026-11-22 01:36:24 +01:00