Fix registering valid paths in VM tests

Commit 37b56574e2 revealed that the code
to get regInfo from /proc/cmdline was broken.  It only happened to
work because the kernel passes the command line to stage 1 through the
environment, so $regInfo was set anyway.
This commit is contained in:
Eelco Dolstra 2013-01-23 14:35:52 +01:00
parent 37b56574e2
commit ef5108f560

View File

@ -306,11 +306,9 @@ in
# dependency.)
boot.postBootCommands =
''
( source /proc/cmdline
if [ -n "$regInfo" ]; then
${config.environment.nix}/bin/nix-store --load-db < $regInfo
fi
)
if [[ "$(cat /proc/cmdline)" =~ regInfo=([^ ]*) ]]; then
${config.environment.nix}/bin/nix-store --load-db < ''${BASH_REMATCH[1]}
fi
'';
virtualisation.pathsInNixDB =