[zaptel-commits] branch 1.2 - r879 in /branches/1.2: Makefile
udev/zaptel.rules-combined
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Wed Dec 28 16:10:18 CST 2005
Author: kpfleming
Date: Wed Dec 28 16:10:18 2005
New Revision: 879
URL: http://svn.digium.com/view/zaptel?rev=879&view=rev
Log:
support newer udev rules+permissions format
install udev rules by default, since it's so common on distros now
Added:
branches/1.2/udev/zaptel.rules-combined
Modified:
branches/1.2/Makefile
Modified: branches/1.2/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.2/Makefile?rev=879&r1=878&r2=879&view=diff
==============================================================================
--- branches/1.2/Makefile (original)
+++ branches/1.2/Makefile Wed Dec 28 16:10:18 2005
@@ -85,9 +85,15 @@
#We only support DEVFS in linux 2.4 kernels, since its considered obsolete post 2.4
DYNFS:=$(shell ps ax | grep -v grep | grep -q devfsd && echo "yes")
endif
+
ifeq (${BUILDVER},linux26)
-#Tests for newer linux-2.6 udev support
-DYNFS:=$(shell ps ax | grep -v grep | grep udevd && echo "yes")
+ ifneq (,$(wildcard $(ROOT_PREFIX)/etc/udev/rules.d))
+ DYNFS=yes
+ UDEVRULES=yes
+ ifneq (,$(wildcard $(ROOT_PREFIX)/etc/udev/permissions.d))
+ UDEVPERMISSIONS=yes
+ endif
+ endif
endif
CHKCONFIG:=$(shell sh -c 'type -p chkconfig' 2> /dev/null)
@@ -320,8 +326,16 @@
N=$$[$$N+1]; \
done
else # DYNFS
+ ifdef UDEVRULES
+ ifdef UDEVPERMISSIONS
+ install -m 444 udev/zaptel.rules $(INSTALL_PREFIX)/etc/udev/rules.d
+ install -m 444 udev/zaptel.permissions $(INSTALL_PREFIX)/etc/udev/permissions.d
+ else # !UDEVPERMISSIONS (newer, combined syntax)
+ install -m 444 udev/zaptel.rules-combined $(INSTALL_PREFIX)/etc/udev/rules.d/zaptel.rules
+ endif
+ else # !UDEVRULES
@echo "**** Dynamic filesystem detected -- not creating device nodes"
- @echo "**** If you are running udev, read README.udev"
+ endif
endif
install: all devices
@@ -398,8 +412,14 @@
[ -f $(CONFIG_FILE) ] || install -D -m 644 zaptel.conf.sample $(CONFIG_FILE)
install-udev:
+ ifdef UDEVRULES
+ ifdef UDEVPERMISSIONS
install -m 444 udev/zaptel.rules $(INSTALL_PREFIX)/etc/udev/rules.d
install -m 444 udev/zaptel.permissions $(INSTALL_PREFIX)/etc/udev/permissions.d
+ else # !UDEVPERMISSIONS (newer, combined syntax)
+ install -m 444 udev/zaptel.rules-combined $(INSTALL_PREFIX)/etc/udev/rules.d/zaptel.rules
+ endif
+ endif
config:
if [ -d $(INSTALL_PREFIX)/etc/rc.d/init.d ]; then \
Added: branches/1.2/udev/zaptel.rules-combined
URL: http://svn.digium.com/view/zaptel/branches/1.2/udev/zaptel.rules-combined?rev=879&view=auto
==============================================================================
--- branches/1.2/udev/zaptel.rules-combined (added)
+++ branches/1.2/udev/zaptel.rules-combined Wed Dec 28 16:10:18 2005
@@ -1,0 +1,6 @@
+# zaptel devices with ownership/permissions for running as non-root
+KERNEL="zapctl", NAME="zap/ctl", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+KERNEL="zaptimer", NAME="zap/timer", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+KERNEL="zapchannel", NAME="zap/channel", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+KERNEL="zappseudo", NAME="zap/pseudo", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+KERNEL="zap[0-9]*", NAME="zap/%n", OWNER="asterisk", GROUP="asterisk", MODE="0660"
More information about the zaptel-commits
mailing list