LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-14-2010, 08:26 PM   #1
tansj
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Rep: Reputation: 0
How to autorun commands at boot?


Hi all,

I am a newbie using Redhat Linux Enterprise 5.0.
I am trying to figure out how to autorun these commands at boot.

cd ixpio
./ixpio.inst


Please advice.

Thanks.
 
Old 01-14-2010, 09:20 PM   #2
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Using an editor as root or sudo, put those commands in /etc/rc.local. Make sure there is no hash "#" at the beginning or they will be ignored.
 
Old 01-14-2010, 09:27 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
What are these commands? Is this a service? Is it a graphical program? Is this a user program or a system program?
If this is a user program, it is better to start it when you log in instead of when your computer boots.
If this is a user console program, then your .profile script is a good place to start it, but you may need to run it in the background so that the .profile script will finish. If this is a GUI program, placing a shortcut in an Autostart directory may be better. If you want it to start regardless of which desktop environment you use, then an X script such as .xsession.

Also, include a full path to the command in your scripts. A script started at boot and run as root will have a different environment then one started by a regular user.

Last edited by jschiwal; 01-14-2010 at 09:35 PM.
 
Old 01-14-2010, 09:40 PM   #4
tansj
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Original Poster
Rep: Reputation: 0
it is an I/O module slotted in one of my PCI-Express slot. It doesnt load automatically with every boot. To load the module i have to type the commands in the command shell.

Any advice?
 
Old 01-14-2010, 09:50 PM   #5
tansj
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Hi Brains,

i have tried insert these commands in rc.local but it doesnt work.
When i typed "lsmod" in the command shell, my I/O module is not loaded.

please advice.
 
Old 01-14-2010, 10:14 PM   #6
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Where exactly is this "ixpio" directory?
If it's in your home directory, specify the full path of this directory, an example below using my /etc/rc.local file.
Code:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
cd /home/me/ixpio
./ixpio.inst

exit 0
You can also put them both in one command as such: cd /home/me/ixpio && ./ixpio.inst
 
Old 01-14-2010, 10:46 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Could you provide a link with more information on this device and the program? A README file would be great.

Does it work when you run it manually? The only way I can see this is if it is using the fuse system to load a userland driver.

A user program to load a kernel module just doesn't sound right. I can see running a script as root to install the kernel module in /lib/modules/$(uname -r)/ and then adding a file in /etc/modprobe.d/ with an install command, modprobing the device and running "depmod -a".

Perhaps this has been done previously and the ixpio.inst command does something else than load the module.
In that case, the problem could have been in the previous phase of installation.

Is ixpio.inst a script? If so, what does it do?

Last edited by jschiwal; 01-14-2010 at 10:55 PM.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Autorun "startx" on boot with lilo? Pyro In A Cage Linux - General 2 02-06-2006 05:36 PM
autorun commands dhave Slackware 2 05-16-2005 03:34 PM
Boot hangs after "md: ...autorun Done" The_fuzzy_cow Linux - Hardware 2 07-12-2004 08:50 AM
autorun at boot anthjaz Linux - General 10 05-06-2004 08:02 PM
boot/startup/autorun commands awejevlen Linux - Newbie 6 05-04-2004 06:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:10 AM.

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