[asterisk-commits] trunk - r7241 in /trunk/contrib/init.d: rc.debian.asterisk rc.redhat.asterisk

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Nov 30 15:22:40 CST 2005


Author: russell
Date: Wed Nov 30 15:22:38 2005
New Revision: 7241

URL: http://svn.digium.com/view/asterisk?rev=7241&view=rev
Log:
Comment out LD_ASSUME_KERNEL by default.
Print error messages if asterisk executable or the asterisk configuration
directory is not found. (issue #5785, #5708)

Modified:
    trunk/contrib/init.d/rc.debian.asterisk
    trunk/contrib/init.d/rc.redhat.asterisk

Modified: trunk/contrib/init.d/rc.debian.asterisk
URL: http://svn.digium.com/view/asterisk/trunk/contrib/init.d/rc.debian.asterisk?rev=7241&r1=7240&r2=7241&view=diff
==============================================================================
--- trunk/contrib/init.d/rc.debian.asterisk (original)
+++ trunk/contrib/init.d/rc.debian.asterisk Wed Nov 30 15:22:38 2005
@@ -1,7 +1,12 @@
 #! /bin/sh
-# $Id: asterisk,v 1.2 2004/07/18 20:24:07 Gregory Boehnlein <damin at nacs.net>
+# $Id: asterisk,v 1.3 2005/11/17 22:30:01 Gregory Boehnlein <damin at nacs.net>
 #
 # asterisk	start the asterisk PBX
+#
+# Thu Nov 17 2005 Gregory Boehnlein <damin at 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 at nacs.net>
 # - Updated Version to 1.2
@@ -19,8 +24,8 @@
 # Full path to safe_asterisk script
 SAFE_ASTERISK=/usr/sbin/safe_asterisk
 
-# Leave this set unless you know what you are doing.
-export LD_ASSUME_KERNEL=2.4.1
+# Uncomment this ONLY if you know what you are doing.
+# export LD_ASSUME_KERNEL=2.4.1
 
 # Uncomment the following and set them to the user/groups that you
 # want to run Asterisk as. NOTE: this requires substantial work to
@@ -30,7 +35,15 @@
 #AST_USER="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
 

Modified: trunk/contrib/init.d/rc.redhat.asterisk
URL: http://svn.digium.com/view/asterisk/trunk/contrib/init.d/rc.redhat.asterisk?rev=7241&r1=7240&r2=7241&view=diff
==============================================================================
--- trunk/contrib/init.d/rc.redhat.asterisk (original)
+++ trunk/contrib/init.d/rc.redhat.asterisk Wed Nov 30 15:22:38 2005
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: asterisk,v 1.2 2004/07/18 20:24:07 Gregory Boehnlein <damin at nacs.net>
+# $Id: asterisk,v 1.3 2005/11/17 22:30:01 Gregory Boehnlein <damin at nacs.net>
 #
 # asterisk    Starts, Stops and Reloads Asterisk.
 #
@@ -7,6 +7,11 @@
 # description: Asterisk PBX and telephony daemon.
 # processname: asterisk
 # pidfile: /var/run/asterisk.pid
+#
+# Thu Nov 17 2005 Gregory Boehnlein <damin at 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 at nacs.net>
 # - Updated Version to 1.2
@@ -18,11 +23,18 @@
 # Source function library.
 . /etc/rc.d/init.d/functions
 
-[ -x /usr/sbin/asterisk ] || exit 0
-[ -d /etc/asterisk ] || exit 0
+if ! [ -x /usr/sbin/asterisk ] ; then
+	echo "ERROR: /usr/sbin/asterisk not found"
+	exit 0
+fi
 
-# Leave this set unless you know what you are doing.
-export LD_ASSUME_KERNEL=2.4.1
+if ! [ -d /etc/asterisk ] ; then
+	echo "ERROR: /etc/asterisk directory not found"
+	exit 0
+fi
+
+# Uncomment this ONLY if you know what you are doing.
+# export LD_ASSUME_KERNEL=2.4.1
 
 # Full path to asterisk binary
 DAEMON=/usr/sbin/asterisk



More information about the asterisk-commits mailing list