LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-09-2007, 07:09 PM   #1
rmckibben
LQ Newbie
 
Registered: Jul 2007
Location: deep south, usa
Distribution: Debian
Posts: 17

Rep: Reputation: 0
stopping a process during boot


Debian Etch (2.6.1) on compaq laptop with both landline (eth1) and wireless (eth0) capability.

Long story short - dead battery + weak fan = power-off when not using.

At power-on, when disconnected from the landline, during the bootup, the system starts dhclient to get an ip address from eth1 first. It will pause for a long time before it gives up and decides to move on and try getting an ip from eth0. Dhclient gets the address from eth0 quickly, and the bootup proceeds apace.

How do I tell the system not to try dhclient from eth1 during bootup when its not plugged into a landline?

Thanks
 
Old 07-09-2007, 08:02 PM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Time to go to bed, but just to give you a hint on where to look next: try a script with an if/then/else structure. Like so:
Code:
if {eth1 down}
then {dhcprequest eth0}
else {dhcprequest eth1}
You'll need to rewrite it in proper bash to get it working.

ZZzzzzzzzzzzz...........
 
Old 07-09-2007, 08:20 PM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
If you have a default Debian installation, you'll have either network-manager or network-manager-gnome installed. NW will try to link to a network automatically upon boot-up, unless you configure the (eth1) interface properly in /etc/network/interfaces to avoid having network-manager manage it, and you link to that interface manually. In /usr/share/doc/network-manager(-gnome or -kde)/README Debian are some examples of which entries in /etc/network/interfaces that are/are not managed by network-manager.

Last edited by Junior Hacker; 07-09-2007 at 08:21 PM.
 
Old 07-10-2007, 12:01 AM   #4
rmckibben
LQ Newbie
 
Registered: Jul 2007
Location: deep south, usa
Distribution: Debian
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Dutch Master
Time to go to bed, but just to give you a hint on where to look next: try a script with an if/then/else structure. Like so:
Code:
if {eth1 down}
then {dhcprequest eth0}
else {dhcprequest eth1}
You'll need to rewrite it in proper bash to get it working.

ZZzzzzzzzzzzz...........
This script goes somewhere in boot?
 
Old 07-10-2007, 12:14 AM   #5
rmckibben
LQ Newbie
 
Registered: Jul 2007
Location: deep south, usa
Distribution: Debian
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Junior Hacker
If you have a default Debian installation, you'll have either network-manager or network-manager-gnome installed. NW will try to link to a network automatically upon boot-up, unless you configure the (eth1) interface properly in /etc/network/interfaces to avoid having network-manager manage it, and you link to that interface manually. In /usr/share/doc/network-manager(-gnome or -kde)/README Debian are some examples of which entries in /etc/network/interfaces that are/are not managed by network-manager.
Thanks, I'll go check this out. When the landline is plugged in everything works hunky dory, click click go go. This pause without the landline is happening long before I get to the login prompt. Without the landline, everything works wireless, click click go go, but you have to wait a while. So... everything seems to be configured properly.

So, I take eth1 off the net-mgr list, and it will boot up with only eth0?
And then if I ever want to plug in the landline, say at a my brother's house without a wireless router, I can somehow ifup eth1 after the boot?

Thanks
 
Old 07-10-2007, 12:22 AM   #6
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Actually, I think all you have to do is take out the word "auto" for eth1 in /etc/network/interfaces to avoid network-manager trying to configure it at boot-up. And to bring it up manually, I don't know because network manager does that for me. I also only use the ethernet once in a blue moon at another place, but boot-up does not lag like what you describe without being linked via ethernet. Maybe it's because I have a $3500.00 high end laptop.
EDIT: Actually, the more I think of it, I don't have an entry for the ethernet in /etc/network/interfaces as it gets linked via DHCP, the entries in /etc/network/interfaces are usually for static IP's and wireless with encryption.
SECOND EDIT: Just remembered, I just did a re-installation a couple days ago and have not had it linked to land line yet.

Last edited by Junior Hacker; 07-10-2007 at 12:28 AM.
 
Old 07-10-2007, 05:36 AM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
You can also hit ctrl-c during this wait time.

Also change some timings for the dhcp probe but you have to be sure of what you are doing!

Or use ifplugd , which will detect a disconnected cable.
 
Old 07-10-2007, 09:45 AM   #8
BillyGalbreath
Member
 
Registered: Nov 2005
Location: Houston Texas
Distribution: Debian Sid
Posts: 379

Rep: Reputation: 31
[QUOTE=nx5000]You can also hit ctrl-c during this wait time.[QUOTE]
ctrl+c will stop eth1 from loading, but then cause it to skip over eth0 as well. This in return will cause for an even longer wait time for the MTA to load. Really annoying if you ask me.

For my notebook I have eth0 (wired) and wlan0 (wireless). wlan0 is set to "auto" and eth0 is not. This way, wlan0 will load on boot every time. If I dont get a connection with wlan0, it is very easy to load up eth0:

1) open a terminal and su to root (or use sudo for the following).

2) type: ifdown wlan0 (eth1 for you) and wait for the device to shutdown.

3) type: ifup eth0 and wait for the device to load up. If you have 'dhcp' set in the configs (i dont - i use static) then it will request an ip from the dhcp server at this time. However, if you're like me and use a static ip in your configs and this ip does not work on the current connection just type dhclient eth0 to force eth0 to request a new ip from dhcp server.

Now eth0 is up and wlan0 (eth1 for you) is down. You have to make sure your wireless is down before bringing eth0 up because this has the potential to cause problems (unless you know what you are doing).
 
Old 07-10-2007, 09:52 AM   #9
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
[QUOTE=BillyGalbreath][QUOTE=nx5000]You can also hit ctrl-c during this wait time.
Quote:
This in return will cause for an even longer wait time for the MTA to load. Really annoying if you ask me.
Yes that's annoying but AFAIK that's because your system is not completly configured. exim can be reconfigured for "temporary internet connections".
There is a big difference between "a machine not responding" and "a machine name being not resolved". In case the connection is down and your dns server is not available then a lot of things will hang. This also need special configuration maybe with resolvconf package.
 
  


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
Question about Linux Process Stopping bjdea1 Linux - General 2 06-25-2007 05:37 AM
Linux boot up process Vs. Windows boot up process darkskull Linux - Software 7 12-30-2006 04:21 PM
Need to install process at end of boot process ch485de Linux - Newbie 5 12-07-2006 05:47 PM
"Starting System Logger" during boot time, stopping boot process. quickNitin Linux - Newbie 1 06-08-2006 01:31 PM
2.6.10 boot stopping at udev.... edM Slackware 7 02-23-2005 02:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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