Skip to contentSkip to conversation

also use SBINDIR for the regulatory.rules

DISCUSSION Luis R. Rodriguez 1 participant 1 message Feb 11, 2009 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 52 lines · Daniel Mierswa
Quoted 4 lines · Daniel Mierswa
Quoted 4 lines

You supply the user with a chance to specify SBINDIR during make install, yet forgot to use it in one place at the install target. I attached a patch against trunk for crda.git which fixes that.

Quoted 9 lines
Quoted 5 lines

Also choosing /sbin as default SBINDIR path is probably not a good idea, since you link against gcrypt and crypto which are both located in /usr which upstream won't change. So it's either thinking of another method to do db verification or to choose /usr/sbin as default binary location. Thanks for your time. Feedback welcomed. :)

Do the same with udev/regulatory.rules. Hope it fits.

And of course that attached patch was all wrong. Sorry :( Here's a new one.

--
Mierswa, Daniel

If you still don't like it, that's ok: that's why I'm boss. I simply know better than you do.

              --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22

From 9d4b1b20bf02d4233b6323d85140385650a9dc09 Mon Sep 17 00:00:00 2001
From: Daniel Mierswa <[email protected]>
Date: Wed, 11 Feb 2009 08:39:55 +0100
Subject: [PATCH] also replace the SBINDIR used in the rules file

---
 Makefile              |    1 +
 udev/regulatory.rules |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
Makefile +1 -0
index 106397d..4079bb0 100644
@@ -119,6 +119,7 @@ install: crda crda.8.gz regdbdump.8.gz
       @# 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)sed 's:$$(SBINDIR):$(SBINDIR):' -i udev/regulatory.rules
       $(Q)$(INSTALL) -m 644 -t \
               $(DESTDIR)/$(UDEV_RULE_DIR)/ \
               udev/$(UDEV_LEVEL)regulatory.rules
udev/regulatory.rules +0 -0
index e81d802..ef9b5f1 100644

udev/regulatory.rules line 5

Quoted 5 lines
udev/regulatory.rules +1 -1
@@ -2,4 +2,4 @@
 # For more information see:
 # http://wireless.kernel.org/en/developers/Regulatory/CRDA
 
-KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/sbin/crda"
+KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="$(SBINDIR)"

How is it the udev rule will know what $(SBINDIR) is?

Luis