bin sh if -z ACTION ACTION add then for in dev mmcblk do D1 echo sed -

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
if [ -z $ACTION ] || [ $ACTION = "add" ] ; then
for i in /dev/mmcblk*
do
D1=`echo $i | sed -e s/p[0-9]*//`
D2="/dev/"`echo $MDEV | sed -e s/p[0-9]*//`
if [ $D1 != $D2 ]
then
umount $i
rm -f $i
fi
done
mount -o sync /dev/$MDEV /mnt
killall madshelf
exit 0
fi
if [ $ACTION = "remove" ] ; then
umount -f /dev/$MDEV
killall -HUP madshelf
exit 0
fi
echo "Unknown action. This script must be called by mdev!"
exit 1