summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-01-23 14:12:48 -0800
committerLuis R. Rodriguez <lrodriguez@atheros.com>2009-01-23 14:12:48 -0800
commite5ca06ca46e4a43c146e087a0344357e9534f95e (patch)
tree88bd7621fd2148a2269cfbd3bc8eee0a0f7bf02d
parentf1a3b8ae2e553d5d0320376220ad4fedd723c8ea (diff)
downloadcrda-e5ca06ca46e4a43c146e087a0344357e9534f95e.tar.gz
crda-e5ca06ca46e4a43c146e087a0344357e9534f95e.tar.bz2
crda-e5ca06ca46e4a43c146e087a0344357e9534f95e.zip
Add regdbdump.8 man page and update Makefile
We add a man page for regdbdump and we correct some typos on the Makefile. We now add SBINDIR and MANDIR targets as well for installation. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r--Makefile30
-rw-r--r--crda.813
-rw-r--r--regdbdump.837
3 files changed, 68 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 2b09049..35cb590 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,9 @@
REG_BIN?=/usr/lib/crda/regulatory.bin
REG_GIT?=git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.git
+SBINDIR ?= /sbin
+MANDIR ?= /usr/share/man/
+
# Use a custom CRDA_UDEV_LEVEL when callling make install to
# change your desired level for the udev regulatory.rules
CRDA_UDEV_LEVEL?=85
@@ -94,20 +97,31 @@ verify: $(REG_BIN) regdbdump
$(NQ) ' CHK $(REG_BIN)'
$(Q)./regdbdump $(REG_BIN) >/dev/null
-install: crda
+%.gz: %
+ @$(NQ) ' GZIP' $<
+ $(Q)gzip < $< > $@
+
+install: crda crda.8.gz regdbdump.8.gz
$(NQ) ' INSTALL crda'
$(Q)$(MKDIR) $(DESTDIR)/sbin
- $(Q)$(INSTALL) -m 755 -t $(DESTDIR)/sbin/ crda
+ $(Q)$(INSTALL) -m 755 -t $(DESTDIR)/$(SBINDIR) crda
$(NQ) ' INSTALL regdbdump'
- $(Q)$(INSTALL) -m 755 -t $(DESTDIR)/sbin/ regdbdump
- $(NQ) ' INSTALL regulatory.rules'
- $(Q)$(MKDIR) $(DESTDIR)/etc/udev/rules.d
+ $(Q)$(INSTALL) -m 755 -t $(DESTDIR)/$(SBINDIR) regdbdump
+ $(NQ) ' INSTALL $(UDEV_LEVEL)regulatory.rules'
+ $(Q)$(MKDIR) $(DESTDIR)/$(UDEV_RULE_DIR)/
@# This removes the old rule you may have, we were not
@# putting it in the right place.
$(Q)rm -f $(DESTDIR)/etc/udev/rules.d/regulatory.rules
+ $(Q)ln -sf regulatory.rules udev/$(UDEV_LEVEL)regulatory.rules
$(Q)$(INSTALL) -m 644 -t \
- $(DESTDIR)/$(UDEV_RULE_DIR)/$(UDEV_LEVEL)regulatory.rules \
- udev/regulatory.rules
+ $(DESTDIR)/$(UDEV_RULE_DIR)/ \
+ udev/$(UDEV_LEVEL)regulatory.rules
+ $(NQ) ' INSTALL crda.8.gz'
+ $(Q)$(MKDIR) $(DESTDIR)$(MANDIR)/man8/
+ $(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(MANDIR)/man8/ crda.8.gz
+ $(NQ) ' INSTALL regdbdump.8.gz'
+ $(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(MANDIR)/man8/ regdbdump.8.gz
clean:
- $(Q)rm -f crda regdbdump intersect *.o *~ *.pyc keys-*.c
+ $(Q)rm -f crda regdbdump intersect *.o *~ *.pyc keys-*.c *.gz \
+ udev/$(UDEV_LEVEL)regulatory.rules
diff --git a/crda.8 b/crda.8
index 7ea1cdd..d45af30 100644
--- a/crda.8
+++ b/crda.8
@@ -6,9 +6,14 @@ crda \- send to the kernel a wireless regulatory domain for a given ISO / IEC 31
.ad l
.in +8
.ti -8
+.B crda
+
+.ad l
+.in +8
+.ti -8
.SS
-.I SUMMARY
+.SH Description
.B crda
is the Linux wireless central regulatory domain agent.
.B crda
@@ -32,7 +37,7 @@ from the
file.
.SS
-.I RSA Digital Signature
+.SH RSA Digital Signature
If built with openssl or gcrypt support
.B crda
will have embedded
@@ -53,7 +58,7 @@ files signed by him. For further information see the
man page.
.SS
-.I UDEV RULE
+.SH UDEV RULE
A udev regulatory rule must be put in place
in order to receive and parse udev events from the kernel in order to get
udev to call crda with the passed ISO / IEC 3166 alpha2 country code.
@@ -64,7 +69,7 @@ An example udev rule which can be used (usually in
.I KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/sbin/crda"
.SS
-.I COMMAND
+.SH Environment variable
Set the
.B COUNTRY
environment variable with a specific ISO / IEC 3166 alpha2 country code
diff --git a/regdbdump.8 b/regdbdump.8
new file mode 100644
index 0000000..4a9cbec
--- /dev/null
+++ b/regdbdump.8
@@ -0,0 +1,37 @@
+.TH regdbdump 8 "23 January 2009" "regdbdump" "Linux"
+.SH NAME
+regdbdump \- parse and print out regulatory rules file
+.SH SYNOPSIS
+
+.ad l
+.in +8
+.ti -8
+.B regdbdump
+.RI <path-to-regulatory.bin>
+
+
+.ad l
+.in +8
+.ti -8
+
+.SS
+.SH Description
+.B regdbdump
+can be used to parse the
+.B regulatory.bin
+file, the Linux wireless regulatory database used by
+.B crda,
+and print out its contents in human readable format.
+.B regdbdump
+will return non zero if the digital signature
+.B regdbdump
+was built with cannot verify the signature of the regulatory database.
+Should this happen unintentionally chances are your regulatory.bin file is
+corrupted or has been tampered with.
+
+.SH SEE ALSO
+.BR regulatory.bin (5)
+.BR crda (8)
+.BR iw (8)
+
+.BR http://wireless.kernel.org/en/developers/Regulatory/