From f87e372daea70ecb33e32dc4303e51fdaecc6ef5 Mon Sep 17 00:00:00 2001 From: Jip-Hop <2871973+Jip-Hop@users.noreply.github.com> Date: Sun, 23 Jun 2024 11:27:48 +0200 Subject: [PATCH] Fix removal of resolv.conf --- jlmkr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jlmkr.py b/jlmkr.py index 3e6a9ed..262fab3 100755 --- a/jlmkr.py +++ b/jlmkr.py @@ -1379,9 +1379,10 @@ def create_jail(**kwargs): config.my_set("startup", 0) start_now = False + # Remove config which systemd handles for us with contextlib.suppress(FileNotFoundError): - # Remove config which systemd handles for us os.remove(os.path.join(jail_rootfs_path, "etc/machine-id")) + with contextlib.suppress(FileNotFoundError): os.remove(os.path.join(jail_rootfs_path, "etc/resolv.conf")) # https://github.com/systemd/systemd/issues/852