From 09928ba3a526b3e306611e3e8fe66690564d165f Mon Sep 17 00:00:00 2001 From: oddlama Date: Sun, 30 May 2021 03:17:37 +0200 Subject: [PATCH] Sanity check ./install -R that the directory is a mountpoint --- scripts/main.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/main.sh b/scripts/main.sh index 4b75333..50f8891 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -374,6 +374,10 @@ function main_install() { } function main_chroot() { + # Skip if already mounted + mountpoint -q -- "$1" \ + || die "'$1' is not a mountpoint" + gentoo_chroot "$@" einfo "Unmounting chroot environment" gentoo_umount