From 45181956169200c7434b10f73de7f35f584f6966 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Wed, 3 Mar 2021 20:58:47 +0100 Subject: [PATCH] abort when we can't detect block devices --- CommonInstaller | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CommonInstaller b/CommonInstaller index 2e5e32d9..fb5bda2b 100644 --- a/CommonInstaller +++ b/CommonInstaller @@ -283,6 +283,8 @@ mount_partitions () { SYSTEM_BLOCK=$(find_block system) decho " INFO: #5 [SYSTEM_BLOCK] ${SYSTEM_BLOCK}" + [ -z "${SYSTEM_BLOCK}" ] && error "failed to detect block device for /system" + if is_mounted /system_root; then umount /system 2&>/dev/null umount /system_root 2&>/dev/null @@ -307,6 +309,8 @@ mount_partitions () { VENDOR_BLOCK=$(find_block vendor) decho " INFO: #7 [VENDOR_BLOCK] ${VENDOR_BLOCK}" + [ -z "${VENDOR_BLOCK}" ] && error "failed to detect block device for /vendor" + ! is_mounted /vendor && mount -o ro /vendor ! is_mounted /vendor && mount -o ro ${VENDOR_BLOCK} /vendor