Find the answer to your Linux question:
Results 1 to 8 of 8
Hey everyone, Well, I have Debian on my laptop and it works great. The one thing that is bothering me is the fact that I have no idea how to ...
  1. #1
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,621

    Backgrounding Network Detection at Boot *solved*

    Hey everyone,

    Well, I have Debian on my laptop and it works great. The one thing that is bothering me is the fact that I have no idea how to background the network detection during boot. I use my laptop frequently away from a network connection and the detection greatly slows down startup time. The laptop will sit there trying to configure my connection with dhcp until I press ctrl-c (it might eventually end like in other distros but I don't have the patience). Does anyone have any idea how I can background detection during boot?

    Thanks in advance,
    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  2. #2
    Linux Newbie
    Join Date
    Jul 2005
    Location
    ~/home
    Posts
    105
    It's very easy
    Open /etc/network/interfaces and comment the last 2 lines.
    Code:
    # The primary network interface
    #auto eth0
    #iface eth0 inet dhcp
    Help me getting a Opera licence
    Beginning with debian? -> read THIS!

  3. #3
    Linux Newbie
    Join Date
    Jul 2005
    Location
    ~/home
    Posts
    105
    I wrote a script to select a network connection,
    so i can choose between a static line (cabled), wireless or no connection.
    Code:
    #!/bin/sh
    
    # global var to hold menu selection
    MENU_CHOISE=""
    
    function get_choise {
    ##################################
    # set the tty driver to raw mode #
    # read a char #
    # restore settings #
    ##################################
    stty raw
    MENU_CHOISE=`dd if=/dev/tty bs=1 count=1 2>/dev/null`
    stty sane
    echo $MENU_CHOISE
    }
    
    # print the menu
    echo "Menu:"
    echo " a) Static network connection"
    echo " b) Wireless network connection"
    echo " c) No network connection"
    printf " please enter your choise: "
    
    # read the menu selection
    get_choise
    
    # print the results.
    case $MENU_CHOISE in
    
    "a")
    	ifconfig vr0 up
    	dhclient vr0
    	;;
    
    "b")
    	ifconfig wi0 up
    	dhclient wi0
    	;;
    
    "c")
    	echo ""
    	echo "No network required, exiting..."
    	;;
    	
    *)
    	echo ""
    	echo "Enter a, b or c"
    	/etc/init.d/netstart
    	;;	
    esac
    Edit this script to your needs and put it in /etc/init.d/ and make a symlink to runlevel 2,
    Code:
    ln -s /etc/init.d/netstart /etc/rc2.d/S99netstart
    Now you just enter a, b or c at boot.
    Help me getting a Opera licence
    Beginning with debian? -> read THIS!

  4. #4
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,621
    Quote Originally Posted by alain_
    It's very easy
    Open /etc/network/interfaces and comment the last 2 lines.
    Code:
    # The primary network interface
    #auto eth0
    #iface eth0 inet dhcp
    Unfourtunately, this disables it completely; if I want to plug in the cord later, I have no luck. Even if the cord is plugged in at boot, it still doesn't work. Any other ideas?

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  5. #5
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,621
    I figured out what I need to do. Thanks for the suggestions.

    For those who are wondering, follow the advice by GilGalad here: http://ubuntuforums.org/showthread.p...=backgrounding. I am not sure about KDE advice though. I believe you can use knetworkconf (seperate download) to deactivate it when the computer starts.

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  6. #6
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    If your startup is BSD-style, you could add an & after the dhcpcd line in the rc.X script... Does Debian use sysvinit?
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

  7. #7
    Linux Newbie
    Join Date
    Jul 2005
    Location
    ~/home
    Posts
    105
    Quote Originally Posted by bryansmith
    Any other ideas?
    yep, you can change the time it takes to look for a connection,
    but i can't find a link atm.
    Help me getting a Opera licence
    Beginning with debian? -> read THIS!

  8. #8
    Linux Newbie
    Join Date
    Jul 2005
    Location
    ~/home
    Posts
    105
    check /etc/dhclient.conf and man dhclient.conf,
    there is an option to increase/decrease the timeout.
    from the manpage:
    The timeout statement determines the amount of time that must pass between the time that the client begins to try to determine its address and the time that it decides that it's not going to be able to contact a server. By default, this timeout is sixty seconds.
    good luck
    Help me getting a Opera licence
    Beginning with debian? -> read THIS!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •