runInLinuxVM: clean up

Those were left-over after 97ed6b4565.

This also cleans up some confusion around TMPDIR. We had the following
lines:

  mkdir xchg
  ...
  cd $TMPDIR
  ...
  path=$TMPDIR/xchg

Those only worked because the **current directory** is the same as
$TMPDIR. Both are /build by default. To refer to the same directory in
two different ways is very confusing at best.
This commit is contained in:
Wolfgang Walther 2024-11-30 12:16:17 +01:00
parent de7867c226
commit 3952f870fc
No known key found for this signature in database
GPG Key ID: B39893FA5F65CAE1

View File

@ -88,10 +88,6 @@ rec {
set -- $(IFS==; echo $o)
command=$2
;;
out=*)
set -- $(IFS==; echo $o)
export out=$2
;;
esac
done
@ -153,7 +149,7 @@ rec {
fi
echo "starting stage 2 ($command)"
exec switch_root /fs $command $out
exec switch_root /fs $command
'';
@ -225,7 +221,6 @@ rec {
-device virtio-rng-pci \
-virtfs local,path=${storeDir},security_model=none,mount_tag=store \
-virtfs local,path=/build,security_model=none,mount_tag=sa \
-virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \
''${diskImage:+-drive file=$diskImage,if=virtio,cache=unsafe,werror=report} \
-kernel ${kernel}/${img} \
-initrd ${initrd}/initrd \
@ -261,8 +256,6 @@ rec {
cat > ./run-vm <<EOF
#! ${bash}/bin/sh
''${diskImage:+diskImage=$diskImage}
TMPDIR=$TMPDIR
cd $TMPDIR
${qemuCommand}
EOF