Permit more options in the Makefile as to startup options
[asterisk/asterisk.git] / Makefile
index 82d4187..b4b948e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -820,10 +820,12 @@ config:
                if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
                        cat contrib/init.d/rc.redhat.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > $(DESTDIR)/etc/rc.d/init.d/asterisk ;\
                        chmod 755 $(DESTDIR)/etc/rc.d/init.d/asterisk;\
+                       if [ ! -f /etc/sysconfig/asterisk ]; then install -m 644 contrib/init.d/etc_default_asterisk /etc/sysconfig/asterisk ; fi ;\
                        if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add asterisk; fi; \
                elif [ -f /etc/debian_version ]; then \
                        cat contrib/init.d/rc.debian.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > $(DESTDIR)/etc/init.d/asterisk ;\
                        chmod 755 $(DESTDIR)/etc/init.d/asterisk;\
+                       if [ ! -f /etc/default/asterisk ]; then install -m 644 contrib/init.d/etc_default_asterisk /etc/default/asterisk ; fi ;\
                        if [ -z "$(DESTDIR)" ]; then /usr/sbin/update-rc.d asterisk defaults 50 91; fi; \
                elif [ -f /etc/gentoo-release ]; then \
                        cat contrib/init.d/rc.gentoo.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > $(DESTDIR)/etc/init.d/asterisk ;\
@@ -832,10 +834,12 @@ config:
                elif [ -f /etc/mandrake-release -o -f /etc/mandriva-release ]; then \
                        cat contrib/init.d/rc.mandriva.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > $(DESTDIR)/etc/rc.d/init.d/asterisk ;\
                        chmod 755 $(DESTDIR)/etc/rc.d/init.d/asterisk;\
+                       if [ ! -f /etc/sysconfig/asterisk ]; then install -m 644 contrib/init.d/etc_default_asterisk /etc/sysconfig/asterisk ; fi ;\
                        if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add asterisk; fi; \
                elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then \
                        cat contrib/init.d/rc.suse.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > $(DESTDIR)/etc/init.d/asterisk ;\
                        chmod 755 $(DESTDIR)/etc/init.d/asterisk;\
+                       if [ ! -f /etc/sysconfig/asterisk ]; then install -m 644 contrib/init.d/etc_default_asterisk /etc/sysconfig/asterisk ; fi ;\
                        if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add asterisk; fi; \
                elif [ -f /etc/arch-release -o -f /etc/arch-release ]; then \
                        cat contrib/init.d/rc.archlinux.asterisk | sed 's|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;s|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > $(DESTDIR)/etc/rc.d/asterisk ;\