LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-19-2005, 09:19 PM   #1
ivj
Member
 
Registered: Jul 2004
Posts: 61

Rep: Reputation: 15
How can i run some programs on startup?


Basically, I want to bind a few IP address onto my eth0 on startup (ifconfig etho0:1 xxx.xxx.xxx.xxx)

I am not sure about where to put those lines...

If I put them into /etc/profile - they will be executed every time a user logs in.

If I put them into etc/rc.d/rc or something - they will be exectued AFTER my http server starts (which by the way binds to those IP addresses).

So I need to have that code exectued before all the init.d stuff executes... Is there an elegant way to do it (not having to edit those rc scripts?)

Thanks!
 
Old 05-20-2005, 03:17 PM   #2
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479

Rep: Reputation: 30
etc/rc.d/rc.local is what I use for slackware for my eth1 and eth2 stuff
 
Old 05-20-2005, 03:41 PM   #3
lokee
Member
 
Registered: Feb 2003
Distribution: Gentoo
Posts: 381

Rep: Reputation: 30
There is a piece of crucial information missing:
-What is your distro?

Best regards,

PS: Might as well put it in your profile(Things will be easier in the future).
 
Old 05-20-2005, 04:47 PM   #4
ivj
Member
 
Registered: Jul 2004
Posts: 61

Original Poster
Rep: Reputation: 15
I'm running Fedora Core 1

rc.local says that

Quote:
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
And I need ips to be bound before HTTP server starts using them - not after!
 
Old 05-21-2005, 09:14 AM   #5
lokee
Member
 
Registered: Feb 2003
Distribution: Gentoo
Posts: 381

Rep: Reputation: 30
Ok, I don't know how you can do this the clean way; but I sure know one.
Code:
cat /etc/rc.d/init.d/apache2
Or maybe /etc/rc.d/init.d/httpd if the latter doesn't exist.

Then I'll tell you at which line you should put your command.

But anyways, you can try another way:
http://www.comptechdoc.org/os/linux/...sysconfig.html
I have a good feeling about the "static-routes" one.

Well, hope this helps.
Best regards,
 
Old 05-21-2005, 04:37 PM   #6
ivj
Member
 
Registered: Jul 2004
Posts: 61

Original Poster
Rep: Reputation: 15
Hmm I guess that is pretty simple... why haven't I thought about it?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
auto run programs at startup?? attila_66 Linux - Newbie 4 10-29-2005 06:01 PM
How do I startup programs? anticuchos SUSE / openSUSE 2 09-07-2005 11:29 PM
Ways to run programs on startup digitalbrutus Linux - Software 3 08-26-2005 05:07 AM
Programs on startup??? GloVe Linux - Software 2 10-05-2003 09:51 AM
Programs run on startup Roy-Svork Linux - Software 4 01-21-2003 09:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:15 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