diff --git a/labs/lib/functions.sh b/labs/lib/functions.sh index ba53562e..d9e4b5cb 100644 --- a/labs/lib/functions.sh +++ b/labs/lib/functions.sh @@ -83,7 +83,7 @@ function get_next_prefix { local digits=${3:-3} # Get number of *.$ext files in $dir - local cnt="$(get_next_file_number "$dir" "$ext")" + local cnt=$(get_next_file_number "$dir" "$ext") printf "%0${digits}d" "$cnt" } diff --git a/labs/lib/osbash/functions-host.sh b/labs/lib/osbash/functions-host.sh index 784cad5e..62337ba3 100644 --- a/labs/lib/osbash/functions-host.sh +++ b/labs/lib/osbash/functions-host.sh @@ -135,7 +135,7 @@ function ssh_exec_script { echo -en "\n$(date) start $remote_path" - local script_name="$(basename "$script_path" .sh)" + local script_name=$(basename "$script_path" .sh) local prefix=$(get_next_prefix "$LOG_DIR" "auto") local log_path=$LOG_DIR/${prefix}_${script_name}.auto diff --git a/labs/lib/osbash/virtualbox-functions.sh b/labs/lib/osbash/virtualbox-functions.sh index 5e4beccb..3deda4c8 100644 --- a/labs/lib/osbash/virtualbox-functions.sh +++ b/labs/lib/osbash/virtualbox-functions.sh @@ -135,7 +135,7 @@ function create_network { ${OSBASH:+:} mktemp -u XXXXXXXX ${OSBASH:+:} return 0 - local if_name="$(ip_to_hostonlyif "$ip")" + local if_name=$(ip_to_hostonlyif "$ip") if [ -n "$if_name" ]; then if hostonlyif_in_use "$if_name"; then echo >&2 "Host-only interface $if_name ($ip) is in use." \ @@ -451,7 +451,7 @@ function vm_export_dir { # don't register the VM above. Unregistering the registered VM takes # care of the snapshots, but we still have to unregister the clone # basedisk. - local snapshot_path="$(vm_get_disk_path "$node-e")" + local snapshot_path=$(vm_get_disk_path "$node-e") local hd_dir=${snapshot_path%Snapshots/*} local hd_path=$hd_dir$(get_base_disk_name) $VBM unregistervm "$node-e" @@ -481,7 +481,7 @@ function vm_delete { if vm_exists "$vm_name"; then echo >&2 "(found)" vm_power_off "$vm_name" - local hd_path="$(vm_get_disk_path "$vm_name")" + local hd_path=$(vm_get_disk_path "$vm_name") if [ -n "$hd_path" ]; then echo >&2 -e "${CInfo:-}Disk attached: ${CData:-}$hd_path${CReset:-}" vm_detach_disk "$vm_name" @@ -519,10 +519,10 @@ function disk_delete_child_vms { while [ : ]; do local child_uuid=$(get_next_child_uuid "$disk") if [ -n "$child_uuid" ]; then - local child_disk="$(disk_to_path "$child_uuid")" + local child_disk=$(disk_to_path "$child_uuid") echo >&2 -e "\nChild disk UUID: $child_uuid\n\t$child_disk" - local vm_name="$(disk_to_vm "$child_uuid")" + local vm_name=$(disk_to_vm "$child_uuid") if [ -n "$vm_name" ]; then echo 2>&1 -e "\tstill attached to VM \"$vm_name\"" vm_delete "$vm_name" diff --git a/labs/lib/osbash/virtualbox-install_base.sh b/labs/lib/osbash/virtualbox-install_base.sh index 743d33ea..f5aa6bb3 100644 --- a/labs/lib/osbash/virtualbox-install_base.sh +++ b/labs/lib/osbash/virtualbox-install_base.sh @@ -43,7 +43,7 @@ function vm_install_base { vm_mem "$vm_name" "${VM_BASE_MEM:=512}" if [ -z "${INSTALL_ISO-}" ]; then - local iso_name="$(get_iso_name)" + local iso_name=$(get_iso_name) if [ -z "$iso_name" ]; then echo -e >&2 "${CMissing:-}Either ISO URL or name needed (ISO_URL, INSTALL_ISO).${CReset:-}" diff --git a/labs/lib/wbatch/batch_for_windows.sh b/labs/lib/wbatch/batch_for_windows.sh index 1b8f7540..3ac7dbbd 100644 --- a/labs/lib/wbatch/batch_for_windows.sh +++ b/labs/lib/wbatch/batch_for_windows.sh @@ -149,10 +149,10 @@ function wbatch_mkdirs { local logdir=$(wbatch_path_to_windows "$LOG_DIR") local statusdir=$(wbatch_path_to_windows "$STATUS_DIR") - autodir="$(wbatch_escape_backslash "$autodir")" - imgdir="$(wbatch_escape_backslash "$imgdir")" - logdir="$(wbatch_escape_backslash "$logdir")" - statusdir="$(wbatch_escape_backslash "$statusdir")" + autodir=$(wbatch_escape_backslash "$autodir") + imgdir=$(wbatch_escape_backslash "$imgdir") + logdir=$(wbatch_escape_backslash "$logdir") + statusdir=$(wbatch_escape_backslash "$statusdir") sed -e " s,%P_AUTODIR%,$autodir,g;