USB booting :: linuxrc script MOD question



Delete the wait_usb function and replace the wait_usb function call with the echo & ash statements.

I put mine inline as I have shown and can see and experience the delay.

I used the ash -c "sleep 6"

Can you show me here what t shoudl look like?  I  printed out some of the script above.

I think I remmed out the wrong lines.

Is this the part I need to modify only?

# Check for user request to wait for slow USB devices
if test -n "$WAITUSB"; then
wait_usb
fi


Remove all that and replace it with your script?  Also don't touch what I rem'd out above?

Before:

# Check for user request to wait for slow USB devices
if test -n "$WAITUSB"; then
wait_usb
fi

After:
if test -n "$WAITUSB"; then
echo -n "${CRE}{BLUE}Waiting for USB devices${NORMAL}..."
ash -c "sleep 6"
echo "${BLUE}Done.${NORMAL}"
fi



So I should have never touched this section which I put back to the way it was:

# Wait for very slow USB devices:
# Host: scsi1 Channel: 00 Id: 00 Lun: 00
#   Vendor:          Model:                  Rev:
#   Type:   <NULL>                ANSI SCSI revision: ffffffff
wait_usb() {
   case "$(cat /proc/scsi/scsi)" in
       *"<NULL>"*|*ffffffff*) ;;
       *) return ;;
   esac
   echo -n "${CRE}${BLUE}Waiting for USB devices${NORMAL}..."
   for i in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .; do
       sleep 1
       case "$(cat /proc/scsi/scsi)" in
           *"<NULL>"*|*ffffffff*) echo -n .;;
           *) break ;;
       esac
   done
   echo "${BLUE}Done.${NORMAL}"
}




I found the section you want me to replace did so but getting a different syntax error this time:

/linuxrc: 621: Syntax error "(" unexpected (expecting "fi"

I am assuming this is line 621?  I never modifed anything on 621 only what I just wrote now and put it back and did as you said.



I just edited this post I think there is a Quote missing will try that and let you know.

SHould:

echo "${BLUE}Done.${NORMAL}

Be:

echo "${BLUE}Done.${NORMAL}"


??

I missed the closing quote on the first {NORMAL} which I have corrected.

The wait_usb function will never be called, so you can delete it or comment it out. Does not matter.

We are really only replacing one line (wait_usb) with three lines:

echo -n "${CRE}{BLUE}Waiting for USB devices${NORMAL}..."
ash -c "sleep 6"
echo "${BLUE}Done.${NORMAL}"

Next Page...
original here.