abort when we can't detect block devices

merge-requests/37/merge
Christopher Roy Bratusek 3 years ago
parent 3411c7b43a
commit 4518195616

@ -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

Loading…
Cancel
Save