blob: a8ae315860ef65b325d2db0831a4e1c436377c76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
|