From 208b96d8b65de93370f2324792e9991e2d9ac191 Mon Sep 17 00:00:00 2001 From: jalr Date: Thu, 13 Jun 2019 21:24:51 +0200 Subject: [PATCH] Replace aria2c with wget for downloading the torrent file --- packer/initramfs/labsync | 2 +- packer/initramfs/labsync-prereqs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packer/initramfs/labsync b/packer/initramfs/labsync index d001a54..2f707d0 100755 --- a/packer/initramfs/labsync +++ b/packer/initramfs/labsync @@ -98,7 +98,7 @@ labsync_mount_root() { vg_name="vglab" if [ -z "$labsync_localboot" ]; then labsync_info "Downloading torrent file from ${labsync_torrent}" - while ! aria2c -t 10 --follow-torrent=false --dir /tmp -o torrent "${labsync_torrent}"; do sleep 1; done + while ! wget -O /tmp/torrent "${labsync_torrent}"; do sleep 1; done aria2c -S /tmp/torrent > /tmp/torrent_info squashfs_file="$(sed -n '/idx|path\/length/,${s/\s*1|\(.*\)$/\1/p}' /tmp/torrent_info)" image_size_bytes="$(sed -n 's/Total Length: .*(\([0-9,]*\)).*$/\1/p' /tmp/torrent_info | tr -d ',')" diff --git a/packer/initramfs/labsync-prereqs b/packer/initramfs/labsync-prereqs index 8345c6d..f02a0ee 100755 --- a/packer/initramfs/labsync-prereqs +++ b/packer/initramfs/labsync-prereqs @@ -7,6 +7,8 @@ case $1 in ## . /usr/share/initramfs-tools/hook-functions rm -f "$DESTDIR/sbin/mke2fs" + mkdir -p "$DESTDIR/lib/x86_64-linux-gnu" + cp /lib/x86_64-linux-gnu/libnss_dns* "$DESTDIR/lib/x86_64-linux-gnu" copy_exec /sbin/e2fsck copy_exec /sbin/mke2fs copy_exec /sbin/sfdisk