--- usb_install.sh.orig 2006-09-30 02:19:35.000000000 +0200 +++ usb_install.sh 2007-01-18 23:32:33.000000000 +0100 @@ -2,7 +2,7 @@ # # usb_install.sh # -# Copyright (c) 2006 by Miklos Vajna +# Copyright (c) 2006-2007 by Miklos Vajna # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -83,12 +83,22 @@ fi echo -n "searching for usb sticks... " -for i in /sys/block/sd* +for i in /sys/block/{sd*,mmc*} do + [ ! -d $i ] && continue if [ "`cat $i/removable`" == "1" ]; then stick=/dev/${i##*/} break fi + if echo $i |grep -q mmc; then + mmc="y" + else + unset mmc + fi + if [ "$mmc" ]; then + stick=/dev/${i##*/} + break + fi done if [ -n "$stick" ]; then echo "done" @@ -122,8 +132,12 @@ exit 1 else echo -n "updating /boot/grub/device.map... " - rm -f /boot/grub/device.map - echo "quit" | grub --batch --device-map=/boot/grub/device.map >/dev/null 2>&1 + if [ -z "$mmc" ]; then + rm -f /boot/grub/device.map + echo "quit" | grub --batch --device-map=/boot/grub/device.map >/dev/null 2>&1 + else + echo -e "(hd$(($(grep hd /boot/grub/device.map |sed -n 's/.*(hd\([0-9]*\)).*/\1/;$ p')+1)))\t/dev/mmcblk0" >> /boot/grub/device.map + fi echo "done." fi fi @@ -134,7 +148,11 @@ echo "$grubdev" echo -n "checking if '$stick' has at least one partition... " -stick="${stick}1" +if [ -z "$mmc" ]; then + stick="${stick}1" +else + stick="${stick}p1" +fi if [ -b "$stick" ]; then echo "yes" else