conn

A script repository to manage connections in Linux.
git clone git://r-36.net/conn
Log | Files | Refs | LICENSE

commit 65c0e813189387984da46933566cbc8ba6cbb7a3
parent 9880e498556ea884501f45898e17bfbb1f54a12e
Author: Christoph Lohmann <20h@r-36.net>
Date:   Fri, 25 Feb 2011 23:15:05 +0100

Fixing restarting a connection and the example AP.

Diffstat:
etc/conn/run.sh | 1+
etc/conn/wifi/networks/skkmswp.sh | 5++++-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/etc/conn/run.sh b/etc/conn/run.sh @@ -101,6 +101,7 @@ if [ $dorestart -eq 1 ]; then $0 -k $* $0 -s $* + exit $? fi if [ "$cmdarg" == "" ]; diff --git a/etc/conn/wifi/networks/skkmswp.sh b/etc/conn/wifi/networks/skkmswp.sh @@ -4,9 +4,12 @@ interface="$1" case "$2" in CONNECTED) + # This is dangerous, but assumed. + ip addr flush dev wlan0 2>&1 >/dev/null ip addr add 192.168.1.6/24 dev $interface \ brd 192.168.1.255 2>&1 >/dev/null - ip route add default via 192.168.1.2 2>&1 >/dev/null + ip route add default via 192.168.1.2 dev $interface \ + 2>&1 >/dev/null echo "nameserver 8.8.8.8" > /etc/resolv.conf ;; DISCONNECTED)