summaryrefslogtreecommitdiffstats
path: root/2configs/hw/lte.sh
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2021-10-01 18:52:09 +0200
committermakefu <github@syntax-fehler.de>2021-10-01 18:52:09 +0200
commit9eecb192a843450d6cbc43d83fc2326bba010c39 (patch)
treed493b7b57d38e0bfc570cf03113053bd1025df16 /2configs/hw/lte.sh
parentcdf4dfc446369386f0e0e44740cf16e9392adc4a (diff)
ma hw: cleanup
Diffstat (limited to '2configs/hw/lte.sh')
-rwxr-xr-x2configs/hw/lte.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/2configs/hw/lte.sh b/2configs/hw/lte.sh
new file mode 100755
index 000000000..a8ae31586
--- /dev/null
+++ b/2configs/hw/lte.sh
@@ -0,0 +1,26 @@
+#/bin/sh
+
+if [[ "$EUID" -ne 0 ]]; then
+ echo "This script must be run as root, elevating!"
+ exec sudo $0 $1
+ exit 0
+fi
+
+if [[ "$1" = "down" ]]; then
+ echo "taking wwan0 down!"
+ ip link set wwan0 down
+ rmmod xmm7360
+ exit
+fi
+
+if [[ "$1" = "up" ]]; then
+ echo "running modprobe"
+ modprobe xmm7360
+ echo "bringing wwan0 up!"
+ until open_xdatachannel -a web.vodafone.de;do
+ modprobe -r xmm7360
+ modprobe xmm7360
+ done
+ ip link set wwan0 up
+ echo "nameserver 1.1.1.1" | tee -a /etc/resolv.conf
+fi