diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-15 20:15:51 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-15 20:15:51 +0000 |
commit | 18961dffe9d4ee7a1fa9d9ae5af6e0912ea1b40f (patch) | |
tree | abc028f27383f0ffab4d719df038fcfed546caf9 /Makefile | |
parent | 631883ca458c2d5123441abe05c475d398e577d5 (diff) |
Properly use DESTDIR in 'config' target.
Do not try to run chkconfig or similar if using DESTDIR.
Issue 10938, patch by cabal95.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85684 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -621,20 +621,20 @@ progdocs: config: @if [ "${OSARCH}" = "linux-gnu" ]; then \ if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \ - $(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \ - /sbin/chkconfig --add asterisk; \ + $(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk $(DESTDIR)/etc/rc.d/init.d/asterisk; \ + if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add asterisk; fi; \ 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 .; \ + $(INSTALL) -m 755 contrib/init.d/rc.debian.asterisk $(DESTDIR)/etc/init.d/asterisk; \ + if [ -z "$(DESTDIR)" ]; then /usr/sbin/update-rc.d asterisk start 10 2 3 4 5 . stop 91 2 3 4 5 .; fi; \ elif [ -f /etc/gentoo-release ]; then \ - $(INSTALL) -m 755 contrib/init.d/rc.gentoo.asterisk /etc/init.d/asterisk; \ - /sbin/rc-update add asterisk default; \ + $(INSTALL) -m 755 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 ]; then \ - $(INSTALL) -m 755 contrib/init.d/rc.mandrake.asterisk /etc/rc.d/init.d/asterisk; \ - /sbin/chkconfig --add asterisk; \ + $(INSTALL) -m 755 contrib/init.d/rc.mandrake.asterisk $(DESTDIR)/etc/rc.d/init.d/asterisk; \ + if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add asterisk; fi; \ elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then \ - $(INSTALL) -m 755 contrib/init.d/rc.suse.asterisk /etc/init.d/asterisk; \ - /sbin/chkconfig --add asterisk; \ + $(INSTALL) -m 755 contrib/init.d/rc.suse.asterisk $(DESTDIR)/etc/init.d/asterisk; \ + if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add asterisk; fi; \ elif [ -f /etc/slackware-version ]; then \ echo "Slackware is not currently supported, although an init script does exist for it." \ else \ |