[svn-commits] tzafrir: tools/trunk r4483 - /tools/trunk/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Jun 29 11:54:14 CDT 2008


Author: tzafrir
Date: Sun Jun 29 11:54:13 2008
New Revision: 4483

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4483
Log:
* dahdi.init: cleanups.
* init.conf: example configuration for the init script.
* dahdi.rules: udev rules (still not installed).
* Makefile: simplify install of RCCONF .

Added:
    tools/trunk/dahdi.rules   (with props)
    tools/trunk/init.conf   (with props)
Modified:
    tools/trunk/Makefile
    tools/trunk/dahdi.init

Modified: tools/trunk/Makefile
URL: http://svn.digium.com/view/dahdi/tools/trunk/Makefile?view=diff&rev=4483&r1=4482&r2=4483
==============================================================================
--- tools/trunk/Makefile (original)
+++ tools/trunk/Makefile Sun Jun 29 11:54:13 2008
@@ -62,7 +62,7 @@
   INIT_TARGET	:= $(DESTDIR)$(INITRD_DIR)/dahdi
   COPY_INITD	:= install -D dahdi.init $(INIT_TARGET)
 endif
-RCCONF_DIR	:= $(firstword $(wildcard /etc/sysconfig /etc/default))
+RCCONF_FILE	= /etc/dahdi/init.conf
 
 NETSCR_DIR	:= $(firstword $(wildcard /etc/sysconfig/network-scripts ))
 ifneq (,$(NETSCR_DIR))
@@ -255,10 +255,8 @@
 ifneq (,$(COPY_INITD))
 	$(COPY_INITD)
 endif
-ifneq (,$(RCCONF_DIR))
-  ifeq (,$(wildcard $(DESTDIR)$(RCCONF_DIR)/dahdi))
-	$(INSTALL) -D -m 644 dahdi.sysconfig $(DESTDIR)$(RCCONF_DIR)/dahdi
-  endif
+ifeq (,$(wildcard $(DESTDIR)$(RCCONF_FILE))
+	$(INSTALL) -D -m 644 init.conf $(DESTDIR)$(RCCONF_FILE)
 endif
 ifneq (,$(COPY_NETSCR))
 	$(COPY_NETSCR)

Modified: tools/trunk/dahdi.init
URL: http://svn.digium.com/view/dahdi/tools/trunk/dahdi.init?view=diff&rev=4483&r1=4482&r2=4483
==============================================================================
--- tools/trunk/dahdi.init (original)
+++ tools/trunk/dahdi.init Sun Jun 29 11:54:13 2008
@@ -1,20 +1,19 @@
 #!/bin/sh
 #
-# zaptel        This shell script takes care of loading and unloading \
-#               Zapata Telephony interfaces
+# dahdi         This shell script takes care of loading and unloading \
+#               Dahdi Telephony interfaces
 # chkconfig: 2345 9 92
 # description: The zapata telephony drivers allow you to use your linux \
 # computer to accept incoming data and voice interfaces
 #
-# config: /etc/sysconfig/zaptel
+# config: /etc/dahdi/init.conf
 
 initdir=/etc/init.d
 
-# Don't edit the following values. Edit /etc/sysconfig/zaptel or
-# /etc/defualt/zaptel (depending on your system) instead.
+# Don't edit the following values. Edit /etc/dahdi/init.conf instead.
 
 DAHDI_CFG=/sbin/dahdi_cfg
-DAHDI_CFG_CMD="$DAHDI_CFG" # e.g: for a custom zaptel.conf location
+DAHDI_CFG_CMD="$DAHDI_CFG" # e.g: for a custom system.conf location
 
 FXOTUNE=/sbin/fxotune
 
@@ -43,8 +42,7 @@
 [ -f /etc/dahdi/init.conf ] && . /etc/dahdi/init.conf
 
 if [ $system = redhat ]; then
-    [ -f /etc/sysconfig/zaptel ] && . /etc/sysconfig/zaptel
-	LOCKFILE=/var/lock/subsys/zaptel
+	LOCKFILE=/var/lock/subsys/dahdi
 fi
 
 # recursively unload a module and its dependencies, if possible.
@@ -142,8 +140,8 @@
        exit 0
 fi
 
-if [ ! -f /etc/zaptel.conf ]; then
-	echo "/etc/zaptel.conf not found. Nothing to do."
+if [ ! -f /etc/dahdi/system.conf ]; then
+	echo "/etc/dahdi/system.conf not found. Nothing to do."
        exit 0
 fi
 
@@ -153,7 +151,7 @@
 case "$1" in
   start)
 	# Load drivers
