summary refs log tree commit diff
path: root/nixos/modules/system/boot/stage-1-init.sh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-02 17:25:18 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-02 19:59:27 +0100
commit901163c0c707d36323400394bf6e75adc4621e2f (patch)
treee90ad80411cb00e206f39eff2cd07ff2fac65fc3 /nixos/modules/system/boot/stage-1-init.sh
parenta5d5736692a742a066f06902d55286a40e392543 (diff)
downloadnixlib-901163c0c707d36323400394bf6e75adc4621e2f.tar
nixlib-901163c0c707d36323400394bf6e75adc4621e2f.tar.gz
nixlib-901163c0c707d36323400394bf6e75adc4621e2f.tar.bz2
nixlib-901163c0c707d36323400394bf6e75adc4621e2f.tar.lz
nixlib-901163c0c707d36323400394bf6e75adc4621e2f.tar.xz
nixlib-901163c0c707d36323400394bf6e75adc4621e2f.tar.zst
nixlib-901163c0c707d36323400394bf6e75adc4621e2f.zip
Split the initrd sshd support into a separate module
Also, drop boot.initrd.postEarlyDeviceCommands since preLVMCommands
should work fine.
Diffstat (limited to 'nixos/modules/system/boot/stage-1-init.sh')
-rw-r--r--nixos/modules/system/boot/stage-1-init.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh
index 7fb368e8c44f..c3d402eca042 100644
--- a/nixos/modules/system/boot/stage-1-init.sh
+++ b/nixos/modules/system/boot/stage-1-init.sh
@@ -72,6 +72,11 @@ mkdir -p /run
 mount -t tmpfs -o "mode=0755,size=@runSize@" tmpfs /run
 
 
+# Initialise /etc.
+echo 'root:x:0:0:root:/root:${cfg.shell}' > /etc/passwd
+echo 'passwd: files' > /etc/nsswitch.conf
+
+
 # Process the kernel command line.
 export stage2Init=/init
 for o in $(cat /proc/cmdline); do
@@ -150,10 +155,6 @@ udevadm trigger --action=add
 udevadm settle
 
 
-# Additional devices initialization.
-@postEarlyDeviceCommands@
-
-
 # Load boot-time keymap before any LVM/LUKS initialization
 @extraUtils@/bin/busybox loadkmap < "@busyboxKeymap@"