From 1be4bc9de8a7ba3c1c4f5bf917c438e8dc97904b Mon Sep 17 00:00:00 2001 From: Paul Guyot Date: Tue, 7 Jun 2022 00:20:20 +0200 Subject: [PATCH] Move instead of copying resolv.conf, test with host (fix #38) (#40) --- .github/workflows/test-partitions.yml | 1 + mount_image.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-partitions.yml b/.github/workflows/test-partitions.yml index 176a3f7..1f0025d 100644 --- a/.github/workflows/test-partitions.yml +++ b/.github/workflows/test-partitions.yml @@ -21,3 +21,4 @@ jobs: commands: | cat /etc/os-release uname -a + host github.com diff --git a/mount_image.sh b/mount_image.sh index c2f3768..661f199 100644 --- a/mount_image.sh +++ b/mount_image.sh @@ -59,7 +59,7 @@ mkdir -p ${mount} echo "::set-output name=mount::${mount}" [ ! -d "${mount}" ] && mkdir "${mount}" mount "${rootdev}" "${mount}" -if [ "x${bootdev}" ]; then +if [ "x${bootdev}" != "x" ]; then [ ! -d "${mount}/boot" ] && mkdir "${mount}/boot" mount "${bootdev}" "${mount}/boot" fi @@ -72,7 +72,7 @@ if [ "${use_systemd_nspawn}x" = "x" -o "${use_systemd_nspawn}x" = "nox" ]; then mount --bind /dev/pts "${mount}/dev/pts" fi -cp "${mount}/etc/resolv.conf" "${mount}/etc/_resolv.conf" +mv "${mount}/etc/resolv.conf" "${mount}/etc/_resolv.conf" cp /etc/resolv.conf "${mount}/etc/resolv.conf" cp /usr/bin/qemu-arm-static0 ${mount}/usr/bin/qemu-arm-static0 cp /usr/bin/qemu-arm-static ${mount}/usr/bin/qemu-arm-static