# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

auto lo

iface lo inet loopback

mapping eth0
        script /usr/sbin/guessnet-ifupdown
        map default: default
        map timeout: 3
        map verbose: true

iface l21 inet dhcp
        up echo "l21" > /etc/network/schemes/active
        up ln -sf /etc/network/schemes/l21/use-proxy /etc/use-proxy
        up ln -sf /etc/network/schemes/l21/proxy.pac /etc/proxy.pac
        up ln -sf /etc/network/schemes/l21/exim4-smarthost /etc/exim4/conf.d/main/00_local_DCsmarthost
        up /etc/init.d/exim4 reload || true
        test-peer address 192.168.130.1

iface l21-unt inet dhcp
        up echo "l21-unt0-29" > /etc/network/schemes/active
        up ln -sf /etc/network/schemes/l21-unt0-29/use-proxy /etc/use-proxy
        up ln -sf /etc/network/schemes/l21-unt0-29/proxy.pac /etc/proxy.pac
        up ln -sf /etc/network/schemes/l21-unt0-29/exim4-smarthost /etc/exim4/conf.d/main/00_local_DCsmarthost
        up /etc/init.d/exim4 reload || true
        test-peer address 217.151.83.6

iface default inet dhcp
        up echo "default" > /etc/network/schemes/active
        up ln -sf /etc/network/schemes/default/exim4-smarthost /etc/exim4/conf.d/main/00_local_DCsmarthost
        up /etc/init.d/exim4 reload || true
        up rm -f /etc/use-proxy
        up rm -f /etc/proxy.pac

iface disconnected inet manual
        up echo "disconnected" > /etc/network/schemes/active
        up ip link set dev eth0 down
        up rm -f /etc/exim4/conf.d/main/00_local_DCsmarthost
        up /etc/init.d/exim4 reload || true
        up rm -f /etc/use-proxy
        up rm -f /etc/proxy.pac
        test missing-cable
