From 226c701e7d0476a076586fda73736301ee0c2281 Mon Sep 17 00:00:00 2001 From: Yurii Smetanka Date: Sun, 20 Oct 2024 03:18:47 +0200 Subject: [PATCH] use resolve-conf config https://github.com/solo-io/packer-plugin-arm-image/pull/70 --- builder/bpim4.json.pkr.hcl | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/builder/bpim4.json.pkr.hcl b/builder/bpim4.json.pkr.hcl index 0b3627c5..3fd09772 100644 --- a/builder/bpim4.json.pkr.hcl +++ b/builder/bpim4.json.pkr.hcl @@ -24,28 +24,13 @@ source "arm-image" "bpim4-pwnagotchi" { // qemu_binary = "qemu-aarch64-static" qemu_args = ["-r", "6.6.44"] target_image_size = 19969908736 + resolv-conf = "bind-host" } build { name = "Banana Pi M4 Zero Pwnagotchi" sources = ["source.arm-image.bpim4-pwnagotchi"] - # Set DNS servers - provisioner "shell" { - inline = [ - # Delete symlink - "sudo rm /etc/resolv.conf", - "echo 'nameserver 8.8.8.8' | sudo tee -a /etc/resolv.conf > /dev/null", - "echo 'nameserver 8.8.4.4' | sudo tee -a /etc/resolv.conf > /dev/null", - ] - } - - provisioner "shell" { - inline = [ - "sudo apt-get update || (sleep 30 && sudo apt-get update)" - ] - } - provisioner "file" { destination = "/usr/bin/" sources = [ @@ -58,11 +43,6 @@ build { "data/64bit/usr/bin/pwnlib", ] } - provisioner "shell" { - inline = [ - "apt-get update -o Acquire::Retries=3 --allow-releaseinfo-change" - ] - } provisioner "shell" { inline = ["chmod +x /usr/bin/*"] }