mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 01:28:59 +00:00
19 lines
433 B
Plaintext
19 lines
433 B
Plaintext
|
#!/bin/sh
|
||
|
# Copyright (c) 2012 OpenWrt.org
|
||
|
[ "$DEVICE" == "lo" ] && exit 0
|
||
|
. /lib/ipv6/support.sh
|
||
|
|
||
|
local mode
|
||
|
config_get mode "$INTERFACE" mode
|
||
|
|
||
|
case "$ACTION" in
|
||
|
ifup)
|
||
|
[ "$mode" != "downstream" ] && enable_static $INTERFACE $DEVICE
|
||
|
[ "$mode" == "upstream" ] && enable_upstream $INTERFACE $DEVICE
|
||
|
[ "$mode" == "downstream" ] && enable_downstream $INTERFACE $DEVICE
|
||
|
;;
|
||
|
ifdown)
|
||
|
disable_interface $INTERFACE $DEVICE
|
||
|
;;
|
||
|
esac
|