Skip to content

Commit

Permalink
Copy /etc/hosts into sandbox as well if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanDeMeyer authored and behrmann committed Jan 4, 2025
1 parent 88b9ca9 commit 91bf2db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mkosi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,9 @@ def install_sandbox_trees(config: Config, dst: Path) -> None:
)
)

if not (dst / "etc/hosts").exists() and Path("/etc/hosts").exists():
shutil.copy("/etc/hosts", dst / "etc/hosts")

Path(dst / "etc/static").unlink(missing_ok=True)
if (config.tools() / "etc/static").is_symlink():
(dst / "etc/static").symlink_to((config.tools() / "etc/static").readlink())
Expand Down

0 comments on commit 91bf2db

Please sign in to comment.