From d255cc1341d0c485f501c5193f55ec93ba9d73f1 Mon Sep 17 00:00:00 2001 From: Janpieter Sollie Date: Tue, 31 Oct 2023 13:47:41 +0100 Subject: [PATCH] fixup! fix a few malfunctioning variables Signed-off-by: Janpieter Sollie --- lib/libktest.sh | 3 +-- root_image | 15 +++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/libktest.sh b/lib/libktest.sh index d5844f69..bf93a3a3 100644 --- a/lib/libktest.sh +++ b/lib/libktest.sh @@ -286,7 +286,6 @@ start_vm() ln -s "$ktest_tmp" "$ktest_out/vm" local kernelargs=() - case $ktest_storage_bus in virtio-blk) ktest_root_dev="/dev/vda" @@ -296,7 +295,7 @@ start_vm() ;; esac - kernelargs+=(root=$ktest_root_dev rw log_buf_len=8M) + kernelargs+=(root=$ktest_root_dev rw log_buf_len=8M rootwait) kernelargs+=(mitigations=off) kernelargs+=("ktest.dir=$ktest_dir") kernelargs+=(ktest.env=$(readlink -f "$ktest_out/vm/env")) diff --git a/root_image b/root_image index e5a5c55d..bc965d67 100755 --- a/root_image +++ b/root_image @@ -293,9 +293,8 @@ update_packages() # systemd... !? mkdir -p "$MNT"/run/user/0 cp /etc/resolv.conf "$MNT/etc/resolv.conf" - - [[ $(curl -qq -I "https://static.rust-lang.org/rustup/${RUST_TRIPLE}/rustup-init" 2>/dev/null | grep "HTTP/2 200") == "" ]] && NO_RUSTUP=1 - [ $NO_RUSTUP ] && PACKAGES+=(rustc rustc-dbgsym rustfmt rustfmt-dbgsym) #don't do rustup on unsupported architectures, just try from debian repositories + [[ $(curl -qq -I "https://static.rust-lang.org/rustup/dist/${RUST_TRIPLE}/rustup-init" 2>/dev/null | grep "HTTP/2 200") == "" ]] && NO_RUSTUP=1 + [ $NO_RUSTUP == "1" ] && PACKAGES+=(rustc rustc-dbgsym rustfmt rustfmt-dbgsym) #don't do rustup on unsupported architectures, just try from debian repositories _chroot "$MNT" mount -t proc none /proc if [[ $MIRROR == *"debian-ports"* ]]; then @@ -308,12 +307,12 @@ update_packages() fi rm -f "$MNT/var/cache/apt/archives/*.deb" - if [ ! $NO_RUSTUP ]; then - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > "$MNT"/tmp/rustup.sh - chmod 755 "$MNT"/tmp/rustup.sh + if [ $NO_RUSTUP == "0" ]; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > "$MNT"/tmp/rustup.sh + chmod 755 "$MNT"/tmp/rustup.sh - _chroot "$MNT" /tmp/rustup.sh --default-host $RUST_TRIPLE -y - echo 'export PATH="$HOME/.cargo/bin:$PATH"' > $MNT/etc/profile.d/rustup.sh + _chroot "$MNT" /tmp/rustup.sh --default-host ${RUST_TRIPLE} -y + echo 'export PATH="$HOME/.cargo/bin:$PATH"' > $MNT/etc/profile.d/rustup.sh fi; }