-	echo -n "Loading zaptel hardware modules:"
+	echo -n "Loading Dahdi hardware modules:"
 	for x in $MODULES; do 
 		eval localARGS="\$${x}_ARGS"
 		if modprobe ${x} ${localARGS} 2> /dev/null; then
@@ -171,12 +169,11 @@
 		fi
 	done
 	sleep 3 # TODO: remove it
-	
-	# If you have zaptel-perl, the three below can be replaced with:
+
 	xpp_startup
-	
-	if [ ! -e /proc/zaptel/1 ]; then
-		echo "No hardware timing source found in /proc/zaptel, loading dahdi_dummy"
+
+	if [ ! -e /proc/dahdi/1 ]; then
+		echo "No hardware timing source found in /proc/dahdi, loading dahdi_dummy"
 		modprobe dahdi_dahdi_dummy 2> /dev/null
 	fi
 
@@ -201,17 +198,15 @@
   stop)
 	# Unload drivers
 	#shutdown_dynamic # FIXME: needs test from someone with dynamic spans
-	echo -n "Unloading zaptel hardware drivers:"
-  	unload_module zaptel
+	echo -n "Unloading Dahdi hardware drivers:"
+  	unload_module dahdi
 	RETVAL=$?
 	echo "."
 
 	[ $RETVAL -eq 0 ] && rm -f $LOCKFILE
 	;;
   unload)
-	# We don't have zaptel helper, so let's not replicate too much code:
-	# allow others to use the unload command.
-	unload_module zaptel
+	unload_module dahdi
 	;;
   restart|force-reload)
 	$0 stop
@@ -228,7 +223,7 @@
 	RETVAL=$?
 	;;
   *)
-	echo "Usage: zaptel {start|stop|restart|reload|unload}"
+	echo "Usage: dahdi {start|stop|restart|reload|unload}"
 	exit 1
 esac
 

Added: tools/trunk/dahdi.rules
URL: http://svn.digium.com/view/dahdi/tools/trunk/dahdi.rules?view=auto&rev=4483
==============================================================================
--- tools/trunk/dahdi.rules (added)
+++ tools/trunk/dahdi.rules Sun Jun 29 11:54:13 2008
@@ -1,0 +1,9 @@
+# Dahdi
+SUBSYSTEM=="dahdi",		OWNER="asterisk", GROUP="asterisk", MODE="0660"
+KERNEL=="dahdictl",		NAME="dahdi/ctl"
+KERNEL=="dahditimer",		NAME="dahdi/timer"
+KERNEL=="dahdichannel",		NAME="dahdi/channel"
+KERNEL=="dahdipseudo",		NAME="dahdi/pseudo"
+KERNEL=="dahdi[0-9]*",		NAME="dahdi/%n"
+
+

Propchange: tools/trunk/dahdi.rules
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tools/trunk/dahdi.rules
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tools/trunk/dahdi.rules
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tools/trunk/init.conf
URL: http://svn.digium.com/view/dahdi/tools/trunk/init.conf?view=auto&rev=4483
==============================================================================
--- tools/trunk/init.conf (added)
+++ tools/trunk/init.conf Sun Jun 29 11:54:13 2008
@@ -1,0 +1,13 @@
+#
+# Shell settings for Dahdi initialization scripts.
+# This replaces the old/per-platform files (/etc/sysconfig/zaptel,
+# /etc/defaults/zaptel)
+#
+
+# The maximal timeout (seconds) to wait for udevd to finish generating 
+# device nodes after the modules have loaded and before running dahdi_cfg. 
+#DAHDI_DEV_TIMEOUT=40
+
+# Override settings for xpp_fxloader
+#XPP_FIRMWARE_DIR=/usr/share/dahdi
+#XPP_HOTPLUG_DISABLED=yes

Propchange: tools/trunk/init.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tools/trunk/init.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tools/trunk/init.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the svn-commits mailing list