From: Francis Dupont Date: Fri, 5 Aug 2022 08:44:17 +0000 (+0200) Subject: [#2071] Replaced ${@} by $@ for dash X-Git-Tag: Kea-2.3.0~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7f0df803fd0bb311326353c8d1a85a6ce522161c;p=thirdparty%2Fkea.git [#2071] Replaced ${@} by $@ for dash --- diff --git a/src/bin/admin/tests/mysql_tests.sh.in b/src/bin/admin/tests/mysql_tests.sh.in index 65b88a2916..8216bc8b17 100644 --- a/src/bin/admin/tests/mysql_tests.sh.in +++ b/src/bin/admin/tests/mysql_tests.sh.in @@ -1358,7 +1358,7 @@ mysql_lease4_dump_test() { "${output_file}.tmp" \ "/tmp/$(basename "${output_file}").tmp" \ ; do - if printf '%s' "${@}" | grep 'y' > /dev/null; then + if printf '%s' "$@" | grep 'y' > /dev/null; then touch "${i}" else rm -f "${i}" @@ -1387,7 +1387,7 @@ insert into lease4 values(12,22,NULL,40,(SELECT FROM_UNIXTIME(1643212345)),50,1, # Dump lease4 to output_file run_command \ "${kea_admin}" lease-dump mysql -4 -u "${db_user}" -p "${db_password}" -n "${db_name}" \ - -d "${db_scripts_dir}" -o "${output_file}" "${@}" + -d "${db_scripts_dir}" -o "${output_file}" "$@" assert_eq 0 "${EXIT_CODE}" "kea-admin lease-dump -4 failed, expected exit code %d, actual %d" # Compare the dump output to reference file, they should be identical @@ -1422,7 +1422,7 @@ mysql_lease6_dump_test() { "${output_file}.tmp" \ "/tmp/$(basename "${output_file}").tmp" \ ; do - if printf '%s' "${@}" | grep 'y' > /dev/null; then + if printf '%s' "$@" | grep 'y' > /dev/null; then touch "${i}" else rm -f "${i}" @@ -1450,7 +1450,7 @@ insert into lease6 values('::12',22,30,(SELECT FROM_UNIXTIME(1643212345)),40,50, # Dump lease4 to output_file run_command \ "${kea_admin}" lease-dump mysql -6 -u "${db_user}" -p "${db_password}" -n "${db_name}" \ - -d "${db_scripts_dir}" -o "${output_file}" "${@}" + -d "${db_scripts_dir}" -o "${output_file}" "$@" assert_eq 0 "${EXIT_CODE}" "kea-admin lease-dump -6 failed, expected exit code %d, actual %d" # Compare the dump output to reference file, they should be identical @@ -1493,7 +1493,7 @@ mysql_lease4_upload_test() { "${output_file}.tmp" \ "/tmp/$(basename "${input_file}").tmp" \ ; do - if printf '%s' "${@}" | grep 'y' > /dev/null; then + if printf '%s' "$@" | grep 'y' > /dev/null; then touch "${i}" else rm -f "${i}" @@ -1510,14 +1510,14 @@ mysql_lease4_upload_test() { run_command \ "${kea_admin}" lease-upload mysql -4 -u "${db_user}" \ -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}" \ - -i "${input_file}" "${@}" + -i "${input_file}" "$@" assert_eq 0 "${EXIT_CODE}" "kea-admin lease-upload -4 failed, expected exit code %d, actual %d" # Dump leases. run_command \ "${kea_admin}" lease-dump mysql -4 -u "${db_user}" \ -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}" \ - -o "${output_file}" "${@}" + -o "${output_file}" "$@" assert_eq 0 "${EXIT_CODE}" "kea-admin lease-dump -4 failed, expected exit code %d, actual %d" # Compare the initial file used for upload to the file retrieved from dump, they should be identical. @@ -1564,7 +1564,7 @@ mysql_lease6_upload_test() { "${output_file}.tmp" \ "/tmp/$(basename "${input_file}").tmp" \ ; do - if printf '%s' "${@}" | grep 'y' > /dev/null; then + if printf '%s' "$@" | grep 'y' > /dev/null; then touch "${i}" else rm -f "${i}" @@ -1581,14 +1581,14 @@ mysql_lease6_upload_test() { run_command \ "${kea_admin}" lease-upload mysql -6 -u "${db_user}" \ -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}" \ - -i "${input_file}" "${@}" + -i "${input_file}" "$@" assert_eq 0 "${EXIT_CODE}" "kea-admin lease-upload -6 failed, expected exit code %d, actual %d" # Dump leases. run_command \ "${kea_admin}" lease-dump mysql -6 -u "${db_user}" \ -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}" \ - -o "${output_file}" "${@}" + -o "${output_file}" "$@" assert_eq 0 "${EXIT_CODE}" "kea-admin lease-dump -6 failed, expected exit code %d, actual %d" # Compare the initial file used for upload to the file retrieved from dump, they should be identical. diff --git a/src/bin/admin/tests/pgsql_tests.sh.in b/src/bin/admin/tests/pgsql_tests.sh.in index 862dbcd22d..b9fbcb1fc3 100644 --- a/src/bin/admin/tests/pgsql_tests.sh.in +++ b/src/bin/admin/tests/pgsql_tests.sh.in @@ -844,7 +844,7 @@ pgsql_lease4_dump_test() { # Clean up any test files left from prior failed runs unless -y was provided in which case # explicitly create the file to check that it will be automatically deleted. # files should be removed by kea-admin itself. - if printf '%s' "${@}" | grep 'y' > /dev/null; then + if printf '%s' "$@" | grep 'y' > /dev/null; then touch "${output_file}" touch "${output_file}.tmp" else @@ -875,7 +875,7 @@ insert into lease4 values(12,E'\\\\x3232','',40,TO_TIMESTAMP(1643212345),50,'t', # Dump lease4 to output_file run_command \ "${kea_admin}" lease-dump pgsql -4 -u "${db_user}" -p "${db_password}" -n "${db_name}" \ - -d "${db_scripts_dir}" -o "${output_file}" "${@}" + -d "${db_scripts_dir}" -o "${output_file}" "$@" assert_eq 0 "${EXIT_CODE}" "kea-admin lease-dump -4 failed, expected exit code %d, actual %d" # Compare the dump output to reference file, they should be identical @@ -918,7 +918,7 @@ pgsql_lease6_dump_test() { # Clean up any test files left from prior failed runs unless -y was provided in which case # explicitly create the file to check that it will be automatically deleted. # files should be removed by kea-admin itself. - if printf '%s' "${@}" | grep 'y' > /dev/null; then + if printf '%s' "$@" | grep 'y' > /dev/null; then touch "${output_file}" touch "${output_file}.tmp" else @@ -949,7 +949,7 @@ insert into lease6 values('::12',E'\\\\x3232',30,TO_TIMESTAMP(1643212345),40,50, # Dump lease6 to output_file run_command \ "${kea_admin}" lease-dump pgsql -6 -u "${db_user}" -p "${db_password}" -n "${db_name}" \ - -d "${db_scripts_dir}" -o "${output_file}" "${@}" + -d "${db_scripts_dir}" -o "${output_file}" "$@" assert_eq 0 "${EXIT_CODE}" "kea-admin lease-dump -6 failed, expected exit code %d, actual %d" # Compare the dump output to reference file, they should be identical @@ -987,7 +987,7 @@ pgsql_lease4_upload_test() { # Clean up any test files left from prior failed runs unless -y was provided in which case # explicitly create the file to check that it will be automatically deleted. # files should be removed by kea-admin itself. - if printf '%s' "${@}" | grep 'y' > /dev/null; then + if printf '%s' "$@" | grep 'y' > /dev/null; then touch "${input_file}.tmp" touch "${output_file}" touch "${output_file}.tmp" @@ -1007,14 +1007,14 @@ pgsql_lease4_upload_test() { run_command \ "${kea_admin}" lease-upload pgsql -4 -u "${db_user}" \ -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}" \ - -i "${input_file}" "${@}" + -i "${input_file}" "$@" assert_eq 0 "${EXIT_CODE}" "kea-admin lease-upload -4 failed, expected exit code %d, actual %d" # Dump leases. run_command \ "${kea_admin}" lease-dump pgsql -4 -u "${db_user}" \ -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}" \ - -o "${output_file}" "${@}" + -o "${output_file}" "$@" assert_eq 0 "${EXIT_CODE}" "kea-admin lease-dump -4 failed, expected exit code %d, actual %d" # Compare the initial file used for upload to the file retrieved from dump, they should be identical. @@ -1055,7 +1055,7 @@ pgsql_lease6_upload_test() { # Clean up any test files left from prior failed runs unless -y was provided in which case # explicitly create the file to check that it will be automatically deleted. # files should be removed by kea-admin itself. - if printf '%s' "${@}" | grep 'y' > /dev/null; then + if printf '%s' "$@" | grep 'y' > /dev/null; then touch "${input_file}.tmp" touch "${output_file}" touch "${output_file}.tmp" @@ -1075,14 +1075,14 @@ pgsql_lease6_upload_test() { run_command \ "${kea_admin}" lease-upload pgsql -6 -u "${db_user}" \ -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}" \ - -i "${input_file}" "${@}" + -i "${input_file}" "$@" assert_eq 0 "${EXIT_CODE}" "kea-admin lease-upload -6 failed, expected exit code %d, actual %d" # Dump leases. run_command \ "${kea_admin}" lease-dump pgsql -6 -u "${db_user}" \ -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}" \ - -o "${output_file}" "${@}" + -o "${output_file}" "$@" assert_eq 0 "${EXIT_CODE}" "kea-admin lease-dump -6 failed, expected exit code %d, actual %d" # Compare the initial file used for upload to the file retrieved from dump, they should be identical.