From 9ae9c6c88848545648d0de8b5a0e337ae86cf965 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 1 Oct 2021 18:52:09 +0200 Subject: ma hw: cleanup --- makefu/2configs/hw/lte.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 makefu/2configs/hw/lte.sh (limited to 'makefu/2configs/hw/lte.sh') diff --git a/makefu/2configs/hw/lte.sh b/makefu/2configs/hw/lte.sh new file mode 100755 index 000000000..a8ae31586 --- /dev/null +++ b/makefu/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 -- cgit v1.2.3