Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (5) </ 1 2 [3] 4 5 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: linuxrc script MOD question, Dell D820 Laptop< Next Oldest | Next Newest >
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Aug. 17 2007,22:47 QUOTE

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"
Back to top
Profile PM WEB 
emunity Offline





Group: Members
Posts: 26
Joined: July 2007
Posted: Aug. 17 2007,22:55 QUOTE

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?
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Aug. 17 2007,23:06 QUOTE

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


Edited by roberts on Aug. 17 2007,23:47
Back to top
Profile PM WEB 
emunity Offline





Group: Members
Posts: 26
Joined: July 2007
Posted: Aug. 17 2007,23:23 QUOTE

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}"


??
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Aug. 17 2007,23:51 QUOTE

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}"
Back to top
Profile PM WEB 
21 replies since Aug. 17 2007,00:29 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (5) </ 1 2 [3] 4 5 >/
reply to topic new topic new poll
Quick Reply: linuxrc script MOD question

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code