summaryrefslogtreecommitdiffstats
path: root/usr/lib/autowifi/lib/network
diff options
context:
space:
mode:
Diffstat (limited to 'usr/lib/autowifi/lib/network')
-rw-r--r--usr/lib/autowifi/lib/network40
1 files changed, 0 insertions, 40 deletions
diff --git a/usr/lib/autowifi/lib/network b/usr/lib/autowifi/lib/network
deleted file mode 100644
index a0105120..00000000
--- a/usr/lib/autowifi/lib/network
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-
-check_gateway(){
- ping -c 1 -w 5 $(ip route | awk '/default/{print $3}') >/dev/null
-}
-check_internet(){
- # TODO determine the loader, either wget or curl
- secret=$(wget -O- http://krebsco.de/secret 2>/dev/null)
- if [ "$secret" == "1337" ]; then
- return 0
- else
- echo "cannot load secret or secret incorrect" >&2
- return 1
- fi
-}
-
-check_bandwidth(){
- echo $(curl http://www.microsoft.com/africa/4afrika/images/infographic.gif -w "%{speed_download}" -o /dev/null 2>/dev/null | sed 's/\..*//')
-}
-
-ip_start(){
- : ${interface?interface variable not set} ${1?please provide method to start ip}
- # usage: method [extra parms]
- case "$1" in
- dhcp)
- if exists dhcpcd; then
- dhcpcd -x $interface
- dhcpcd -w -A $interface
- elif exists dhclient; then
- dhclient -x $interface
- dhclient $interface
- elif exists udhcpc; then
- PIDFILE=/var/run/udhcpc-${interface}.pid
- [ -e $PIDFILE ] && kill `cat $PIDFILE` ||:
- udhcpc -n -p $PIDFILE -i $interface -s \
- "$root/usr/lib/autowifi/opt/udhcpc.run"
- fi ;;
- *) echo "do not know ip starter $1" >&2;;
- esac
-}