Bug#433779: asterisk doesn't retry SIP registrations if DNS is not available

Petter Reinholdtsen pere at hungry.com
Sat Jun 12 20:32:01 UTC 2010


tags 433779 + patch
thanks

[Robert Edmonds]
> if i'm not mistaken, on systems with parallel booting enabled this
> means it would be possible for asterisk to start before the network
> is up or name resolution is available.  i believe that $named and
> $network should be added to Should-Start.

For the common setup, network would always be enabled earlier, but
this might change in the future, so it is smart to list $network as an
explicit dependency.

But a local DNS server can be started after asterisk, yes, unless
$named is listed as a init.d script dependency, and reading this bug
report make me suspect asterisk should almost always start after a
local DNS server.

Also, the asterisk service seem to log to syslog (found in
main/logger.c), so it should start after the syslog collector is
started too and depend on $syslog.

Based on this, I suggest to change the init.d script dependencies like
this:

diff -ru asterisk-1.6.2.7/debian/asterisk.init asterisk-1.6.2.7-pere/debian/asterisk.init
--- asterisk-1.6.2.7/debian/asterisk.init       2010-02-07 14:15:13.000000000 +0100
+++ asterisk-1.6.2.7-pere/debian/asterisk.init  2010-06-12 22:16:56.000000000 +0200
@@ -14,8 +14,8 @@
 # Provides:          asterisk
 # Required-Start:    $remote_fs
 # Required-Stop:     $remote_fs
-# Should-Start:      dahdi mysql postgresql
-# Should-Stop:       mysql postgresql
+# Should-Start:      $syslog $network $named mysql postgresql dahdi
+# Should-Stop:       $syslog $network $named mysql postgresql
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Short-Description: Asterisk PBX

Happy hacking,
-- 
Petter Reinholdtsen





More information about the Pkg-voip-maintainers mailing list