shithub: 9utils

ref: 7217e737dd503a2687d49950a3714f15e71b2e24
dir: /util/wifi/

View raw version
#!/bin/rc
rfork e
fn Ask{
  echo -n $1
  essid=`{dd -bs 64 -count 1 >[2]/dev/null}
}

if(test -e /net/ether1)
  echo "/net/ether1 exists"
if not 
  bind -a '#l1' /net

if(~ $#* 0){
  echo "Wifis disponibles"
  grep node '#'l1/ether1/ifstats
  echo
  Ask 'essid='
}

aux/wpa -s $essid -p /net/ether1
ip/ipconfig ether /net/ether1
cat /net/ndb