From 838a7171ba0f8ef7845af9c37650acc5e6ffc5d7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 29 May 2021 20:22:25 +0200 Subject: [PATCH] Umount, not mount a 2nd time ... --- alpine-install-on-disk.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alpine-install-on-disk.sh b/alpine-install-on-disk.sh index 4869b5e..7068401 100755 --- a/alpine-install-on-disk.sh +++ b/alpine-install-on-disk.sh @@ -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