--- trunk/mkinitrd-magellan/mkinitrd.in 2010/05/30 11:47:04 993 +++ trunk/mkinitrd-magellan/mkinitrd.in 2010/08/19 12:24:23 1140 @@ -487,14 +487,12 @@ for fs in / /boot do esc=$(echo ${fs} | sed 's,/,\\/,g') - dev=$(mount | awk "/ on ${esc} / { print \$1 }" | sed 's/[0-9]*$//' | cut -d/ -f3) - if [ "$(echo ${dev} | cut -c1-2)" = sd ] + dev=$(mount | awk "/ on ${esc} / { print \$1 }" | sed 's/[0-9]*$//') + if [ "$(echo ${dev} | cut -c6-7)" = sd ] then - if [ $(which kudzu 2>/dev/null) ] + if [ $(which hwinfo 2>/dev/null) ] then - host=$(kudzu --probe -b scsi | - gawk '/^device: '${dev}'/,/^host:/ { if (/^host/) { print $2; exit; } }') - if [ -d /proc/scsi/usb-storage-${host} -o -f /proc/scsi/usb-storage/${host} ] + if [[ -n $(hwinfo --disk --only ${dev} | grep 'Driver Modules' | grep 'usb[_|-]storage') ]] then needusb=1 fi