Skip to content

Commit

Permalink
busybox: Simplify dm7025 mount script.
Browse files Browse the repository at this point in the history
Did not push PR on purpose - there are some other things I'm experimenting
with that - if they work - may also need changes to busybox.
  • Loading branch information
MiLo committed Jan 21, 2011
1 parent 7acb15d commit 5489f43
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions recipes/busybox/busybox-1.15.3/dm7025/mdev-mount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,17 @@ case "$ACTION" in
if [ $? -ne 0 ] ; then
# no fstab entry, use automatic mountpoint
DEVBASE=`expr substr $MDEV 1 3`
REMOVABLE=`cat /sys/block/$DEVBASE/removable`
MODEL=`cat /sys/block/$DEVBASE/device/model`
ADAPTER=`expr substr $DEVBASE 1 2`
if [ "$ADAPTER" == "hd" ] ; then
# 7025 needs to set this on internal disks
hdparm -d1 -X66 /dev/$MDEV
fi
if [ $REMOVABLE -eq "0" ]; then
# mount the first non-removable device on /media/hdd
if [ "$DEVBASE" == "hda" ]; then
DEVICETYPE="hdd"
elif [ "$DEVBASE" == "hdc" ]; then
DEVICETYPE="cf"
else
if [ "$DEVBASE" == "hdc" ]; then
DEVICETYPE="cf"
elif [ "$MODEL" == "USB CF Reader " ]; then
DEVICETYPE="cf"
elif [ "$MODEL" == "USB SD Reader " ]; then
DEVICETYPE="mmc1"
elif [ "$MODEL" == "USB MS Reader " ]; then
DEVICETYPE="mmc1"
elif [ "$MODEL" == "USB SM Reader " ]; then
DEVICETYPE="mmc1"
else
DEVICETYPE="usb"
fi
DEVICETYPE="usb"
fi
touch /dev/mdev.$DEVICETYPE
DEVSTATE=`cat /dev/mdev.$DEVICETYPE`
Expand Down

0 comments on commit 5489f43

Please sign in to comment.