summary refs log tree commit diff
path: root/nixos/modules/system/boot/stage-2-init.sh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-12 02:51:20 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-18 17:14:43 +0200
commita7a08188bf650ababa36300a9a6f34169e2a73bf (patch)
tree98418218fe4ac7ebb0e2c8a63cc143e53d21fe37 /nixos/modules/system/boot/stage-2-init.sh
parent32b977d4a7f4615859827780513fdcd7cb21ade7 (diff)
downloadnixpkgs-a7a08188bf650ababa36300a9a6f34169e2a73bf.tar
nixpkgs-a7a08188bf650ababa36300a9a6f34169e2a73bf.tar.gz
nixpkgs-a7a08188bf650ababa36300a9a6f34169e2a73bf.tar.bz2
nixpkgs-a7a08188bf650ababa36300a9a6f34169e2a73bf.tar.lz
nixpkgs-a7a08188bf650ababa36300a9a6f34169e2a73bf.tar.xz
nixpkgs-a7a08188bf650ababa36300a9a6f34169e2a73bf.tar.zst
nixpkgs-a7a08188bf650ababa36300a9a6f34169e2a73bf.zip
Containers: Don't remount /
Diffstat (limited to 'nixos/modules/system/boot/stage-2-init.sh')
-rw-r--r--nixos/modules/system/boot/stage-2-init.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh
index fcefdfa88a3..6fff776f858 100644
--- a/nixos/modules/system/boot/stage-2-init.sh
+++ b/nixos/modules/system/boot/stage-2-init.sh
@@ -29,7 +29,9 @@ setPath "@path@"
 # Normally, stage 1 mounts the root filesystem read/writable.
 # However, in some environments, stage 2 is executed directly, and the
 # 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