LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 12-17-2004, 01:51 PM   #1
benrose111488
Member
 
Registered: Jun 2004
Location: Wantage, NJ
Distribution: Fedora 7
Posts: 177

Rep: Reputation: 30
Auto-Executing Shell Script on boot


Hey everyone.. I have a schell script written, which is right now /etc/profile.d/gateway.sh

The point of this script is to automatically execute all the commands needed to run Linux as a gateway for a WinXP machine.

The problem is that every time I open a terminal or log in anywhere it executes

Where can I put this file so that it'll be started ONLY on boot?

Thanks in advance.
 
Old 12-17-2004, 02:01 PM   #2
saravkrish
Member
 
Registered: Mar 2004
Location: KY, USA
Distribution: Fedora Core 1
Posts: 190

Rep: Reputation: 30
In /etc/rc.local

~Sarav
 
Old 12-17-2004, 03:55 PM   #3
benrose111488
Member
 
Registered: Jun 2004
Location: Wantage, NJ
Distribution: Fedora 7
Posts: 177

Original Poster
Rep: Reputation: 30
As any name?

example:

/etc/rc.d/gateway.sh

Or should I just add the code to one of the existing files in that directory?
 
Old 12-17-2004, 05:06 PM   #4
saravkrish
Member
 
Registered: Mar 2004
Location: KY, USA
Distribution: Fedora Core 1
Posts: 190

Rep: Reputation: 30
Quote:
Originally posted by benrose111488
As any name?

example:

/etc/rc.d/gateway.sh

Or should I just add the code to one of the existing files in that directory?
You didn't read my reply properly. I said /etc/rc.local not /etc/rc.d.

/etc/rc.local is a file. You should call your script from that file.

~Sarav
 
Old 12-17-2004, 07:55 PM   #5
benrose111488
Member
 
Registered: Jun 2004
Location: Wantage, NJ
Distribution: Fedora 7
Posts: 177

Original Poster
Rep: Reputation: 30
ahhhh I understand now

Thank you very much, it's working now
 
Old 12-18-2004, 12:52 AM   #6
saravkrish
Member
 
Registered: Mar 2004
Location: KY, USA
Distribution: Fedora Core 1
Posts: 190

Rep: Reputation: 30
No problem. Enjoy.

~Sarav
 
  


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
executing konsole from shell script Meriadoc Linux - Newbie 10 07-10-2009 08:08 AM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
Executing a shell script command!! vishamr2000 Programming 4 08-15-2005 12:33 AM
executing shell script on apache nooodles Linux - General 1 06-29-2004 01:51 AM
executing a shell script from C llama_meme Programming 2 04-01-2002 09:10 PM

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

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