From: Nigel Metheringham Date: Fri, 30 Oct 2009 15:14:04 +0000 (+0000) Subject: Change "expr" to "expr --" in all shell scripts. Fixes: #889 X-Git-Tag: exim-4_70_RC3~6 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/17792b53d16f2061cb7350001e81c995bac6a9eb Change "expr" to "expr --" in all shell scripts. Fixes: #889 --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 42a5926e4..8e6d5b0c4 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.584 2009/10/30 15:08:25 nm4 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.585 2009/10/30 15:14:04 nm4 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -139,6 +139,9 @@ NM/30 Bugzilla 888: TLS documentation bugfixes NM/31 Bugzilla 896: Dovecot buffer overrun fix +NM/32 Bugzilla 889: Change all instances of "expr" in shell scripts to "expr --" + Unlike the original bugzilla I have changed all shell scripts in src tree + Exim version 4.69 ----------------- diff --git a/src/scripts/exim_install b/src/scripts/exim_install index 2f70c6e35..616ab3c16 100755 --- a/src/scripts/exim_install +++ b/src/scripts/exim_install @@ -1,5 +1,5 @@ #! /bin/sh -# $Cambridge: exim/src/scripts/exim_install,v 1.2 2005/09/06 13:18:13 ph10 Exp $ +# $Cambridge: exim/src/scripts/exim_install,v 1.3 2009/10/30 15:14:04 nm4 Exp $ # Script to install Exim binaries in BIN_DIRECTORY, which is defined in # the local Makefile. It expects to be run in a build directory. It needs @@ -378,7 +378,7 @@ done echo $com "" -if [ `expr "${CONFIGURE_FILE}" : ".*:"` -ne 0 ] ; then +if [ `expr -- "${CONFIGURE_FILE}" : ".*:"` -ne 0 ] ; then echo $com Runtime configuration is specified as the following list: echo $com ' ' ${CONFIGURE_FILE} echo $com Therefore, skipping automatic installation. diff --git a/src/src/exicyclog.src b/src/src/exicyclog.src index c1af5d179..097de7eaa 100644 --- a/src/src/exicyclog.src +++ b/src/src/exicyclog.src @@ -1,5 +1,5 @@ #! /bin/sh -# $Cambridge: exim/src/src/exicyclog.src,v 1.9 2009/01/20 16:06:14 fanf2 Exp $ +# $Cambridge: exim/src/src/exicyclog.src,v 1.10 2009/10/30 15:14:04 nm4 Exp $ # Copyright (c) 2006 University of Cambridge. # See the file NOTICE for conditions of use and distribution. @@ -251,7 +251,7 @@ count=$keep if [ $count -lt 10 ]; then countt=0$count; else countt=$count; fi while [ $count -gt 1 ]; do - old=`expr $count - 1` + old=`expr -- $count - 1` if [ $keep -gt 99 ]; then if [ $old -lt 10 ]; then oldt=00$old elif [ $old -lt 100 ]; then oldt=0$old @@ -334,7 +334,7 @@ while [ $count -le $keep ]; do $chown $user:$group $paniclog.$countt.$suffix fi - count=`expr $count + 1` + count=`expr -- $count + 1` done # End of exicyclog diff --git a/src/src/exinext.src b/src/src/exinext.src index 7fe80c796..80d636972 100644 --- a/src/src/exinext.src +++ b/src/src/exinext.src @@ -1,5 +1,5 @@ #! /bin/sh -# $Cambridge: exim/src/src/exinext.src,v 1.3 2007/07/29 21:49:46 magnus Exp $ +# $Cambridge: exim/src/src/exinext.src,v 1.4 2009/10/30 15:14:04 nm4 Exp $ # Copyright (c) 1996-2004 University of Cambridge. # See the file NOTICE for conditions of use and distribution. @@ -26,16 +26,16 @@ config= eximmacdef= exim_path= -if expr $1 : '\-' >/dev/null ; then - while expr $1 : '\-' >/dev/null ; do +if expr -- $1 : '\-' >/dev/null ; then + while expr -- $1 : '\-' >/dev/null ; do if [ "$1" = "-C" ]; then config=$2 shift shift - elif expr $1 : '\-D' >/dev/null ; then + elif expr -- $1 : '\-D' >/dev/null ; then eximmacdef="$eximmacdef $1" - if expr $1 : '\-DEXIM_PATH=' >/dev/null ; then - exim_path=`expr $1 : '\-DEXIM_PATH=\(.*\)'` + if expr -- $1 : '\-DEXIM_PATH=' >/dev/null ; then + exim_path=`expr -- $1 : '\-DEXIM_PATH=\(.*\)'` fi shift else