Unverified Commit a527080c authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Print curl error (#438)

* feat: Print curl error
parent ce6d60c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ if [ ! -f "${RDC}" ]; then
  VERIFY="b4215a4b213ff5154db0488f92c87864"
  LOC="$DL/release/7.0.1/42218/DSM_VirtualDSM_42218.pat"

  { curl -r "$POS" -sfk -o "$RD" "$LOC"; rc=$?; } || :
  { curl -r "$POS" -sfk -S -o "$RD" "$LOC"; rc=$?; } || :
  (( rc != 0 )) && error "Failed to download $LOC, reason: $rc" && exit 60

  SUM=$(md5sum "$RD" | cut -f 1 -d " ")
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ _graceful_shutdown() {
  # echo 'system_powerdown' | nc -q 1 -w 1 localhost "${QEMU_PORT}" > /dev/null

  # Send shutdown command to guest agent via serial port
  RESPONSE=$(curl -s -m 30 -S http://127.0.0.1:2210/read?command=6 2>&1)
  RESPONSE=$(curl -sk -m 30 -S http://127.0.0.1:2210/read?command=6 2>&1)

  if [[ ! "${RESPONSE}" =~ "\"success\"" ]]; then