LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-18-2008, 07:27 AM   #1
/dev/me
Member
 
Registered: May 2008
Distribution: Slackware 13
Posts: 116

Rep: Reputation: 20
She's so slow when she's not wired


Normally I have my slackbox hooked up to the internet wiredly, but sometimes I use wireless.

The thing is, wireless works perfectly. But booting up is a lot slower without the cable. I guess you know what I mean. Booting the laptop up makes it wait for the attempt to establish a wired connection.

I'd like it if the machine could somehow determine that it wasn't wired and skip that step, or do it in the background or something. I know other distro's do this 'by default', and as is to be expected slack doesn't. But I somehow can't find the switch needed to alter it's behaviour here.

It's not a Big Thing. But I'd really appreciate it if someone could give me a hint. 'cuz I have no idea where to start looking. I was reading the inet scripts but they did not inspire me today :-s
 
Old 07-18-2008, 07:47 AM   #2
LordAnta
Member
 
Registered: Apr 2008
Location: Munich, Germany
Distribution: Slackware current
Posts: 128

Rep: Reputation: 18
It is trying to establish a wired connection because he is looking for a DHCP server to give him a lease.

You have 2 possibilities:
1. press CTRL+C on bootup when it tries to get it's ip
2. edit /etc/rc.d/rc.inet1.conf and change USE_DHCP[0]="yes" to USE_DHCP[0]="" for eth0 (or whatever is your ethernet card). In this case you will have to run dhclient eth0 every time you stay with the wire

Last edited by LordAnta; 07-18-2008 at 07:49 AM.
 
Old 07-18-2008, 08:31 AM   #3
Maligree
Member
 
Registered: Mar 2008
Distribution: Gentoo, CentOS, Fedora, Arch
Posts: 231
Blog Entries: 1

Rep: Reputation: 42
Yeah mine's like that too. But she has the most beautiful eyes I've ever seen..

And, this time seriously: ifplugd, do some research
 
Old 07-18-2008, 08:31 AM   #4
/dev/me
Member
 
Registered: May 2008
Distribution: Slackware 13
Posts: 116

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by LordAnta
It is trying to establish a wired connection because he is looking for a DHCP server to give him a lease.

You have 2 possibilities:
1. press CTRL+C on bootup when it tries to get it's ip
2. edit /etc/rc.d/rc.inet1.conf and change USE_DHCP[0]="yes" to USE_DHCP[0]="" for eth0 (or whatever is your ethernet card). In this case you will have to run dhclient eth0 every time you stay with the wire
Thanks, yeah, I thought as much.

It seems a better option to press ctrl-C when not wired than to run dhclient every time it is wired. But I was kinda hoping some trigger would be identifiable upon which the machine could determine whether it's plugged in or not. So to automate the pressing of ctrl-C, so to speak.

I see no reason why this would be a technical impossibility. It's just that I'm not really sure in which direction to look for a solution, and how to integrate this into my inet scripts (without breaking anything, heheh...)



____
You know, thinking about this I think I would have to change a couple of things in my boot order. Invent an extra step I mean, where the machine first looks if signal is coming from eth0 (or something similar to identify whether a cable is present) before proceeding with dhclient. But all my blunt understanding comes up with are ugly polling scripts that don't integrate well with the regular boot procedure.

Which leads me to believe I'm looking it the wrong direction.
 
Old 07-18-2008, 08:40 AM   #5
/dev/me
Member
 
Registered: May 2008
Distribution: Slackware 13
Posts: 116

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by Maligree
Yeah mine's like that too. But she has the most beautiful eyes I've ever seen..

And, this time seriously: ifplugd, do some research
Sorry for the double post. We seemed to have crossed each other.

Yeah... I could have probably solved this on my own. But as above, I was looking in the wrong direction and I somehow didn't get on the right track by myself. Thank you. That was all I needed to know.


Finishing thoughts: ifplugd isn't installed by default I believe. But I found alien's slackbuilds for it, so I'm confident that all will be well after I've done some reading.
 
