[zaptel-commits] tzafrir: trunk r1420 - /trunk/xpp/utils/xpp_fxloader

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Wed Sep 6 13:41:41 MST 2006


Author: tzafrir
Date: Wed Sep  6 15:41:40 2006
New Revision: 1420

URL: http://svn.digium.com/view/zaptel?rev=1420&view=rev
Log:
A hacked udev support for xpp_fxloader.

Modified:
    trunk/xpp/utils/xpp_fxloader

Modified: trunk/xpp/utils/xpp_fxloader
URL: http://svn.digium.com/view/zaptel/trunk/xpp/utils/xpp_fxloader?rev=1420&r1=1419&r2=1420&view=diff
==============================================================================
--- trunk/xpp/utils/xpp_fxloader (original)
+++ trunk/xpp/utils/xpp_fxloader Wed Sep  6 15:41:40 2006
@@ -23,6 +23,20 @@
 # 1. Copy this file and the file xpp_fxloader.usermap to /etc/hotplug/usb/
 # 2. tail -f  /var/log/messages...
 #
+# 
+# Suggested udev configuration: I used the following file as 
+# /etc/udev/rules.d/z60_zaptel.rules :
+#
+# BUS!="usb", ACTION!="add", GOTO="zaptel_usb_add_end"
+# 
+# SYSFS{idVendor}=="04b4", SYSFS{idProduct}=="8613", \
+# 	RUN+="/etc/hotplug/usb/xpp_fxloader udev $sysfs{idVendor}/$sysfs{idProduct}/"
+# SYSFS{idVendor}=="e4e4", SYSFS{idProduct}=="1130", \
+# 	RUN+="/etc/hotplug/usb/xpp_fxloader udev $sysfs{idVendor}/$sysfs{idProduct}/"
+# SYSFS{idVendor}=="e4e4", SYSFS{idProduct}=="1131", \
+# 	RUN+="/etc/hotplug/usb/xpp_fxloader udev $sysfs{idVendor}/$sysfs{idProduct}/"
+# 
+# LABEL="zaptel_usb_add_end"
 #
 # Written by Tzafrir Cohen <tzafrir.cohen at xorcom.com>
 # Copyright (C) 2006, Xorcom
@@ -126,6 +140,12 @@
 
 # to run manually, pass the parameter 'xppdetect'
 case "$1" in
+udev) 
+	# the following emulate hotplug's environment from udev's environment:
+	DEVICE=`echo $DEVNAME | sed -e 's|^/dev/|/proc/|'`
+	PRODUCT="$2"
+	# skip on to the rest of the script. Don't exit.
+	;;
 xppdetect|load|usb)
 	echo "--------- FIRMWARE LOADING: ($1)"
 	



More information about the zaptel-commits mailing list