LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-14-2005, 02:52 AM   #1
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Rep: Reputation: 30
Services and "sudo ifdown eth0" on boot?


Hi,

Part 1
I currently have two NICs on my Ubuntu laptop - one inbuilt one, and a PCMCIA one. The inbuilt one is broken, as in physically broken, but it's still sending signals to Ubuntu that it's an NIC. Both of the NICs are in conflict, so every time I boot up my laptop I have to go into terminal and type in "sudo ifdown eth0" (don't think it works without root), and then my PCMCIA card (eth1) works and I can access the internet.

How can I make Ubuntu run "ifdown eth0" on boot, so that I don't have to do it manually each time? Thanks!

Part 2
Hello again , how can I start up a service (for example nessusd) on boot? I think it has something to do with rc.d, but I found loads of those directories in /etc, so I'm slightly confused.....

J_K9
 
Old 07-14-2005, 03:48 AM   #2
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
On part one can you disable the inbuilt ethernet port through your BIOS. This will eliminate the problem.
The second point you should have a menu item for you to select what services you want to run. I don't use Gnome so I can't tell you exactly where it is.
 
Old 07-14-2005, 04:06 AM   #3
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
for part one:
you can also go into /etc/network/interfaces and comment out the line that reads
Code:
auto eth0
this will then stop eth0 from being activated atomatically at boot time

part 2:
find out which runlevel you are currently using (debian standard is 2 i think)
type
Code:
#runlevel
to find out

then symlink the init script to the right rcX.d directory eg.:
Code:
#ln -s /etc/init.d/nessusd /etc/rc2.d/S90nessusd
do all this as root!
 
Old 07-14-2005, 04:12 AM   #4
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
edit: Thanks for the last post! I am having some problems though...This is what my /etc/network/interfaces looks like:
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
	script grep
	map eth0

iface eth0 inet static
address 192.168.1.106
netmask 255.255.255.0
gateway 192.168.1.1



iface eth1 inet dhcp

auto eth1
That's pretty confusing to me! What should I do? Should I replace all the eth0 with eth1, and then just comment out the last 2 lines?

I haven't tried the service thing yet (because I can't remember which service I wanted to start on boot! ), but how do I know which is the right rcx.d directory? Thanks again,

J_K9

Last edited by J_K9; 07-14-2005 at 04:23 AM.
 
Old 07-14-2005, 04:29 AM   #5
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
change the lines
Code:
mapping hotplug
	script grep
	map eth0
to either read
Code:
mapping hotplug
	script grep
	map eth1
or uncomment those lines entirely (that is what i would try, just giving it a shot!)
to find out which runlevel you are using, run the command 'runlevel'
this will output something like
N 2
then you would want to adding/removing simlinks to/from /etc/rc2.d
 
Old 07-14-2005, 04:35 AM   #6
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
Thanks! I've also changed the following lines:
Code:
iface eth0 inet static
address 192.168.1.106
netmask 255.255.255.0
gateway 192.168.1.1
so that they're all commented out. That's right isn't it? That just leaves eth1 on dhcp.

Oh, and my runlevel is also N 2 so I would add the links to rc2.d, gotcha! Thanks for everything!

J_K9

Last edited by J_K9; 07-14-2005 at 04:36 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I get around the "submit passwd" prompt in ubuntu even if I use "sudo"? t3gah Linux - Distributions 1 02-22-2005 04:42 PM
boot hangs at "Eth0" Help! I know this is an easy question!! skripx Linux - Newbie 3 12-26-2004 07:22 PM
Problem with "sudo" command on Fedora Core 2 maatghandi Linux - Newbie 1 10-30-2004 09:25 AM
normal user want to perform "init 6" by using " sudo acbenny Linux - General 3 08-08-2004 07:41 AM
rh8.0 boot up stuck on "bringing up interface eth0" tnf Linux - Wireless Networking 7 03-22-2004 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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