From ae7b364b7e7d9ec850c1472c31cedbe7c1557296 Mon Sep 17 00:00:00 2001 From: John W. Linville Date: Jan 25 2013 19:23:06 +0000 Subject: Update setregdomain to determine timezone info from /etc/timezone --- diff --git a/crda.spec b/crda.spec index ef57a84..d3718ff 100644 --- a/crda.spec +++ b/crda.spec @@ -3,7 +3,7 @@ Name: crda Version: %{crda_version}_%{regdb_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Regulatory compliance daemon for 802.11 wireless networking Group: System Environment/Base @@ -18,6 +18,7 @@ BuildRequires: pkgconfig python m2crypto BuildRequires: openssl Requires: udev, iw +Requires: systemd >= 190 Source0: http://wireless.kernel.org/download/crda/crda-%{crda_version}.tar.bz2 Source1: http://wireless.kernel.org/download/wireless-regdb/wireless-regdb-%{regdb_version}.tar.bz2 @@ -93,6 +94,9 @@ rm -rf %{buildroot} %changelog +* Mon Jan 25 2013 John W. Linville - 1.1.3_2013.01.11-2 +- Update setregdomain to determine timezone info from /etc/timezone + * Mon Jan 25 2013 John W. Linville - 1.1.3_2013.01.11-1 - Update crda to version 1.1.3 - Update wireless-regdb to version 2013.01.11 diff --git a/setregdomain b/setregdomain index 74b1e3d..7664c59 100755 --- a/setregdomain +++ b/setregdomain @@ -16,7 +16,7 @@ # REGDOMAIN=/etc/sysconfig/regdomain -CLOCK=/etc/sysconfig/clock +LOCALTIME=/etc/localtime if [ -f $REGDOMAIN ] then @@ -29,10 +29,9 @@ then fi fi -if [ -f $CLOCK ] +if [ -f $TZ ] then - # This should set ZONE - . $CLOCK + ZONE=$(readlink $LOCALTIME | sed -e 's/\/usr\/share\/zoneinfo\///') else echo "Timezone information not found! Unable to set regulatory domain." exit @@ -44,9 +43,7 @@ then exit fi -COOKED_ZONE=$(echo $ZONE | sed -e 's/ /_/') - -COUNTRY=$(grep $COOKED_ZONE /usr/share/zoneinfo/zone.tab | awk '{ print $1 }') +COUNTRY=$(grep $ZONE /usr/share/zoneinfo/zone.tab | awk '{ print $1 }') if [ -z "$COUNTRY" ] then