Discussion:
[PATCH] install udev rule
richard kennedy
2007-06-22 10:24:14 UTC
Permalink
Hi,
This patch installs the udev rule file if the default rules directory
exists. This should do the right thing in most cases.

BTW -- there's still only a udev rule for the usb card, is it worth
adding rules for the other variants? ( easy to do although I can't test
them! ). Does anyone need or want them ?

Cheers
Richard


Index: etc/Makefile
===================================================================
--- etc/Makefile (revision 1832)
+++ etc/Makefile (working copy)
@@ -65,3 +65,8 @@
rm -f
$(TARGET_ROOT_ON_HOST)/etc/hotplug/pci/prism2_pci; \
rm -f
$(TARGET_ROOT_ON_HOST)/etc/hotplug/pci/prism2_plx; \
fi
+# install any udev rules to default location
+ if [ -d $(TARGET_ROOT_ON_HOST)/etc/udev/rules.d ]; then \
+ cp ./udev/rules.d/*.rules $(TARGET_ROOT_ON_HOST)/etc/udev/rules.d; \
+ fi
+
Solomon Peachy
2007-06-22 13:28:06 UTC
Permalink
Post by richard kennedy
BTW -- there's still only a udev rule for the usb card, is it worth
adding rules for the other variants? ( easy to do although I can't test
them! ). Does anyone need or want them ?
The udev rule would mean we could eliminate the RC script; all hotplug
devices already do the right thing on hot-insertion, but those that were
present when the system booted still need a way of getting kicked.

- Solomon
--
Solomon Peachy ***@linux-wlan.com
AbsoluteValue Systems http://www.linux-wlan.com
721-D North Drive +1 (321) 259-0737 (office)
Melbourne, FL 32934 +1 (321) 259-0286 (fax)
richard kennedy
2007-06-22 15:56:33 UTC
Permalink
Post by Solomon Peachy
Post by richard kennedy
BTW -- there's still only a udev rule for the usb card, is it worth
adding rules for the other variants? ( easy to do although I can't test
them! ). Does anyone need or want them ?
The udev rule would mean we could eliminate the RC script; all hotplug
devices already do the right thing on hot-insertion, but those that were
present when the system booted still need a way of getting kicked.
- Solomon
that's true. As the install doesn't run chkconfig or create links to
rc.wlan does anybody use it anyway?

IIRC -- the usb code detected the card on boot and ran hotplug correctly
without needing rc.wlan.

but certainly udev doesn't need rc.wlan, so we could do this instead :-

install:
set -e; for d in $(DIRS); do $(MAKE) -C $$d install; done
# install any udev rules to default location
if [ -d $(TARGET_ROOT_ON_HOST)/etc/udev/rules.d ]; then \
cp ./udev/rules.d/*.rules $(TARGET_ROOT_ON_HOST)/etc/udev/rules.d; \
else \
if [ ! -d $(TARGET_ROOT_ON_HOST)$(RC_DIR)/init.d ]; then \
mkdir -p $(TARGET_ROOT_ON_HOST)$(RC_DIR)/init.d; \
fi; \
cp rc.wlan $(TARGET_ROOT_ON_HOST)$(RC_DIR)/init.d/wlan; \
chmod 755 $(TARGET_ROOT_ON_HOST)$(RC_DIR)/init.d/wlan ;\
if [ -d $(TARGET_ROOT_ON_HOST)/etc/hotplug ]; then \
cp wlan.agent $(TARGET_ROOT_ON_HOST)/etc/hotplug; \
rm -f $(TARGET_ROOT_ON_HOST)/etc/hotplug/usb/prism2_usb; \
rm -f $(TARGET_ROOT_ON_HOST)/etc/hotplug/pci/prism2_pci; \
rm -f $(TARGET_ROOT_ON_HOST)/etc/hotplug/pci/prism2_plx; \
fi \
fi

Loading...