Having problems with rc.local

Bob McClure Jr robertmcclure at earthlink.net
Tue Sep 13 19:13:37 UTC 2005


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,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
robertmcclure at earthlink.net  http://www.bobcatos.com
Peace at any price is inflationary.




More information about the Redhat-install-list mailing list