ifstatus 273 B

12345678910111213
  1. #!/bin/sh
  2. INTERFACE="$1"
  3. [ -n "$INTERFACE" ] || {
  4. echo "Usage: $0 <interface>"
  5. exit 1
  6. }
  7. ubus -S list "network.interface.$INTERFACE" >/dev/null || {
  8. echo "Interface $INTERFACE not found"
  9. exit 1
  10. }
  11. ubus call network.interface status "{ \"interface\" : \"$INTERFACE\" }"