backuptool.sh: Improve check for whether /system is mounted.
Fixes unable to flash an update.zip over a formatted /system Change-Id: Ia163262585cb2ef414c6996837834c512d774243
This commit is contained in:
@@ -9,14 +9,14 @@ export V=9
|
|||||||
|
|
||||||
# Mount /system if it is not already mounted
|
# Mount /system if it is not already mounted
|
||||||
mount_system() {
|
mount_system() {
|
||||||
if [ ! -f "$S/build.prop" ]; then
|
if ! mount | grep -q " $S " ; then
|
||||||
mount $S
|
mount $S
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Unmount /system unless it is already unmounted
|
# Unmount /system unless it is already unmounted
|
||||||
umount_system() {
|
umount_system() {
|
||||||
if [ -f "$S/build.prop" ]; then
|
if mount | grep -q " $S " ; then
|
||||||
umount $S
|
umount $S
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user