[Home]

Summary:ASTERISK-06738: [patch] Add 'make config' for debian distro
Reporter:Jesse Goerz (jgoerz)Labels:
Date Opened:2006-04-09 18:07:19Date Closed:2011-06-07 14:03:14
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) Makefile.patch
Description:Just a simple patch to the makefile to add the init script in /etc/init.d/ for debian distro.  BTW, the file it currently looks for "init.asterisk" doesn't exist, so this will affect any distro that is not using redhat style stuff.  I guess this might be a bugfix rather than a feature (for debian at least)...

****** ADDITIONAL INFORMATION ******

I've attached a patch to the top level makefile.
Comments:By: Andrey S Pankov (casper) 2006-04-10 12:12:45

Can someone else confirm that this will work for Debian?

If so, I hope this will be fixed for 1.2.

By: Jesse Goerz (jgoerz) 2006-04-11 17:09:20

I really should have added this command to that patch as well:
update-rc.d asterisk defaults

That would have been a more complete solution.  If you would like me to add a new patch, let me know.

Jesse

By: Serge Vecher (serge-v) 2006-05-04 10:43:22

jesse: please update your patch...

By: Serge Vecher (serge-v) 2006-05-04 10:44:07

tzafrir: can you please look at this one?

By: Tzafrir Cohen (tzafrir) 2006-05-04 11:02:17

The asterisk package on Debian has the following bots added to its postinst script:

# Automatically added by dh_installinit
if [ -x "/etc/init.d/asterisk" ]; then
       update-rc.d asterisk defaults 21 >/dev/null
       if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
               invoke-rc.d asterisk start || exit 0
       else
               /etc/init.d/asterisk start || exit 0
       fi
fi
# End automatically added section

For the sake of simplicity you can skip the restarting, and only run 'update-rc.d asterisk defaults 21' (or maybe a slightly higher number).

Asterisk is set there to start slightly after zaptel (20).


TODO: fix the current init.d script in the asterisk tarball from the one in the Debian distribution.

By: Russell Bryant (russell) 2006-05-05 23:18:39

I apologize that I didn't see this patch earlier.  I committed a patch from issue ASTERISK-6907 earlier today to support all of the init scripts we have.  If you see any problems with what is there, or would like to suggest changes against it, feel free to open a new issue.  I'm still adding the karma for this contribution.  :)  Thanks