[crda/f17] Revert "Update setregdomain to determine timezone info from /etc/timezone"
John W. Linville
linville at fedoraproject.org
Fri Feb 15 16:46:10 UTC 2013
commit 11b86b89b5e5335955be6562ddff8767fe463fab
Author: John W. Linville <linville at tuxdriver.com>
Date: Fri Feb 15 11:45:34 2013 -0500
Revert "Update setregdomain to determine timezone info from /etc/timezone"
This mostly reverts commit ae7b364b7e7d9ec850c1472c31cedbe7c1557296.
Conflicts:
crda.spec
crda.spec | 6 ++++--
setregdomain | 11 +++++++----
2 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/crda.spec b/crda.spec
index 93b5075..c2cfc4f 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,7 +18,6 @@ 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
@@ -94,6 +93,9 @@ rm -rf %{buildroot}
%changelog
+* Fri Feb 15 2013 John W. Linville <linville at redhat.com> - 1.1.3_2013.02.13-2
+- Revert setregdomain changes, since they are inappropriate for F17
+
* Wed Feb 13 2013 John W. Linville <linville at redhat.com> - 1.1.3_2013.02.13-1
- Update wireless-regdb to version 2013.02.13
diff --git a/setregdomain b/setregdomain
index 7664c59..74b1e3d 100755
--- a/setregdomain
+++ b/setregdomain
@@ -16,7 +16,7 @@
#
REGDOMAIN=/etc/sysconfig/regdomain
-LOCALTIME=/etc/localtime
+CLOCK=/etc/sysconfig/clock
if [ -f $REGDOMAIN ]
then
@@ -29,9 +29,10 @@ then
fi
fi
-if [ -f $TZ ]
+if [ -f $CLOCK ]
then
- ZONE=$(readlink $LOCALTIME | sed -e 's/\/usr\/share\/zoneinfo\///')
+ # This should set ZONE
+ . $CLOCK
else
echo "Timezone information not found! Unable to set regulatory domain."
exit
@@ -43,7 +44,9 @@ then
exit
fi
-COUNTRY=$(grep $ZONE /usr/share/zoneinfo/zone.tab | awk '{ print $1 }')
+COOKED_ZONE=$(echo $ZONE | sed -e 's/ /_/')
+
+COUNTRY=$(grep $COOKED_ZONE /usr/share/zoneinfo/zone.tab | awk '{ print $1 }')
if [ -z "$COUNTRY" ]
then
More information about the scm-commits
mailing list