487 |
for fs in / /boot |
for fs in / /boot |
488 |
do |
do |
489 |
esc=$(echo ${fs} | sed 's,/,\\/,g') |
esc=$(echo ${fs} | sed 's,/,\\/,g') |
490 |
dev=$(mount | awk "/ on ${esc} / { print \$1 }" | sed 's/[0-9]*$//' | cut -d/ -f3) |
dev=$(mount | awk "/ on ${esc} / { print \$1 }" | sed 's/[0-9]*$//') |
491 |
if [ "$(echo ${dev} | cut -c1-2)" = sd ] |
if [ "$(echo ${dev} | cut -c6-7)" = sd ] |
492 |
then |
then |
493 |
if [ $(which kudzu 2>/dev/null) ] |
if [ $(which hwinfo 2>/dev/null) ] |
494 |
then |
then |
495 |
host=$(kudzu --probe -b scsi | |
if [[ -n $(hwinfo --disk --only ${dev} | grep 'Driver Modules' | grep 'usb[_|-]storage') ]] |
|
gawk '/^device: '${dev}'/,/^host:/ { if (/^host/) { print $2; exit; } }') |
|
|
if [ -d /proc/scsi/usb-storage-${host} -o -f /proc/scsi/usb-storage/${host} ] |
|
496 |
then |
then |
497 |
needusb=1 |
needusb=1 |
498 |
fi |
fi |