Umount, not mount a 2nd time ...

This commit is contained in:
Nico Schottelius 2021-05-29 20:22:25 +02:00
parent 919a725b04
commit 838a7171ba

View file

@ -25,7 +25,7 @@ rootfs_tmpdir=$(mktemp -d)
rootfs_url="http://dl-cdn.alpinelinux.org/alpine/v$MAJOR_VERSION/releases/x86_64/$IMAGE"
run_root () {
sudo chroot $rootfs_tmpdir
sudo chroot $rootfs_tmpdir /usr/bin/env \
PATH=/sbin:/bin:/usr/sbin:/usr/bin \
/bin/sh -c "$*"
}
@ -95,7 +95,7 @@ run_root grub-install --target=i386-pc ${DISK}
# Cleanup
run_root rm -f /etc/resolv.conf
for dir in dev proc sys; do
sudo mount --bind /${dir} ${rootfs_tmpdir}/${dir}
sudo umount ${rootfs_tmpdir}/${dir}
done
sudo umount $rootfs_tmpdir