[Pkg-voip-commits] [dahdi-tools] 129/285: added udev rules and their install target:

tzafrir at debian.org tzafrir at debian.org
Thu Jul 7 19:18:43 UTC 2016


This is an automated email from the git hooks/post-receive script.

tzafrir pushed a commit to branch master
in repository dahdi-tools.

commit fb1a2b557277d1515e5fe020c3d2891060452799
Author: Oron Peled <oron.peled at xorcom.com>
Date:   Tue Oct 15 21:00:17 2013 +0300

    added udev rules and their install target:
    
    * Added missing Makefile install rule for dahdi.rules
    * Pulled xpp.rules from dahdi-linux and added install rules for it
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>
---
 Makefile      |  3 +++
 xpp/Makefile  |  4 ++++
 xpp/xpp.rules | 11 +++++++++++
 3 files changed, 18 insertions(+)

diff --git a/Makefile b/Makefile
index cbd44a2..d9f9b1a 100644
--- a/Makefile
+++ b/Makefile
@@ -85,6 +85,7 @@ MAN_DIR:=$(mandir)/man8
 DATA_DIR:=${datadir}/dahdi
 CONFIG_DIR:=$(sysconfdir)/dahdi
 CONFIG_FILE:=$(CONFIG_DIR)/system.conf
+UDEVRULES_DIR:=$(sysconfdir)/udev/rules.d
 
 # Utilities we build with a standard build procedure:
 UTILS		= dahdi_tool dahdi_test dahdi_monitor dahdi_speed sethdlc dahdi_cfg \
@@ -292,6 +293,8 @@ endif
 ifeq (,$(wildcard $(DESTDIR)$(BLACKLIST_FILE)))
 	$(INSTALL) -D -m 644 blacklist.sample $(DESTDIR)$(BLACKLIST_FILE)
 endif
+	$(INSTALL) -d $(DESTDIR)$(UDEVRULES_DIR)
+	$(INSTALL) -D -m 644 dahdi.rules $(DESTDIR)$(UDEVRULES_DIR)/
 ifneq (,$(COPY_NETSCR))
 	$(COPY_NETSCR)
 endif
diff --git a/xpp/Makefile b/xpp/Makefile
index 8cbfae9..49f7b33 100644
--- a/xpp/Makefile
+++ b/xpp/Makefile
@@ -20,6 +20,8 @@ INSTALL_DATA	= $(INSTALL) -m 644
 prefix		?= /usr
 datadir		?= $(prefix)/share
 mandir		?= $(datadir)/man
+sysconfdir	?= $(prefix)/etc
+udevrulesdir	?= $(sysconfdir)/udev/rules.d
 INSTALL		?= install
 
 INSTALL_DATA	= $(INSTALL) -m 644
@@ -102,6 +104,8 @@ install: all
 	$(INSTALL) -d $(DESTDIR)$(DATADIR)
 	$(INSTALL) xpp_fxloader astribank_hook $(DESTDIR)$(DATADIR)/
 	$(INSTALL) waitfor_xpds $(DESTDIR)$(DATADIR)/
+	$(INSTALL) -d $(DESTDIR)$(udevrulesdir)
+	$(INSTALL_DATA) xpp.rules $(DESTDIR)$(udevrulesdir)/
 	$(INSTALL) -d $(DESTDIR)$(MANDIR)
 	$(INSTALL_DATA) $(MAN_INSTALL) $(DESTDIR)$(MANDIR)/
 	$(INSTALL) -d $(DESTDIR)$(HOTPLUG_USB_DIR)
diff --git a/xpp/xpp.rules b/xpp/xpp.rules
new file mode 100644
index 0000000..93f772d
--- /dev/null
+++ b/xpp/xpp.rules
@@ -0,0 +1,11 @@
+# Load firmware into the Xorcom Astribank device:
+SUBSYSTEM=="usb", ACTION=="add", \
+ENV{PRODUCT}=="e4e4/11[3456][013]/*", ENV{DEVTYPE}!="usb_interface", \
+	RUN+="/usr/share/dahdi/xpp_fxloader udev $env{PRODUCT}"
+
+# Hotplug hook for Astribank up/down
+# If you need this functionality, copy the astribank_hook.sample
+# to $XPP_INIT_DIR/astribank_hook
+#
+# By default XPP_INIT_DIR="/usr/share/dahdi"
+KERNEL=="xbus*", RUN+="%E{XPP_INIT_DIR}/astribank_hook udev $kernel $sysfs{status} $sysfs{connector}"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/dahdi-tools.git



More information about the Pkg-voip-commits mailing list