mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-26 22:30:28 +00:00
Revert r394939 due to (numerous) objections
The patch from ASTERISK-21965 was committed perhaps a bit too hastily. Walter and Tzafrir have pointed out numerous issues with the approach and have propsed an alternative in r/2757. Since it's not a time critical issue and is not worth holding up the release of 12 for it, I've gone ahead and reverted r394939 from 12/trunk and re-opened ASTERISK-21965. ........ Merged revisions 397938 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
10
CHANGES
10
CHANGES
@@ -1108,16 +1108,6 @@ Realtime/Database Scripts
|
|||||||
|
|
||||||
See contrib/ast-db-manage/README.md for more details.
|
See contrib/ast-db-manage/README.md for more details.
|
||||||
|
|
||||||
safe_asterisk
|
|
||||||
------------------
|
|
||||||
* The safe_asterisk script will now install over previously installations.
|
|
||||||
In previous versions of Asterisk, once installed a 'make install' would
|
|
||||||
skip over safe_asterisk if it was already installed.
|
|
||||||
|
|
||||||
* Certain options in safe_asterisk can now be configured from the
|
|
||||||
safe_asterisk.conf file. A sample version of this is located in the
|
|
||||||
configs/ folder.
|
|
||||||
|
|
||||||
sip_to_res_pjsip.py
|
sip_to_res_pjsip.py
|
||||||
-------------------
|
-------------------
|
||||||
* A new script has been added in the contrib/scripts/sip_to_res_pjsip folder.
|
* A new script has been added in the contrib/scripts/sip_to_res_pjsip folder.
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -561,8 +561,8 @@ main-bininstall:
|
|||||||
bininstall: _all installdirs $(SUBDIRS_INSTALL) main-bininstall
|
bininstall: _all installdirs $(SUBDIRS_INSTALL) main-bininstall
|
||||||
$(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/"
|
$(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/"
|
||||||
$(INSTALL) -m 755 contrib/scripts/autosupport "$(DESTDIR)$(ASTSBINDIR)/"
|
$(INSTALL) -m 755 contrib/scripts/autosupport "$(DESTDIR)$(ASTSBINDIR)/"
|
||||||
if [ ! -f /sbin/launchd ]; then \
|
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)|;s|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;' > contrib/scripts/safe.tmp ; \
|
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 ; \
|
||||||
$(INSTALL) -m 755 contrib/scripts/safe.tmp "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk" ; \
|
$(INSTALL) -m 755 contrib/scripts/safe.tmp "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk" ; \
|
||||||
rm -f contrib/scripts/safe.tmp ; \
|
rm -f contrib/scripts/safe.tmp ; \
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
Used by safe_asterisk startup script
|
|
||||||
|
|
||||||
# comment this line out to have this script _not_ kill all mpg123 processes when
|
|
||||||
# asterisk exits
|
|
||||||
KILLALLMPG123=1
|
|
||||||
|
|
||||||
# run asterisk with this priority
|
|
||||||
PRIORITY=0
|
|
||||||
|
|
||||||
# set system filemax on supported OSes if this variable is set
|
|
||||||
# SYSMAXFILES=262144
|
|
||||||
|
|
||||||
# Asterisk allows full permissions by default, so set a umask, if you want
|
|
||||||
# restricted permissions.
|
|
||||||
# UMASK=022
|
|
||||||
|
|
||||||
# set max files open with ulimit. On linux systems, this will be automatically
|
|
||||||
# set to the system's maximum files open devided by two, if not set here.
|
|
||||||
# MAXFILES=32768
|
|
||||||
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# vim:textwidth=80:tabstop=4:shiftwidth=4:smartindent:autoindent
|
# vim:textwidth=80:tabstop=4:shiftwidth=4:smartindent:autoindent
|
||||||
|
|
||||||
ASTETCDIR=__ASTERISK_ETC_DIR__
|
|
||||||
ASTSBINDIR=__ASTERISK_SBIN_DIR__
|
ASTSBINDIR=__ASTERISK_SBIN_DIR__
|
||||||
ASTVARRUNDIR=__ASTERISK_VARRUN_DIR__
|
ASTVARRUNDIR=__ASTERISK_VARRUN_DIR__
|
||||||
ASTVARLOGDIR=__ASTERISK_LOG_DIR__
|
ASTVARLOGDIR=__ASTERISK_LOG_DIR__
|
||||||
@@ -20,32 +19,23 @@ RUNDIR=${RUNDIR:-/tmp}
|
|||||||
SLEEPSECS=4
|
SLEEPSECS=4
|
||||||
ASTPIDFILE=${ASTVARRUNDIR}/asterisk.pid
|
ASTPIDFILE=${ASTVARRUNDIR}/asterisk.pid
|
||||||
|
|
||||||
# Obtain parameters from the safe_asterisk.conf file in the
|
# comment this line out to have this script _not_ kill all mpg123 processes when
|
||||||
# ASTETCDIR directory
|
# asterisk exits
|
||||||
|
KILLALLMPG123=1
|
||||||
|
|
||||||
kvalue=`grep ^KILLALLMPG123= $ASTETCDIR 2>/dev/null | cut -c 15`
|
# run asterisk with this priority
|
||||||
if test "x$kvalue" != "x" ; then
|
PRIORITY=0
|
||||||
KILLALLMPG123=$kvalue
|
|
||||||
else
|
|
||||||
KILLALLMPG123=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
pvalue=`grep ^PRIORITY= $ASTETCDIR 2>/dev/null | cut -c 10`
|
# set system filemax on supported OSes if this variable is set
|
||||||
if test "x$pvalue" != "x" ; then
|
# SYSMAXFILES=262144
|
||||||
PRIORITY=$pvalue
|
|
||||||
else
|
|
||||||
PRIORITY=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
svalue=`grep ^SYSMAXFILES= $ASTETCDIR 2>/dev/null | cut -c 13-21`
|
# Asterisk allows full permissions by default, so set a umask, if you want
|
||||||
if test "x$svalue" != "x" ; then
|
# restricted permissions.
|
||||||
SYSMAXFILES=$svalue
|
#UMASK=022
|
||||||
fi
|
|
||||||
|
|
||||||
mvalue=`grep ^MAXFILES= $ASTETCDIR 2>/dev/null | cut -c 10-15`
|
# set max files open with ulimit. On linux systems, this will be automatically
|
||||||
if test "x$mvalue" != "x" ; then
|
# set to the system's maximum files open devided by two, if not set here.
|
||||||
MAXFILES=$mvalue
|
# MAXFILES=32768
|
||||||
fi
|
|
||||||
|
|
||||||
message() {
|
message() {
|
||||||
echo "$1" >&2
|
echo "$1" >&2
|
||||||
@@ -106,10 +96,8 @@ else
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "x$UMASK" != "x"; then
|
||||||
uvalue=`grep ^UMASK= $ASTETCDIR 2>/dev/null | cut -c 7-10`
|
umask $UMASK
|
||||||
if test "x$uvalue" != "x" ; then
|
|
||||||
umask $uvalue
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user