Package: tomcat6 Version: 6.0.28-10 Severity: wishlist Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu natty ubuntu-patch
In Ubuntu, the attached patch was applied to achieve the following: [ Abhinav Upadhyay ] * tomcat6-instance-create should accept -1 as the value of -c option as per http://tomcat.apache.org/tomcat-6.0-doc/config/server.html (LP: #707405) Thanks for considering the patch. -- System Information: Debian Release: squeeze/sid APT prefers natty-updates APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 'natty') Architecture: amd64 (x86_64) Kernel: Linux 2.6.38-5-generic (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
=== modified file 'debian/tomcat6-instance-create' --- debian/tomcat6-instance-create 2010-05-21 13:51:15 +0000 +++ debian/tomcat6-instance-create 2011-03-09 18:10:34 +0000 @@ -23,11 +23,22 @@ type=$1 port=$2 # Fail if port is non-numeric - num=`expr ${port} + 1 2> /dev/null` - if [ $? != 0 ] || [ $num -lt 2 ]; then + if ! echo $port | grep -Eq '^\-?[0-9]+$' ; then echo "Error: ${type} port '${port}' is not a valid TCP port number." exit 1 fi + + # If Control port is -1 , no need to check any further. + if [ "$type" = "Control" ] && [ $port -eq -1 ]; then + echo "Warning: Control port disabled. You will have to shutdown the server manually, by using OS signals." + return + fi + + # Fail if port is 0 or negative + if [ $port -le 0 ]; then + echo "Error: ${type} port '${port}' is not a valid TCP port number." + exit 1 + fi # Fail if port is above 65535 if [ ${port} -gt 65535 ]; then