From ab61c8941cd55ccecc65f70146273821f004bf59 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Mon, 8 Jun 2020 17:45:11 +0200 Subject: [PATCH] Solved mount bug --- scripts/image/base.sh | 2 +- scripts/image/setup.sh | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/image/base.sh b/scripts/image/base.sh index fede976..b2aa5b3 100644 --- a/scripts/image/base.sh +++ b/scripts/image/base.sh @@ -56,7 +56,7 @@ mount_chroot_binds(){ chroot_proc_mount_path="$root_mount_path""proc/" && chroot_dev_mount_path="$root_mount_path""dev/" && chroot_dev_pts_mount_path="$root_mount_path""dev/pts" && - mount --bind "$boot_mount_path" "$root_mount_path""/boot" && + mount --bind "$boot_mount_path" "$root_mount_path""boot" && mount --bind /dev "$chroot_dev_mount_path" && mount --bind /sys "$chroot_sys_mount_path" && mount --bind /proc "$chroot_proc_mount_path" && diff --git a/scripts/image/setup.sh b/scripts/image/setup.sh index bbbf0a4..532c797 100644 --- a/scripts/image/setup.sh +++ b/scripts/image/setup.sh @@ -253,7 +253,7 @@ if [ "$transfer_image" = "y" ] error info "Boot files will be transfered to device..." && - mv -v "$root_mount_path/boot/"* "$boot_mount_path" || + mv -v "$root_mount_path""boot/"* "$boot_mount_path" || error elif [ "${image_path: -4}" = ".zip" ] then @@ -281,11 +281,15 @@ if [ "$transfer_image" = "y" ] fi info "Start regular mounting procedure..." -if mount | grep -q "$boot_mount_path" && mount | grep -q "$root_mount_path" +if ! mount | grep -q "$boot_mount_path" then - info "Everything allready mounted. Skipping..." - else - mount_partitions + info "$boot_mount_path is allready mounted..." + if ! mount | grep -q "$root_mount_path" + then + info "$root_mount_path is allready mounted..." + else + mount_partitions + fi fi info "Define target paths..."