[asterisk-bugs] [Asterisk 0014864]: [patch] LSB header for init scripts

Asterisk Bug Tracker noreply at bugs.digium.com
Sat Dec 19 09:12:27 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=14864 
====================================================================== 
Reported By:                lathama
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14864
Category:                   Core/BuildSystem
Reproducibility:            always
Severity:                   text
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.0.7 
JIRA:                       SWP-492 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.1 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-04-08 15:47 CDT
Last Modified:              2009-12-19 09:12 CST
====================================================================== 
Summary:                    [patch] LSB header for init scripts
Description: 
Add LSB headers to init scripts.

Suggestion

### BEGIN INIT INFO
# Provides:          asterisk
# Required-Start:    $network $local_fs $syslog
# Required-Stop:     $network $local_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start Asterisk at boot time
# Description:       Asterisk a software PBX and VoIP glue.
### END INIT INFO

For all platforms.
http://wiki.debian.org/LSBInitScripts

eg.. asterisk/contrib/init.d/rc.debian.asterisk
====================================================================== 

---------------------------------------------------------------------- 
 (0115462) pkempgen (reporter) - 2009-12-19 09:12
 https://issues.asterisk.org/view.php?id=14864#c115462 
---------------------------------------------------------------------- 
> Does Asterisk rely on syslog?

Yes if logging to syslog is configured in logger.conf.
Well, you could argue that $syslog should be listed in Should-*
instead of Required-* but that seems to be unusal.

> $local_fs is needed if you want to e.g. rely on files from /usr .

$local_fs is needed for local file systems (e.g. /var/lib/asterisk/).
/usr might be a remote file system and since asterisk depends on
files in /usr (/usr/lib/asterisk/modules/) it needs to depend on
$remote_fs.

> Should-Start/Should-Stop lists optional dependencies, that is: if
> such a service exists, we'll start after it (or stop before it,
> respectively).

Exactly.

> So I don't see the real issue here. Most Asterisk systems don't
> have e.g. a PostgreSQL server, anyway. It is still listed there.

Yes. That's why postgresql is a weak dependency (Should-Start)
instead of a strong dependency (Required-Start).
If the system does not have postgresql, fine. ("This allows for weak
dependencies which do not cause the service to fail if a facility is
not available.")
If the system does have postgresql then postgresql should already be
running when asterisk is started because asterisk might need to load
configuration from the database (extconfig.conf).

Somehow I fail to see your point. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-12-19 09:12 pkempgen       Note Added: 0115462                          
======================================================================




More information about the asterisk-bugs mailing list