Commits

Anonymous committed 438d334 Draft

Merge revision 269347. Update ChangeLog and .version files.

Comments (0)

Files changed (4)

-1.6.2.9-rc2
+1.6.2.9-rc3
+2010-06-09  Leif Madsen <lmadsen@digium.com>
+
+	* Asterisk 1.6.2.9-rc3 Released.
+
+2010-06-09  Paul Belanger <paul.belanger@polybeacon.com>
+
+	* Fix Debian init script to not use -c.
+
+	  When using the init script as-is currently, it could cause issues on Debian
+	  such as high CPU usage. This fix has worked for several people so I'm
+	  implementing the change. We now handle color displays properly.
+
+	  (closes issue 0016784)
+	  Reported by: pabelanger
+	  Patches:
+	        20100530__issue16784__2.diff.txt uploaded by tilghman (license 14)
+	  Tested by: pabelanger, tilghman
+
 2010-06-07  Leif Madsen <lmadsen@digium.com>
 
 	* Asterisk 1.6.2.9-rc2 Released.

contrib/init.d/rc.debian.asterisk

         exit 0
 fi
 
-# Use the LSB standar functions for services management
+# Use the LSB standard functions for services management
 . /lib/lsb/init-functions
 
 case "$1" in
 	if [ ! -d $ASTVARRUNDIR ]; then
 		mkdir -p $ASTVARRUNDIR
 	fi
-
 	if [ $AST_USER ] ; then
 		ASTARGS="-U $AST_USER"
 		chown $AST_USER $ASTVARRUNDIR
 		ASTARGS="$ASTARGS -G $AST_GROUP"
 		chgrp $AST_GROUP $ASTVARRUNDIR
 	fi
+	if test "x$COLOR" = "xno" ; then
+		ASTARGS="$ASTARGS -n"
+	fi
 	# "start-stop-daemon --oknodo" returns 0 even if Asterisk was already running (as LSB expects):
-	if test "x$COLOR" = "xyes" ; then
-		export TERM=linux
-		start-stop-daemon --start --oknodo --background --exec $DAEMON -- $ASTARGS -c
-	else
-		start-stop-daemon --start --oknodo --exec $DAEMON -- $ASTARGS
-	fi
+	start-stop-daemon --start --oknodo --exec $DAEMON -- $ASTARGS
 	log_end_msg $?
 	;;
   stop)
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2010, Digium, Inc.
  *
  * Mark Spencer <markster@digium.com>
  *
 
 /*! \file
  *
- * \brief Terminal Routines 
+ * \brief Terminal Routines
  *
- * \author Mark Spencer <markster@digium.com> 
+ * \author Mark Spencer <markster@digium.com>
  */
 
 #include "asterisk.h"
 	char buffer[512] = "";
 	int termfd = -1, parseokay = 0, i;
 
-	if (!term)
+	if (ast_opt_no_color) {
 		return 0;
-	if (!ast_opt_console || ast_opt_no_color || !ast_opt_no_fork)
+	}
+
+	if (!ast_opt_console) {
+		/* If any remote console is not compatible, we'll strip the color codes at that point */
+		vt100compat = 1;
+		goto end;
+	}
+
+	if (!term) {
 		return 0;
+	}
 
-	for (i=0 ;; i++) {
+	for (i = 0;; i++) {
 		if (termpath[i] == NULL) {
 			break;
 		}
 		}
 	}
 
+end:
 	if (vt100compat) {
 		/* Make commands show up in nice colors */
 		if (ast_opt_light_background) {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.