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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-14-2010, 08:26 PM
|
#1
|
LQ Newbie
Registered: Jan 2010
Posts: 3
Rep:
|
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.
|
|
|
01-14-2010, 09:20 PM
|
#2
|
Senior Member
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591
|
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.
|
|
|
01-14-2010, 09:27 PM
|
#3
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
01-14-2010, 09:40 PM
|
#4
|
LQ Newbie
Registered: Jan 2010
Posts: 3
Original Poster
Rep:
|
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?
|
|
|
01-14-2010, 09:50 PM
|
#5
|
LQ Newbie
Registered: Jan 2010
Posts: 3
Original Poster
Rep:
|
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.
|
|
|
01-14-2010, 10:14 PM
|
#6
|
Senior Member
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591
|
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
|
|
|
01-14-2010, 10:46 PM
|
#7
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
All times are GMT -5. The time now is 11:50 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|