summaryrefslogtreecommitdiff
path: root/netifd/files/sbin/ifstatus
blob: 8a951e6e15a9cb1a3a45966c6cc32dfccd35e409 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
INTERFACE="$1"

[ -n "$INTERFACE" ] || {
	echo "Usage: $0 <interface>"
	exit 1
}

ubus -S list "network.interface.$INTERFACE" >/dev/null || {
	echo "Interface $INTERFACE not found"
	exit 1
}
ubus call network.interface status "{ \"interface\" : \"$INTERFACE\" }"