summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/network b/src/network
index 1e37633..ccf0893 100644
--- a/src/network
+++ b/src/network
@@ -252,6 +252,26 @@ set_iface() {
fi
}
+set_interface()
+{
+ INTERFACE=$2
+ case $1 in
+ up)
+ at_interface_up
+ ip link set dev $INTERFACE up
+ sleep ${UP_SLEEP:-2}
+ ;;
+ down)
+ at_interface_down
+ ip addr flush dev "$INTERFACE"
+ quirk nodown || ip link set dev "$INTERFACE" down
+ ;;
+ *)
+ return 1
+ ;;
+ esac
+}
+
### From FreeBSD's /etc/rc.subr
##