Unmount /system on exit
This commit is contained in:
parent
8125d652e1
commit
ae44572c41
1 changed files with 5 additions and 0 deletions
|
@ -44,6 +44,9 @@ if ! ${BB} mount -t ext4 -o ro,barrier=1 ${DISK}p2 /system; then
|
|||
exit 2
|
||||
fi
|
||||
|
||||
# Umount system
|
||||
trap "${BB} umount /system" EXIT
|
||||
|
||||
# Nothing to do?
|
||||
if /system/bin/resize2fs ${DISK_PART} 2>&1 | ${BB} grep "Nothing to do"; then
|
||||
echo "Disk is already resized"
|
||||
|
@ -59,4 +62,6 @@ if ! /system/bin/resize2fs ${DISK_PART}; then
|
|||
exit 3
|
||||
fi
|
||||
|
||||
/sbin/busybox sync
|
||||
|
||||
echo "Disk is resized"
|
||||
|
|
Loading…
Add table
Reference in a new issue