From: Andrei Pavel Date: Fri, 11 Dec 2020 15:37:41 +0000 (+0200) Subject: [#1574] $ character missed in shell tests X-Git-Tag: Kea-1.9.3~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e873784d82f9f07fec16323d8242b2edf0116656;p=thirdparty%2Fkea.git [#1574] $ character missed in shell tests --- diff --git a/src/share/database/scripts/cql/upgrade_2.0_to_3.0.sh.in b/src/share/database/scripts/cql/upgrade_2.0_to_3.0.sh.in index a3062a8013..ebc7408e29 100644 --- a/src/share/database/scripts/cql/upgrade_2.0_to_3.0.sh.in +++ b/src/share/database/scripts/cql/upgrade_2.0_to_3.0.sh.in @@ -271,8 +271,8 @@ migrate_host_data() { exit_now 0 "Updated $update_cnt of $line_cnt records" } -check_version "{@}" -if ! update_schema "{@}"; then +check_version "${@}" +if ! update_schema "${@}"; then printf 'Schema update FAILED!\n' exit 1 fi diff --git a/src/share/database/scripts/cql/upgrade_3.0_to_4.0.sh.in b/src/share/database/scripts/cql/upgrade_3.0_to_4.0.sh.in index af41c162b8..d9a5cba81e 100644 --- a/src/share/database/scripts/cql/upgrade_3.0_to_4.0.sh.in +++ b/src/share/database/scripts/cql/upgrade_3.0_to_4.0.sh.in @@ -271,7 +271,7 @@ migrate_host_data() { if ! cqlsh "${@}" -e "$query" then - exit_now 1 "Cassandra export failed! Could not migrate data!" "{@}" + exit_now 1 "Cassandra export failed! Could not migrate data!" "${@}" fi # Strip the carriage returns that CQL insists on adding. @@ -281,7 +281,7 @@ migrate_host_data() { mv $export_file.2 $export_file else # Shouldn't happen but then again we're talking about CQL here - exit_now 1 "Cassandra export file $export_file is missing?" "{@}" + exit_now 1 "Cassandra export file $export_file is missing?" "${@}" fi # Iterate through the exported data, accumulating update statements, @@ -334,7 +334,7 @@ migrate_host_data() { # If we didn't record any updates, then hey, we're good to go! if [ "$update_cnt" -eq 0 ] then - exit_now 0 "Completed successfully: No updates were needed" "{@}" + exit_now 0 "Completed successfully: No updates were needed" "${@}" fi # We have at least one update in the update file, so submit it # to cqlsh. @@ -355,10 +355,10 @@ migrate_host_data() { if ! cqlsh "${@}" -e "$query" then - exit_now 1 "Cassandra updates failed" "{@}" + exit_now 1 "Cassandra updates failed" "${@}" fi - exit_now 0 "Updated $update_cnt of $line_cnt records" "{@}" + exit_now 0 "Updated $update_cnt of $line_cnt records" "${@}" } check_version "${@}"