need 8.04 /etc/init.d/networking file

Asked by atomicbits on 2009-11-15

I stupidly accidentally deleted /etc/init.d/networking in my server. I believe it is 8.04 server. uname -a shows 2.6.24-24. I tried the networking file I found at , but get a message when I run it: "/bin/sh: Illegal option -" I tried removing the -e in first line, but then get file can not be found when I try to run it.

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Cristi Nistor (cristi-nistor) said : #1

MAke sure you don't have any spaces after -e option. If you copy/pasted the code check for any chars (like " or ') to be pasted correctly and for any spaces at hte end of the lines.

Good luck.

Stefan Eggers (stefan-eggers) said : #2

This file is contained in package "netbase". If the server is up, a "sudo apt-get --reinstall install netbase" might already help.

If not, I'd try to get the file this way:

- Download the netbase source package from here (for Hardy / 8.04 LTS):
  (Info found on this page:
- Use tar on some other machine to extract netbase.init and copy it over some way to the server as /etc/init.d/networking.

That should be enough to get it properly working again.

atomicbits (baldoni-gmail) said : #3

Thank you both for the answer. It is working now :)
I need to stop doing dumb stuff. I downloaded the text from original link on a windows computer, then transferred it to server, didn't realize it was in MS txt format. I copied it to a new file on the server (in correct format) now it works.

Stefan Eggers (stefan-eggers) said : #4

In case you wonder how to know which package a file belongs to:

"dpkg-query -S /path/and/file" will do this. That even works for removed files. Using this one can go looking for package in There one can download the .deb file.

Extract a .deb file with "ar x packagename.deb", extract the contained "data.tar.gz" and you have access to most files. Some configuration files might get created during package installation depending on questions asked by the debconf system and thus might be missing from this file.