Active Topics

 


Reply
Thread Tools
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#1
I would like to run a certain script when connecting to a specific WLAN, in this case I need to trigger an access GW with a wget command to enable forwarding when I enter the BYOD network of my workplace.

My first idea is to use the SSID string to decide if I need to run the trigger script.

When I look at the environment that's passed to scripts in /etc/network/if-up.d/ when an acces point is opened, it looks like this:

Code:
ADDRFAM='inet'
ICD_CONNECTION_ID='8c3ab660-b3e6-49b3-98fc-753898f0a6dd'
ICD_CONNECTION_TYPE='WLAN_INFRA'
IFACE='wlan0'
IFS=' 	
'
LOGICAL='wlan0'
MODE='start'
OPTIND='1'
PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
PHASE='post-up'
PPID='25479'
PS1='\w \$ '
PS2='> '
PS4='+ '
PWD='/'
TERM='linux'
UPSTART_INSTANCE=''
UPSTART_JOB='xsession/icd2'
UPSTART_JOB_RESPAWNED='0'
VERBOSITY='0'
So unfortunately there's nothing about the SSID in any of the variables even though I can easily decide actions based on the $ICD_CONNECTION_TYPE for example.

There's no iwconfig on N9 either, so I cannot use that to fish out the SSID.
So, how to find out the SSID of my current WLAN connection?

Last edited by juiceme; 2013-04-26 at 11:07. Reason: found out the answer :)
 

The Following User Says Thank You to juiceme For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#2
Well silly me since I did not think about his in the first place... I must be a bit tired and really in need of a weekend now

The obvious solution: apt-get install wireless-tools
 

The Following 2 Users Say Thank You to juiceme For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 02:22.