»
»
»
»
»
»
»
»
»
»
»
»
»
|
Andrew
»
»
»
»
»
»
»
»
»
»
»
»
»
»
»
|
» » » » » » » » » » » » » » » » » » » » »
»
»
|
 |
Current as of 2005-01-10
cat /bin/ipset
#!/bin/bash
if [ -n "$1" ]
then
IP_ADDR=$1
if [ -n "$2" ]; then
GATEWAY=$2
else
SUBNET=`echo $IP_ADDR | cut -d "." -f 1,2,3`
GATEWAY="$SUBNET.1"
fi
echo ifconfig eth0 $IP_ADDR
ifconfig eth0 $IP_ADDR
echo route add default gw $GATEWAY
route add default gw $GATEWAY
fi
cat /bin/remount
#!/bin/bash
if [ "$1" = "ro" -o "$1" = "rw" ]
then
echo mount / -o remount,$1
mount / -o remount,$1
elif [ "$2" = "ro" -o "$2" = "rw" ]
then
echo mount $1 -o remount,$2
mount $1 -o remount,$2
else
echo Like so: \`remount ro\` or \`remount / rw\`
fi
cat /bin/wifi
#!/bin/sh
if [ -z "$1" -a -e /proc/net/hostap/wlan0 ]
then
echo WiFi stuff works
iwconfig wlan0
elif [ -z "$1" -a ! -e /proc/net/hostap/wlan0 ]
then
echo no WiFi for you! \(run cardmgr?\)
fi
if [ -e /proc/net/hostap/wlan0 ] ; then
if [ "$1" = "scan" ] ; then
#iwlist wlan0 scan > /dev/null
iwlist wlan0 scan | grep -v Bit | grep -v Extra
RESULTS=`cat /proc/net/hostap/wlan0/scan_results | wc -l | cut -b 7`
#$((RESULTS--)) #line 1 explains layout
RESULTS=$((RESULTS - 1))
echo $RESULTS ap\(s\) found.
fi
fi
|
|