utils_functions: Added a check for the system_root

now on addon while flashing recovery usign mount point /system_root by which this is causing a flashing error.
Let's first check and unmount /system_root if mounted

Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
This commit is contained in:
Mohd Faraz 2020-11-08 18:40:18 +05:30 committed by John Wu
parent d089698475
commit dc3d57deba

View File

@ -252,6 +252,10 @@ mount_partitions() {
[ -z $SLOT ] || ui_print "- Current boot slot: $SLOT"
# Mount ro partitions
if is_mounted /system_root; then
umount /system 2&>/dev/null
umount /system_root 2&>/dev/null
fi
mount_ro_ensure "system$SLOT app$SLOT" /system
if [ -f /system/init -o -L /system/init ]; then
SYSTEM_ROOT=true