/etc/network/ifupdown-scripts-zg2.d/link is in ifupdown-scripts-zg2 0.6-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 | #!/bin/bash
# $Header$
# MODE = start | stop
# IF_DEVICE = physical interface name
. /etc/network/ifupdown-scripts-zg2.d/common-functions
case "$MODE" in
start)
cmd "ip link set dev \"$IF_DEVICE\" up"
;;
stop)
DEV=$(state_entry dev)
if [ -n "$DEV" ]; then
if has_ip_address "$DEV"; then
# device doesn't have any more IP addresses
if ! is_active_vlan_master "$DEV"; then
# if we take down an interface that is an active vlan master,
# we take down all VLANs. Not a good idea.
cmd "ip link set dev $DEV down"
fi
fi
fi
;;
*)
;;
esac
# end of file
|