Skip to content
Snippets Groups Projects
Commit 056d4010 authored by Russell Bryant's avatar Russell Bryant
Browse files

Comment out LD_ASSUME_KERNEL by default.

Print error messages if asterisk executable or the asterisk configuration
directory is not found. (issue #5785, #5708)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 0d341e06
No related branches found
No related tags found
No related merge requests found
#! /bin/sh #! /bin/sh
# $Id: asterisk,v 1.2 2004/07/18 20:24:07 Gregory Boehnlein <damin@nacs.net> # $Id: asterisk,v 1.3 2005/11/17 22:30:01 Gregory Boehnlein <damin@nacs.net>
# #
# asterisk start the asterisk PBX # asterisk start the asterisk PBX
# #
# Thu Nov 17 2005 Gregory Boehnlein <damin@nacs.net>
# - Updated Version to 1.3
# - Reversed behavior of LD_ASSUME_KERNEL=2.4.1
# - Added detailed failure messages
#
# Sun Jul 18 2004 Gregory Boehnlein <damin@nacs.net> # Sun Jul 18 2004 Gregory Boehnlein <damin@nacs.net>
# - Updated Version to 1.2 # - Updated Version to 1.2
# - Added test for safe_asterisk # - Added test for safe_asterisk
...@@ -19,8 +24,8 @@ DAEMON=/usr/sbin/asterisk ...@@ -19,8 +24,8 @@ DAEMON=/usr/sbin/asterisk
# Full path to safe_asterisk script # Full path to safe_asterisk script
SAFE_ASTERISK=/usr/sbin/safe_asterisk SAFE_ASTERISK=/usr/sbin/safe_asterisk
# Leave this set unless you know what you are doing. # Uncomment this ONLY if you know what you are doing.
export LD_ASSUME_KERNEL=2.4.1 # export LD_ASSUME_KERNEL=2.4.1
# Uncomment the following and set them to the user/groups that you # Uncomment the following and set them to the user/groups that you
# want to run Asterisk as. NOTE: this requires substantial work to # want to run Asterisk as. NOTE: this requires substantial work to
...@@ -30,7 +35,15 @@ export LD_ASSUME_KERNEL=2.4.1 ...@@ -30,7 +35,15 @@ export LD_ASSUME_KERNEL=2.4.1
#AST_USER="asterisk" #AST_USER="asterisk"
#AST_GROUP="asterisk" #AST_GROUP="asterisk"
test -x $DAEMON || exit 0 if ! [ -x $DAEMON ] ; then
echo "ERROR: /usr/sbin/asterisk not found"
exit 0
fi
if ! [ -d /etc/asterisk ] ; then
echo "ERROR: /etc/asterisk directory not found"
exit 0
fi
set -e set -e
......
#!/bin/sh #!/bin/sh
# $Id: asterisk,v 1.2 2004/07/18 20:24:07 Gregory Boehnlein <damin@nacs.net> # $Id: asterisk,v 1.3 2005/11/17 22:30:01 Gregory Boehnlein <damin@nacs.net>
# #
# asterisk Starts, Stops and Reloads Asterisk. # asterisk Starts, Stops and Reloads Asterisk.
# #
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
# processname: asterisk # processname: asterisk
# pidfile: /var/run/asterisk.pid # pidfile: /var/run/asterisk.pid
# #
# Thu Nov 17 2005 Gregory Boehnlein <damin@nacs.net>
# - Updated Version to 1.3
# - Reversed behavior of LD_ASSUME_KERNEL=2.4.1
# - Added detailed failure messages
#
# Sun Jul 18 2004 Gregory Boehnlein <damin@nacs.net> # Sun Jul 18 2004 Gregory Boehnlein <damin@nacs.net>
# - Updated Version to 1.2 # - Updated Version to 1.2
# - Added test for safe_asterisk # - Added test for safe_asterisk
...@@ -18,11 +23,18 @@ ...@@ -18,11 +23,18 @@
# Source function library. # Source function library.
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
[ -x /usr/sbin/asterisk ] || exit 0 if ! [ -x /usr/sbin/asterisk ] ; then
[ -d /etc/asterisk ] || exit 0 echo "ERROR: /usr/sbin/asterisk not found"
exit 0
fi
if ! [ -d /etc/asterisk ] ; then
echo "ERROR: /etc/asterisk directory not found"
exit 0
fi
# Leave this set unless you know what you are doing. # Uncomment this ONLY if you know what you are doing.
export LD_ASSUME_KERNEL=2.4.1 # export LD_ASSUME_KERNEL=2.4.1
# Full path to asterisk binary # Full path to asterisk binary
DAEMON=/usr/sbin/asterisk DAEMON=/usr/sbin/asterisk
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment