diff --git a/src/disk.sh b/src/disk.sh index 079e699..47bedff 100644 --- a/src/disk.sh +++ b/src/disk.sh @@ -404,15 +404,13 @@ convertDisk() { fi fi - if ! rm -f "$SOURCE_FILE"; then - rm -f "$TMP_FILE" - error "Failed to remove old $DISK_DESC image $SOURCE_FILE." + if ! mv "$TMP_FILE" "$DST_FILE"; then + error "Failed to move converted $DISK_DESC image to $DST_FILE." exit 79 fi - if ! mv "$TMP_FILE" "$DST_FILE"; then - rm -f "$TMP_FILE" - error "Failed to move converted $DISK_DESC image to $DST_FILE." + if ! rm -f "$SOURCE_FILE"; then + error "Failed to remove old $DISK_DESC image $SOURCE_FILE." exit 79 fi diff --git a/src/network.sh b/src/network.sh index c31d72c..010d48c 100644 --- a/src/network.sh +++ b/src/network.sh @@ -1620,10 +1620,8 @@ else showGuestInfo - if [[ "${NETWORK,,}" == "passt" || "${NETWORK,,}" == "slirp" ]]; then - if [ -z "$USER_PORTS" ]; then - info "Notice: because user-mode networking is active, when you need to forward custom ports to DSM, add them to the \"USER_PORTS\" variable." - fi + if isUserMode && [ -z "$USER_PORTS" ]; then + info "Notice: because user-mode networking is active, when you need to forward custom ports to DSM, add them to the \"USER_PORTS\" variable." fi fi