blob: 3092efe2a2efb6a86c02e49e2df15b2a04f82c97 [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001#!/sbin/sh
2
3um
4if [ $? != "0" ]; then
5 echo "Unable to unmount!"
6 exit 1
7fi
8
9
10case $1 in
11 repair)
12 if [ -e /dev/block/mmcblk0p2 ]; then
13
14 e2fsck -yf /dev/block/mmcblk0p2
15 else
16 echo "No ext partition found!"
17 exit 1
18 fi
19 exit 0
20 ;;
21 ext3)
22 if [ -e /dev/block/mmcblk0p2 ]; then
23
24 e2fsck -yf /dev/block/mmcblk0p2
25 tune2fs -c0 -i0 -j /dev/block/mmcblk0p2
26 else
27 echo "No ext partition found!"
28 exit 1
29 fi
30 exit 0
31 ;;
32 ext4)
33 if [ -e /dev/block/mmcblk0p2 ]; then
34
35 tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
36 e2fsck -fpDC0 /dev/block/mmcblk0p2
37 else
38 echo "No ext partition found!"
39 exit 1
40 fi
41 exit 0
42 ;;
43 --)
44 exit 0
45 ;;
46esac