diff options
author | mboelen <michael@cisofy.com> | 2016-03-08 10:47:25 +0300 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2016-03-08 10:47:25 +0300 |
commit | 62f31a8b82c5383285071f91a9ff30b8f3316e10 (patch) | |
tree | 48b23ea3a66eff821bf962fb7eded56f83072831 /include | |
parent | 94d0aaf8d4cc7066f15c181652fff8ebc74446d0 (diff) |
SSH-7408: use only the last occurrence of a configured option
Diffstat (limited to 'include')
-rw-r--r-- | include/tests_ssh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/tests_ssh b/include/tests_ssh index 922daf21..ff0a3811 100644 --- a/include/tests_ssh +++ b/include/tests_ssh @@ -129,7 +129,8 @@ WEAKVALUE=`echo ${I} | cut -d ':' -f2 | cut -d',' -f3` TESTTYPE=`echo ${I} | cut -d ':' -f3` RESULT="NONE" - FOUNDVALUE=`awk -v OPT="${OPTIONNAME}" 'index($0, OPT) == 1 { print toupper($2) }' ${SSH_DAEMON_CONFIG}` + # Get value and use the last occurrence + FOUNDVALUE=`awk -v OPT="${OPTIONNAME}" 'index($0, OPT) == 1 { print toupper($2) }' ${SSH_DAEMON_CONFIG} | tail -1` LogText "Test: Checking ${OPTIONNAME} in ${SSH_DAEMON_CONFIG}" if [ ! "${FOUNDVALUE}" = "" ]; then |