Old 07-18-2008, 08:18 PM   #6
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Can you decrease the DHCP timeout in /etc/rc.d/rc.inet1?
 
Old 07-18-2008, 09:08 PM   #7
Pratt
Member
 
Registered: Apr 2005
Location: Colombia
Distribution: Slackware 14.2
Posts: 82

Rep: Reputation: 18
You Could add (for eth0)

Code:
DHCP_TIMEOUT[0]=5
in your /etc/rc.d/rc.inet1.conf

This way, it only waits 5 seconds
 
Old 07-19-2008, 08:11 AM   #8
/dev/me
Member
 
Registered: May 2008
Distribution: Slackware 13
Posts: 116

Original Poster
Rep: Reputation: 20
Yeah, I wrote in my first post that I was reading the inet files, but that they failed to inspire me. It was things like this:
Code:
echo "Polling for DHCP server on interface ${1}:"
        # If you set a timeout, you get one, even if the kernel doesn't think that
        # your device is connected, in case /sys isn't right (which it usually isn't
        # except right after the device is loaded, when it usually is):
These things are exactly why I love Slackware, and why I'm glad I'm back. But it kind of tells me that the time-out setting is a form of 'manual override' that can be set because the automagicly detected status can under certain circumstances be wrong.


Code continues:
Code:
        if [ "${DHCP_TIMEOUT[$i]}" = "" ]; then
          ifconfig ${1} up && sleep 1
          CONNSTATUS="$(cat /sys/class/net/${1}/carrier 2> /dev/null)"
          ifconfig ${1} down
          if [ "$CONNSTATUS" = "0" ]; then
            # The kernel has just told us the cable isn't even plugged in, but we will
            # give any DHCP server a short chance to reply anyway:
            echo "No carrier detected on ${1}.  Reducing DHCP timeout to 10 seconds."
            DHCP_TIMEOUT[$i]=10
          fi
As above. This doesn't bring me closer to a /fast/ solution. It does help understanding why things are as they are, and yes, also, that it may be changed by hand.

But somehow that didn't seem the right approach.

The way I understand it, and correct me if I'm wrong, but a hard coded time-out counts as a manual override. But the lack of a hard coded time-out might yield false negatives (the machine thinks there is no signal while there is a signal).

Now if I where to take this approach in solving this minor problem, I would have to run some tests (cuz I trust myself least of all before testing). That means pulling the cable and seeing whether...
Code:
cat /sys/class/net/${1}/carrier   # Where ${1} = eth0
...yields different results with the cable in and out. (It does, instantly )
So that gives some results to work with, and has taught me just a little more about the system, but also gave me the idea that I'd be working on a complex approach to solving what is basically not even a problem but an optimization. So rather than following this road I did a little comparative study and found this:

The working code of Slackware
Code:
/sbin/dhcpcd -d -t ${DHCP_TIMEOUT[$i]:-30} ${DHCP_OPTIONS} ${1}
The working code of Backtrack:
Code:
/sbin/dhcpcd -t 60 $eth &
See the difference?? Heheh... it's all so logical once you've seen it. In fact, moving the whole thing to the background was one of my first thoughts (OP). But I'm so easily distracted that I didn't stop to think about it until after I compared Backtrack's inet scripts with those of Slackware.


Thanks for answering y'all!
Sorry about the long posts
 
  


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
[SOLVED] DSL connection slow on Linux wired connection but fast on Windows wireless Pandarsson Linux - Wireless Networking 9 12-17-2010 05:55 PM
Suse 9.2 & SATA - Slow, Slow, Slow jess1975 SUSE / openSUSE 6 01-28-2007 12:17 PM
New Fedora Internet connection slow slow slow matrim Fedora 9 07-29-2005 01:39 PM
Wireless Laptop to Wired ethernet via Linux PC (wired/wireless) sambartle Linux - Wireless Networking 0 01-30-2005 04:37 AM
Wired to Wireless back to Wired The_Nerd Linux - Hardware 5 09-15-2004 09:20 PM

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

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