diff --git a/lisp/tramp-sh.el b/lisp/tramp-sh.el index 569922a9..1233c635 100644 --- a/lisp/tramp-sh.el +++ b/lisp/tramp-sh.el @@ -5263,18 +5263,7 @@ connection if a previous connection has died for some reason." ;; New connection must be opened. (condition-case err (unless (process-live-p p) - (with-tramp-progress-reporter - vec 3 - (if (tramp-string-empty-or-nil-p (tramp-file-name-user vec)) - (format "Opening connection %s for %s using %s" - process-name - (tramp-file-name-host vec) - (tramp-file-name-method vec)) - (format "Opening connection %s for %s@%s using %s" - process-name - (tramp-file-name-user vec) - (tramp-file-name-host vec) - (tramp-file-name-method vec))) + (progn (catch 'uname-changed ;; Start new process. @@ -5424,15 +5413,23 @@ connection if a previous connection has died for some reason." " ")) ;; Send the command. - (tramp-message vec 3 "Sending command `%s'" command) - (tramp-send-command vec command t t) - (tramp-process-actions - p vec - (min - pos (with-current-buffer (process-buffer p) (point-max))) - tramp-actions-before-shell connection-timeout) - (tramp-message - vec 3 "Found remote shell prompt on `%s'" l-host) + (with-tramp-progress-reporter + vec 3 + (if (tramp-string-empty-or-nil-p l-user) + (format "Opening connection %s for %s using %s" + process-name l-host l-method) + (format "Opening connection %s for %s@%s using %s" + process-name l-user l-host l-method)) + + (tramp-message vec 3 "Sending command `%s'" command) + (tramp-send-command vec command t t) + (tramp-process-actions + p vec + (min + pos (with-current-buffer (process-buffer p) (point-max))) + tramp-actions-before-shell connection-timeout) + (tramp-message + vec 3 "Found remote shell prompt on `%s'" l-host)) ;; Next hop. (setq options "" @@ -5446,7 +5443,18 @@ connection if a previous connection has died for some reason." #'tramp-timeout-session vec)) ;; Make initial shell settings. - (tramp-open-connection-setup-interactive-shell p vec) + (with-tramp-progress-reporter + vec 3 + (if (tramp-string-empty-or-nil-p + (tramp-file-name-user vec)) + (format "Setup connection %s for %s using %s" + process-name (tramp-file-name-host vec) + (tramp-file-name-method vec)) + (format "Setup connection %s for %s@%s using %s" + process-name (tramp-file-name-user vec) + (tramp-file-name-host vec) + (tramp-file-name-method vec))) + (tramp-open-connection-setup-interactive-shell p vec)) ;; Mark it as connected. (tramp-set-connection-property p "connected" t)))))