LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-27-2003, 03:19 PM   #1
tfalk3
LQ Newbie
 
Registered: May 2003
Posts: 3

Rep: Reputation: 0
Question 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
 
Old 05-27-2003, 03:30 PM   #2
je_fro
Member
 
Registered: Nov 2002
Location: /texas/austin/home/desk
Distribution: Gentoo
Posts: 341

Rep: Reputation: 30
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.
 
Old 05-27-2003, 03:32 PM   #3
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Put it in the last script run by Redhat, /etc/rc.d/rc.local
 
Old 05-27-2003, 03:53 PM   #4
tfalk3
LQ Newbie
 
Registered: May 2003
Posts: 3

Original Poster
Rep: Reputation: 0
That worked thanks fancypiper.
 
Old 05-27-2003, 03:57 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Startup and Running Commands Post Boot nmitchell Debian 5 08-17-2005 05:37 PM
Commands at startup Maverick1182 Linux - Newbie 5 08-08-2005 05:55 PM
Commands On Startup SkyeFyre Linux - General 3 04-16-2005 07:31 PM
Running Scripts/Commands on Startup drknow Linux - Newbie 4 01-09-2004 05:14 AM
Executing commands on startup viciousfish Linux - General 5 06-28-2002 02:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration