[svn-commits] kpfleming: linux/trunk r4497 - /linux/trunk/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jul 1 13:45:18 CDT 2008


Author: kpfleming
Date: Tue Jul  1 13:45:17 2008
New Revision: 4497

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4497
Log:
Add the remaining files and changes needed to get 'make config' to be functional.

(closes issue #12968)
Reported by: dimas

Added:
    linux/trunk/dahdi.init
      - copied, changed from r4492, old/branches/1.4/zaptel.init
    linux/trunk/init.conf.sample
      - copied, changed from r4492, old/branches/1.4/zaptel.sysconfig
    linux/trunk/system.conf.sample
      - copied, changed from r4494, old/branches/1.4/zaptel.conf.sample
Modified:
    linux/trunk/Makefile

Modified: linux/trunk/Makefile
URL: http://svn.digium.com/view/dahdi/linux/trunk/Makefile?view=diff&rev=4497&r1=4496&r2=4497
==============================================================================
--- linux/trunk/Makefile (original)
+++ linux/trunk/Makefile Tue Jul  1 13:45:17 2008
@@ -94,7 +94,6 @@
   INIT_TARGET	:= $(DESTDIR)$(INITRD_DIR)/dahdi
   COPY_INITD	:= install -D dahdi.init $(INIT_TARGET)
 endif
-RCCONF_DIR	:= $(firstword $(wildcard /etc/sysconfig /etc/default))
 
 NETSCR_DIR	:= $(firstword $(wildcard /etc/sysconfig/network-scripts ))
 ifdef NETSCR_DIR
@@ -199,25 +198,23 @@
 	[ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
 
 config:
+	install -d $(DESTDIR)/etc/dahdi
+	install -D -m 644 system.conf.sample $(DESTDIR)/etc/dahdi/system.conf
 ifdef COPY_INITD
 	$(COPY_INITD)
-endif
-ifdef RCCONF_DIR
-  ifeq (,$(wildcard $(DESTDIR)$(RCCONF_DIR)/dahdi))
-	install -D -m 644 dahdi.sysconfig $(DESTDIR)$(RCCONF_DIR)/dahdi
-  endif
+	install -D -m 644 init.conf.sample $(DESTDIR)/etc/dahdi/init.conf
+ifdef ADD_INITD
+	$(ADD_INITD)
+endif
 endif
 ifdef COPY_NETSCR
 	$(COPY_NETSCR)
-endif
-ifdef ADD_INITD
-	$(ADD_INITD)
 endif
 	@echo "DAHDI has been configured."
 	@echo ""
 	@echo "If you have any DAHDI hardware it is now recommended to "
-	@echo "edit /etc/default/dahdi or /etc/sysconfig/dahdi and set there an "
-	@echo "optimal value for the variable MODULES."
+	@echo "edit /etc/dahdi/init.conf and set an optimal value for"
+	@echo " the variable MODULES."
 	@echo ""
 	@echo "I think that the DAHDI hardware you have on your system is:"
 	@kernel/xpp/utils/dahdi_hardware || true

Copied: linux/trunk/dahdi.init (from r4492, old/branches/1.4/zaptel.init)
URL: http://svn.digium.com/view/dahdi/linux/trunk/dahdi.init?view=diff&rev=4497&p1=old/branches/1.4/zaptel.init&r1=4492&p2=linux/trunk/dahdi.init&r2=4497
==============================================================================
--- old/branches/1.4/zaptel.init (original)
+++ linux/trunk/dahdi.init Tue Jul  1 13:45:17 2008
@@ -1,20 +1,19 @@
 #!/bin/sh
 #
 # zaptel        This shell script takes care of loading and unloading \
-#               Zapata Telephony interfaces
+#               DAHDI Telephony interfaces
 # chkconfig: 2345 9 92
-# description: The zapata telephony drivers allow you to use your linux \
+# description: The DAHDI 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.
-
-ZTCFG=/sbin/ztcfg
-ZTCFG_CMD="$ZTCFG" # e.g: for a custom zaptel.conf location
+# Don't edit the following values. Edit /etc/dahdi/init.conf instead
+
+DAHDI_CFG=/sbin/ztcfg
+DAHDI_CFG_CMD="$DAHDI_CFG" # e.g: for a custom .conf location
 
 FXOTUNE=/sbin/fxotune
 
@@ -24,8 +23,8 @@
 XPP_SYNC=auto
 
 # The maximal timeout (seconds) to wait for udevd to finish generating 
-# device nodes after the modules have loaded and before running ztcfg. 
-ZAP_DEV_TIMEOUT=20
+# device nodes after the modules have loaded and before running dahdi_cfg. 
+DAHDI_DEV_TIMEOUT=20
 
 #
 # Determine which kind of configuration we're using
@@ -41,12 +40,13 @@
 fi
 
 # Source zaptel configuration.
+. /etc/dahdi/init.conf
+
+# Choose a lock file location.
 if [ $system = debian ]; then
-    [ -f /etc/default/zaptel ] && . /etc/default/zaptel
-	LOCKFILE=/var/lock/zaptel
+	LOCKFILE=/var/lock/dahdi
 elif [ $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.
@@ -75,7 +75,7 @@
 
 # Initialize the Xorcom Astribank (xpp/) using perl utiliites:
 # intended to replace all the the three functions below if user has 
-# installed the zaptel-perl utilities.
+# installed the dahdi-perl utilities.
 xpp_startup() {
 	# do nothing if there are no astribank devices:
 	if ! grep -q connected /proc/xpp/xbuses 2>/dev/null; then return 0; fi
@@ -99,28 +99,28 @@
 		return
 	fi
 
-	# zaphpec_enable not installed in /usr/sbin
-	if [ ! -f /usr/sbin/zaphpec_enable ]; then
-		echo -n "Running zaphpec_enable: Failed"
+	# dahdihpec_enable not installed in /usr/sbin
+	if [ ! -f /usr/sbin/dahdihpec_enable ]; then
+		echo -n "Running dahdihpec_enable: Failed"
 		echo -n "."
-		echo "  The zaphpec_enable binary is not installed in /usr/sbin."
+		echo "  The dahdihpec_enable binary is not installed in /usr/sbin."
 		return
 	fi
 
-	# zaphpec_enable not set executable
-	if [ ! -x /usr/sbin/zaphpec_enable ]; then
-		echo -n "Running zaphpec_enable: Failed"
+	# dahdihpec_enable not set executable
+	if [ ! -x /usr/sbin/dahdihpec_enable ]; then
+		echo -n "Running dahdihpec_enable: Failed"
 		echo -n "."
-		echo "  /usr/sbin/zaphpec_enable is not set as executable."
+		echo "  /usr/sbin/dahdihpec_enable is not set as executable."
 		return
 	fi
 
-	# zaphpec_enable properly installed
-	if [ $system = debian ]; then
-		echo -n "Running zaphpec_enable: "
-		/usr/sbin/zaphpec_enable 2> /dev/null
-	elif [ $system = redhat ]; then
-		action "Running zaphpec_enable: " /usr/sbin/zaphpec_enable
+	# dahdihpec_enable properly installed
+	if [ $system = debian ]; then
+		echo -n "Running dahdihpec_enable: "
+		/usr/sbin/dahdihpec_enable 2> /dev/null
+	elif [ $system = redhat ]; then
+		action "Running dahdihpec_enable: " /usr/sbin/dahdihpec_enable
 	fi
 	if [ $? = 0 ]; then
 		echo -n "done"
@@ -128,15 +128,15 @@
 	else
 		echo -n "Failed"
 		echo -n "."
-		echo "  This can be caused if you had already run zaphpec_enable, or if your HPEC license is no longer valid."
+		echo "  This can be caused if you had already run dahdihpec_enable, or if your HPEC license is no longer valid."
 	fi
 }
 
 shutdown_dynamic() {
-	if ! grep -q ' ZTD/' /proc/* 2>/dev/null; then return; fi
+	if ! grep -q ' DAHDI_DUMMY/' /proc/* 2>/dev/null; then return; fi
 
 	# we should only get here if we have dynamic spans. Right?
-	$ZTCFG_CMD -s
+	$DAHDI_CFG_CMD -s
 }
 
 # Check that telephony is up.
@@ -145,13 +145,13 @@
        exit 0
 fi
 
-if [ ! -x "$ZTCFG" ]; then
-       echo "ztcfg not executable"
+if [ ! -x "$DAHDI_CFG" ]; then
+       echo "dahdi_cfg not executable"
        exit 0
 fi
 
-if [ ! -f /etc/zaptel.conf ]; then
-       echo "/etc/zaptel.conf not found"
+if [ ! -f /etc/dahdi/system.conf ]; then
+       echo "/etc/dahdi/system.conf not found"
        exit 0
 fi
 
@@ -165,28 +165,25 @@
 case "$1" in
   start)
 	# Load drivers
-	rmmod wcusb 2> /dev/null
-	rmmod wcfxsusb 2> /dev/null
-	rmmod audio 2> /dev/null
-	if [ $system = debian ]; then
-	    echo -n "Loading zaptel framework: " 
-	    modprobe zaptel ${ARGS} 2> /dev/null && echo -n "done"
+	if [ $system = debian ]; then
+	    echo -n "Loading DAHDI framework: " 
+	    modprobe dahdi ${ARGS} 2> /dev/null && echo -n "done"
 	    echo "."
 	elif [ $system = redhat ]; then
-	    action "Loading zaptel framework: " modprobe zaptel ${ARGS}
+	    action "Loading DAHDI framework: " modprobe dahdi ${ARGS}
 	fi
 	echo -n "Waiting for zap to come online..."
-	TMOUT=$ZAP_DEV_TIMEOUT # max secs to wait
-	while [ ! -d /dev/zap ] ; do
+	TMOUT=$DAHDI_DEV_TIMEOUT # max secs to wait
+	while [ ! -d /dev/dahdi ] ; do
  		sleep 1
 		TMOUT=`expr $TMOUT - 1`
 		if [ $TMOUT -eq 0 ] ; then
-			echo "Error: missing /dev/zap!"
+			echo "Error: missing /dev/dahdi!"
 			exit 1
 		fi
 	done
 	echo "OK"
-	echo -n "Loading zaptel hardware modules:"
+	echo -n "Loading DAHDI hardware modules:"
 	for x in $MODULES; do 
 		eval localARGS="\$${x}_ARGS"
 		if modprobe ${x} ${ARGS} ${localARGS} 2> /dev/null; then
@@ -199,17 +196,17 @@
 	# 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 ztdummy"
-		modprobe ztdummy 2> /dev/null
-	fi
-
-	if [ $system = debian ]; then
-	    echo -n "Running ztcfg: " 
-	    $ZTCFG_CMD 2> /dev/null && echo -n "done"
+	if [ ! -e /proc/dahdi/1 ]; then
+		echo "No hardware timing source found in /proc/dahdi, loading dahdi_dummy"
+		modprobe dahdi_dummy 2> /dev/null
+	fi
+
+	if [ $system = debian ]; then
+	    echo -n "Running dahdi_cfg: " 
+	    $DAHDI_CFG_CMD 2> /dev/null && echo -n "done"
 	    echo "."
 	elif [ $system = redhat ]; then
-	    action "Running ztcfg: " $ZTCFG_CMD
+	    action "Running dahdi_cfg: " $DAHDI_CFG_CMD
 	fi
 	RETVAL=$?
 
@@ -225,17 +222,17 @@
   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:
+	# We don't have DAHDI helper, so let's not replicate too much code:
 	# allow others to use the unload command.
-	unload_module zaptel
+	unload_module dahdi
 	;;
   restart)
 	$0 stop
@@ -243,18 +240,17 @@
 	;;
   reload)
 	if [ $system = debian ]; then
-	    echo -n "Reloading ztcfg: "
-	    $ZTCFG_CMD 2> /dev/null && echo -n "done"
+	    echo -n "Reloading dahdi_cfg: "
+	    $DAHDI_CFG_CMD 2> /dev/null && echo -n "done"
 	    echo "."
 	elif [ $system = redhat ]; then
-	    action "Reloading ztcfg: " $ZTCFG_CMD
+	    action "Reloading dahdi_cfg: " $DAHDI_CFG_CMD
 	fi
 	RETVAL=$?
 	;;
   *)
-	echo "Usage: zaptel {start|stop|restart|reload}"
+	echo "Usage: dahdi {start|stop|restart|reload}"
 	exit 1
 esac
 
 exit $RETVAL
-

Copied: linux/trunk/init.conf.sample (from r4492, old/branches/1.4/zaptel.sysconfig)
URL: http://svn.digium.com/view/dahdi/linux/trunk/init.conf.sample?view=diff&rev=4497&p1=old/branches/1.4/zaptel.sysconfig&r1=4492&p2=linux/trunk/init.conf.sample&r2=4497
==============================================================================
--- old/branches/1.4/zaptel.sysconfig (original)
+++ linux/trunk/init.conf.sample Tue Jul  1 13:45:17 2008
@@ -3,15 +3,15 @@
 #        May break xpp_usb.
 #DEBUG=yes
 #
-#Alternatively set:  options zaptel debug=1
-#in /etc/modprobe.d/zaptel or /etc/modprobe.conf.
+#Alternatively set:  options dahdi debug=1
+#in /etc/modprobe.d/dahdi or /etc/modprobe.conf.
 #
-# ZTCFG: The full path to ztcfg. default: /sbin/ztcfg .
-#ZTCFG=/usr/local/sbin/ztcfg
+# DAHDI_CFG: The full path to dahdi_cfg. default: /sbin/dahdi_cfg .
+#DAHDI_CFG=/usr/local/sbin/dahdi_cfg
 #
-# ZTCFG_CMD: allow adding extra parameters to the ztcfg command.
+# DAHDI_CFG_CMD: allow adding extra parameters to the dahdi_cfg command.
 #            May be handy for -v, but mostly for:
-#ZTCFG_CMD=/sbin/ztcfg -c /home/tzafrir/myzaptel.conf
+#DAHDI_CFG_CMD=/sbin/dahdi_cfg -c /home/tzafrir/mydahdi.conf
 #
 # XPP_SYNC: Can be used to set an explicit Astribank unit as the 
 #           synchronizing Astribank. Passed to xpp_sync(8) .
@@ -26,7 +26,7 @@
 MODULES="$MODULES wct4xxp"	# TE405P - Quad Span T1/E1 Card (5v version)
 				# TE410P - Quad Span T1/E1 Card (3.3v version)
 #wct4xxp_ARGS="t1e1override=15"	# Additional parameters for TE4xxP driver
-# or use /etc/modprobe.d/zaptel or /etc/modprobe.conf .
+# or use /etc/modprobe.d/dahdi or /etc/modprobe.conf .
 
 MODULES="$MODULES wcte12xp"	# TE120P - Single Span T1/E1 Card
 
@@ -42,18 +42,14 @@
 
 MODULES="$MODULES wctdm"	# TDM400P - Modular FXS/FXO interface (1-4 ports)
 
-MODULES="$MODULES wcusb"	# S100U - Single port FXS USB Interface
-
-#MODULES="$MODULES torisa"	# Old Tormenta1 ISA Card
-
-#MODULES="$MODULES ztdummy"	# Zaptel Timing Only Interface
+#MODULES="$MODULES dahdi_dummy"	# DAHDI Timing Only Interface
 
 MODULES="$MODULES xpp_usb"	# Xorcom Astribank Device
 
 # Disables Astribank hotplug firmware loading
 #XPP_HOTPLUG_DISABLED=yes
 #
-# Disables Astribank udev hook called when an astribank is added and ready
+# Disables Astribank udev hook called when an Astribank is added and ready
 # or removed.
 #ASTRIBANK_HOOK_DISABLED=yes
 #
@@ -61,9 +57,9 @@
 # Default: all E1,TE . See xpp/README.Astribank .
 #XPP_PRI_SETUP='NUM/*/XPD-01=NT,E1'
 
-# Extensions genzaptelconf are (base + channel_number)
+# Extensions gendahdiconf are (base + channel_number)
 # base is by default 6000:
 #base_exten=6000
 #
 # There are a host of other variables you can set to affect
-# genzaptelconf. See the beginning of the script.
+# gendahdiconf. See the beginning of the script.

Copied: linux/trunk/system.conf.sample (from r4494, old/branches/1.4/zaptel.conf.sample)
URL: http://svn.digium.com/view/dahdi/linux/trunk/system.conf.sample?view=diff&rev=4497&p1=old/branches/1.4/zaptel.conf.sample&r1=4494&p2=linux/trunk/system.conf.sample&r2=4497
==============================================================================
--- old/branches/1.4/zaptel.conf.sample (original)
+++ linux/trunk/system.conf.sample Tue Jul  1 13:45:17 2008
@@ -1,7 +1,7 @@
 #
-# Zaptel Configuration File
-#
-# This file is parsed by the Zaptel Configurator, ztcfg
+# DAHDI Configuration File
+#
+# This file is parsed by the DAHDI Configurator, dahdi_cfg
 #
 # Span Configuration
 # ~~~~~~~~~~~~~~~~~~
@@ -118,11 +118,11 @@
 #   Like 'clear' except all channels are treated individually and
 #   are not bundled.  'inclear' is an alias for this.
 # rawhdlc::
-#   The zaptel driver performs HDLC encoding and decoding on the 
+#   The DAHDI driver performs HDLC encoding and decoding on the 
 #   bundle, and the resulting data is communicated via the master
 #   device.
 # dchan::
-#   The zapdel driver performs HDLC encoding and decoding on the
+#   The DAHDI driver performs HDLC encoding and decoding on the
 #   bundle and also performs incoming and outgoing FCS insertion
 #   and verification.  'fcshdlc' is an alias for this.
 # hardhdlc::
@@ -131,21 +131,20 @@
 #   and verification.  Is subject to limitations and support of underlying
 #   hardware.
 # nethdlc::
-#   The zaptel driver bundles the channels together into an
-#   hdlc network device, which in turn can be configured with
-#   sethdlc (available separately). In 2.6.x kernels you can also optionally
-#   pass the name for the network interface after the channel list.
+#   The DAHDI driver bundles the channels together into an
+#   HDLC network device, which in turn can be configured with
+#   sethdlc. You can also optionally pass the name for the network interface
+#   after the channel list.
 #   Syntax:
 #   
 #     nethdlc=<channel list>[:interface name]
 #   Use original names, don't use the names which have been already registered 
 #   in system e.g eth.
-#
 # dacs::
-#   The zaptel driver cross connects the channels starting at
+#   The DAHDI driver cross connects the channels starting at
 #   the channel number listed at the end, after a colon
 # dacsrbs::
-#   The zaptel driver cross connects the channels starting at
+#   The DAHDI driver cross connects the channels starting at
 #   the channel number listed at the end, after a colon and 
 #   also performs the DACSing of RBS bits
 #
@@ -180,14 +179,14 @@
 # Tone Zone Data
 # ~~~~~~~~~~~~~~
 # Finally, you can preload some tone zones, to prevent them from getting
-# overwritten by other users (if you allow non-root users to open /dev/zap/*
-# interfaces anyway.  Also this means they won't have to be loaded at runtime.
+# overwritten by other users (if you allow non-root users to open /dev/dahdi/*
+# interfaces anyway).  Also this means they won't have to be loaded at runtime.
 # The format is "loadzone=<zone>" where the zone is a two letter country code.
 # 
 # You may also specify a default zone with "defaultzone=<zone>" where zone
 # is a two letter country code.
 #
-# An up-to-date list of the zones can be found in the file zaptel/zonedata.c
+# An up-to-date list of the zones can be found in the file dahdi/zonedata.c
 #
 loadzone = us
 #loadzone = us-old
@@ -210,11 +209,11 @@
 # (see http://www.zapatatelephony.org/app_rpt.html)
 #
 # The PCI Radio Interface card interfaces up to 4 two-way radios (either
-# a base/mobile radio or repeater system) to Zaptel channels. The driver
+# a base/mobile radio or repeater system) to DAHDI channels. The driver
 # may work either independent of an application, or with it, through
-# the driver;s ioctl() interface. This file gives you access to specify
+# the driver's ioctl() interface. This file gives you access to specify
 # load-time parameters for Radio channels, so that the driver may run
-# by itself, and just act like a generic Zaptel radio interface.
+# by itself, and just act like a generic DAHDI radio interface.
 #
 # Unlike the rest of this file, you specify a block of parameters, and
 # then the channel(s) to which they apply. CTCSS is specified as a frequency




More information about the svn-commits mailing list