From 1b04d3a8135df19f3c91468cd19a18021b144116 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 20 Jul 2010 13:50:10 +0000 Subject: [PATCH] * Absolutise $systemConfig in case it's a symlink. svn path=/nixos/trunk/; revision=22677 --- modules/system/boot/stage-2-init.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/system/boot/stage-2-init.sh b/modules/system/boot/stage-2-init.sh index 6a8bf5cbdb4..7070683d9b9 100644 --- a/modules/system/boot/stage-2-init.sh +++ b/modules/system/boot/stage-2-init.sh @@ -3,11 +3,6 @@ # !!! copied from stage 1; remove duplication -# If no `systemConfig' parameter is specified on the kernel command -# line, use a fallback. -systemConfig=/nix/var/nix/profiles/system - - # Print a greeting. echo echo -e "\e[1;32m<<< NixOS Stage 2 >>>\e[0m" @@ -61,6 +56,11 @@ rm -f /etc/mtab* # not that we care about stale locks cat /proc/mounts > /etc/mtab +# If no `systemConfig' parameter is specified on the kernel command +# line, use a fallback. +systemConfig=/nix/var/nix/profiles/system + + # Process the kernel command line. for o in $(cat /proc/cmdline); do case $o in @@ -90,6 +90,8 @@ for o in $(cat /proc/cmdline); do esac done +systemConfig="$(readlink -f "$systemConfig")" + # More special file systems, initialise required directories. mkdir -m 0777 /dev/shm