Results 1 to 2 of 2

Thread: *Only* add Network interface If Exists

  1. #1
    Join Date
    Mar 2008
    Beans
    28

    *Only* add Network interface If Exists

    Hiya networking geniuses

    Is there any way for me to make Ubuntu set up a network interface only of it exists?

    Because network interface eth1 will only be present sometimes. If I add the following to /etc/network/interfaces:

    Code:
    auto eth1
    iface eth1 inet dhcp
    Then, if eth1 is not there, /etc/init.d/networking takes ages to start, because it assumes eth1 is there and spends ages trying to assign an IP address.

    Can't I do something like:

    Code:
    if exists(eth1)
      auto eth1
      iface eth1 inet dhcp
    fi
    ?

    Ta,
    Robin.

  2. #2
    Join Date
    Mar 2008
    Beans
    28

    Re: *Only* add Network interface If Exists

    okay ignore me I'm being a fool. If the interface isn't there it just fails to load it at all, and that's relatively graceful. So it doesn't matter. Can I delete this message?

Tags for this Thread

Bookmarks

Posting Permissions

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