Skip to content

Commit e5ca06c

Browse files
author
Luis R. Rodriguez
committed
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>
1 parent f1a3b8a commit e5ca06c

File tree

3 files changed

+68
-12
lines changed

3 files changed

+68
-12
lines changed

Makefile

+22-8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
REG_BIN?=/usr/lib/crda/regulatory.bin
44
REG_GIT?=git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.git
55

6+
SBINDIR ?= /sbin
7+
MANDIR ?= /usr/share/man/
8+
69
# Use a custom CRDA_UDEV_LEVEL when callling make install to
710
# change your desired level for the udev regulatory.rules
811
CRDA_UDEV_LEVEL?=85
@@ -94,20 +97,31 @@ verify: $(REG_BIN) regdbdump
9497
$(NQ) ' CHK $(REG_BIN)'
9598
$(Q)./regdbdump $(REG_BIN) >/dev/null
9699

97-
install: crda
100+
%.gz: %
101+
@$(NQ) ' GZIP' $<
102+
$(Q)gzip < $< > $@
103+
104+
install: crda crda.8.gz regdbdump.8.gz
98105
$(NQ) ' INSTALL crda'
99106
$(Q)$(MKDIR) $(DESTDIR)/sbin
100-
$(Q)$(INSTALL) -m 755 -t $(DESTDIR)/sbin/ crda
107+
$(Q)$(INSTALL) -m 755 -t $(DESTDIR)/$(SBINDIR) crda
101108
$(NQ) ' INSTALL regdbdump'
102-
$(Q)$(INSTALL) -m 755 -t $(DESTDIR)/sbin/ regdbdump
103-
$(NQ) ' INSTALL regulatory.rules'
104-
$(Q)$(MKDIR) $(DESTDIR)/etc/udev/rules.d
109+
$(Q)$(INSTALL) -m 755 -t $(DESTDIR)/$(SBINDIR) regdbdump
110+
$(NQ) ' INSTALL $(UDEV_LEVEL)regulatory.rules'
111+
$(Q)$(MKDIR) $(DESTDIR)/$(UDEV_RULE_DIR)/
105112
@# This removes the old rule you may have, we were not
106113
@# putting it in the right place.
107114
$(Q)rm -f $(DESTDIR)/etc/udev/rules.d/regulatory.rules
115+
$(Q)ln -sf regulatory.rules udev/$(UDEV_LEVEL)regulatory.rules
108116
$(Q)$(INSTALL) -m 644 -t \
109-
$(DESTDIR)/$(UDEV_RULE_DIR)/$(UDEV_LEVEL)regulatory.rules \
110-
udev/regulatory.rules
117+
$(DESTDIR)/$(UDEV_RULE_DIR)/ \
118+
udev/$(UDEV_LEVEL)regulatory.rules
119+
$(NQ) ' INSTALL crda.8.gz'
120+
$(Q)$(MKDIR) $(DESTDIR)$(MANDIR)/man8/
121+
$(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(MANDIR)/man8/ crda.8.gz
122+
$(NQ) ' INSTALL regdbdump.8.gz'
123+
$(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(MANDIR)/man8/ regdbdump.8.gz
111124

112125
clean:
113-
$(Q)rm -f crda regdbdump intersect *.o *~ *.pyc keys-*.c
126+
$(Q)rm -f crda regdbdump intersect *.o *~ *.pyc keys-*.c *.gz \
127+
udev/$(UDEV_LEVEL)regulatory.rules

crda.8

+9-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@
33
crda \- send to the kernel a wireless regulatory domain for a given ISO / IEC 3166 alpha2
44
.SH SYNOPSIS
55

6+
.ad l
7+
.in +8
8+
.ti -8
9+
.B crda
10+
611
.ad l
712
.in +8
813
.ti -8
914

1015
.SS
11-
.I SUMMARY
16+
.SH Description
1217
.B crda
1318
is the Linux wireless central regulatory domain agent.
1419
.B crda
@@ -32,7 +37,7 @@ from the
3237
file.
3338

3439
.SS
35-
.I RSA Digital Signature
40+
.SH RSA Digital Signature
3641
If built with openssl or gcrypt support
3742
.B crda
3843
will have embedded
@@ -53,7 +58,7 @@ files signed by him. For further information see the
5358
man page.
5459

5560
.SS
56-
.I UDEV RULE
61+
.SH UDEV RULE
5762
A udev regulatory rule must be put in place
5863
in order to receive and parse udev events from the kernel in order to get
5964
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
6469
.I KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/sbin/crda"
6570

6671
.SS
67-
.I COMMAND
72+
.SH Environment variable
6873
Set the
6974
.B COUNTRY
7075
environment variable with a specific ISO / IEC 3166 alpha2 country code

regdbdump.8

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.TH regdbdump 8 "23 January 2009" "regdbdump" "Linux"
2+
.SH NAME
3+
regdbdump \- parse and print out regulatory rules file
4+
.SH SYNOPSIS
5+
6+
.ad l
7+
.in +8
8+
.ti -8
9+
.B regdbdump
10+
.RI <path-to-regulatory.bin>
11+
12+
13+
.ad l
14+
.in +8
15+
.ti -8
16+
17+
.SS
18+
.SH Description
19+
.B regdbdump
20+
can be used to parse the
21+
.B regulatory.bin
22+
file, the Linux wireless regulatory database used by
23+
.B crda,
24+
and print out its contents in human readable format.
25+
.B regdbdump
26+
will return non zero if the digital signature
27+
.B regdbdump
28+
was built with cannot verify the signature of the regulatory database.
29+
Should this happen unintentionally chances are your regulatory.bin file is
30+
corrupted or has been tampered with.
31+
32+
.SH SEE ALSO
33+
.BR regulatory.bin (5)
34+
.BR crda (8)
35+
.BR iw (8)
36+
37+
.BR http://wireless.kernel.org/en/developers/Regulatory/

0 commit comments

Comments
 (0)