mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* net/tramp.el (tramp-ssh-controlmaster-template): Make it a
defconst. Apply independent check for ControlPersist.
This commit is contained in:
parent
886bae77f0
commit
d20e6e9093
2 changed files with 16 additions and 5 deletions
|
|
@ -281,16 +281,24 @@ started on the local host. You should specify a remote host
|
|||
useful only in combination with `tramp-default-proxies-alist'.")
|
||||
|
||||
;;;###tramp-autoload
|
||||
(defvar tramp-ssh-controlmaster-template
|
||||
(defconst tramp-ssh-controlmaster-template
|
||||
(let (result)
|
||||
(ignore-errors
|
||||
(with-temp-buffer
|
||||
(call-process "ssh" nil t nil "-o" "ControlMaster")
|
||||
(goto-char (point-min))
|
||||
(when (search-forward-regexp "Missing ControlMaster argument" nil t)
|
||||
'("-o" "ControlPath=%t.%%r@%%h:%%p"
|
||||
"-o" "ControlMaster=auto"
|
||||
"-o" "ControlPersist=no"))))
|
||||
"Call ssh to detect whether it supports the ControlMaster argument.
|
||||
(setq result
|
||||
'("-o" "ControlPath=%t.%%r@%%h:%%p"
|
||||
"-o" "ControlMaster=auto"))))
|
||||
(when result
|
||||
(with-temp-buffer
|
||||
(call-process "ssh" nil t nil "-o" "ControlPersist")
|
||||
(goto-char (point-min))
|
||||
(when (search-forward-regexp "Missing ControlPersist argument" nil t)
|
||||
(setq result (append result '("-o" "ControlPersist=no")))))))
|
||||
result)
|
||||
"Call ssh to detect whether it supports the Control* arguments.
|
||||
Return a template to be used in `tramp-methods'.")
|
||||
|
||||
(defcustom tramp-default-method
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue