[asterisk-commits] Makefile: remove OSARCH check for init install (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon May 23 16:16:04 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: Makefile: remove OSARCH check for init install
......................................................................
Makefile: remove OSARCH check for init install
There are more specific checks for the platform.
Specifically this allows installing OS/X init scripts.
ASTERISK-26038 #close
Change-Id: If08933621145b10362a0cfe73c079301d9c13f50
Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
---
M Makefile
1 file changed, 49 insertions(+), 53 deletions(-)
Approvals:
George Joseph: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Matthew Fredrickson: Looks good to me, approved
Joshua Colp: Looks good to me, but someone else must approve
diff --git a/Makefile b/Makefile
index 7528f83..b988c8f 100644
--- a/Makefile
+++ b/Makefile
@@ -824,60 +824,56 @@
rm -f contrib/scripts/asterisk.logrotate.tmp
config:
- @if [ "${OSARCH}" = "linux-gnu" -o "${OSARCH}" = "kfreebsd-gnu" ]; then \
- if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
- ./build_tools/install_subst contrib/init.d/rc.redhat.asterisk "$(DESTDIR)/etc/rc.d/init.d/asterisk"; \
- if [ ! -f "$(DESTDIR)/etc/sysconfig/asterisk" ] ; then \
- $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
- fi ; \
- if [ -z "$(DESTDIR)" ] ; then \
- /sbin/chkconfig --add asterisk ; \
- fi ; \
- elif [ -f /etc/debian_version ] ; then \
- ./build_tools/install_subst contrib/init.d/rc.debian.asterisk "$(DESTDIR)/etc/init.d/asterisk"; \
- if [ ! -f "$(DESTDIR)/etc/default/asterisk" ] ; then \
- $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/default/asterisk" ; \
- fi ; \
- if [ -z "$(DESTDIR)" ] ; then \
- /usr/sbin/update-rc.d asterisk defaults 50 91 ; \
- fi ; \
- elif [ -f /etc/gentoo-release ] ; then \
- ./build_tools/install_subst contrib/init.d/rc.gentoo.asterisk "$(DESTDIR)/etc/init.d/asterisk"; \
- if [ -z "$(DESTDIR)" ] ; then \
- /sbin/rc-update add asterisk default ; \
- fi ; \
- elif [ -f /etc/mandrake-release -o -f /etc/mandriva-release ] ; then \
- ./build_tools/install_subst contrib/init.d/rc.mandriva.asterisk "$(DESTDIR)/etc/rc.d/init.d/asterisk"; \
- if [ ! -f /etc/sysconfig/asterisk ] ; then \
- $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
- fi ; \
- if [ -z "$(DESTDIR)" ] ; then \
- /sbin/chkconfig --add asterisk ; \
- fi ; \
- elif [ -f /etc/SuSE-release -o -f /etc/novell-release ] ; then \
- ./build_tools/install_subst contrib/init.d/rc.suse.asterisk "$(DESTDIR)/etc/init.d/asterisk"; \
- if [ ! -f /etc/sysconfig/asterisk ] ; then \
- $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
- fi ; \
- if [ -z "$(DESTDIR)" ] ; then \
- /sbin/chkconfig --add asterisk ; \
- fi ; \
- elif [ -f /etc/arch-release -o -f /etc/arch-release ] ; then \
- ./build_tools/install_subst contrib/init.d/rc.archlinux.asterisk "$(DESTDIR)/etc/init.d/asterisk"; \
- elif [ -d "$(DESTDIR)/Library/LaunchDaemons" ]; then \
- if [ ! -f "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist" ]; then \
- ./build_tools/install_subst contrib/init.d/org.asterisk.asterisk.plist "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist"; \
- fi; \
- if [ ! -f "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist" ]; then \
- ./build_tools/install_subst contrib/init.d/org.asterisk.muted.plist "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist"; \
- fi; \
- elif [ -f /etc/slackware-version ]; then \
- echo "Slackware is not currently supported, although an init script does exist for it."; \
- else \
- echo "We could not install init scripts for your distribution." ; \
- fi \
+ if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
+ ./build_tools/install_subst contrib/init.d/rc.redhat.asterisk "$(DESTDIR)/etc/rc.d/init.d/asterisk"; \
+ if [ ! -f "$(DESTDIR)/etc/sysconfig/asterisk" ] ; then \
+ $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
+ fi ; \
+ if [ -z "$(DESTDIR)" ] ; then \
+ /sbin/chkconfig --add asterisk ; \
+ fi ; \
+ elif [ -f /etc/debian_version ] ; then \
+ ./build_tools/install_subst contrib/init.d/rc.debian.asterisk "$(DESTDIR)/etc/init.d/asterisk"; \
+ if [ ! -f "$(DESTDIR)/etc/default/asterisk" ] ; then \
+ $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/default/asterisk" ; \
+ fi ; \
+ if [ -z "$(DESTDIR)" ] ; then \
+ /usr/sbin/update-rc.d asterisk defaults 50 91 ; \
+ fi ; \
+ elif [ -f /etc/gentoo-release ] ; then \
+ ./build_tools/install_subst contrib/init.d/rc.gentoo.asterisk "$(DESTDIR)/etc/init.d/asterisk"; \
+ if [ -z "$(DESTDIR)" ] ; then \
+ /sbin/rc-update add asterisk default ; \
+ fi ; \
+ elif [ -f /etc/mandrake-release -o -f /etc/mandriva-release ] ; then \
+ ./build_tools/install_subst contrib/init.d/rc.mandriva.asterisk "$(DESTDIR)/etc/rc.d/init.d/asterisk"; \
+ if [ ! -f /etc/sysconfig/asterisk ] ; then \
+ $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
+ fi ; \
+ if [ -z "$(DESTDIR)" ] ; then \
+ /sbin/chkconfig --add asterisk ; \
+ fi ; \
+ elif [ -f /etc/SuSE-release -o -f /etc/novell-release ] ; then \
+ ./build_tools/install_subst contrib/init.d/rc.suse.asterisk "$(DESTDIR)/etc/init.d/asterisk"; \
+ if [ ! -f /etc/sysconfig/asterisk ] ; then \
+ $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
+ fi ; \
+ if [ -z "$(DESTDIR)" ] ; then \
+ /sbin/chkconfig --add asterisk ; \
+ fi ; \
+ elif [ -f /etc/arch-release -o -f /etc/arch-release ] ; then \
+ ./build_tools/install_subst contrib/init.d/rc.archlinux.asterisk "$(DESTDIR)/etc/init.d/asterisk"; \
+ elif [ -d "$(DESTDIR)/Library/LaunchDaemons" ]; then \
+ if [ ! -f "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist" ]; then \
+ ./build_tools/install_subst contrib/init.d/org.asterisk.asterisk.plist "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist"; \
+ fi; \
+ if [ ! -f "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist" ]; then \
+ ./build_tools/install_subst contrib/init.d/org.asterisk.muted.plist "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist"; \
+ fi; \
+ elif [ -f /etc/slackware-version ]; then \
+ echo "Slackware is not currently supported, although an init script does exist for it."; \
else \
- echo "We could not install init scripts for your operating system." ; \
+ echo "We could not install init scripts for your distribution." ; \
fi
sounds:
--
To view, visit https://gerrit.asterisk.org/2873
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If08933621145b10362a0cfe73c079301d9c13f50
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
More information about the asterisk-commits
mailing list