Skip to content

Commit

Permalink
fixup! fix a few malfunctioning variables
Browse files Browse the repository at this point in the history
Signed-off-by: Janpieter Sollie <janpieter.sollie@edpnet.be>
  • Loading branch information
jpsollie committed Nov 15, 2023
1 parent a899c47 commit d255cc1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions lib/libktest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"))
Expand Down
15 changes: 7 additions & 8 deletions root_image
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}

Expand Down

0 comments on commit d255cc1

Please sign in to comment.