From d4be5bbc3682bb9d7f74db5592988ec0838b6138 Mon Sep 17 00:00:00 2001 From: Cullum Smith Date: Mon, 5 Aug 2024 08:59:44 -0400 Subject: autoconnect android usb tethering on laptops --- files/etc/devd/usb-tether.conf.roadwarrior_latpop | 6 ++++++ scripts/hostclass/roadwarrior_laptop/30-roadwarrior | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 files/etc/devd/usb-tether.conf.roadwarrior_latpop diff --git a/files/etc/devd/usb-tether.conf.roadwarrior_latpop b/files/etc/devd/usb-tether.conf.roadwarrior_latpop new file mode 100644 index 0000000..5183ed2 --- /dev/null +++ b/files/etc/devd/usb-tether.conf.roadwarrior_latpop @@ -0,0 +1,6 @@ +notify 100 { + match "system" "IFNET"; + match "subsystem" "ue0"; + match "type" "ATTACH"; + action "/sbin/ifconfig ue0 up"; +}; diff --git a/scripts/hostclass/roadwarrior_laptop/30-roadwarrior b/scripts/hostclass/roadwarrior_laptop/30-roadwarrior index 2cc0a3e..f75685a 100644 --- a/scripts/hostclass/roadwarrior_laptop/30-roadwarrior +++ b/scripts/hostclass/roadwarrior_laptop/30-roadwarrior @@ -4,3 +4,7 @@ install_file -m 0600 \ /usr/local/etc/sudoers \ /usr/local/etc/sudoers.d/networkmgr + +# Configure devd for Android USB tethering. +install_file -m 0644 /etc/devd/usb-tether.conf +service devd restart -- cgit v1.2.3