paulgorman.org

< ^ txt

Wed Mar 14 09:29:05 EDT 2018 Slept from ten-thirty to six-thirty without waking. High of thirty-four and mostly cloudy today. Stephen Hawking died. :( I remember when Grandpa Gordon gave me A Brief History of Time for Christmas. Work: - Ansible study Done. - Clean email inbox Done. - Work on MECS No. ``` #!/bin/bash set -uf -o pipefail # Print an Ansible inventory of IP addresses of devices from the DHCP pools # of EdgeOS routers based on client MAC address. outfile=/tmp/ansible-inventory-yealink mid=00:15:65 user=ht sshid="$HOME"/.ssh/ht-edgerouter-key showleases='/opt/vyatta/bin/vyatta-op-cmd-wrapper show dhcp leases | tail -n +3' # showleases should give output like the following, with the first and # second columns containing IP address and MAC address: # 10.0.25.50 00:15:65:a8:7f:31 2018/03/15 08:06:20 DHCP SIP-T21P_E2 # 10.0.25.52 00:15:65:a8:7f:19 2018/03/15 18:47:52 DHCP SIP-T21P_E2 # 10.0.25.54 00:80:64:69:7c:61 2018/03/15 11:06:12 DHCP LWT008064697C61 rm "$outfile" sites=(bv-router cl-router cm-router cr-router fl-router fh-router gm-router \ gb-router hv-router hp-router hr-router hs-router kwl-router kwm-router \ lt-router lh-router mw-router og-router pr-router pw-router rg-router \ ro-router rp-router rv-router sh-router sb-router tt-router vb-router \ vs-router wn-router) for site in "${sites[@]}" do leases=$( ssh -i "$sshid" -q \ "$user"@"$site" \ "$showleases" ) echo "[${site:0:2}]" >> $outfile while read -r line do read -r ip mac x <<< "$line" if [[ "$mac" == "$mid":??:??:?? ]] then echo "$ip" >> $outfile fi done <<< "$leases" echo >> $outfile done ``` Fifteen-minute walk at lunch. Sunny. Nice. Fat buds on many of the trees now. Home: - Purge one thing from a closet Done. https://arstechnica.com/gadgets/2018/03/new-raspberry-pi-adds-5ghz-wi-fi-bluetooth-4-2-and-more-mhz/ > The B+ has the same form factor and dimensions as the Pi 2 B and Pi 3 B [...] runs its quad core 64-bit Cortex-A53 processor at 1.4GHz, up from 1.2GHz—along with dual band 2.4/5GHz 802.11b/g/n/ac Wi-Fi and Bluetooth 4.2, up from 2.4GHz and Bluetooth 4.1. The Ethernet port has been upgraded from 100Mb/s to what is technically gigabit; it syncs at gigabit speeds, but the actual Ethernet controller is only USB 2, so transfer rates are limited to about 300Mb/s. https://www.raspberrypi.org/blog/raspberry-pi-3-model-bplus-sale-now-35/ > Power-over-Ethernet support (with separate PoE HAT) > Improved PXE network and USB mass-storage booting PXE is nice. I with the PoE was built-in. https://news.ycombinator.com/item?id=16582878 http://www.denx.de/wiki/U-Boot Watched the last episode of Jessica Jones. Not a bad second season. Lunch: coffee, Thai food, cookies Dinner: spinach, turkey sandwich, chips

< ^ txt