blob: b62054c323c43b97ce761c3d4ab7daf2083e63c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
case "$0" in
*ifdown) mode=down;;
*ifup) mode=up;;
*) echo "Invalid command: $0";;
esac
[[ "$1" == "-a" ]] && {
for interface in `ubus -S list 'network.interface.*'`; do
ubus call $interface $mode
done
exit
}
ubus -S list "network.interface.$1" > /dev/null || {
echo "Interface $1 not found"
exit
}
ubus call "network.interface.$1" "$mode"
|