From: Tomek Mrugalski Date: Mon, 4 Mar 2019 11:26:01 +0000 (+0100) Subject: More quotes X-Git-Tag: 465-add-subnet4-update-and-subnet6-update-commands-to-subnet-cmds-hook_base2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b9f0e248f5524691ed6575fe6f648f17633d822;p=thirdparty%2Fkea.git More quotes --- diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in index 8c3684a9b1..5daf6e3fa4 100644 --- a/src/bin/keactrl/keactrl.in +++ b/src/bin/keactrl/keactrl.in @@ -56,7 +56,7 @@ is_in_list() { # Prints keactrl usage. usage() { - printf "usage is %s command [-c keactrl-config-file] [-s server[,server,..]]\n" "$( basename ${0} )" + printf "usage is %s command [-c keactrl-config-file] [-s server[,server,..]]\n" $( basename "${0}" ) printf "commands: start stop reload status version\n" } @@ -104,7 +104,7 @@ get_pid_from_file() { # Grab the PID if the file exists if [ -e "${_pid_file}" ]; then - _pid=$(cat ${_pid_file}) + _pid=$(cat "${_pid_file}") if [ $? -ne 0 ]; then log_error "Error reading PID file: ${_pid_file}" fi @@ -124,7 +124,7 @@ check_running() { _running=0 # Get the PID from the PID file (if it exists) - get_pid_from_file ${proc_name} + get_pid_from_file "${proc_name}" if [ ${_pid} -gt 0 ]; then # Use ps to check if PID is alive ps -p ${_pid} 1>/dev/null @@ -140,7 +140,7 @@ send_signal() { sig=${1} # Signal number proc_name=${2} # Process name. - get_pid_from_file ${proc_name} + get_pid_from_file "${proc_name}" if [ ${_pid} -eq 0 ]; then log_info "Skip sending signal ${sig} to process ${proc_name}: \ process is not running\n" @@ -202,7 +202,7 @@ reload_server() { binary_name=$(basename "${binary_path}") # Use the binary name to check if the process is already running. - check_running ${binary_name} + check_running "${binary_name}" # If process isn't running, don't start another one. Just log a message. if [ ${_running} -eq 0 ]; then log_info "${binary_name} isn't running." @@ -280,7 +280,7 @@ run_conditional() { return fi # reload is not supported for netconf. - if [ ${command} = "reload" ]; then + if [ "${command}" = "reload" ]; then if [ ${is_all} -eq 1 ]; then return fi