summaryrefslogtreecommitdiffstats
path: root/addonsu/mount-system.sh
blob: 2e209fb2d82e46ce09987d0556739749d1d808b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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