[Pkg-voip-commits] r8019 - in /dahdi-tools/trunk/debian: README.Debian changelog patches/init_unload_modules patches/init_unload_oslec patches/series
tzafrir-guest at alioth.debian.org
tzafrir-guest at alioth.debian.org
Sun Feb 7 10:44:51 UTC 2010
Author: tzafrir-guest
Date: Sun Feb 7 10:44:50 2010
New Revision: 8019
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=8019
Log:
Patches init_unload_modules and init_unload_oslec: also unload OSLEC
when unloading all modules.
Added:
dahdi-tools/trunk/debian/patches/init_unload_modules
dahdi-tools/trunk/debian/patches/init_unload_oslec
Modified:
dahdi-tools/trunk/debian/README.Debian
dahdi-tools/trunk/debian/changelog
dahdi-tools/trunk/debian/patches/series
Modified: dahdi-tools/trunk/debian/README.Debian
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/README.Debian?rev=8019&op=diff
==============================================================================
--- dahdi-tools/trunk/debian/README.Debian (original)
+++ dahdi-tools/trunk/debian/README.Debian Sun Feb 7 10:44:50 2010
@@ -9,7 +9,8 @@
The Debian package of dahdi-linux is patched to include support of the
echo canceller OSLEC. Thus dahdi-tools has been patched accordingly to
-make it the default echo canceller.
+make it the default echo canceller, and to remove 'echo' as well when
+unloading modules.
However if you, for any strange reason, use a version of the DAHDI
kernel modules that does not include a working dahdi_echocan_oslec.ko,
Modified: dahdi-tools/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/changelog?rev=8019&op=diff
==============================================================================
--- dahdi-tools/trunk/debian/changelog (original)
+++ dahdi-tools/trunk/debian/changelog Sun Feb 7 10:44:50 2010
@@ -14,8 +14,10 @@
minor perl issues.
* Add the missing ${misc:Depends}, as per lintian.
* Patch astribank_allow_ignoreend: an extra missing patch from upstream.
-
- -- Tzafrir Cohen <tzafrir.cohen at xorcom.com> Sun, 31 Jan 2010 13:28:23 +0200
+ * Patches init_unload_modules and init_unload_oslec: also unload OSLEC
+ when unloading all modules.
+
+ -- Tzafrir Cohen <tzafrir.cohen at xorcom.com> Sun, 07 Feb 2010 12:43:31 +0200
dahdi-tools (1:2.2.0-1) unstable; urgency=low
Added: dahdi-tools/trunk/debian/patches/init_unload_modules
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/patches/init_unload_modules?rev=8019&op=file
==============================================================================
--- dahdi-tools/trunk/debian/patches/init_unload_modules (added)
+++ dahdi-tools/trunk/debian/patches/init_unload_modules Sun Feb 7 10:44:50 2010
@@ -1,0 +1,90 @@
+From: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Date: Sun, 7 Feb 2010 09:13:50 +0000
+Subject: dahdi.init: allow specifying the module(s) to download.
+Origin: http://svn.digium.com/svn/dahdi/tools/trunk@7997
+
+At the 'stop' command, the dahdi init.d service unloads dahdi
+(and any module it depends in).
+
+With this change, the user will be able to specify the modules to
+unload, by setting DAHDI_UNLOAD_MODULES in init.conf. This allows:
+
+* Disabling module unloading altogether
+* Allowing the user to unload other modules as well, e.g. the 'echo'
+ module of OSLEC, if you build it as part of DAHDI.
+
+Note that unless you explicitly set DAHDI_UNLOAD_MODULES, the script
+behaves exatly as before.
+
+This patch is included in current trunk of dahdi-tools (will become 2.3).
+
+---
+ dahdi.init | 14 ++++++++++++--
+ init.conf.sample | 5 +++++
+ 2 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/dahdi.init b/dahdi.init
+index cbc9dc7..91ae44e 100755
+--- a/dahdi.init
++++ b/dahdi.init
+@@ -37,6 +37,10 @@ XPP_SYNC=auto
+ # device nodes after the modules have loaded and before running dahdi_cfg.
+ DAHDI_DEV_TIMEOUT=20
+
++# A list of modules to unload when stopping.
++# All of their dependencies will be unloaded as well.
++DAHDI_UNLOAD_MODULES="dahdi"
++
+ #
+ # Determine which kind of configuration we're using
+ #
+@@ -99,6 +103,12 @@ unload_module() {
+ rmmod $module
+ }
+
++unload_modules() {
++ for module in $DAHDI_UNLOAD_MODULES; do
++ unload_module $module
++ done
++}
++
+ # In (xpp) hotplug mode, the init script is also executed from the
+ # hotplug hook. In that case it should not attempt to loade modules.
+ #
+@@ -275,7 +285,7 @@ case "$1" in
+ # Unload drivers
+ #shutdown_dynamic # FIXME: needs test from someone with dynamic spans
+ echo -n "Unloading DAHDI hardware modules: "
+- if unload_module dahdi; then
++ if unload_modules; then
+ echo "done"
+ else
+ echo "error"
+@@ -285,7 +295,7 @@ case "$1" in
+ fi
+ ;;
+ unload)
+- unload_module dahdi
++ unload_modules
+ ;;
+ restart|force-reload)
+ $0 stop
+diff --git a/init.conf.sample b/init.conf.sample
+index 9fb6393..58edec5 100644
+--- a/init.conf.sample
++++ b/init.conf.sample
+@@ -8,6 +8,11 @@
+ # device nodes after the modules have loaded and before running dahdi_cfg.
+ #DAHDI_DEV_TIMEOUT=40
+
++# A list of modules to unload when stopping.
++# All of their dependencies will be unloaded as well.
++#DAHDI_UNLOAD_MODULES="" # Disable module unloading
++#DAHDI_UNLOAD_MODULES="dahdi echo" # If you use OSLEC
++
+ # Override settings for xpp_fxloader
+ #XPP_FIRMWARE_DIR=/usr/share/dahdi
+ #XPP_HOTPLUG_DISABLED=yes
+--
+1.6.5
+
Added: dahdi-tools/trunk/debian/patches/init_unload_oslec
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/patches/init_unload_oslec?rev=8019&op=file
==============================================================================
--- dahdi-tools/trunk/debian/patches/init_unload_oslec (added)
+++ dahdi-tools/trunk/debian/patches/init_unload_oslec Sun Feb 7 10:44:50 2010
@@ -1,0 +1,26 @@
+Subject: also unload OSLEC (echo) on module unload
+From: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Forwarded: no
+
+This patch sets the DAHDI init.d script to also unload 'echo' (OSLEC)
+in the 'stop' target. This adds to the default of unloading dahdi and
+all of its dependent modules.
+
+The package dahdi-linux includes 'echo' and with the default settings,
+will attempts load 'echo', that does not depend on dahdi, and hence
+will not be unloaded by default. Thus upgrading to a newer version (of
+a newer build) may break.
+
+This change will not be commited upstream, as OSLEC is not used there.
+
+--- a/dahdi.init
++++ b/dahdi.init
+@@ -39,7 +39,7 @@ DAHDI_DEV_TIMEOUT=20
+
+ # A list of modules to unload when stopping.
+ # All of their dependencies will be unloaded as well.
+-DAHDI_UNLOAD_MODULES="dahdi"
++DAHDI_UNLOAD_MODULES="dahdi echo"
+
+ #
+ # Determine which kind of configuration we're using
Modified: dahdi-tools/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/patches/series?rev=8019&op=diff
==============================================================================
--- dahdi-tools/trunk/debian/patches/series (original)
+++ dahdi-tools/trunk/debian/patches/series Sun Feb 7 10:44:50 2010
@@ -6,3 +6,5 @@
perl_fix_noserial
perl_fix_transportdir
astribank_allow_ignoreend
+init_unload_modules
+init_unload_oslec
More information about the Pkg-voip-commits
mailing list