File: Saner-Defaults-HOWTO

package info (click to toggle)
guessnet 0.56
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 1,064 kB
  • ctags: 863
  • sloc: cpp: 5,355; sh: 1,432; makefile: 168; perl: 118
file content (32 lines) | stat: -rw-r--r-- 949 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Saner Ifupdown Defaults
=======================

Without going into complex network detection issues, guessnet can be used with
very little effort to avoid the annoying DHCP timeout at boot when no cable is
connected to the ethernet device.

To do it, just use something like this /etc/network/interfaces file:

----------------------------------------------------------------------
auto lo eth0

iface lo inet loopback

# Use guessnet
mapping eth0
	script /usr/sbin/guessnet-ifupdown
	map default: dhcp

# If there is no link detected, don't try DHCP
#
# Here it would be useful to have 'fail' method for iface that just
# keeps the interface down (see ifupdown bug #275326)
# In the meantime, leave the interface unconfigured by hand.
iface interface inet manual
	test missing-cable
	pre-up echo No link present.
	pre-up false

# By default, perform DHCP
iface dhcp inet dhcp
----------------------------------------------------------------------