source: hybrid/branches/releng-11/nanobsd/files/etc/motd.cshrc

Last change on this file was 14251, checked in by rick, 6 years ago

Add new UBNT ranges to bridge detection

Fixes: nodefactory#223

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/csh
2#
3# Display some tricks and pointers for management on login.
4#
5# Rick van der Zwet <rick@wirelessleiden.nl>
6#
7echo ""
8echo "Statistics:"
9echo " - Build "`grep 'Revision:' /tools/wl-release.txt`
10echo " - Config "`grep Generated /usr/local/etc/wleiden.yaml | tr -d '#'`
11setenv cs_conn `arp -na | grep -v -e ' 00:15:6d' -e 'incomplete' -e 'permanent' -e ' 00:0d:b9' | wc -l`
12setenv cs_auth `pfctl -twlportal -Tshow | wc -l`
13echo " - $cs_conn clients and $cs_auth authenticated"
14echo " - "`uptime`
15echo ""
16echo "Active Bridges:"
17# MAC OIDs Ubiquiti Networks
18#
19# curl 'https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf' |\
20# awk '{print $1}' | cut -c -8 | tr 'A-Z' 'a-z' | tr '\n' '|'
21arp -na | grep -E ' (00:15:6d|00:27:22|00:50:c2|04:18:d6|18:e8:29|24:a4:3c|44:d9:e7|68:72:51|74:83:c2|78:8a:20|80:2a:a8|b4:fb:e4|dc:9f:db|e0:63:da|f0:9f:c2|fc:ec:da)' | sed -e 's/^/ - /' | grep ' ' || echo " - none"
22echo ""
23echo "Active Neighbors:"
24# MAC OID PC Engines GmbH
25arp -na | grep -v 'permanent' | grep -E ' 00:0d:b9' |\
26 sed -e 's/^/ - /' -e 's/.wleiden.net//' -e 's/expires .*$//' |\
27 grep ' ' || echo " - none"
28echo ""
29
Note: See TracBrowser for help on using the repository browser.