LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-24-2009, 12:38 AM   #1
erikw
LQ Newbie
 
Registered: Mar 2009
Posts: 4

Rep: Reputation: 0
Help recreate trashed /etc/init.d/hostname.sh file


Total newbie trying to installing ubuntu 8.04 server for the first time. I'm afraid I accidentally overprinted the /etc/init.d/hostname.sh file (I issued an "echo" command to the wrong file).

Can anyone show me how to recreate it? Or provide it's default contents? I'm unable to resolve hostname issues without being able to run the command:
/etc/init.d/hostname.sh start
This returns error messages (like "...can't find ...command")

Thanks.
 
Old 03-24-2009, 06:42 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Searching on Google, it looks like it comes from the initscripts package.
 
Old 03-24-2009, 09:10 PM   #3
erikw
LQ Newbie
 
Registered: Mar 2009
Posts: 4

Original Poster
Rep: Reputation: 0
so what do I do? I deleted corrupt /etc/init.d/hostname.sh. Tried
apt-get install initscripts
This did not resolve problem. I'm a newbie, so don't assume I know much.
Any suggestions?
 
Old 03-24-2009, 09:22 PM   #4
erikw
LQ Newbie
 
Registered: Mar 2009
Posts: 4

Original Poster
Rep: Reputation: 0
I also tried
sudo aptitude reinstall initscripts
Still no /etc/init.d/hostname.sh
 
Old 03-24-2009, 09:41 PM   #5
manwithaplan
Member
 
Registered: Nov 2008
Location: ~/
Distribution: Arch || Sidux
Posts: 393

Rep: Reputation: 45
Maybe try purging the package...
Code:
sudo apt-get remove initscripts --purge
Then try re-installing.
 
Old 03-24-2009, 11:06 PM   #6
erikw
LQ Newbie
 
Registered: Mar 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Bingo! That did it. Thank you SO much.
 
  


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
recreate md-raid edgjerp Linux - Hardware 3 05-01-2008 04:45 PM
Recreate xorg.conf xaphalanx Fedora 2 04-18-2006 02:53 PM
How to recreate Gnome panel tulip4heaven Linux - Newbie 6 03-28-2006 12:37 AM
recreate swap samhob Linux - General 11 02-07-2004 10:04 AM
how to recreate mysql database java8964 Linux - Software 1 07-25-2002 09:30 PM

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

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