first commit
This commit is contained in:
36
etc_org/network/if-down.d/avahi-autoipd
Executable file
36
etc_org/network/if-down.d/avahi-autoipd
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Description: Remove routes to allow communication between machines which
|
||||
# only have an IPv4LL address assigned and those which only
|
||||
# have a routable address assigned. These were added by
|
||||
# /etc/network/if-up.d/avahi-autoipd.
|
||||
#
|
||||
# See http://developer.apple.com/qa/qa2004/qa1357.html for
|
||||
# more information.
|
||||
|
||||
[ -x /usr/sbin/avahi-autoipd ] || exit 0
|
||||
|
||||
[ "$IFACE" != "lo" ] || exit 0
|
||||
case "$ADDRFAM" in
|
||||
inet) ;;
|
||||
*) exit 0 ;;
|
||||
esac
|
||||
case "$METHOD" in
|
||||
static|dhcp|NetworkManager) ;;
|
||||
*) exit 0 ;;
|
||||
esac
|
||||
|
||||
if [ -x /bin/ip ]; then
|
||||
# route already present?
|
||||
ip route show | grep -q '^169.254.0.0/16[[:space:]]' && exit 0
|
||||
|
||||
/bin/ip route del 169.254.0.0/16 dev $IFACE metric 1000 scope link || true
|
||||
elif [ -x /sbin/route ]; then
|
||||
# route already present?
|
||||
/sbin/route -n | grep -q "^169.254.0.0[[:space:]]" && exit 0
|
||||
|
||||
/sbin/route del -net 169.254.0.0 netmask 255.255.0.0 dev $IFACE metric 1000 || true
|
||||
fi
|
||||
|
||||
16
etc_org/network/if-down.d/resolvconf
Executable file
16
etc_org/network/if-down.d/resolvconf
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# ifdown hook script for resolvconf
|
||||
#
|
||||
# This file is part of the resolvconf package.
|
||||
#
|
||||
|
||||
[ -x /sbin/resolvconf ] || exit 0
|
||||
|
||||
case "$ADDRFAM" in
|
||||
inet|inet6) : ;;
|
||||
*) exit 0 ;;
|
||||
esac
|
||||
|
||||
/sbin/resolvconf -d "${IFACE}.${ADDRFAM}" || :
|
||||
|
||||
20
etc_org/network/if-down.d/upstart
Executable file
20
etc_org/network/if-down.d/upstart
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
if [ -e /lib/lsb/init-functions ]; then
|
||||
. /lib/lsb/init-functions
|
||||
fi
|
||||
|
||||
if ! init_is_upstart; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Let's ignore meta entries (ifdown -a)
|
||||
if [ "$ADDRFAM" = "meta" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
initctl emit -n net-device-down \
|
||||
"IFACE=$IFACE" \
|
||||
"LOGICAL=$LOGICAL" \
|
||||
"ADDRFAM=$ADDRFAM" \
|
||||
"METHOD=$METHOD"
|
||||
1
etc_org/network/if-down.d/wpasupplicant
Symbolic link
1
etc_org/network/if-down.d/wpasupplicant
Symbolic link
@@ -0,0 +1 @@
|
||||
../../wpa_supplicant/ifupdown.sh
|
||||
Reference in New Issue
Block a user