diff --git a/src/vmm_mad/remotes/kvm/restore b/src/vmm_mad/remotes/kvm/restore index ef8d1e8d5e..183a1dda9b 100755 --- a/src/vmm_mad/remotes/kvm/restore +++ b/src/vmm_mad/remotes/kvm/restore @@ -40,7 +40,7 @@ if [ ! -t 0 ]; then # The data is the driver message. Extracting the System DS TM_MAD XPATH="${DRIVER_PATH}/../../datastore/xpath.rb --stdin" - TM_MAD=$(echo "$DRV_MESSAGE" | $XPATH /VMM_DRIVER_ACTION_DATA/DATASTORE/TM_MAD) + IFS= read -r -d '' TM_MAD < <(echo "$DRV_MESSAGE" | $XPATH /VMM_DRIVER_ACTION_DATA/DATASTORE/TM_MAD) # If there is a specific hook for this TM_MAD call it: RESTORE_TM_FILE="${DRIVER_PATH}/restore.${TM_MAD}" diff --git a/src/vmm_mad/remotes/kvm/save b/src/vmm_mad/remotes/kvm/save index 45409efd76..d1c460449c 100755 --- a/src/vmm_mad/remotes/kvm/save +++ b/src/vmm_mad/remotes/kvm/save @@ -55,7 +55,7 @@ DRV_MESSAGE=$(cat) # The data is the driver message. Extracting the System DS TM_MAD XPATH="${DRIVER_PATH}/../../datastore/xpath.rb --stdin" -TM_MAD=$(echo "$DRV_MESSAGE" | $XPATH /VMM_DRIVER_ACTION_DATA/DATASTORE/TM_MAD) +IFS= read -r -d '' TM_MAD < <(echo "$DRV_MESSAGE" | $XPATH /VMM_DRIVER_ACTION_DATA/DATASTORE/TM_MAD) # If there is a specific hook for this TM_MAD call it: SAVE_TM_FILE="${DRIVER_PATH}/save.${TM_MAD}"