Summary:ASTERISK-06907: [patch] make config doesn't work other than RH distribution
Reporter:Alvaro Oliver (froguz)Labels:
Date Opened:2006-05-05 15:34:08Date Closed:2006-05-05 17:51:19
Versions:Frequency of
Environment:Attachments:( 0) Makefile.patch
( 1) Makefile-r25012-20060505-1450.diff
Description:i've notice that asterisk's "make config" works just for Red Hat based distros, so i rewrote and test the Makefile config section to allow detect and configure Asterisk to lauch automatically on Debian/Ubuntu systems startup.

changes are described on Additional Information section. Complete new Makefile attached.


current Makefile config section:

       if [ -d /etc/rc.d/init.d ]; then \
               $(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \
               /sbin/chkconfig --add asterisk; \
       elif [ -d /etc/init.d ]; then \
               $(INSTALL) -m 755 init.asterisk /etc/init.d/asterisk; \

new Makefile config section:

       if [ -d /etc/rc.d/init.d ]; then \
               $(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \
               /sbin/chkconfig --add asterisk; \
       elif [ -f /etc/debian_version ]; then \
               $(INSTALL) -m 755 contrib/init.d/rc.debian.asterisk /etc/init.d/asterisk; \
               /usr/sbin/update-rc.d asterisk start 10 2 3 4 5 . stop 91 2 3 4 5 .; \
Comments:By: Serge Vecher (serge-v) 2006-05-05 15:39:16

froguz, thank you for your contribution, first of all.

1) can you please file a disclaimer with Digium?
2) rewrite this a patch for /trunk, since this a new feature?


By: Russell Bryant (russell) 2006-05-05 15:39:35

It is preferred that you attach changes as a patch.  Please review the following page to see how to make the patch:


Also, we will need a disclaimer from you before we can put the patch in.  Thanks!

By: Jason Parker (jparker) 2006-05-05 16:24:12

Patch uploaded...I got bored.

By: Jason Parker (jparker) 2006-05-05 16:51:52

Yet another patch uploaded.  I'd like for somebody with each of the listed distros (redhat, fedora, mandrake, suse, gentoo, debian {and variants}), to test my patch...

By: Jason Parker (jparker) 2006-05-05 17:01:34

oh, I should mention...  The reason the elif for init.asterisk was removed, was because the file simply doesn't exist anymore in the tree.  I have no clue where it went, and when it disappeared...if it ever existed in the first place.

By: Russell Bryant (russell) 2006-05-05 17:51:18

I decided to merge north's updated version of this patch.  froguz, thank you very much for your work on this!  Your patch provided the push we needed to go ahead and implement the rest of these.

added to the trunk in revision 25095