Skip to content

Instantly share code, notes, and snippets.

View laf's full-sized avatar

Neil Lathwood laf

View GitHub Profile
@laf
laf / 00-button
Last active December 30, 2021 08:12 — forked from abstrask/00-button
Scripts for OpenWrt on TP-Link TL-MR3020 to change network configs using 3-position sliding switch
# based on
# https://dev.openwrt.org/browser/trunk/target/linux/atheros/base-files/etc/hotplug.d/button/00-button
# https://forum.openwrt.org/viewtopic.php?pid=172110#p172110
. /lib/functions.sh
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
do_button () {
local button