Fix warning reported by ShellCheck regarding PR #213 #230
Reference in New Issue
Block a user
Delete Branch "mchiappero/Factory:shellcheck_213"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
300d5e21bdto390f500c42Nits about using {} to protect expansions
@@ -54,3 +54,3 @@if [[ "$(echo "$LISTEN_ALL_INTERFACES" | tr '[:upper:]' '[:lower:]')" == "true" ]]; thenexport IRONIC_HOST_IP="::"elif [[ -n env.ENABLE_IPV6 ]]; thenelif [[ -n "$ENABLE_IPV6" ]]; thenelif [[ -n "${ENABLE_IPV6}" ]]; then@@ -56,3 +56,3 @@local HOSTNAME=$1echo "$(nslookup -type=${QUERY} $HOSTNAME | tail -n2 | grep -w "Address:" | cut -d " " -f2)"echo $(nslookup -type=${QUERY} "$HOSTNAME" | tail -n2 | grep -w "Address:" | cut -d " " -f2)echo $(nslookup -type=${QUERY} "${HOSTNAME}" | tail -n2 | grep -w "Address:" | cut -d " " -f2)@@ -86,3 +86,3 @@IP_ADDR="$(ipcalc "${IP_ADDR}" | grep "^Address:" | awk '{print $2}')"echo "$(ip $IP_VERS -br addr show scope global | grep -i " ${IP_ADDR}/" | cut -f 1 -d ' ' | cut -f 1 -d '@')"echo $(ip "$IP_VERS" -br addr show scope global | grep -i " ${IP_ADDR}/" | cut -f 1 -d ' ' | cut -f 1 -d '@')echo $(ip "${IP_VERS}" -br addr show scope global | grep -i " ${IP_ADDR}/" | cut -f 1 -d ' ' | cut -f 1 -d '@')@@ -112,3 +112,3 @@local IFACE=$1echo "$(ip $IP_VERS -br addr show scope global up dev $IFACE | awk '{print $3}' | sed -e 's%/.*%%' | head -n 1)"echo $(ip "$IP_VERS" -br addr show scope global up dev $IFACE | awk '{print $3}' | sed -e 's%/.*%%' | head -n 1)echo $(ip "${IP_VERS}" -br addr show scope global up dev ${IFACE} | awk '{print $3}' | sed -e 's%/.*%%' | head -n 1)@@ -151,3 +151,3 @@until [[ -n "$IFACE_OF_IP" ]]; doecho "Waiting for ${PROVISIONING_IP} to be configured on an interface..."IFACE_OF_IP="$(get_interface_of_ip $PROVISIONING_IP)"IFACE_OF_IP="$(get_interface_of_ip "$PROVISIONING_IP")"IFACE_OF_IP="$(get_interface_of_ip "${PROVISIONING_IP}")"@@ -168,3 +168,3 @@echo "Waiting for ${PROVISIONING_INTERFACE} interface to be configured..."export IRONIC_IPV6="$(get_ip_of_interface $PROVISIONING_INTERFACE 6)"IRONIC_IPV6="$(get_ip_of_interface "$PROVISIONING_INTERFACE" 6)"IRONIC_IPV6="$(get_ip_of_interface "${PROVISIONING_INTERFACE}" 6)"@@ -171,3 +171,3 @@sleep 1export IRONIC_IP="$(get_ip_of_interface $PROVISIONING_INTERFACE 4)"IRONIC_IP="$(get_ip_of_interface "$PROVISIONING_INTERFACE" 4)"IRONIC_IP="$(get_ip_of_interface "${PROVISIONING_INTERFACE}" 4)"@@ -191,3 +193,2 @@IPV6_RECORD="$(get_ip_of_hostname $IRONIC_URL_HOSTNAME 6)"IPV4_RECORD="$(get_ip_of_hostname $IRONIC_URL_HOSTNAME 4)"IPV6_RECORD="$(get_ip_of_hostname "$IRONIC_URL_HOSTNAME" 6)"IPV6_RECORD="$(get_ip_of_hostname "${IRONIC_URL_HOSTNAME}" 6)"@@ -192,2 +194,2 @@IPV6_RECORD="$(get_ip_of_hostname $IRONIC_URL_HOSTNAME 6)"IPV4_RECORD="$(get_ip_of_hostname $IRONIC_URL_HOSTNAME 4)"IPV6_RECORD="$(get_ip_of_hostname "$IRONIC_URL_HOSTNAME" 6)"IPV4_RECORD="$(get_ip_of_hostname "$IRONIC_URL_HOSTNAME" 4)"IPV4_RECORD="$(get_ip_of_hostname "${IRONIC_URL_HOSTNAME}" 4)"@@ -200,3 +202,3 @@echo "Waiting for ${IPV6_RECORD} to be configured on an interface"IPV6_IFACE="$(get_interface_of_ip $IPV6_RECORD 6)"IPV6_IFACE="$(get_interface_of_ip "$IPV6_RECORD" 6)"IPV6_IFACE="$(get_interface_of_ip "${IPV6_RECORD}" 6)"@@ -204,3 +206,3 @@echo "Waiting for ${IPV4_RECORD} to be configured on an interface"IPV4_IFACE="$(get_interface_of_ip $IPV4_RECORD 4)"IPV4_IFACE="$(get_interface_of_ip "$IPV4_RECORD" 4)"IPV4_IFACE="$(get_interface_of_ip "${IPV4_RECORD}" 4)"Are they needed in the above contexts? I have skipped them as I thought they made no difference here, but I'll add them anyway. Thank you for reviewing!
I won't say needed but AFAIK it won't hurt :D (I'm old)
390f500c42to66c168cce466c168cce4to14570860811457086081to27af056dce