LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-03-2008, 09:02 AM   #1
Caldus
Member
 
Registered: Oct 2007
Posts: 36

Rep: Reputation: 15
Question about modifying hosts at startup.


Hi,

I'm trying to write a quick and simple script that will stop inetd, add an entry to the hosts file, and then restart inetd so that the changes will take effect. I want to do all of this before the login screen comes up. The reason I am doing it this way is because there is a software package called Ardence that is installed on this machine and it recreates certain files in the /etc/ directory every time the machine starts up, so it mangles with the hosts file every time. I want to be able to automatically add in an extra entry in this hosts file every time the machine boots up so that it doesn't have to be added manually every time. So my question is, what daemon(s) do I need to restart in order for the changes to take effect? Any other daemon(s) I should be worrying about? Is inetd even one of them?

Thanks!
 
Old 01-04-2008, 05:25 AM   #2
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
I don't know what distro you are using, but I don't have to restart any program for the changes to take effect. I could simply do:
echo 192.168.1.1 router >> /etc/hosts
as root, to make an entry for my router in the hosts file. Doesn't this work with your distro?
 
Old 01-04-2008, 12:48 PM   #3
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
As well as with Dinithion's response, anything you put in rc.local should be executed at the end of the startup process, prior to the login prompt.
 
  


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
Modifying startup Yig Linux - Newbie 6 11-28-2006 03:30 PM
Modifying /etc/hosts globally (All LAN users) for loopbacking. How? ambayah Linux - General 4 08-28-2004 12:08 PM
Am I modifying the startup scripts correctly? BajaNick Linux - General 3 07-04-2004 02:26 PM
Something is modifying my modules.conf at startup abro Linux - Software 0 12-14-2003 08:50 PM
modifying hosts.deny and rdesktop Goatdemon Arch 2 11-17-2003 04:20 PM


All times are GMT -5. The time now is 09:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration