LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   running commands at startup (https://www.linuxquestions.org/questions/linux-general-1/running-commands-at-startup-62138/)

tfalk3 05-27-2003 03:19 PM

running commands at startup
 
Hi guys,

I just installed RedHat 9 last weekend and I couldnt get my Logitech WingMan RumblePad working so I went searching around on the net to try and find a solution. I came across this website http://www.sslug.dk/~chlor/joystick/ which told me to do this.

$ su -
# rmmod hid
# modprobe joydev
# modprobe hid

This works great but it wont let me run rmmod or modprobe even when i enter the super user password it gives me command not found . I have to logout and log back in as root to do it. Then logout and back in as a regular user. I have to do this every time i boot up to use my joystick.

I want linux to do this at startup

Thanks for any help

je_fro 05-27-2003 03:30 PM

It has to do with your PATH variable.
 
I think modprobe lives in /sbin
So if /sbin is not in your PATH, you'll have to do it like: /sbin/modprobe modulename
As for autoloading, that should take care of it. I'm not sure about RH9, though.

fancypiper 05-27-2003 03:32 PM

Put it in the last script run by Redhat, /etc/rc.d/rc.local

tfalk3 05-27-2003 03:53 PM

That worked thanks fancypiper.

trickykid 05-27-2003 03:57 PM

If your su'ing to root, you won't have root's full path by default. You have to issue a command like this when logging in as root when your logged in already using su:

su -

or

su - root

Then you will root's defined $PATH which should include the /sbin directory.


All times are GMT -5. The time now is 07:54 PM.