diff options
Diffstat (limited to 'addonsu/mount-system.sh')
-rw-r--r-- | addonsu/mount-system.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/addonsu/mount-system.sh b/addonsu/mount-system.sh new file mode 100644 index 00000000..2e209fb2 --- /dev/null +++ b/addonsu/mount-system.sh @@ -0,0 +1,13 @@ +#!/sbin/sh + +if mount /system; then + exit 0 +fi + +# Try to get the block from /etc/recovery.fstab +block=`cat /etc/recovery.fstab | cut -d '#' -f 1 | grep /system | grep -o '/dev/[^ ]*' | head -1` +if [ -n "$block" ] && mount $block /system; then + exit 0 +fi + +exit 1 |