summary refs log tree commit diff
path: root/modules/system/boot/stage-2-init.sh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-28 10:59:58 -0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-28 10:59:58 -0400
commit3e6bb7d1de4fb0e4024161f501dbd7521ff791b4 (patch)
tree60ae39affb30695a4b36cce2a44ce035cf3c782e /modules/system/boot/stage-2-init.sh
parentaf7c192f2a542f18f4f488fc52104dc8a3297e2d (diff)
downloadnixpkgs-3e6bb7d1de4fb0e4024161f501dbd7521ff791b4.tar
nixpkgs-3e6bb7d1de4fb0e4024161f501dbd7521ff791b4.tar.gz
nixpkgs-3e6bb7d1de4fb0e4024161f501dbd7521ff791b4.tar.bz2
nixpkgs-3e6bb7d1de4fb0e4024161f501dbd7521ff791b4.tar.lz
nixpkgs-3e6bb7d1de4fb0e4024161f501dbd7521ff791b4.tar.xz
nixpkgs-3e6bb7d1de4fb0e4024161f501dbd7521ff791b4.tar.zst
nixpkgs-3e6bb7d1de4fb0e4024161f501dbd7521ff791b4.zip
Move setting ownership of /nix/store to stage-2-init
This is necessary because the store might be bind-mounted read-only.
Diffstat (limited to 'modules/system/boot/stage-2-init.sh')
-rw-r--r--modules/system/boot/stage-2-init.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/system/boot/stage-2-init.sh b/modules/system/boot/stage-2-init.sh
index 3aab7a59504..55e61ffb69a 100644
--- a/modules/system/boot/stage-2-init.sh
+++ b/modules/system/boot/stage-2-init.sh
@@ -43,6 +43,8 @@ fi
 
 # Make /nix/store a read-only bind mount to enforce immutability of
 # the Nix store.
+chown root:nixbld /nix/store
+chmod 1775 /nix/store
 if [ -n "@readOnlyStore@" ]; then
     if ! mountpoint /nix/store; then
         mkdir -p /nix/rw-store