Search Linux Wireless

Re: Using GeoClue to send a Linux wireless regulatory hint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 17, 2009 at 9:52 AM, Luis R. Rodriguez<mcgrof@xxxxxxxxx> wrote:

> It just reads the country from timezone file, I've pasted the script
> below inline in case you are curious.

Oh and here is the script used by Fedora (thanks to John):

#!/bin/sh

REGDOMAIN=/etc/sysconfig/regdomain
CLOCK=/etc/sysconfig/clock

if [ -f $REGDOMAIN ]
then
        # This should set COUNTRY
        . $REGDOMAIN
        iw reg set $COUNTRY
        exit
fi

if [ -f $CLOCK ]
then
        # This should set ZONE
        . $CLOCK
else
        echo "Timezone information not found!  Unable to set regulatory domain."
        exit
fi

if [ -z "$ZONE" ]
then
        echo "Timezone information not set!  Unable to set regulatory domain."
        exit
fi

COOKED_ZONE=$(echo $ZONE | sed -e 's/ /_/')

COUNTRY=$(grep $COOKED_ZONE /usr/share/zoneinfo/zone.tab | awk '{ print $1 }')

if [ -z "$COUNTRY" ]
then
        echo "Could not determine country!  Unable to set regulatory domain."
        exit
fi

iw reg set $COUNTRY
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux