From a88ce7b965c1d4c03aac02c1c8be819cff0f9f6e Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 24 Dec 2022 01:58:59 +0100 Subject: mz-(router|ap): upgrade to openwrt 22.03.2 --- files/common/openwrt/list-stations | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 files/common/openwrt/list-stations (limited to 'files/common') diff --git a/files/common/openwrt/list-stations b/files/common/openwrt/list-stations new file mode 100644 index 00000000..6cd21671 --- /dev/null +++ b/files/common/openwrt/list-stations @@ -0,0 +1,14 @@ +#!/bin/sh + +interfaces=$(iw dev | grep "Interface " | cut -d ' ' -f2 | sort) + +for interface in $interfaces; do + bssid=$(iw $interface info | grep "addr " | cut -d ' ' -f2) + essid=$(iw $interface info | grep "ssid " | cut -d ' ' -f2-) + channel=$(iw $interface info | grep "channel " | cut -d ' ' -f2-) + echo "$interface ($bssid, ssid: '$essid', channel: $channel)" + iw $interface station dump | grep "^Station" | awk '{ print(" - "$2) }' + echo "" +done + +exit 0 -- cgit v1.2.3