repo.or.cz
/
dotfiles_afify.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
remove vifm
[dotfiles_afify.git]
/
.scripts
/
openbsd_connect_wifi.sh
blob
fd13ac608d14a3b981605e9233a10fd3262867c2
1
#!/bin/sh
2
3
[
"
$USER
"
!=
"root"
] &&
echo
"Must run as root."
&&
exit
1
4
5
interface
=
$
(
ifconfig |
awk
'/UP,BROADCAST,RUNNING/ {print
$1
}'
|
tr
-d
':'
)
6
7
ssid
=
$1
8
pass
=
$2
9
10
ifconfig
$interface
up
11
ifconfig
$interface
nwid
$ssid
wpakey
$pass
12
dhclient
$interface