Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
84 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/ksh | ||
|
||
DEBUG=1 | ||
|
||
eval . ~/lib/functions | ||
|
||
# WIF=iwn0 | ||
WIF=$(ifconfig | grep -B 4 IEEE802 | grep ^[a-z] | awk -F\: '{print $1}') | ||
IF=/sbin/ifconfig | ||
|
||
echo -n "SSID: " | ||
read SSID | ||
|
||
echo -n "WPA-PSK: " | ||
stty -echo | ||
read -s KEY | ||
stty echo | ||
echo "" | ||
#log "using ${KEY} on ${WIF}" | ||
|
||
echo -n "Use dhclient (y/n)? " | ||
read DH | ||
|
||
sudo $IF $WIF up nwid $SSID wpa wpakey $KEY | ||
|
||
if [ $? ]; then | ||
log "'${WIF}' configured for '$SSID'" | ||
|
||
if [[ $DH = "y" ]]; then | ||
log "using dhclient on '${WIF}'." | ||
sudo dhclient -q $WIF | ||
fi | ||
|
||
exit; | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
OS=$(uname) | ||
|
||
alias vi="vim" | ||
|
||
if [ $OS == "OpenBSD" ]; then | ||
export PKG_PATH="ftp://ftp.openbsd.org/pub/OpenBSD/snapshots/packages/i386/" | ||
if [ ! -f ~/.cvsrc ]; then | ||
export CVSROOT="anoncvs@anoncvs1.usa.openbsd.org:/cvs" | ||
fi | ||
fi | ||
|
||
PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:$HOME/bin:$HOME/Development/go/bin:. | ||
export PATH HOME TERM | ||
|
||
if [ "$(id -u)" -eq 0 ] ; then | ||
PS1='\u@\h[\[\e[01;$(($??31:39))m\]$?\[\e[0m]\]:\w\]# ' | ||
else | ||
PS1='\u@\h[\[\e[01;$(($??31:39))m\]$?\[\e[0m]\]:\w\]$ ' | ||
fi | ||
|
||
KEY_CHAIN=$(which keychain); | ||
if [ -x $KEY_CHAIN ]; then | ||
$KEY_CHAIN -q ~/.ssh/id_rsa | ||
. ~/.keychain/$(hostname)-sh | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters