[-]
[+]
|
Added |
dahdi-tools.changes
|
|
[-]
[+]
|
Changed |
dahdi-tools.spec
^
|
|
[-]
[+]
|
Added |
dahdi-tools-2.3.0-Makefile.patch
^
|
@@ -0,0 +1,14 @@
+diff -ruN dahdi-tools-2.3.0-orig/Makefile dahdi-tools-2.3.0/Makefile
+--- dahdi-tools-2.3.0-orig/Makefile 2010-04-01 17:45:47.000000000 +0200
++++ dahdi-tools-2.3.0/Makefile 2010-04-21 12:04:26.000000000 +0200
+@@ -70,8 +70,8 @@
+ RCCONF_FILE = /etc/dahdi/init.conf
+ MODULES_FILE = /etc/dahdi/modules
+ GENCONF_FILE = /etc/dahdi/genconf_parameters
+-MODPROBE_FILE = /etc/modprobe.d/dahdi.conf
+-BLACKLIST_FILE = /etc/modprobe.d/dahdi.blacklist.conf
++MODPROBE_FILE = /etc/modprobe.d/dahdi
++BLACKLIST_FILE = /etc/modprobe.d/dahdi.blacklist
+
+ NETSCR_DIR := $(firstword $(wildcard $(DESTDIR)/etc/sysconfig/network-scripts ))
+ ifneq (,$(NETSCR_DIR))
|
[-]
[+]
|
Added |
dahdi-tools-soname.diff
^
|
@@ -0,0 +1,25 @@
+From: Jan Engelhardt <jengelh@medozas.de>
+Date: 2011-10-09 18:54:37.499709467 +0200
+Upstream: tbd
+
+Because both libfoo.so.2.0.0 and libfoo.so.2.1.0 are compatible,
+they must carry the same SONAME. As such, only the first
+sequence number is supposed to be in the SONAME.
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: dahdi-tools-2.5.0.1/Makefile
+===================================================================
+--- dahdi-tools-2.5.0.1.orig/Makefile
++++ dahdi-tools-2.5.0.1/Makefile
+@@ -172,7 +172,7 @@ $(LTZ_A): $(LTZ_A_OBJS)
+ ranlib $@
+
+ $(LTZ_SO): $(LTZ_SO_OBJS)
+- $(CC) $(CFLAGS) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ -lm
++ $(CC) $(CFLAGS) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER) -o $@ $^ -lm
+
+ dahdi_cfg: $(LTZ_A)
+ dahdi_cfg: LIBS+=-lm
|
|
Added |
dahdi-tools-2.5.0.1.tar.bz2
^
|
[-]
[+]
|
Added |
dahdi-tools.rpmlintrc
^
|
@@ -0,0 +1,3 @@
+addFilter("incoherent-init-script-name")
+addFilter("no-dependency-on")
+addFilter("perl5-naming-policy-not-applied")
|
[-]
[+]
|
Added |
dahdi.init
^
|
@@ -0,0 +1,266 @@
+#!/bin/sh
+#
+# dahdi This shell script takes care of loading and unloading \
+# DAHDI Telephony interfaces
+# chkconfig: 2345 9 92
+# description: The DAHDI drivers allow you to use your linux \
+# computer to accept incoming data and voice interfaces
+#
+### BEGIN INIT INFO
+# Provides: dahdi
+# Required-Start: $remote_fs $local_fs
+# Required-Stop: $remote_fs $local_fs
+# Should-Start:
+# Should-Stop:
+# Default-Start: 1 2 3 5
+# Default-Stop: 0 6
+# Short-Description: Load and initialize Dahdi.
+# Description: Load and initialize the Dahdi telephony drivers
+# which can be used by the Asterisk PBX system.
+### END INIT INFO
+
+. /etc/rc.status
+
+initdir=/etc/init.d
+
+# Don't edit the following values. Edit /etc/dahdi/init.conf instead.
+
+DAHDI_CFG=/usr/sbin/dahdi_cfg
+DAHDI_CFG_CMD="$DAHDI_CFG" # e.g: for a custom system.conf location
+
+FXOTUNE=/sbin/fxotune
+
+# The default syncer Astribank. Usually set automatically to a sane
+# value by xpp_sync(1) if you have an Astribank. You can set this to an
+# explicit Astribank (e.g: 01).
+XPP_SYNC=auto
+
+# 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=20
+
+#
+# Determine which kind of configuration we're using
+#
+system=suse # assume redhat
+
+[ -r /etc/sysconfig/dahdi ] && . /etc/sysconfig/dahdi
+
+LOCKFILE=/var/lock/subsys/dahdi
+
+# recursively unload a module and its dependencies, if possible.
+# where's modprobe -r when you need it?
+# inputs: module to unload.
+# returns: the result from
+unload_module() {
+ module="$1"
+ line=`lsmod 2>/dev/null | grep "^$1 "`
+ if [ "$line" = '' ]; then return; fi # module was not loaded
+
+ set -- $line
+ # $1: the original module, $2: size, $3: refcount, $4: deps list
+ mods=`echo $4 | tr , ' '`
+ # xpp_usb keeps the xpds below busy if an xpp hardware is
+ # connected. Hence must be removed before them:
+ case "$module" in xpd_*) mods="xpp_usb $mods";; esac
+ for mod in $mods; do
+ # run in a subshell, so it won't step over our vars:
+ (unload_module $mod)
+ # TODO: the following is probably the error handling we want:
+ # if [ $? != 0 ]; then return 1; fi
+ done
+ rmmod $module
+}
+
+# have we loaded the modules
+running()
+{
+ lsmod|grep -q "$1[^_-]"
+}
+
+# Initialize the Xorcom Astribank (xpp/) using perl utiliites:
+xpp_startup() {
+ # do nothing if there are no astribank devices:
+ if ! grep -q connected /proc/xpp/xbuses 2>/dev/null; then return 0; fi
+
+ echo "Waiting for Astribank devices to initialize:"
+ cat /proc/xpp/XBUS-[0-9]*/waitfor_xpds 2>/dev/null || true
+
+ # overriding locales for the above two, as perl can be noisy
+ # when locales are missing.
+ # No register all the devices if they didn't auto-register:
+ LC_ALL=C dahdi__registration on
+
+ # this one could actually be run after dahdi_cfg:
+ LC_ALL=C xpp_sync "$XPP_SYNC"
+}
+
+
+hpec_start() {
+ # HPEC license found
+ if ! echo /var/lib/digium/licenses/HPEC-*.lic | grep -v '\*' | grep -q .; then
+ return
+ fi
+
+ # zaphpec_enable not installed in /usr/sbin
+ if [ ! -f /usr/sbin/zaphpec_enable ]; then
+ echo -n "Running zaphpec_enable: Failed"
+ echo -n "."
+ echo " The zaphpec_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"
+ echo -n "."
+ echo " /usr/sbin/zaphpec_enable is not set as executable."
+ return
+ fi
+
+ # zaphpec_enable properly installed
+ echo -n "Running zaphpec_enable: "
+ /usr/sbin/zaphpec_enable 2> /dev/null
+ if [ $? = 0 ]; then
+ echo -n "done"
+ echo "."
+ 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."
+ fi
+}
+
+shutdown_dynamic() {
+ if ! grep -q ' ZTD/' /proc/* 2>/dev/null; then return; fi
+
+ # we should only get here if we have dynamic spans. Right?
+ $DAHDI_CFG_CMD -s
+}
+
+if [ ! -x "$DAHDI_CFG" ]; then
+ echo "dahdi_cfg not executable"
+ exit 0
+fi
+
+if [ ! -f /etc/dahdi/system.conf ]; then
+ echo "/etc/dahdi/system.conf not found. Nothing to do."
+ exit 0
+fi
+
+RETVAL=0
+
+# See how we were called.
+case "$1" in
+ start)
+ cat "/etc/dahdi/modules" | grep "^[^\#]" | {
+ foundone=false
+ echo -ne $"Loading DAHDI hardware modules:\n"
+ while read line; do
+ foundone=true
+ echo -n " ${line}: "
+ if modprobe $line 2> /dev/null; then
+ echo -n "done"
+ else
+ echo -n "error"
+ fi
+ done
+ echo -ne $"\n"
+ if ! $foundone; then
+ echo "There aren't any DAHDI hardware modules specified to "
+ echo "load. Please update /etc/dahdi/modules in order to "
+ echo "specify the modules to load."
+ exit 1
+ fi
+ }
+ 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/dahdi!"
+ exit 1
+ fi
+ done
+ sleep 3 # TODO: remove it
+
+ xpp_startup
+
+ 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
+
+ echo -n "Running dahdi_cfg: "
+ $DAHDI_CFG_CMD 2> /dev/null && echo -n "done"
+ echo "."
+ RETVAL=$?
+
+ if [ "$LOCKFILE" != '' ]; then
|
[-]
[+]
|
Added |
dahdi.sysconfig
^
|
@@ -0,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
|