mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Containers: Don't remount /
This commit is contained in:
parent
32b977d4a7
commit
a7a08188bf
2 changed files with 5 additions and 1 deletions
|
@ -29,7 +29,9 @@ setPath "@path@"
|
||||||
# Normally, stage 1 mounts the root filesystem read/writable.
|
# Normally, stage 1 mounts the root filesystem read/writable.
|
||||||
# However, in some environments, stage 2 is executed directly, and the
|
# However, in some environments, stage 2 is executed directly, and the
|
||||||
# root is read-only. So make it writable here.
|
# root is read-only. So make it writable here.
|
||||||
mount -n -o remount,rw none /
|
if [ "$container" != systemd-nspawn ]; then
|
||||||
|
mount -n -o remount,rw none /
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Likewise, stage 1 mounts /proc, /dev and /sys, so if we don't have a
|
# Likewise, stage 1 mounts /proc, /dev and /sys, so if we don't have a
|
||||||
|
|
|
@ -89,6 +89,8 @@ with lib;
|
||||||
restartIfChanged = false;
|
restartIfChanged = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.systemd-remount-fs.enable = false;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue