| The Following 3 Users Say Thank You to ichneumon For This Useful Post: | ||
|
|
2009-01-11
, 12:25
|
|
|
Posts: 3,397 |
Thanked: 1,212 times |
Joined on Jul 2008
@ Netherlands
|
#2
|
| The Following User Says Thank You to allnameswereout For This Useful Post: | ||
|
|
2009-01-11
, 14:38
|
|
Posts: 755 |
Thanked: 406 times |
Joined on Feb 2008
@ UK
|
#3
|
#!/bin/sh
| The Following User Says Thank You to codeMonkey For This Useful Post: | ||
|
|
2009-01-11
, 16:26
|
|
Posts: 191 |
Thanked: 29 times |
Joined on Sep 2007
@ Ottawa
|
#4
|
| The Following User Says Thank You to cvmiller For This Useful Post: | ||
|
|
2012-03-21
, 13:08
|
|
Banned |
Posts: 34 |
Thanked: 3 times |
Joined on Jul 2011
|
#5
|
#!/bin/sh # shell script to connect/disconnect from APs by name iapidbyname() { gconftool-2 --all-dirs /system/osso/connectivity/IAP | while read LINE do if [ $1 == "`gconftool-2 -g $LINE/name 2>/dev/null`" ]; then echo $LINE | sed 's|/system/osso/connectivity/IAP/\([0-9abcdef-]*\)|\1|' break fi done } # connect by name if [ "$1" == "-c" ] || [ "$1" == "--connect" ]; then IAP=`iapidbyname $2` if [ $IAP ]; then dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:${IAP} uint32:0 exit 0 else echo "Network name not found" exit 1 fi fi # disconnect if [ "$1" == "-d" ] || [ "$1" == "--disconnect" ]; then dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true exit 0 fi # return id for name if [ "$1" == "-i" ] || [ "$1" == "--id" ]; then IAP=`iapidbyname $2` if [ $IAP ]; then echo $IAP exit 0 else echo "Network name not found" exit 1 fi fi # Output Help echo "Usage: $0 option [IAP]" echo "Option GNU long option Meaning" echo " -h, -? --help Show this message" echo " -c <IAP> --connect <IAP> Connect to Internet Access Point" echo " -d --disconnect Disconnect current connection" echo " -i <IAP> --id <IAP> Show osso id for named IAP" exit 1Last edited by ichneumon; 2009-01-11 at 18:09. Reason: Script update