You are not logged in.

#1 2010-04-12 17:20:56

tatofoo
Member
Registered: 2009-05-18
Posts: 6

[SOLVED] NetworkManager dispatcher script can't find out the ESSID

Hello, I've made a little script to automatically set my proxy settings depending on the wifi ESSID. The relevant part is this:

#!/bin/sh -e

if [ -z "$1" ]; then
    echo "$0: called with no interface" 1>&2
    exit 1
fi

if [ "$1" != "wlan0" ]; then
    exit 1
fi

INTERFACE=$1
STATUS=$2

iwconfig > /tmp/log

That last "iwconfig > /tmp/log" drops nothing. I've tried "iwgetid --raw" aswell with the same results. It looks like at the time that the script is called, the network is not configured yet.

How can I make NetworkManager call the script after the network is configurated?

EDIT

You can call nm-tool instead of iwconfig/iwgetid and extract the ESSID from there, it works now.

Last edited by tatofoo (2010-04-12 19:41:05)

Offline

Board footer

Powered by FluxBB