summary refs log tree commit diff
path: root/nixos/modules/system/boot/stage-2-init.sh
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2014-05-27 17:22:25 -0400
committerShea Levy <shea@shealevy.com>2014-05-27 17:22:25 -0400
commit57ed344917d909ca6ef76f24b3bb78f75b7ec407 (patch)
treeb336ec8617032e8478435cf9cb7a5284bdc6ed2b /nixos/modules/system/boot/stage-2-init.sh
parent6bfb25b9e870ef080120108e2b1a94ace725a015 (diff)
downloadnixpkgs-57ed344917d909ca6ef76f24b3bb78f75b7ec407.tar
nixpkgs-57ed344917d909ca6ef76f24b3bb78f75b7ec407.tar.gz
nixpkgs-57ed344917d909ca6ef76f24b3bb78f75b7ec407.tar.bz2
nixpkgs-57ed344917d909ca6ef76f24b3bb78f75b7ec407.tar.lz
nixpkgs-57ed344917d909ca6ef76f24b3bb78f75b7ec407.tar.xz
nixpkgs-57ed344917d909ca6ef76f24b3bb78f75b7ec407.tar.zst
nixpkgs-57ed344917d909ca6ef76f24b3bb78f75b7ec407.zip
Fix /run/keys permissions
Diffstat (limited to 'nixos/modules/system/boot/stage-2-init.sh')
-rw-r--r--nixos/modules/system/boot/stage-2-init.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh
index a64c6cdfa19..ab414e29eb2 100644
--- a/nixos/modules/system/boot/stage-2-init.sh
+++ b/nixos/modules/system/boot/stage-2-init.sh
@@ -121,9 +121,10 @@ fi
 # written to disk (generally used for NixOps, harmless elsewhere).
 if ! mountpoint -q /run/keys; then
     rm -rf /run/keys
-    mkdir -m 0750 /run/keys
-    chown 0:96 /run/keys
+    mkdir /run/keys
     mount -t ramfs none /run/keys
+    chown 0:96 /run/keys
+    chmod 0750 /run/keys
 fi
 
 mkdir -m 0755 -p /run/lock