Fix removal of resolv.conf
This commit is contained in:
parent
f94ff51a51
commit
f87e372dae
3
jlmkr.py
3
jlmkr.py
|
@ -1379,9 +1379,10 @@ def create_jail(**kwargs):
|
||||||
config.my_set("startup", 0)
|
config.my_set("startup", 0)
|
||||||
start_now = False
|
start_now = False
|
||||||
|
|
||||||
|
# Remove config which systemd handles for us
|
||||||
with contextlib.suppress(FileNotFoundError):
|
with contextlib.suppress(FileNotFoundError):
|
||||||
# Remove config which systemd handles for us
|
|
||||||
os.remove(os.path.join(jail_rootfs_path, "etc/machine-id"))
|
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"))
|
os.remove(os.path.join(jail_rootfs_path, "etc/resolv.conf"))
|
||||||
|
|
||||||
# https://github.com/systemd/systemd/issues/852
|
# https://github.com/systemd/systemd/issues/852
|
||||||
|
|
Loading…
Reference in New Issue