+ if (GNUPGHOME="$SYSDATADIR"/gnupg-host gpg --no-permission-warning --export-secret-keys && \
+ GNUPGHOME="$SYSDATADIR"/gnupg-host gpg --no-permission-warning --export "$FPR") | \
+ GNUPGHOME="$NEWDATADIR" gpg --quiet --no-tty --import ; then
+ : we are in good shape!
+ else
+ if ! GNUPGHOME="$NEWDATADIR" gpg --list-secret-key >/dev/null ; then
+ log "The old host key (%s) was not imported properly.\n" "$FPR"
+ exit 1
+ fi
+ fi
+
+ # if we get here cleanly, then we're OK to move forward:
+ mv "$NEWDATADIR" "$MHDATADIR"
+