fix: a machine with no ifupdown configuration is not an error

The release validator caught it: in a container there is no
/etc/network/interfaces at all, and a missing file was being treated as
a read failure, so --check printed nothing and said nothing was wrong
rather than saying there was nothing to do.

A machine with no ifupdown configuration is the ordinary case for a
fresh install, and the answer is simply that this command has no work.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
ekklesia
2026-09-21 21:23:30 -05:00
co-authored by Claude Opus 5
parent b8688d00a7
commit fe08363534
3 changed files with 15 additions and 2 deletions
+5
View File
@@ -208,6 +208,11 @@ def carrying(name, device):
def find_stanza():
"""The one wireless stanza ifupdown holds, or None, plus the file."""
if not os.path.exists(INTERFACES):
# A machine with no ifupdown configuration at all. Nothing is
# wrong with that and nothing here has anything to do.
return None, ""
try:
with open(INTERFACES, "r", encoding="utf-8") as handle:
text = handle.read()