nixos-install: Run in a separate UTS namespace

This prevents the activation script from clobbering our hostname.
This commit is contained in:
Eelco Dolstra 2014-05-09 13:19:02 +02:00
parent c06786759c
commit 1c4fd9b25d

View File

@ -12,7 +12,7 @@
if [ "$(id -u)" = 0 ]; then if [ "$(id -u)" = 0 ]; then
if [ -z "$NIXOS_INSTALL_REEXEC" ]; then if [ -z "$NIXOS_INSTALL_REEXEC" ]; then
export NIXOS_INSTALL_REEXEC=1 export NIXOS_INSTALL_REEXEC=1
exec unshare --mount -- "$0" "$@" exec unshare --mount --uts -- "$0" "$@"
else else
mount --make-rprivate / mount --make-rprivate /
fi fi