2 # By Chih-Wei Huang <cwhuang@linux.org.tw>
3 # Last updated 2010/12/19
5 # License: GNU Public License
6 # We explicitely grant the right to use the scripts
7 # with Android-x86 project.
12 mountpoint -q data && return
13 if [ -b "$DATA" ]; then
15 elif [ -b "/dev/$DATA" ]; then
17 elif [ -d /mnt/$SRC/data ]; then
19 mount --bind /mnt/$SRC/data data
20 elif [ -f /mnt/$SRC/data.img ]; then
22 mount -o loop /mnt/$SRC/data.img data
24 device_mount_data || mount -t tmpfs tmpfs data
30 mountpoint -q sdcard && return
31 if [ -n "$SDCARD" -a -e /mnt/$SRC$SDCARD ]; then
33 sddir=`dirname $SDCARD`
35 mount --bind /mnt/$SRC$sddir /android$sddir
36 elif [ "$SDCARD" = "premount" ]; then
37 # WARNING: premount the sdcard is deprecated since froyo-x86.
38 # It is left only for backward compatibility and may be removed
40 if [ -d /mnt/$SRC/sdcard ]; then
42 mount --bind /mnt/$SRC/sdcard mnt/sdcard
43 elif [ -d data/sdcard ]; then
44 mount --bind data/sdcard mnt/sdcard
46 mount -o mode=2777,uid=1000,gid=1015 -t tmpfs tmpfs mnt/sdcard