rpms/crda/F-10 regulatory-rules-setregdomain.patch, NONE, 1.1 setregdomain, NONE, 1.1 crda.spec, 1.6, 1.7
John W. Linville
linville at fedoraproject.org
Thu Mar 19 18:05:16 UTC 2009
Author: linville
Update of /cvs/pkgs/rpms/crda/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3453
Modified Files:
crda.spec
Added Files:
regulatory-rules-setregdomain.patch setregdomain
Log Message:
Add setregdomain script to set regulatory domain based on timezone ; Expand 85-regulatory.rules to invoke setregdomain script on device add
regulatory-rules-setregdomain.patch:
--- NEW FILE regulatory-rules-setregdomain.patch ---
diff -up crda-1.0.1_2009.03.09/crda-1.0.1/udev/regulatory.rules.orig crda-1.0.1_2009.03.09/crda-1.0.1/udev/regulatory.rules
--- crda-1.0.1_2009.03.09/crda-1.0.1/udev/regulatory.rules.orig 2009-03-19 13:30:50.000000000 -0400
+++ crda-1.0.1_2009.03.09/crda-1.0.1/udev/regulatory.rules 2009-03-19 13:30:58.000000000 -0400
@@ -2,4 +2,6 @@
# For more information see:
# http://wireless.kernel.org/en/developers/Regulatory/CRDA
+SUBSYSTEM=="ieee80211", ACTION=="add", RUN+="/sbin/setregdomain"
+
KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/sbin/crda"
--- NEW FILE setregdomain ---
#!/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
Index: crda.spec
===================================================================
RCS file: /cvs/pkgs/rpms/crda/F-10/crda.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- crda.spec 10 Mar 2009 17:39:07 -0000 1.6
+++ crda.spec 19 Mar 2009 18:04:46 -0000 1.7
@@ -3,7 +3,7 @@
Name: crda
Version: %{crda_version}_%{regdb_version}
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: Regulatory compliance daemon for 802.11 wireless networking
Group: System Environment/Base
@@ -20,6 +20,9 @@
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
+Source2: setregdomain
+
+Patch0: regulatory-rules-setregdomain.patch
%description
CRDA acts as the udev helper for communication between the kernel
@@ -31,6 +34,7 @@
%setup -q -c
%setup -q -T -D -a 1
+%patch0 -p1 -b .setregdomain
%build
@@ -59,6 +63,7 @@
cp README README.wireless-regdb
make install PREFIX=${RPM_BUILD_ROOT}/usr
+install -D -m0755 %SOURCE2 ${RPM_BUILD_ROOT}/sbin
%clean
rm -rf $RPM_BUILD_ROOT
@@ -68,6 +73,7 @@
%defattr(-,root,root,-)
/sbin/%{name}
/sbin/regdbdump
+/sbin/setregdomain
/lib/udev/rules.d/85-regulatory.rules
/usr/lib/%{name}
%{_mandir}/man5/regulatory.bin.5.gz
@@ -77,6 +83,10 @@
%doc wireless-regdb-%{regdb_version}/README.wireless-regdb
%changelog
+* Thu Mar 19 2009 John W. Linville <linville at redhat.com> 1.0.1_2009.03.09-8
+- Add setregdomain script to set regulatory domain based on timezone
+- Expand 85-regulatory.rules to invoke setregdomain script on device add
+
* Tue Mar 10 2009 John W. Linville <linville at redhat.com> 1.0.1_2009.03.09-7
- Update wireless-regdb version to pick-up recent updates and fixes (#489560)
More information about the scm-commits
mailing list