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
$(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
.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
file.
.SS
-.I RSA Digital Signature
+.SH RSA Digital Signature
If built with openssl or gcrypt support
.B crda
will have embedded
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.
.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
--- /dev/null
+.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/