]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
safe_asterisk: Overwrite old safe_asterisk on make install.
authorWalter Doekes <walter+asterisk@wjd.nu>
Thu, 12 Jun 2014 07:47:45 +0000 (07:47 +0000)
committerWalter Doekes <walter+asterisk@wjd.nu>
Thu, 12 Jun 2014 07:47:45 +0000 (07:47 +0000)
From now on, make install will overwrite safe_asterisk with the
latest version. You need to move any local modifications to files
inside /etc/asterisk/startup.d, if you have any.

See also commits r394939 and r397938.

ASTERISK-21965 #close
Patches:
  safe_asterisk.patch uploaded by jkister (License 6232, modified by me)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@415748 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile
UPGRADE.txt
contrib/scripts/safe_asterisk

index 3e10c319ca21bcdb28c6e5d3bd69f57c7a07cf85..3d7f49b5d9c243bc42d14ab3dd5c07a5a634f4d2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -569,8 +569,8 @@ main-bininstall:
 bininstall: _all installdirs $(SUBDIRS_INSTALL) main-bininstall
        $(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/"
        $(INSTALL) -m 755 contrib/scripts/autosupport "$(DESTDIR)$(ASTSBINDIR)/"
-       if [ ! -f "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk" -a ! -f /sbin/launchd ]; then \
-               cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;s|__ASTERISK_LOG_DIR__|$(ASTLOGDIR)|;' > contrib/scripts/safe.tmp ; \
+       if [ ! -f /sbin/launchd ]; then \
+               cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;s|__ASTERISK_LOG_DIR__|$(ASTLOGDIR)|;s|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;' > contrib/scripts/safe.tmp ; \
                $(INSTALL) -m 755 contrib/scripts/safe.tmp "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk" ; \
                rm -f contrib/scripts/safe.tmp ; \
        fi
index d3e2f4fbf9f4bc4ffd8b77ee55cd5bd42c21641b..fd8a516d110a047cd983f3a20653d312e39ed806 100644 (file)
 
 From 12.3.0 to 12.4.0:
 
+ - The safe_asterisk script was previously not installed on top of an existing
+   version. This caused bug-fixes in that script not to be deployed. If your
+   safe_asterisk script is customized, be sure to keep your changes. Custom
+   values for variables should be created in *.sh file(s) inside
+   ASTETCDIR/startup.d/. See ASTERISK-21965.
  - Changed a log message in safe_asterisk and the $NOTIFY mail subject. If
    you use tools to parse either of them, update your parse functions
    accordingly. The changed strings are:
index 8901d8a83557f99e536bba9c26074adf09099e28..de24d1b288a06600775a9215b56a59487317337f 100644 (file)
@@ -1,5 +1,6 @@
 #!/bin/sh
 
+ASTETCDIR="__ASTERISK_ETC_DIR__"
 ASTSBINDIR="__ASTERISK_SBIN_DIR__"
 ASTVARRUNDIR="__ASTERISK_VARRUN_DIR__"
 ASTVARLOGDIR="__ASTERISK_LOG_DIR__"
@@ -146,10 +147,10 @@ trap '' PIPE
 # Run scripts to set any environment variables or do any other system-specific setup needed
 #
 
-if test -d /etc/asterisk/startup.d; then
-       for script in /etc/asterisk/startup.d/*.sh; do
-               if test -r ${script}; then
-                       . ${script}
+if test -d "${ASTETCDIR}/startup.d"; then
+       for script in "${ASTETCDIR}/startup.d/"*.sh; do
+               if test -r "${script}"; then
+                       . "${script}"
                fi
        done
 fi