Diff for /elwix/config/etc/uboot/wifi_up.sh between versions 1.1 and 1.2

version 1.1, 2014/01/23 09:24:04 version 1.2, 2014/09/15 19:06:48
Line 0 Line 1
   #!/bin/sh
   #
   # WiFi Up/Down control script for elwix :)
   #
   # $Id$
   
   DOWNSEC=5
   UPSEC=30
   CHKTIMEOUT=15
   PROG="wifi_up"
   
   rup()
   {
           while [ `ifconfig $1 | awk '($1 == "status:") { printf("%s", $2); }'` = no ]; do
                   logger -t $PROG "`date '+[ %Y-%m-%d %H:%M:%S ]'` Lost connection will be down $1 " \
                           "for $DOWNSEC seconds"
                   ifconfig $1 down
                   [ -x /etc/sysctl.$1 ] && /etc/sysctl.$1
                   sleep $DOWNSEC
                   logger -t $PROG "`date '+[ %Y-%m-%d %H:%M:%S ]'` Up $1 and try to reconnect for " \
                           "$UPSEC seconds timeout"
                   ifconfig $1 up
                   [ -x /etc/sysctl.$1 ] && /etc/sysctl.$1
                   sleep $UPSEC
           done
   }
   
   # Main ...
   
   if [ -z $1 ]; then
           echo "Syntax: $0 <interface>"
           echo
           exit 1
   fi
   
   echo ">>> elwix - WiFi interface $1 state logger"
   while : ; do
           rup $1
           sleep $CHKTIMEOUT
   done

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>