summary refs log tree commit diff
diff options
context:
space:
mode:
authorLuka Blaskovic <lblasc@znode.net>2023-09-10 15:36:49 +0200
committerAlyssa Ross <hi@alyssa.is>2023-10-30 21:53:52 +0100
commitd3db35f684db741b162dc7fc4ce12d97296cef01 (patch)
tree856e4433987bc3084f1ae430e6a5de8325eedcdb
parentdd77cbd17561f51584cf70750671b88c087674b2 (diff)
downloadnixpkgs-d3db35f684db741b162dc7fc4ce12d97296cef01.tar
nixpkgs-d3db35f684db741b162dc7fc4ce12d97296cef01.tar.gz
nixpkgs-d3db35f684db741b162dc7fc4ce12d97296cef01.tar.bz2
nixpkgs-d3db35f684db741b162dc7fc4ce12d97296cef01.tar.lz
nixpkgs-d3db35f684db741b162dc7fc4ce12d97296cef01.tar.xz
nixpkgs-d3db35f684db741b162dc7fc4ce12d97296cef01.tar.zst
nixpkgs-d3db35f684db741b162dc7fc4ce12d97296cef01.zip
stage-2: don't write to /dev/kmsg if missing
-rwxr-xr-xnixos/modules/system/boot/stage-2-init.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh
index 5a2133f960e..a89e3d81763 100755
--- a/nixos/modules/system/boot/stage-2-init.sh
+++ b/nixos/modules/system/boot/stage-2-init.sh
@@ -54,7 +54,7 @@ if [ ! -e /proc/1 ]; then
 fi
 
 
-if [ "${IN_NIXOS_SYSTEMD_STAGE1:-}" = true ]; then
+if [ "${IN_NIXOS_SYSTEMD_STAGE1:-}" = true ] || [ ! -c /dev/kmsg ] ; then
     echo "booting system configuration ${systemConfig}"
 else
     echo "booting system configuration $systemConfig" > /dev/kmsg