From: Andrei Pavel Date: Fri, 11 Dec 2020 13:43:55 +0000 (+0200) Subject: [#1574] shell scripts: remove the use of lists X-Git-Tag: Kea-1.9.3~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c027050d89f5bebe3d33d508b2cd7751ad483786;p=thirdparty%2Fkea.git [#1574] shell scripts: remove the use of lists --- diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in index 1da80c511b..3c3b93fa8f 100644 --- a/src/bin/keactrl/keactrl.in +++ b/src/bin/keactrl/keactrl.in @@ -177,8 +177,7 @@ process is not running" # Start the Kea process. Do not start the process if there is an instance # already running. start_server() { - binary_path=${1} # Full path to the binary. - full_command=("${@}") # Binary and arguments. + binary_path=${1} # Full path to the binary. # Extract the name of the binary from the path. local binary_name binary_name=$(basename -- "${binary_path}") @@ -189,9 +188,9 @@ start_server() { log_info "${binary_name} appears to be running, see: \ PID ${_pid}, PID file: ${_pid_file}." else - log_info "Starting ${full_command[*]}" + log_info "Starting ${*}" # Start the process. - "${full_command[@]}" & + "${@}" & fi } 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 286d3f31b9..a3062a8013 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 @@ -28,9 +28,6 @@ else . "@abs_top_builddir@/src/bin/admin/admin-utils.sh" fi -# Save the command line arguments for later use. -cqlargs=("${@}") - # Need a path for temporary files created during upgrade data migration # Use the state directory in the install path directory if it exists, otherwise # use the build tree @@ -42,7 +39,7 @@ fi # Ensures the current schema version is 2.0. If not it exits. check_version() { - version=$(cql_version "${cqlargs[@]}") + version=$(cql_version "${@}") if [ "${version}" != "2.0" ]; then printf "This script upgrades 2.0 to 3.0. Reported version is %s. Skipping upgrade.\n" "${version}" @@ -52,7 +49,7 @@ check_version() { # Peforms the schema changes from 2.0 to 3.0 update_schema() { - cqlsh "${cqlargs[@]}" <