Having problems with rc.local

jim ruxton cinetron at passport.ca
Tue Sep 13 21:46:44 UTC 2005


> If you would please, we prefer bottom posting here.
> 
> http://en.wikipedia.org/wiki/Top-posting
> 
> I'll rearrange this.
> 
> On Tue, Sep 13, 2005 at 04:05:21PM -0400, jim ruxton wrote:
> > 
> > > On Tue, Sep 13, 2005 at 02:53:26PM -0400, jim ruxton wrote:
> > > > Hi I'm having a problem with a script I put in rc.local and I was
> > > > wondering if anyone has any suggestions:
> > > > Below is my script:
> > > > 
> > > > touch /var/lock/subsys/local
> > > > /sbin/rmmod uhci-hcd
> > > > /sbin/modprobe uhci-hcd
> > > > su - jim -c /home/jim/capture/camera_start_script.sh &
> > > > 
> > > >  
> > > > What I want to do is unload and reload uhci-hcd and start another
> > > > script. I have a camera attached to a usb port and when the pc boots it
> > > > doesn't load the camera driver correctly
> > > 
> > > Let's fix the real problem, not the work-around.  Look in
> > > /var/log/messages for error messages.  Here's a quick way to do that.
> > > Bring it up with less.  Then hit '>' to go to end of file.  Then hit
> > > '?' (search backwards) and enter "restart".  That should put you at
> > > the beginning of the boot process in the log.  Then you can either
> > > just page through it, or search forward (with '/') for "uhci".
> > > 
> > > > but if after booting I reload
> > > > the uhci-hcd script all works fine. If I manually run rc.local this
> > > > script works fine as well. So I thought rc.local was the last thing to
> > > > to run but for some reason running it manually and letting the computer
> > > > do it during bootup gives different results any idea why?? I know this
> > > > is probably confusing. Thanks.
> > > > Jim
> > > 
> > > You must remember that when rc.local runs at boot time, it has a very
> > > austere (assume none) environment.  When you run it by hand you have
> > > all kinds of goodies in the environment.  But let's not make
> > > work-arounds (which presently don't work).  Let's fix the root
> > > problem.  The kernel should load the driver(s) on demand.
> > > 
> > > Cheers,
> > 
> > _______________________________________________
> 
> > Thanks Bob,
> > Tried as you suggested. Not sure that it tells me much. Below is the
> > info. from /var/log/messages after booting up. and after that what was
> > written after doing rc.local manually. It looks like in both cases the
> > uhci info is being loaded identically ?? Do you see anything suspicious.
> > My camera is on usb 5-1. 
> > Sep 13 15:34:27 localhost kernel: uhci_hcd 0000:00:1d.0: UHCI Host
> > Controller
> > Sep 13 15:34:27 localhost kernel: usb 1-3: new high speed USB device
> > using ehci_hcd and address 2
> > Sep 13 15:34:27 localhost kernel: idVendor = 0x13b1, idProduct = 0xd
> > Sep 13 15:34:27 localhost kernel: INIT bRadio=1
> > Sep 13 15:34:27 localhost kernel: uhci_hcd 0000:00:1d.0: new USB bus
> > registered, assigned bus number 2
> > Sep 13 15:34:27 localhost kernel: uhci_hcd 0000:00:1d.0: irq 10, io base
> > 0x0000ef00
> > Sep 13 15:34:27 localhost kernel: hub 2-0:1.0: USB hub found
> > Sep 13 15:34:27 localhost kernel: hub 2-0:1.0: 2 ports detected
> > Sep 13 15:34:27 localhost kernel: ACPI: PCI Interrupt Link [LNKD]
> > enabled at IRQ 3
> > Sep 13 15:34:27 localhost kernel: PCI: setting IRQ 3 as level-triggered
> > Sep 13 15:34:27 localhost kernel: ACPI: PCI Interrupt 0000:00:1d.1[B] ->
> > Link [LNKD] -> GSI 3 (level, low) -> IRQ 3
> > Sep 13 15:34:27 localhost kernel: uhci_hcd 0000:00:1d.1: UHCI Host
> > Controller
> > Sep 13 15:34:27 localhost kernel: uhci_hcd 0000:00:1d.1: new USB bus
> > registered, assigned bus number 3
> > Sep 13 15:34:27 localhost kernel: uhci_hcd 0000:00:1d.1: irq 3, io base
> > 0x0000ef20
> > Sep 13 15:34:27 localhost kernel: hub 3-0:1.0: USB hub found
> > Sep 13 15:34:27 localhost kernel: hub 3-0:1.0: 2 ports detected
> > Sep 13 15:34:27 localhost kernel: ACPI: PCI Interrupt 0000:00:1d.2[C] ->
> > Link [LNKC] -> GSI 5 (level, low) -> IRQ 5
> > Sep 13 15:34:27 localhost kernel: uhci_hcd 0000:00:1d.2: UHCI Host
> > Controller
> > Sep 13 15:34:27 localhost kernel: uhci_hcd 0000:00:1d.2: new USB bus
> > registered, assigned bus number 4
> > Sep 13 15:34:27 localhost kernel: uhci_hcd 0000:00:1d.2: irq 5, io base
> > 0x0000ef40
> > Sep 13 15:34:27 localhost kernel: hub 4-0:1.0: USB hub found
> > Sep 13 15:34:27 localhost kernel: hub 4-0:1.0: 2 ports detected
> > Sep 13 15:34:27 localhost kernel: ACPI: PCI Interrupt 0000:00:1d.3[A] ->
> > Link [LNKA] -> GSI 10 (level, low) -> IRQ 10
> > Sep 13 15:34:27 localhost kernel: uhci_hcd 0000:00:1d.3: UHCI Host
> > Controller
> > Sep 13 15:34:27 localhost kernel: uhci_hcd 0000:00:1d.3: new USB bus
> > registered, assigned bus number 5
> > Sep 13 15:34:27 localhost kernel: uhci_hcd 0000:00:1d.3: irq 10, io base
> > 0x0000ef80
> > Sep 13 15:34:27 localhost kernel: hub 5-0:1.0: USB hub found
> > Sep 13 15:34:27 localhost kernel: hub 5-0:1.0: 2 ports detected
> > Sep 13 15:34:27 localhost kernel: usb 5-1: new full speed USB device
> > using uhci_hcd and address 2
> > Sep 13 15:34:27 localhost kernel: usb 5-2: new low speed USB device
> > using uhci_hcd and address 3
> > Sep 13 15:34:27 localhost mDNSResponder:  startup succeeded
> > Sep 13 15:34:27 localhost kernel: input: USB HID v1.10 Mouse [062a:0000]
> > on usb-0000:00:1d.3-2
> > 
> > 
> > 
> > after removing and reloading uhci-hcd ( everything works after this):
> > 
> > 
> > 
> > 
> > 
> > Sep 13 15:51:14 localhost kernel: USB Universal Host Controller
> > Interface driver v2.2
> > Sep 13 15:51:14 localhost kernel: SELinux: initialized (dev debugfs,
> > type debugfs), not configured for labeling
> > Sep 13 15:51:14 localhost kernel: ACPI: PCI Interrupt 0000:00:1d.0[A] ->
> > Link [LNKA] -> GSI 10 (level, low) -> IRQ 10
> > Sep 13 15:51:14 localhost kernel: uhci_hcd 0000:00:1d.0: UHCI Host
> > Controller
> > Sep 13 15:51:14 localhost kernel: uhci_hcd 0000:00:1d.0: new USB bus
> > registered, assigned bus number 2
> > Sep 13 15:51:14 localhost kernel: uhci_hcd 0000:00:1d.0: irq 10, io base
> > 0x0000ef00
> > Sep 13 15:51:14 localhost kernel: hub 2-0:1.0: USB hub found
> > Sep 13 15:51:14 localhost kernel: hub 2-0:1.0: 2 ports detected
> > Sep 13 15:51:14 localhost kernel: ACPI: PCI Interrupt 0000:00:1d.1[B] ->
> > Link [LNKD] -> GSI 3 (level, low) -> IRQ 3
> > Sep 13 15:51:14 localhost kernel: uhci_hcd 0000:00:1d.1: UHCI Host
> > Controller
> > Sep 13 15:51:14 localhost kernel: uhci_hcd 0000:00:1d.1: new USB bus
> > registered, assigned bus number 3
> > Sep 13 15:51:14 localhost kernel: uhci_hcd 0000:00:1d.1: irq 3, io base
> > 0x0000ef20
> > Sep 13 15:51:14 localhost kernel: hub 3-0:1.0: USB hub found
> > Sep 13 15:51:14 localhost kernel: hub 3-0:1.0: 2 ports detected
> > Sep 13 15:51:14 localhost kernel: ACPI: PCI Interrupt 0000:00:1d.2[C] ->
> > Link [LNKC] -> GSI 5 (level, low) -> IRQ 5
> > Sep 13 15:51:14 localhost kernel: uhci_hcd 0000:00:1d.2: UHCI Host
> > Controller
> > Sep 13 15:51:14 localhost kernel: uhci_hcd 0000:00:1d.2: new USB bus
> > registered, assigned bus number 4
> > Sep 13 15:51:14 localhost kernel: uhci_hcd 0000:00:1d.2: irq 5, io base
> > 0x0000ef40
> > Sep 13 15:51:14 localhost kernel: hub 4-0:1.0: USB hub found
> > Sep 13 15:51:14 localhost kernel: hub 4-0:1.0: 2 ports detected
> > Sep 13 15:51:14 localhost kernel: ACPI: PCI Interrupt 0000:00:1d.3[A] ->
> > Link [LNKA] -> GSI 10 (level, low) -> IRQ 10
> > Sep 13 15:51:14 localhost kernel: uhci_hcd 0000:00:1d.3: UHCI Host
> > Controller
> > Sep 13 15:51:15 localhost kernel: uhci_hcd 0000:00:1d.3: new USB bus
> > registered, assigned bus number 5
> > Sep 13 15:51:15 localhost kernel: uhci_hcd 0000:00:1d.3: irq 10, io base
> > 0x0000ef80
> > Sep 13 15:51:15 localhost kernel: hub 5-0:1.0: USB hub found
> > Sep 13 15:51:15 localhost kernel: hub 5-0:1.0: 2 ports detected
> > Sep 13 15:51:15 localhost su(pam_unix)[5855]: session opened for user
> > jim by (uid=0)
> > Sep 13 15:51:15 localhost kernel: usb 5-1: new full speed USB device
> > using uhci_hcd and address 2
> > Sep 13 15:51:15 localhost kernel: usb 5-2: new low speed USB device
> > using uhci_hcd and address 3
> > Sep 13 15:51:15 localhost hal.hotplug[5928]: DEVPATH is not set
> > Sep 13 15:51:15 localhost kernel: input: USB HID v1.10 Mouse [062a:0000]
> > on usb-0000:00:1d.3-2
> > Sep 13 15:51:35 localhost su(pam_unix)[5855]: session closed for user
> > jim
> 
> Perhaps we need to back up a little further.  Please describe what
> happens if you comment out the rc.local dodge and reboot.  What is
> the end result that fails to happen?  The camera is not acknowledged?
> What error messages?
> 
> Also, to Rick Stevens: you may be able to solve this better than I.
> Feel free to jump in.
Thanks Bob,
I'm ccing this to the developer of capture in case he has some ideas
about this.
When I reboot without the rc.local dodge if I go to start my camera I
can't initialize it unless I turn the camera off and back on again once
the machine has booted. I'm using a program called capture based on
libptp http://www.ucl.cas.cz/~petr/plant-growth/ .

normally I just issue a:
$ capture start 
command to initialize the camera. If I turn the camera on boot the
machine and issue this it doesn't work. I get an error message saying
"can't initialize the camera" If I boot the machine then turn the camera
on it works fine. I am trying to build a system that allows someone to
turn on the camera, boot the machine and walk away. I haven't been able
to find any error messages in the system logs. Any more thoughts on
this? Thanks!
Jim

> 
> Cheers,




More information about the Redhat-install-list mailing list