87 |
(unless (fboundp 'uudecode-decode-region) |
(unless (fboundp 'uudecode-decode-region) |
88 |
(autoload 'uudecode-decode-region "uudecode")) |
(autoload 'uudecode-decode-region "uudecode")) |
89 |
|
|
90 |
;; ;; It does not work to load EFS after loading TRAMP. |
;; XEmacs is distributed with few Lisp packages. Further packages are |
91 |
;; (when (fboundp 'efs-file-handler-function) |
;; installed using EFS. If we use a unified filename format, then |
92 |
;; (require 'efs)) |
;; Tramp is required in addition to EFS. (But why can't Tramp just |
93 |
|
;; disable EFS when Tramp is loaded? Then XEmacs can ship with EFS |
94 |
|
;; just like before.) Another reason for using a separate filename |
95 |
|
;; syntax on XEmacs is that EFS hooks into XEmacs in many places, but |
96 |
|
;; Tramp only knows how to deal with `file-name-handler-alist', not |
97 |
|
;; the other places. |
98 |
|
;;;###autoload |
99 |
|
(defvar tramp-unified-filenames (not (featurep 'xemacs)) |
100 |
|
"Non-nil means to use unified Ange-FTP/Tramp filename syntax. |
101 |
|
Nil means to use a separate filename syntax for Tramp.") |
102 |
|
|
103 |
;; Load foreign methods. Because they do require Tramp internally, this |
;; Load foreign methods. Because they do require Tramp internally, this |
104 |
;; must be done with the `eval-after-load' trick. |
;; must be done with the `eval-after-load' trick. |
107 |
(unless (featurep 'xemacs) |
(unless (featurep 'xemacs) |
108 |
(eval-after-load "tramp" |
(eval-after-load "tramp" |
109 |
'(require 'tramp-ftp))) |
'(require 'tramp-ftp))) |
110 |
|
(when (and tramp-unified-filenames (featurep 'xemacs)) |
111 |
|
(eval-after-load "tramp" |
112 |
|
'(require 'tramp-efs))) |
113 |
|
|
114 |
;; tramp-smb uses "smbclient" from Samba. |
;; tramp-smb uses "smbclient" from Samba. |
115 |
;; Not available under Cygwin and Windows, because they don't offer |
;; Not available under Cygwin and Windows, because they don't offer |
135 |
(when (fboundp 'byte-compiler-options) |
(when (fboundp 'byte-compiler-options) |
136 |
(byte-compiler-options (warnings (- unused-vars))))) |
(byte-compiler-options (warnings (- unused-vars))))) |
137 |
|
|
|
;; XEmacs is distributed with few Lisp packages. Further packages are |
|
|
;; installed using EFS. If we use a unified filename format, then |
|
|
;; Tramp is required in addition to EFS. (But why can't Tramp just |
|
|
;; disable EFS when Tramp is loaded? Then XEmacs can ship with EFS |
|
|
;; just like before.) Another reason for using a separate filename |
|
|
;; syntax on XEmacs is that EFS hooks into XEmacs in many places, but |
|
|
;; Tramp only knows how to deal with `file-name-handler-alist', not |
|
|
;; the other places. |
|
|
;;;###autoload |
|
|
(defvar tramp-unified-filenames (not (featurep 'xemacs)) |
|
|
"Non-nil means to use unified Ange-FTP/Tramp filename syntax. |
|
|
Nil means to use a separate filename syntax for Tramp.") |
|
|
|
|
138 |
;;; User Customizable Internal Variables: |
;;; User Customizable Internal Variables: |
139 |
|
|
140 |
(defgroup tramp nil |
(defgroup tramp nil |
233 |
|
|
234 |
(defcustom tramp-methods |
(defcustom tramp-methods |
235 |
'( ("rcp" (tramp-connection-function tramp-open-connection-rsh) |
'( ("rcp" (tramp-connection-function tramp-open-connection-rsh) |
236 |
(tramp-rsh-program "rsh") |
(tramp-login-program "rsh") |
237 |
(tramp-rcp-program "rcp") |
(tramp-copy-program "rcp") |
238 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
239 |
(tramp-rsh-args nil) |
(tramp-login-args nil) |
240 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
241 |
(tramp-rcp-keep-date-arg "-p") |
(tramp-copy-keep-date-arg "-p")) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
242 |
("scp" (tramp-connection-function tramp-open-connection-rsh) |
("scp" (tramp-connection-function tramp-open-connection-rsh) |
243 |
(tramp-rsh-program "ssh") |
(tramp-login-program "ssh") |
244 |
(tramp-rcp-program "scp") |
(tramp-copy-program "scp") |
245 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
246 |
(tramp-rsh-args ("-e" "none")) |
(tramp-login-args ("-e" "none")) |
247 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
248 |
(tramp-rcp-keep-date-arg "-p") |
(tramp-copy-keep-date-arg "-p")) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
249 |
("scp1" (tramp-connection-function tramp-open-connection-rsh) |
("scp1" (tramp-connection-function tramp-open-connection-rsh) |
250 |
(tramp-rsh-program "ssh") |
(tramp-login-program "ssh") |
251 |
(tramp-rcp-program "scp") |
(tramp-copy-program "scp") |
252 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
253 |
(tramp-rsh-args ("-1" "-e" "none")) |
(tramp-login-args ("-1" "-e" "none")) |
254 |
(tramp-rcp-args ("-1")) |
(tramp-copy-args ("-1")) |
255 |
(tramp-rcp-keep-date-arg "-p") |
(tramp-copy-keep-date-arg "-p")) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
256 |
("scp2" (tramp-connection-function tramp-open-connection-rsh) |
("scp2" (tramp-connection-function tramp-open-connection-rsh) |
257 |
(tramp-rsh-program "ssh") |
(tramp-login-program "ssh") |
258 |
(tramp-rcp-program "scp") |
(tramp-copy-program "scp") |
259 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
260 |
(tramp-rsh-args ("-2" "-e" "none")) |
(tramp-login-args ("-2" "-e" "none")) |
261 |
(tramp-rcp-args ("-2")) |
(tramp-copy-args ("-2")) |
262 |
(tramp-rcp-keep-date-arg "-p") |
(tramp-copy-keep-date-arg "-p")) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
263 |
("scp1_old" |
("scp1_old" |
264 |
(tramp-connection-function tramp-open-connection-rsh) |
(tramp-connection-function tramp-open-connection-rsh) |
265 |
(tramp-rsh-program "ssh1") |
(tramp-login-program "ssh1") |
266 |
(tramp-rcp-program "scp1") |
(tramp-copy-program "scp1") |
267 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
268 |
(tramp-rsh-args ("-e" "none")) |
(tramp-login-args ("-e" "none")) |
269 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
270 |
(tramp-rcp-keep-date-arg "-p") |
(tramp-copy-keep-date-arg "-p")) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
271 |
("scp2_old" |
("scp2_old" |
272 |
(tramp-connection-function tramp-open-connection-rsh) |
(tramp-connection-function tramp-open-connection-rsh) |
273 |
(tramp-rsh-program "ssh2") |
(tramp-login-program "ssh2") |
274 |
(tramp-rcp-program "scp2") |
(tramp-copy-program "scp2") |
275 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
276 |
(tramp-rsh-args ("-e" "none")) |
(tramp-login-args ("-e" "none")) |
277 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
278 |
(tramp-rcp-keep-date-arg "-p") |
(tramp-copy-keep-date-arg "-p")) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
279 |
("rsync" (tramp-connection-function tramp-open-connection-rsh) |
("rsync" (tramp-connection-function tramp-open-connection-rsh) |
280 |
(tramp-rsh-program "ssh") |
(tramp-login-program "ssh") |
281 |
(tramp-rcp-program "rsync") |
(tramp-copy-program "rsync") |
282 |
|
(tramp-remote-sh "/bin/sh") |
283 |
|
(tramp-login-args ("-e" "none")) |
284 |
|
(tramp-copy-args ("-e" "ssh")) |
285 |
|
(tramp-copy-keep-date-arg "-t")) |
286 |
|
("remcp" (tramp-connection-function tramp-open-connection-rsh) |
287 |
|
(tramp-login-program "remsh") |
288 |
|
(tramp-copy-program "rcp") |
289 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
290 |
(tramp-rsh-args ("-e" "none")) |
(tramp-login-args nil) |
291 |
(tramp-rcp-args ("-e" "ssh")) |
(tramp-copy-args nil) |
292 |
(tramp-rcp-keep-date-arg "-t") |
(tramp-copy-keep-date-arg "-p")) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
293 |
("rsh" (tramp-connection-function tramp-open-connection-rsh) |
("rsh" (tramp-connection-function tramp-open-connection-rsh) |
294 |
(tramp-rsh-program "rsh") |
(tramp-login-program "rsh") |
295 |
(tramp-rcp-program nil) |
(tramp-copy-program nil) |
296 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
297 |
(tramp-rsh-args nil) |
(tramp-login-args nil) |
298 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
299 |
(tramp-rcp-keep-date-arg nil) |
(tramp-copy-keep-date-arg nil)) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
300 |
("ssh" (tramp-connection-function tramp-open-connection-rsh) |
("ssh" (tramp-connection-function tramp-open-connection-rsh) |
301 |
(tramp-rsh-program "ssh") |
(tramp-login-program "ssh") |
302 |
(tramp-rcp-program nil) |
(tramp-copy-program nil) |
303 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
304 |
(tramp-rsh-args ("-e" "none")) |
(tramp-login-args ("-e" "none")) |
305 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
306 |
(tramp-rcp-keep-date-arg nil) |
(tramp-copy-keep-date-arg nil)) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
307 |
("ssh1" (tramp-connection-function tramp-open-connection-rsh) |
("ssh1" (tramp-connection-function tramp-open-connection-rsh) |
308 |
(tramp-rsh-program "ssh") |
(tramp-login-program "ssh") |
309 |
(tramp-rcp-program nil) |
(tramp-copy-program nil) |
310 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
311 |
(tramp-rsh-args ("-1" "-e" "none")) |
(tramp-login-args ("-1" "-e" "none")) |
312 |
(tramp-rcp-args ("-1")) |
(tramp-copy-args ("-1")) |
313 |
(tramp-rcp-keep-date-arg nil) |
(tramp-copy-keep-date-arg nil)) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
314 |
("ssh2" (tramp-connection-function tramp-open-connection-rsh) |
("ssh2" (tramp-connection-function tramp-open-connection-rsh) |
315 |
(tramp-rsh-program "ssh") |
(tramp-login-program "ssh") |
316 |
(tramp-rcp-program nil) |
(tramp-copy-program nil) |
317 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
318 |
(tramp-rsh-args ("-2" "-e" "none")) |
(tramp-login-args ("-2" "-e" "none")) |
319 |
(tramp-rcp-args ("-2")) |
(tramp-copy-args ("-2")) |
320 |
(tramp-rcp-keep-date-arg nil) |
(tramp-copy-keep-date-arg nil)) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
321 |
("ssh1_old" |
("ssh1_old" |
322 |
(tramp-connection-function tramp-open-connection-rsh) |
(tramp-connection-function tramp-open-connection-rsh) |
323 |
(tramp-rsh-program "ssh1") |
(tramp-login-program "ssh1") |
324 |
(tramp-rcp-program nil) |
(tramp-copy-program nil) |
325 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
326 |
(tramp-rsh-args ("-e" "none")) |
(tramp-login-args ("-e" "none")) |
327 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
328 |
(tramp-rcp-keep-date-arg nil) |
(tramp-copy-keep-date-arg nil)) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
329 |
("ssh2_old" |
("ssh2_old" |
330 |
(tramp-connection-function tramp-open-connection-rsh) |
(tramp-connection-function tramp-open-connection-rsh) |
331 |
(tramp-rsh-program "ssh2") |
(tramp-login-program "ssh2") |
332 |
(tramp-rcp-program nil) |
(tramp-copy-program nil) |
333 |
|
(tramp-remote-sh "/bin/sh") |
334 |
|
(tramp-login-args ("-e" "none")) |
335 |
|
(tramp-copy-args nil) |
336 |
|
(tramp-copy-keep-date-arg nil)) |
337 |
|
("remsh" (tramp-connection-function tramp-open-connection-rsh) |
338 |
|
(tramp-login-program "remsh") |
339 |
|
(tramp-copy-program nil) |
340 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
341 |
(tramp-rsh-args ("-e" "none")) |
(tramp-login-args nil) |
342 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
343 |
(tramp-rcp-keep-date-arg nil) |
(tramp-copy-keep-date-arg nil)) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
344 |
("telnet" |
("telnet" |
345 |
(tramp-connection-function tramp-open-connection-telnet) |
(tramp-connection-function tramp-open-connection-telnet) |
346 |
(tramp-rsh-program nil) |
(tramp-login-program "telnet") |
347 |
(tramp-rcp-program nil) |
(tramp-copy-program nil) |
348 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
349 |
(tramp-rsh-args nil) |
(tramp-login-args nil) |
350 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
351 |
(tramp-rcp-keep-date-arg nil) |
(tramp-copy-keep-date-arg nil)) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program "telnet") |
|
|
(tramp-telnet-args nil)) |
|
352 |
("su" (tramp-connection-function tramp-open-connection-su) |
("su" (tramp-connection-function tramp-open-connection-su) |
353 |
(tramp-rsh-program nil) |
(tramp-login-program "su") |
354 |
(tramp-rcp-program nil) |
(tramp-copy-program nil) |
355 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
356 |
(tramp-rsh-args nil) |
(tramp-login-args ("-" "%u")) |
357 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
358 |
(tramp-rcp-keep-date-arg nil) |
(tramp-copy-keep-date-arg nil)) |
|
(tramp-su-program "su") |
|
|
(tramp-su-args ("-" "%u")) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
359 |
("sudo" (tramp-connection-function tramp-open-connection-su) |
("sudo" (tramp-connection-function tramp-open-connection-su) |
360 |
(tramp-rsh-program nil) |
(tramp-login-program "sudo") |
361 |
(tramp-rcp-program nil) |
(tramp-copy-program nil) |
362 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
363 |
(tramp-rsh-args nil) |
(tramp-login-args ("-u" "%u" "-s" |
364 |
(tramp-rcp-args nil) |
"-p" "Password:")) |
365 |
(tramp-rcp-keep-date-arg nil) |
(tramp-copy-args nil) |
366 |
(tramp-su-program "sudo") |
(tramp-copy-keep-date-arg nil)) |
|
(tramp-su-args ("-u" "%u" "-s")) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
367 |
("multi" (tramp-connection-function tramp-open-connection-multi) |
("multi" (tramp-connection-function tramp-open-connection-multi) |
368 |
(tramp-rsh-program nil) |
(tramp-login-program nil) |
369 |
(tramp-rcp-program nil) |
(tramp-copy-program nil) |
370 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
371 |
(tramp-rsh-args nil) |
(tramp-login-args nil) |
372 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
373 |
(tramp-rcp-keep-date-arg nil) |
(tramp-copy-keep-date-arg nil)) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
374 |
("scpx" (tramp-connection-function tramp-open-connection-rsh) |
("scpx" (tramp-connection-function tramp-open-connection-rsh) |
375 |
(tramp-rsh-program "ssh") |
(tramp-login-program "ssh") |
376 |
(tramp-rcp-program "scp") |
(tramp-copy-program "scp") |
377 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
378 |
(tramp-rsh-args ("-e" "none" "-t" "-t" "/bin/sh")) |
(tramp-login-args ("-e" "none" "-t" "-t" "/bin/sh")) |
379 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
380 |
(tramp-rcp-keep-date-arg "-p") |
(tramp-copy-keep-date-arg "-p")) |
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
381 |
("sshx" (tramp-connection-function tramp-open-connection-rsh) |
("sshx" (tramp-connection-function tramp-open-connection-rsh) |
382 |
(tramp-rsh-program "ssh") |
(tramp-login-program "ssh") |
383 |
(tramp-rcp-program nil) |
(tramp-copy-program nil) |
384 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
385 |
(tramp-rsh-args ("-e" "none" "-t" "-t" "/bin/sh")) |
(tramp-login-args ("-e" "none" "-t" "-t" "/bin/sh")) |
386 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
387 |
(tramp-rcp-keep-date-arg nil) |
(tramp-copy-keep-date-arg nil)) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
388 |
("krlogin" |
("krlogin" |
389 |
(tramp-connection-function tramp-open-connection-rsh) |
(tramp-connection-function tramp-open-connection-rsh) |
390 |
(tramp-rsh-program "krlogin") |
(tramp-login-program "krlogin") |
391 |
(tramp-rcp-program nil) |
(tramp-copy-program nil) |
392 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
393 |
(tramp-rsh-args ("-x")) |
(tramp-login-args ("-x")) |
394 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
395 |
(tramp-rcp-keep-date-arg nil) |
(tramp-copy-keep-date-arg nil)) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
396 |
("plink" |
("plink" |
397 |
(tramp-connection-function tramp-open-connection-rsh) |
(tramp-connection-function tramp-open-connection-rsh) |
398 |
(tramp-rsh-program "plink") |
(tramp-login-program "plink") |
399 |
(tramp-rcp-program nil) |
(tramp-copy-program nil) |
400 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
401 |
(tramp-rsh-args ("-ssh")) ;optionally add "-v" |
(tramp-login-args ("-ssh")) ;optionally add "-v" |
402 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
403 |
(tramp-rcp-keep-date-arg nil) |
(tramp-copy-keep-date-arg nil)) |
404 |
(tramp-su-program nil) |
("plink1" |
405 |
(tramp-su-args nil) |
(tramp-connection-function tramp-open-connection-rsh) |
406 |
(tramp-telnet-program nil) |
(tramp-login-program "plink") |
407 |
(tramp-telnet-args nil)) |
(tramp-copy-program nil) |
408 |
|
(tramp-remote-sh "/bin/sh") |
409 |
|
(tramp-login-args ("-1" "-ssh")) ;optionally add "-v" |
410 |
|
(tramp-copy-args nil) |
411 |
|
(tramp-copy-keep-date-arg nil)) |
412 |
("pscp" |
("pscp" |
413 |
(tramp-connection-function tramp-open-connection-rsh) |
(tramp-connection-function tramp-open-connection-rsh) |
414 |
(tramp-rsh-program "plink") |
(tramp-login-program "plink") |
415 |
(tramp-rcp-program "pscp") |
(tramp-copy-program "pscp") |
416 |
(tramp-remote-sh "/bin/sh") |
(tramp-remote-sh "/bin/sh") |
417 |
(tramp-rsh-args ("-ssh")) |
(tramp-login-args ("-ssh")) |
418 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
419 |
(tramp-rcp-keep-date-arg "-p") |
(tramp-copy-keep-date-arg "-p")) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
420 |
("fcp" |
("fcp" |
421 |
(tramp-connection-function tramp-open-connection-rsh) |
(tramp-connection-function tramp-open-connection-rsh) |
422 |
(tramp-rsh-program "fsh") |
(tramp-login-program "fsh") |
423 |
(tramp-rcp-program "fcp") |
(tramp-copy-program "fcp") |
424 |
(tramp-remote-sh "/bin/sh -i") |
(tramp-remote-sh "/bin/sh -i") |
425 |
(tramp-rsh-args ("sh" "-i")) |
(tramp-login-args ("sh" "-i")) |
426 |
(tramp-rcp-args nil) |
(tramp-copy-args nil) |
427 |
(tramp-rcp-keep-date-arg "-p") |
(tramp-copy-keep-date-arg "-p")) |
|
(tramp-su-program nil) |
|
|
(tramp-su-args nil) |
|
|
(tramp-telnet-program nil) |
|
|
(tramp-telnet-args nil)) |
|
428 |
) |
) |
429 |
"*Alist of methods for remote files. |
"*Alist of methods for remote files. |
430 |
This is a list of entries of the form (NAME PARAM1 PARAM2 ...). |
This is a list of entries of the form (NAME PARAM1 PARAM2 ...). |
442 |
which groks tilde expansion, but it can search for it. Also note |
which groks tilde expansion, but it can search for it. Also note |
443 |
that \"/bin/sh\" exists on all Unixen, this might not be true for |
that \"/bin/sh\" exists on all Unixen, this might not be true for |
444 |
the value that you decide to use. You Have Been Warned. |
the value that you decide to use. You Have Been Warned. |
445 |
* `tramp-rsh-program' |
* `tramp-login-program' |
446 |
This specifies the name of the program to use for rsh; this might be |
This specifies the name of the program to use for logging in to the |
447 |
the absolute filename of rsh or the name of a workalike program. |
remote host. Depending on `tramp-connection-function', this may be |
448 |
* `tramp-rsh-args' |
the name of rsh or a workalike program (when |
449 |
|
`tramp-connection-function' is `tramp-open-connection-rsh'), or the |
450 |
|
name of telnet or a workalike (for `tramp-open-connection-telnet'), |
451 |
|
or the name of su or a workalike (for `tramp-open-connection-su'). |
452 |
|
* `tramp-login-args' |
453 |
This specifies the list of arguments to pass to the above |
This specifies the list of arguments to pass to the above |
454 |
mentioned program. Please note that this is a list of arguments, |
mentioned program. Please note that this is a list of arguments, |
455 |
that is, normally you don't want to put \"-a -b\" or \"-f foo\" |
that is, normally you don't want to put \"-a -b\" or \"-f foo\" |
456 |
here. Instead, you want two list elements, one for \"-a\" and one |
here. Instead, you want two list elements, one for \"-a\" and one |
457 |
for \"-b\", or one for \"-f\" and one for \"foo\". |
for \"-b\", or one for \"-f\" and one for \"foo\". |
458 |
* `tramp-rcp-program' |
If `tramp-connection-function' is `tramp-open-connection-su', then |
459 |
This specifies the name of the program to use for rcp; this might be |
\"%u\" in this list is replaced by the user name, and \"%%\" can |
460 |
the absolute filename of rcp or the name of a workalike program. |
be used to obtain a literal percent character. |
461 |
* `tramp-rcp-args' |
* `tramp-copy-program' |
462 |
|
This specifies the name of the program to use for remotely copying |
463 |
|
the file; this might be the absolute filename of rcp or the name of |
464 |
|
a workalike program. |
465 |
|
* `tramp-copy-args' |
466 |
This specifies the list of parameters to pass to the above mentioned |
This specifies the list of parameters to pass to the above mentioned |
467 |
program, the hints for `tramp-rsh-args' also apply here. |
program, the hints for `tramp-login-args' also apply here. |
468 |
* `tramp-rcp-keep-date-arg' |
* `tramp-copy-keep-date-arg' |
469 |
This specifies the parameter to use for `rcp' when the timestamp |
This specifies the parameter to use for the copying program when the |
470 |
of the original file should be kept. For `rcp', use `-p', for |
timestamp of the original file should be kept. For `rcp', use `-p', for |
471 |
`rsync', use `-t'. |
`rsync', use `-t'. |
472 |
* `tramp-su-program' |
|
473 |
This specifies the name of the program to use for `su'. |
What does all this mean? Well, you should specify `tramp-login-program' |
474 |
* `tramp-su-args' |
for all methods; this program is used to log in to the remote site. Then, |
475 |
This specifies the list of arguments to pass to `su'. |
there are two ways to actually transfer the files between the local and the |
476 |
\"%u\" is replaced by the user name, use \"%%\" for a literal |
remote side. One way is using an additional rcp-like program. If you want |
477 |
percent character. |
to do this, set `tramp-copy-program' in the method. |
|
* `tramp-telnet-program' |
|
|
Specifies the telnet program to use when using |
|
|
`tramp-open-connection-telnet' to log in. |
|
|
* `tramp-telnet-args' |
|
|
Specifies list of arguments to pass to `telnet'. The hints for |
|
|
`tramp-rsh-args' also apply here. |
|
|
|
|
|
What does all this mean? Well, you should specify `tramp-rsh-program', |
|
|
`tramp-telnet-program' or `tramp-su-program' for all methods; this program |
|
|
is used to log in to the remote site. Then, there are two ways to |
|
|
actually transfer the files between the local and the remote side. |
|
|
One way is using an additional rcp-like program. If you want to do |
|
|
this, set `tramp-rcp-program' in the method. |
|
478 |
|
|
479 |
Another possibility for file transfer is inline transfer, i.e. the |
Another possibility for file transfer is inline transfer, i.e. the |
480 |
file is passed through the same buffer used by `tramp-rsh-program'. In |
file is passed through the same buffer used by `tramp-login-program'. In |
481 |
this case, the file contents need to be protected since the |
this case, the file contents need to be protected since the |
482 |
`tramp-rsh-program' might use escape codes or the connection might not |
`tramp-login-program' might use escape codes or the connection might not |
483 |
be eight-bit clean. Therefore, file contents are encoded for transit. |
be eight-bit clean. Therefore, file contents are encoded for transit. |
484 |
See the variable `tramp-coding-commands' for details. |
See the variable `tramp-coding-commands' for details. |
485 |
|
|
486 |
So, to summarize: if the method is an out-of-band method, then you |
So, to summarize: if the method is an out-of-band method, then you |
487 |
must specify `tramp-rcp-program' and `tramp-rcp-args'. If it is an |
must specify `tramp-copy-program' and `tramp-copy-args'. If it is an |
488 |
inline method, then these two parameters should be nil. Every method, |
inline method, then these two parameters should be nil. Every method, |
489 |
inline or out of band, must specify `tramp-connection-function' plus |
inline or out of band, must specify `tramp-connection-function' plus |
490 |
the associated arguments (for example, the telnet program if you chose |
the associated arguments (for example, the login program if you chose |
491 |
`tramp-open-connection-telnet'). |
`tramp-open-connection-telnet'). |
492 |
|
|
493 |
Notes: |
Notes: |
501 |
:type '(repeat |
:type '(repeat |
502 |
(cons string |
(cons string |
503 |
(set (list (const tramp-connection-function) function) |
(set (list (const tramp-connection-function) function) |
504 |
(list (const tramp-rsh-program) |
(list (const tramp-login-program) |
505 |
(choice (const nil) string)) |
(choice (const nil) string)) |
506 |
(list (const tramp-rcp-program) |
(list (const tramp-copy-program) |
507 |
(choice (const nil) string)) |
(choice (const nil) string)) |
508 |
(list (const tramp-remote-sh) |
(list (const tramp-remote-sh) |
509 |
(choice (const nil) string)) |
(choice (const nil) string)) |
510 |
(list (const tramp-rsh-args) (repeat string)) |
(list (const tramp-login-args) (repeat string)) |
511 |
(list (const tramp-rcp-args) (repeat string)) |
(list (const tramp-copy-args) (repeat string)) |
512 |
(list (const tramp-rcp-keep-date-arg) |
(list (const tramp-copy-keep-date-arg) |
513 |
(choice (const nil) string)) |
(choice (const nil) string)) |
|
(list (const tramp-su-program) |
|
|
(choice (const nil) string)) |
|
|
(list (const tramp-su-args) (repeat string)) |
|
514 |
(list (const tramp-encoding-command) |
(list (const tramp-encoding-command) |
515 |
(choice (const nil) string)) |
(choice (const nil) string)) |
516 |
(list (const tramp-decoding-command) |
(list (const tramp-decoding-command) |
518 |
(list (const tramp-encoding-function) |
(list (const tramp-encoding-function) |
519 |
(choice (const nil) function)) |
(choice (const nil) function)) |
520 |
(list (const tramp-decoding-function) |
(list (const tramp-decoding-function) |
521 |
(choice (const nil) function)) |
(choice (const nil) function)))))) |
|
(list (const tramp-telnet-program) |
|
|
(choice (const nil) string)) |
|
|
(list (const tramp-telnet-args) (repeat string)))))) |
|
522 |
|
|
523 |
(defcustom tramp-multi-methods '("multi" "multiu") |
(defcustom tramp-multi-methods '("multi" "multiu") |
524 |
"*List of multi-hop methods. |
"*List of multi-hop methods. |
530 |
(defcustom tramp-multi-connection-function-alist |
(defcustom tramp-multi-connection-function-alist |
531 |
'(("telnet" tramp-multi-connect-telnet "telnet %h%n") |
'(("telnet" tramp-multi-connect-telnet "telnet %h%n") |
532 |
("rsh" tramp-multi-connect-rlogin "rsh %h -l %u%n") |
("rsh" tramp-multi-connect-rlogin "rsh %h -l %u%n") |
533 |
|
("remsh" tramp-multi-connect-rlogin "remsh %h -l %u%n") |
534 |
("ssh" tramp-multi-connect-rlogin "ssh %h -l %u%n") |
("ssh" tramp-multi-connect-rlogin "ssh %h -l %u%n") |
535 |
("su" tramp-multi-connect-su "su - %u%n") |
("su" tramp-multi-connect-su "su - %u%n") |
536 |
("sudo" tramp-multi-connect-su "sudo -u %u -s%n")) |
("sudo" tramp-multi-connect-su "sudo -u %u -s -p Password:%n")) |
537 |
"*List of connection functions for multi-hop methods. |
"*List of connection functions for multi-hop methods. |
538 |
Each list item is a list of three items (METHOD FUNCTION COMMAND), |
Each list item is a list of three items (METHOD FUNCTION COMMAND), |
539 |
where METHOD is the name as used in the file name, FUNCTION is the |
where METHOD is the name as used in the file name, FUNCTION is the |
551 |
:group 'tramp |
:group 'tramp |
552 |
:type '(repeat (list string function string))) |
:type '(repeat (list string function string))) |
553 |
|
|
554 |
(defcustom tramp-default-method "ssh" |
(defcustom tramp-default-method |
555 |
|
(if (and (fboundp 'executable-find) |
556 |
|
(executable-find "plink")) |
557 |
|
"plink" |
558 |
|
"ssh") |
559 |
"*Default method to use for transferring files. |
"*Default method to use for transferring files. |
560 |
See `tramp-methods' for possibilities. |
See `tramp-methods' for possibilities. |
561 |
Also see `tramp-default-method-alist'." |
Also see `tramp-default-method-alist'." |
585 |
(unless (memq system-type '(windows-nt)) |
(unless (memq system-type '(windows-nt)) |
586 |
'((tramp-parse-rhosts "/etc/hosts.equiv") |
'((tramp-parse-rhosts "/etc/hosts.equiv") |
587 |
(tramp-parse-rhosts "~/.rhosts"))) |
(tramp-parse-rhosts "~/.rhosts"))) |
588 |
"Default list of (FUNCTION FILE) pairs to be examined for rsh methods." |
"Default list of (FUNCTION FILE) pairs to be examined for rsh methods.") |
|
) |
|
589 |
|
|
590 |
;; Default values for non-Unices seeked |
;; Default values for non-Unices seeked |
591 |
(defconst tramp-completion-function-alist-ssh |
(defconst tramp-completion-function-alist-ssh |
598 |
(tramp-parse-rhosts "~/.shosts") |
(tramp-parse-rhosts "~/.shosts") |
599 |
(tramp-parse-shosts "~/.ssh/known_hosts") |
(tramp-parse-shosts "~/.ssh/known_hosts") |
600 |
(tramp-parse-sconfig "~/.ssh/config"))) |
(tramp-parse-sconfig "~/.ssh/config"))) |
601 |
"Default list of (FUNCTION FILE) pairs to be examined for ssh methods." |
"Default list of (FUNCTION FILE) pairs to be examined for ssh methods.") |
|
) |
|
602 |
|
|
603 |
;; Default values for non-Unices seeked |
;; Default values for non-Unices seeked |
604 |
(defconst tramp-completion-function-alist-telnet |
(defconst tramp-completion-function-alist-telnet |
605 |
(unless (memq system-type '(windows-nt)) |
(unless (memq system-type '(windows-nt)) |
606 |
'((tramp-parse-hosts "/etc/hosts"))) |
'((tramp-parse-hosts "/etc/hosts"))) |
607 |
"Default list of (FUNCTION FILE) pairs to be examined for telnet methods." |
"Default list of (FUNCTION FILE) pairs to be examined for telnet methods.") |
|
) |
|
608 |
|
|
609 |
;; Default values for non-Unices seeked |
;; Default values for non-Unices seeked |
610 |
(defconst tramp-completion-function-alist-su |
(defconst tramp-completion-function-alist-su |
611 |
(unless (memq system-type '(windows-nt)) |
(unless (memq system-type '(windows-nt)) |
612 |
'((tramp-parse-passwd "/etc/passwd"))) |
'((tramp-parse-passwd "/etc/passwd"))) |
613 |
"Default list of (FUNCTION FILE) pairs to be examined for su methods." |
"Default list of (FUNCTION FILE) pairs to be examined for su methods.") |
|
) |
|
614 |
|
|
615 |
(defcustom tramp-completion-function-alist |
(defcustom tramp-completion-function-alist |
616 |
(list (cons "rcp" tramp-completion-function-alist-rsh) |
(list (cons "rcp" tramp-completion-function-alist-rsh) |
696 |
:type 'regexp) |
:type 'regexp) |
697 |
|
|
698 |
(defcustom tramp-shell-prompt-pattern |
(defcustom tramp-shell-prompt-pattern |
699 |
"^[^#$%>\n]*[#$%>] *" |
"^[^#$%>\n]*[#$%>] *\\(\e\\[[0-9;]*[a-zA-Z]\\)?" |
700 |
"Regexp to match prompts from remote shell. |
"Regexp to match prompts from remote shell. |
701 |
Normally, Tramp expects you to configure `shell-prompt-pattern' |
Normally, Tramp expects you to configure `shell-prompt-pattern' |
702 |
correctly, but sometimes it happens that you are connecting to a |
correctly, but sometimes it happens that you are connecting to a |
703 |
remote host which sends a different kind of shell prompt. Therefore, |
remote host which sends a different kind of shell prompt. Therefore, |
704 |
Tramp recognizes things matched by `shell-prompt-pattern' as prompt, |
Tramp recognizes things matched by `shell-prompt-pattern' as prompt, |
705 |
and also things matched by this variable. The default value of this |
and also things matched by this variable. The default value of this |
706 |
variable is the same as the default value of `shell-prompt-pattern', |
variable is similar to the default value of `shell-prompt-pattern', |
707 |
which should work well in many cases." |
which should work well in many cases." |
708 |
:group 'tramp |
:group 'tramp |
709 |
:type 'regexp) |
:type 'regexp) |
1237 |
In the connection buffer, this variable has the value of the like-named |
In the connection buffer, this variable has the value of the like-named |
1238 |
method parameter, as specified in `tramp-methods' (which see).") |
method parameter, as specified in `tramp-methods' (which see).") |
1239 |
|
|
1240 |
(defvar tramp-rsh-program nil |
(defvar tramp-login-program nil |
1241 |
"This internal variable holds a parameter for `tramp-methods'. |
"This internal variable holds a parameter for `tramp-methods'. |
1242 |
In the connection buffer, this variable has the value of the like-named |
In the connection buffer, this variable has the value of the like-named |
1243 |
method parameter, as specified in `tramp-methods' (which see).") |
method parameter, as specified in `tramp-methods' (which see).") |
1244 |
|
|
1245 |
(defvar tramp-rsh-args nil |
(defvar tramp-login-args nil |
1246 |
"This internal variable holds a parameter for `tramp-methods'. |
"This internal variable holds a parameter for `tramp-methods'. |
1247 |
In the connection buffer, this variable has the value of the like-named |
In the connection buffer, this variable has the value of the like-named |
1248 |
method parameter, as specified in `tramp-methods' (which see).") |
method parameter, as specified in `tramp-methods' (which see).") |
1249 |
|
|
1250 |
(defvar tramp-rcp-program nil |
(defvar tramp-copy-program nil |
1251 |
"This internal variable holds a parameter for `tramp-methods'. |
"This internal variable holds a parameter for `tramp-methods'. |
1252 |
In the connection buffer, this variable has the value of the like-named |
In the connection buffer, this variable has the value of the like-named |
1253 |
method parameter, as specified in `tramp-methods' (which see).") |
method parameter, as specified in `tramp-methods' (which see).") |
1254 |
|
|
1255 |
(defvar tramp-rcp-args nil |
(defvar tramp-copy-args nil |
1256 |
"This internal variable holds a parameter for `tramp-methods'. |
"This internal variable holds a parameter for `tramp-methods'. |
1257 |
In the connection buffer, this variable has the value of the like-named |
In the connection buffer, this variable has the value of the like-named |
1258 |
method parameter, as specified in `tramp-methods' (which see).") |
method parameter, as specified in `tramp-methods' (which see).") |
1259 |
|
|
1260 |
(defvar tramp-rcp-keep-date-arg nil |
(defvar tramp-copy-keep-date-arg nil |
1261 |
"This internal variable holds a parameter for `tramp-methods'. |
"This internal variable holds a parameter for `tramp-methods'. |
1262 |
In the connection buffer, this variable has the value of the like-named |
In the connection buffer, this variable has the value of the like-named |
1263 |
method parameter, as specified in `tramp-methods' (which see).") |
method parameter, as specified in `tramp-methods' (which see).") |
1282 |
In the connection buffer, this variable has the value of the like-named |
In the connection buffer, this variable has the value of the like-named |
1283 |
method parameter, as specified in `tramp-methods' (which see).") |
method parameter, as specified in `tramp-methods' (which see).") |
1284 |
|
|
|
(defvar tramp-telnet-program nil |
|
|
"This internal variable holds a parameter for `tramp-methods'. |
|
|
In the connection buffer, this variable has the value of the like-named |
|
|
method parameter, as specified in `tramp-methods' (which see).") |
|
|
|
|
|
(defvar tramp-telnet-args nil |
|
|
"This internal variable holds a parameter for `tramp-methods'. |
|
|
In the connection buffer, this variable has the value of the like-named |
|
|
method parameter, as specified in `tramp-methods' (which see).") |
|
|
|
|
|
(defvar tramp-su-program nil |
|
|
"This internal variable holds a parameter for `tramp-methods'. |
|
|
In the connection buffer, this variable has the value of the like-named |
|
|
method parameter, as specified in `tramp-methods' (which see).") |
|
|
|
|
1285 |
;; CCC `local in each buffer'? |
;; CCC `local in each buffer'? |
1286 |
(defvar tramp-ls-command nil |
(defvar tramp-ls-command nil |
1287 |
"This command is used to get a long listing with numeric user and group ids. |
"This command is used to get a long listing with numeric user and group ids. |
1851 |
(setq numchase (1+ numchase)) |
(setq numchase (1+ numchase)) |
1852 |
(when (file-name-absolute-p symlink-target) |
(when (file-name-absolute-p symlink-target) |
1853 |
(setq result nil)) |
(setq result nil)) |
1854 |
|
;; If the symlink was absolute, we'll get a string like |
1855 |
|
;; "/user@host:/some/target"; extract the |
1856 |
|
;; "/some/target" part from it. |
1857 |
|
(when (tramp-tramp-file-p symlink-target) |
1858 |
|
(with-parsed-tramp-file-name symlink-target sym |
1859 |
|
(unless (equal (list multi-method method user host) |
1860 |
|
(list sym-multi-method sym-method |
1861 |
|
sym-user sym-host)) |
1862 |
|
(error "Symlink target `%s' on wrong host" |
1863 |
|
symlink-target)) |
1864 |
|
(setq symlink-target localname))) |
1865 |
(setq steps |
(setq steps |
1866 |
(append (tramp-split-string symlink-target "/") steps))) |
(append (tramp-split-string symlink-target "/") steps))) |
1867 |
(t |
(t |
2239 |
"Like `file-symlink-p' for tramp files." |
"Like `file-symlink-p' for tramp files." |
2240 |
(with-parsed-tramp-file-name filename nil |
(with-parsed-tramp-file-name filename nil |
2241 |
(let ((x (car (tramp-handle-file-attributes filename)))) |
(let ((x (car (tramp-handle-file-attributes filename)))) |
2242 |
(when (stringp x) x)))) |
(when (stringp x) |
2243 |
|
;; When Tramp is running on VMS, then `file-name-absolute-p' |
2244 |
|
;; might do weird things. |
2245 |
|
(if (file-name-absolute-p x) |
2246 |
|
(tramp-make-tramp-file-name |
2247 |
|
multi-method method user host x) |
2248 |
|
x))))) |
2249 |
|
|
2250 |
(defun tramp-handle-file-writable-p (filename) |
(defun tramp-handle-file-writable-p (filename) |
2251 |
"Like `file-writable-p' for tramp files." |
"Like `file-writable-p' for tramp files." |
2528 |
;; source and target file. |
;; source and target file. |
2529 |
|
|
2530 |
;; CCC: If both source and target are Tramp files, |
;; CCC: If both source and target are Tramp files, |
2531 |
;; and both are using the same rcp-program, then we |
;; and both are using the same copy-program, then we |
2532 |
;; can invoke rcp directly. Note that |
;; can invoke rcp directly. Note that |
2533 |
;; default-directory should point to a local |
;; default-directory should point to a local |
2534 |
;; directory if we want to invoke rcp. |
;; directory if we want to invoke rcp. |
2846 |
;; would otherwise use backslash. |
;; would otherwise use backslash. |
2847 |
(let ((directory-sep-char ?/)) |
(let ((directory-sep-char ?/)) |
2848 |
(tramp-make-tramp-file-name |
(tramp-make-tramp-file-name |
2849 |
multi-method method user host |
multi-method (or method (tramp-find-default-method user host)) |
2850 |
|
user host |
2851 |
(tramp-drop-volume-letter |
(tramp-drop-volume-letter |
2852 |
(tramp-run-real-handler 'expand-file-name |
(tramp-run-real-handler 'expand-file-name |
2853 |
(list localname))))))))) |
(list localname))))))))) |
2937 |
(with-parsed-tramp-file-name filename nil |
(with-parsed-tramp-file-name filename nil |
2938 |
(let ((output-buf (get-buffer-create "*tramp output*")) |
(let ((output-buf (get-buffer-create "*tramp output*")) |
2939 |
(tramp-buf (tramp-get-buffer multi-method method user host)) |
(tramp-buf (tramp-get-buffer multi-method method user host)) |
2940 |
(rcp-program (tramp-get-rcp-program |
(copy-program (tramp-get-copy-program |
2941 |
multi-method |
multi-method |
2942 |
(tramp-find-method multi-method method user host) |
(tramp-find-method multi-method method user host) |
2943 |
user host)) |
user host)) |
2944 |
(rcp-args (tramp-get-rcp-args |
(copy-args (tramp-get-copy-args |
2945 |
multi-method |
multi-method |
2946 |
(tramp-find-method multi-method method user host) |
(tramp-find-method multi-method method user host) |
2947 |
user host)) |
user host)) |
2948 |
;; We used to bind the following as late as possible. |
;; We used to bind the following as late as possible. |
2949 |
;; loc-enc and loc-dec were bound directly before the if |
;; loc-enc and loc-dec were bound directly before the if |
2950 |
;; statement that checks them. But the functions |
;; statement that checks them. But the functions |
2960 |
(error "Cannot make local copy of non-existing file `%s'" |
(error "Cannot make local copy of non-existing file `%s'" |
2961 |
filename)) |
filename)) |
2962 |
(setq tmpfil (tramp-make-temp-file)) |
(setq tmpfil (tramp-make-temp-file)) |
2963 |
(cond (rcp-program |
(cond (copy-program |
2964 |
;; Use rcp-like program for file transfer. |
;; Use rcp-like program for file transfer. |
2965 |
(tramp-message-for-buffer |
(tramp-message-for-buffer |
2966 |
multi-method method user host |
multi-method method user host |
2969 |
(unless (equal |
(unless (equal |
2970 |
0 |
0 |
2971 |
(apply #'call-process |
(apply #'call-process |
2972 |
rcp-program |
copy-program |
2973 |
nil output-buf nil |
nil output-buf nil |
2974 |
(append rcp-args |
(append copy-args |
2975 |
(list |
(list |
2976 |
(tramp-make-rcp-program-file-name |
(tramp-make-copy-program-file-name |
2977 |
user host |
user host |
2978 |
(tramp-shell-quote-argument localname)) |
(tramp-shell-quote-argument localname)) |
2979 |
tmpfil)))) |
tmpfil)))) |
2981 |
(error |
(error |
2982 |
(concat "tramp-handle-file-local-copy: `%s' didn't work, " |
(concat "tramp-handle-file-local-copy: `%s' didn't work, " |
2983 |
"see buffer `%s' for details") |
"see buffer `%s' for details") |
2984 |
rcp-program output-buf)) |
copy-program output-buf)) |
2985 |
(tramp-message-for-buffer |
(tramp-message-for-buffer |
2986 |
multi-method method user host |
multi-method method user host |
2987 |
5 "Fetching %s to tmp file %s...done" filename tmpfil)) |
5 "Fetching %s to tmp file %s...done" filename tmpfil)) |
3105 |
(error "File not overwritten"))) |
(error "File not overwritten"))) |
3106 |
(with-parsed-tramp-file-name filename nil |
(with-parsed-tramp-file-name filename nil |
3107 |
(let ((curbuf (current-buffer)) |
(let ((curbuf (current-buffer)) |
3108 |
(rcp-program (tramp-get-rcp-program |
(copy-program (tramp-get-copy-program |
3109 |
multi-method (tramp-find-method multi-method method user host) |
multi-method |
3110 |
user host)) |
(tramp-find-method multi-method method user host) |
3111 |
(rcp-args (tramp-get-rcp-args |
user host)) |
3112 |
|
(copy-args (tramp-get-copy-args |
3113 |
multi-method |
multi-method |
3114 |
(tramp-find-method multi-method method user host) |
(tramp-find-method multi-method method user host) |
3115 |
user host)) |
user host)) |
3147 |
;; decoding command must be specified. However, if the method |
;; decoding command must be specified. However, if the method |
3148 |
;; _also_ specifies an encoding function, then that is used for |
;; _also_ specifies an encoding function, then that is used for |
3149 |
;; encoding the contents of the tmp file. |
;; encoding the contents of the tmp file. |
3150 |
(cond (rcp-program |
(cond (copy-program |
3151 |
;; use rcp-like program for file transfer |
;; use rcp-like program for file transfer |
3152 |
(let ((argl (append rcp-args |
(let ((argl (append copy-args |
3153 |
(list |
(list |
3154 |
tmpfil |
tmpfil |
3155 |
(tramp-make-rcp-program-file-name |
(tramp-make-copy-program-file-name |
3156 |
user host |
user host |
3157 |
(tramp-shell-quote-argument localname)))))) |
(tramp-shell-quote-argument localname)))))) |
3158 |
(tramp-message-for-buffer |
(tramp-message-for-buffer |
3159 |
multi-method method user host |
multi-method method user host |
3160 |
6 "Writing tmp file using `%s'..." rcp-program) |
6 "Writing tmp file using `%s'..." copy-program) |
3161 |
(save-excursion (set-buffer trampbuf) (erase-buffer)) |
(save-excursion (set-buffer trampbuf) (erase-buffer)) |
3162 |
(when tramp-debug-buffer |
(when tramp-debug-buffer |
3163 |
(save-excursion |
(save-excursion |
3165 |
method user host)) |
method user host)) |
3166 |
(goto-char (point-max)) |
(goto-char (point-max)) |
3167 |
(tramp-insert-with-face |
(tramp-insert-with-face |
3168 |
'bold (format "$ %s %s\n" rcp-program |
'bold (format "$ %s %s\n" copy-program |
3169 |
(mapconcat 'identity argl " "))))) |
(mapconcat 'identity argl " "))))) |
3170 |
(unless (equal 0 |
(unless (equal 0 |
3171 |
(apply #'call-process |
(apply #'call-process |
3172 |
rcp-program nil trampbuf nil argl)) |
copy-program nil trampbuf nil argl)) |
3173 |
(pop-to-buffer trampbuf) |
(pop-to-buffer trampbuf) |
3174 |
(error |
(error |
3175 |
"Cannot write region to file `%s', command `%s' failed" |
"Cannot write region to file `%s', command `%s' failed" |
3176 |
filename rcp-program)) |
filename copy-program)) |
3177 |
(tramp-message-for-buffer |
(tramp-message-for-buffer |
3178 |
multi-method method user host |
multi-method method user host |
3179 |
6 "Transferring file using `%s'...done" |
6 "Transferring file using `%s'...done" |
3180 |
rcp-program))) |
copy-program))) |
3181 |
((and rem-enc rem-dec) |
((and rem-enc rem-dec) |
3182 |
;; Use inline file transfer |
;; Use inline file transfer |
3183 |
(let ((tmpbuf (get-buffer-create " *tramp file transfer*"))) |
(let ((tmpbuf (get-buffer-create " *tramp file transfer*"))) |
3431 |
(fn (apply (cdr fn) args)) |
(fn (apply (cdr fn) args)) |
3432 |
(t (tramp-run-real-handler operation args)))))) |
(t (tramp-run-real-handler operation args)))))) |
3433 |
|
|
3434 |
|
;;;###autoload |
3435 |
(put 'tramp-file-name-handler 'file-remote-p t) ;for file-remote-p |
(put 'tramp-file-name-handler 'file-remote-p t) ;for file-remote-p |
3436 |
|
|
3437 |
;;;###autoload |
;;;###autoload |
3447 |
(save-match-data (apply (cdr fn) args)) |
(save-match-data (apply (cdr fn) args)) |
3448 |
(tramp-completion-run-real-handler operation args)))) |
(tramp-completion-run-real-handler operation args)))) |
3449 |
|
|
3450 |
|
;;;###autoload |
3451 |
|
(put 'tramp-completion-file-name-handler 'safe-magic t) |
3452 |
|
|
3453 |
;; Register in file name handler alist |
;; Register in file name handler alist |
3454 |
;;;###autoload |
;;;###autoload |
3455 |
(add-to-list 'file-name-handler-alist |
(add-to-list 'file-name-handler-alist |
4538 |
(p (apply 'start-process |
(p (apply 'start-process |
4539 |
(tramp-buffer-name multi-method method user host) |
(tramp-buffer-name multi-method method user host) |
4540 |
(tramp-get-buffer multi-method method user host) |
(tramp-get-buffer multi-method method user host) |
4541 |
(tramp-get-telnet-program |
(tramp-get-login-program |
4542 |
multi-method |
multi-method |
4543 |
(tramp-find-method multi-method method user host) |
(tramp-find-method multi-method method user host) |
4544 |
user host) |
user host) |
4545 |
host |
host |
4546 |
(tramp-get-telnet-args |
(tramp-get-login-args |
4547 |
multi-method |
multi-method |
4548 |
(tramp-find-method multi-method method user host) |
(tramp-find-method multi-method method user host) |
4549 |
user host))) |
user host))) |
4595 |
(let ((process-environment (copy-sequence process-environment)) |
(let ((process-environment (copy-sequence process-environment)) |
4596 |
(bufnam (tramp-buffer-name multi-method method user host)) |
(bufnam (tramp-buffer-name multi-method method user host)) |
4597 |
(buf (tramp-get-buffer multi-method method user host)) |
(buf (tramp-get-buffer multi-method method user host)) |
4598 |
(rsh-program (tramp-get-rsh-program |
(login-program (tramp-get-login-program |
4599 |
multi-method |
multi-method |
4600 |
(tramp-find-method multi-method method user host) |
(tramp-find-method multi-method method user host) |
4601 |
user host)) |
user host)) |
4602 |
(rsh-args (tramp-get-rsh-args |
(login-args (tramp-get-login-args |
4603 |
multi-method |
multi-method |
4604 |
(tramp-find-method multi-method method user host) |
(tramp-find-method multi-method method user host) |
4605 |
user host))) |
user host))) |
4606 |
;; The following should be changed. We need a more general |
;; The following should be changed. We need a more general |
4607 |
;; mechanism to parse extra host args. |
;; mechanism to parse extra host args. |
4608 |
(when (string-match "\\([^#]*\\)#\\(.*\\)" host) |
(when (string-match "\\([^#]*\\)#\\(.*\\)" host) |
4609 |
(setq rsh-args (cons "-p" (cons (match-string 2 host) rsh-args))) |
(setq login-args (cons "-p" (cons (match-string 2 host) rsh-args))) |
4610 |
(setq host (match-string 1 host))) |
(setq host (match-string 1 host))) |
4611 |
(setenv "TERM" tramp-terminal-type) |
(setenv "TERM" tramp-terminal-type) |
4612 |
(let* ((default-directory (tramp-temporary-file-directory)) |
(let* ((default-directory (tramp-temporary-file-directory)) |
4617 |
(> emacs-major-version 20)) |
(> emacs-major-version 20)) |
4618 |
tramp-dos-coding-system)) |
tramp-dos-coding-system)) |
4619 |
(p (if (and user (not (string= user ""))) |
(p (if (and user (not (string= user ""))) |
4620 |
(apply #'start-process bufnam buf rsh-program |
(apply #'start-process bufnam buf login-program |
4621 |
host "-l" user rsh-args) |
host "-l" user login-args) |
4622 |
(apply #'start-process bufnam buf rsh-program |
(apply #'start-process bufnam buf login-program |
4623 |
host rsh-args))) |
host login-args))) |
4624 |
(found nil)) |
(found nil)) |
4625 |
(process-kill-without-query p) |
(process-kill-without-query p) |
4626 |
|
|
4670 |
(p (apply 'start-process |
(p (apply 'start-process |
4671 |
(tramp-buffer-name multi-method method user host) |
(tramp-buffer-name multi-method method user host) |
4672 |
(tramp-get-buffer multi-method method user host) |
(tramp-get-buffer multi-method method user host) |
4673 |
(tramp-get-su-program |
(tramp-get-login-program |
4674 |
multi-method |
multi-method |
4675 |
(tramp-find-method multi-method method user host) |
(tramp-find-method multi-method method user host) |
4676 |
user host) |
user host) |
4677 |
(mapcar |
(mapcar |
4678 |
(lambda (x) |
(lambda (x) |
4679 |
(format-spec x `((?u . ,(or user "root"))))) |
(format-spec x `((?u . ,(or user "root"))))) |
4680 |
(tramp-get-su-args |
(tramp-get-login-args |
4681 |
multi-method |
multi-method |
4682 |
(tramp-find-method multi-method method user host) |
(tramp-find-method multi-method method user host) |
4683 |
user host)))) |
user host)))) |
4881 |
"]]")))) |
"]]")))) |
4882 |
found)) |
found)) |
4883 |
|
|
4884 |
|
(defun tramp-wait-for-shell-prompt (proc timeout) |
4885 |
|
"Wait for the shell prompt to appear from process PROC within TIMEOUT seconds. |
4886 |
|
See `tramp-wait-for-regexp' for more details. |
4887 |
|
Shell prompt pattern is determined by variables `shell-prompt-pattern' |
4888 |
|
and `tramp-shell-prompt-pattern'." |
4889 |
|
(tramp-wait-for-regexp |
4890 |
|
proc timeout |
4891 |
|
(format "\\(%s\\|%s\\)\\'" |
4892 |
|
shell-prompt-pattern tramp-shell-prompt-pattern))) |
4893 |
|
|
4894 |
|
(defun tramp-barf-if-no-shell-prompt (proc timeout &rest error-args) |
4895 |
|
"Wait for shell prompt and barf if none appears. |
4896 |
|
Looks at process PROC to see if a shell prompt appears in TIMEOUT |
4897 |
|
seconds. If not, it produces an error message with the given ERROR-ARGS." |
4898 |
|
(unless (tramp-wait-for-shell-prompt proc timeout) |
4899 |
|
(pop-to-buffer (buffer-name)) |
4900 |
|
(apply 'error error-args))) |
4901 |
|
|
4902 |
(defun tramp-enter-password (p prompt) |
(defun tramp-enter-password (p prompt) |
4903 |
"Prompt for a password and send it to the remote end. |
"Prompt for a password and send it to the remote end. |
4904 |
Uses PROMPT as a prompt and sends the password to process P." |
Uses PROMPT as a prompt and sends the password to process P." |
4942 |
;; because that is read by some sh implementations (eg, bash when |
;; because that is read by some sh implementations (eg, bash when |
4943 |
;; called as sh) on startup; this way, we avoid the startup file |
;; called as sh) on startup; this way, we avoid the startup file |
4944 |
;; clobbering $PS1. |
;; clobbering $PS1. |
4945 |
(process-send-string nil (format "exec env 'ENV=' 'PS1=$ ' %s%s" |
(tramp-send-command-internal |
4946 |
(tramp-get-remote-sh |
multi-method method user host |
4947 |
multi-method method user host) |
(format "exec env 'ENV=' 'PS1=$ ' %s" |
4948 |
tramp-rsh-end-of-line)) |
(tramp-get-remote-sh multi-method method user host)) |
4949 |
(when tramp-debug-buffer |
(format "remote `%s' to come up" |
4950 |
(save-excursion |
(tramp-get-remote-sh multi-method method user host))) |
4951 |
(set-buffer (tramp-get-debug-buffer multi-method method user host)) |
(tramp-barf-if-no-shell-prompt |
4952 |
(goto-char (point-max)) |
p 30 |
4953 |
(tramp-insert-with-face |
"Remote `%s' didn't come up. See buffer `%s' for details" |
4954 |
'bold (format "$ exec env PS1='$ ' %s\n" |
(tramp-get-remote-sh multi-method method user host) |
4955 |
(tramp-get-remote-sh multi-method method user host))))) |
(buffer-name)) |
4956 |
(tramp-message 9 "Waiting 30s for remote `%s' to come up..." |
(tramp-message 8 "Setting up remote shell environment") |
|
(tramp-get-remote-sh multi-method method user host)) |
|
|
(unless (tramp-wait-for-regexp |
|
|
p 30 (format "\\(%s\\|%s\\)\\'" |
|
|
shell-prompt-pattern tramp-shell-prompt-pattern)) |
|
|
(pop-to-buffer (buffer-name)) |
|
|
(error "Remote `%s' didn't come up. See buffer `%s' for details" |
|
|
(tramp-get-remote-sh multi-method method user host) |
|
|
(buffer-name))) |
|
|
(tramp-message 9 "Setting up remote shell environment") |
|
4957 |
(tramp-discard-garbage-erase-buffer p multi-method method user host) |
(tramp-discard-garbage-erase-buffer p multi-method method user host) |
4958 |
(process-send-string |
(tramp-send-command-internal multi-method method user host |
4959 |
nil (format "stty -inlcr -echo kill '^U'%s" tramp-rsh-end-of-line)) |
"stty -inlcr -echo kill '^U'") |
|
(unless (tramp-wait-for-regexp |
|
|
p 30 (format "\\(%s\\|%s\\)\\'" |
|
|
shell-prompt-pattern tramp-shell-prompt-pattern)) |
|
|
(pop-to-buffer (buffer-name)) |
|
|
(error "Couldn't `stty -echo', see buffer `%s'" (buffer-name))) |
|
4960 |
(erase-buffer) |
(erase-buffer) |
4961 |
(process-send-string nil (format "TERM=dumb; export TERM%s" |
(tramp-send-command-internal multi-method method user host |
4962 |
tramp-rsh-end-of-line)) |
"TERM=dumb; export TERM") |
|
(unless (tramp-wait-for-regexp |
|
|
p 30 (format "\\(%s\\|%s\\)\\'" |
|
|
shell-prompt-pattern tramp-shell-prompt-pattern)) |
|
|
(pop-to-buffer (buffer-name)) |
|
|
(error "Couldn't `TERM=dumb; export TERM', see buffer `%s'" (buffer-name))) |
|
4963 |
;; Try to set up the coding system correctly. |
;; Try to set up the coding system correctly. |
4964 |
;; CCC this can't be the right way to do it. Hm. |
;; CCC this can't be the right way to do it. Hm. |
4965 |
(save-excursion |
(save-excursion |
4966 |
(erase-buffer) |
(erase-buffer) |
4967 |
(tramp-message 9 "Determining coding system") |
(tramp-message 9 "Determining coding system") |
4968 |
(process-send-string nil (format "echo foo ; echo bar %s" |
(tramp-send-command-internal multi-method method user host |
4969 |
tramp-rsh-end-of-line)) |
"echo foo ; echo bar") |
|
(unless (tramp-wait-for-regexp |
|
|
p 30 (format "\\(%s\\|%s\\)\\'" |
|
|
shell-prompt-pattern tramp-shell-prompt-pattern)) |
|
|
(pop-to-buffer (buffer-name)) |
|
|
(error "Couldn't `echo foo; echo bar' to determine line endings'")) |
|
4970 |
(goto-char (point-min)) |
(goto-char (point-min)) |
4971 |
(if (featurep 'mule) |
(if (featurep 'mule) |
4972 |
;; Use MULE to select the right EOL convention for communicating |
;; Use MULE to select the right EOL convention for communicating |
4990 |
;; because we're running on a non-MULE Emacs. Let's try |
;; because we're running on a non-MULE Emacs. Let's try |
4991 |
;; stty, instead. |
;; stty, instead. |
4992 |
(tramp-message 9 "Trying `stty -onlcr'") |
(tramp-message 9 "Trying `stty -onlcr'") |
4993 |
(process-send-string nil (format "stty -onlcr%s" tramp-rsh-end-of-line)) |
(tramp-send-command-internal multi-method method user host |
4994 |
(unless (tramp-wait-for-regexp |
"stty -onlcr")))) |
|
p 30 (format "\\(%s\\|%s\\)\\'" |
|
|
shell-prompt-pattern tramp-shell-prompt-pattern)) |
|
|
(pop-to-buffer (buffer-name)) |
|
|
(error "Couldn't `stty -onlcr', see buffer `%s'" (buffer-name)))))) |
|
4995 |
(erase-buffer) |
(erase-buffer) |
4996 |
(tramp-message |
(tramp-message |
4997 |
9 "Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1'") |
9 "Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1'") |
4998 |
(process-send-string |
(tramp-send-command-internal multi-method method user host |
4999 |
nil (format "HISTFILE=$HOME/.tramp_history; HISTSIZE=1%s" |
"HISTFILE=$HOME/.tramp_history; HISTSIZE=1") |
|
tramp-rsh-end-of-line)) |
|
|
(unless (tramp-wait-for-regexp |
|
|
p 30 (format "\\(%s\\|%s\\)\\'" |
|
|
shell-prompt-pattern tramp-shell-prompt-pattern)) |
|
|
(pop-to-buffer (buffer-name)) |
|
|
(error (concat "Couldn't `HISTFILE=$HOME/.tramp_history; " |
|
|
"HISTSIZE=1', see buffer `%s'") |
|
|
(buffer-name))) |
|
5000 |
(erase-buffer) |
(erase-buffer) |
5001 |
(tramp-message 9 "Waiting 30s for `set +o vi +o emacs'") |
(tramp-message 9 "Waiting 30s for `set +o vi +o emacs'") |
5002 |
(process-send-string |
(tramp-send-command-internal multi-method method user host |
5003 |
nil (format "set +o vi +o emacs%s" ;mustn't `>/dev/null' with AIX? |
"set +o vi +o emacs") |
|
tramp-rsh-end-of-line)) |
|
|
(unless (tramp-wait-for-regexp |
|
|
p 30 (format "\\(%s\\|%s\\)\\'" |
|
|
shell-prompt-pattern tramp-shell-prompt-pattern)) |
|
|
(pop-to-buffer (buffer-name)) |
|
|
(error "Couldn't `set +o vi +o emacs', see buffer `%s'" |
|
|
(buffer-name))) |
|
5004 |
(erase-buffer) |
(erase-buffer) |
5005 |
(tramp-message 9 "Waiting 30s for `unset MAIL MAILCHECK MAILPATH'") |
(tramp-message 9 "Waiting 30s for `unset MAIL MAILCHECK MAILPATH'") |
5006 |
(process-send-string |
(tramp-send-command-internal |
5007 |
nil (format "unset MAIL MAILCHECK MAILPATH 1>/dev/null 2>/dev/null%s" |
multi-method method user host |
5008 |
tramp-rsh-end-of-line)) |
"unset MAIL MAILCHECK MAILPATH 1>/dev/null 2>/dev/null") |
|
(unless (tramp-wait-for-regexp |
|
|
p 30 (format "\\(%s\\|%s\\)\\'" |
|
|
shell-prompt-pattern tramp-shell-prompt-pattern)) |
|
|
(pop-to-buffer (buffer-name)) |
|
|
(error "Couldn't `unset MAIL MAILCHECK MAILPATH', see buffer `%s'" |
|
|
(buffer-name))) |
|
5009 |
(erase-buffer) |
(erase-buffer) |
5010 |
(tramp-message 9 "Waiting 30s for `unset CDPATH'") |
(tramp-message 9 "Waiting 30s for `unset CDPATH'") |
5011 |
(process-send-string |
(tramp-send-command-internal multi-method method user host |
5012 |
nil (format "unset CDPATH%s" tramp-rsh-end-of-line)) |
"unset CDPATH") |
|
(unless (tramp-wait-for-regexp |
|
|
p 30 (format "\\(%s\\|%s\\)\\'" |
|
|
shell-prompt-pattern tramp-shell-prompt-pattern)) |
|
|
(pop-to-buffer (buffer-name)) |
|
|
(error "Couldn't `unset CDPATH', see buffer `%s'" |
|
|
(buffer-name))) |
|
5013 |
(erase-buffer) |
(erase-buffer) |
5014 |
(tramp-message 9 "Setting shell prompt") |
(tramp-message 9 "Setting shell prompt") |
5015 |
;; Douglas Gray Stephens <DGrayStephens@slb.com> says that we must |
;; Douglas Gray Stephens <DGrayStephens@slb.com> says that we must |
5133 |
" -e '" tramp-perl-file-attributes "' $1 2>/dev/null\n" |
" -e '" tramp-perl-file-attributes "' $1 2>/dev/null\n" |
5134 |
"}")) |
"}")) |
5135 |
(tramp-wait-for-output) |
(tramp-wait-for-output) |
5136 |
(unless (tramp-get-rcp-program |
(unless (tramp-get-copy-program |
5137 |
multi-method |
multi-method |
5138 |
(tramp-find-method multi-method method user host) |
(tramp-find-method multi-method method user host) |
5139 |
user host) |
user host) |
5175 |
(tramp-set-connection-property "ln" ln multi-method method user host))) |
(tramp-set-connection-property "ln" ln multi-method method user host))) |
5176 |
(erase-buffer) |
(erase-buffer) |
5177 |
;; Find the right encoding/decoding commands to use. |
;; Find the right encoding/decoding commands to use. |
5178 |
(unless (tramp-get-rcp-program |
(unless (tramp-get-copy-program |
5179 |
multi-method |
multi-method |
5180 |
(tramp-find-method multi-method method user host) |
(tramp-find-method multi-method method user host) |
5181 |
user host) |
user host) |
5420 |
(process-send-string proc |
(process-send-string proc |
5421 |
(concat command tramp-rsh-end-of-line)))) |
(concat command tramp-rsh-end-of-line)))) |
5422 |
|
|
5423 |
|
(defun tramp-send-command-internal |
5424 |
|
(multi-method method user host command &optional msg) |
5425 |
|
"Send command to remote host and wait for success. |
5426 |
|
Sends COMMAND, then waits 30 seconds for shell prompt." |
5427 |
|
(tramp-send-command multi-method method user host command t t) |
5428 |
|
(when msg |
5429 |
|
(tramp-message 9 "Waiting 30s for %s..." msg)) |
5430 |
|
(tramp-barf-if-no-shell-prompt |
5431 |
|
nil 30 |
5432 |
|
"Couldn't `%s', see buffer `%s'" command (buffer-name))) |
5433 |
|
|
5434 |
(defun tramp-wait-for-output (&optional timeout) |
(defun tramp-wait-for-output (&optional timeout) |
5435 |
"Wait for output from remote rsh command." |
"Wait for output from remote rsh command." |
5436 |
(let ((proc (get-buffer-process (current-buffer))) |
(let ((proc (get-buffer-process (current-buffer))) |
5868 |
(incf i))) |
(incf i))) |
5869 |
(concat prefix hops localname))) |
(concat prefix hops localname))) |
5870 |
|
|
5871 |
(defun tramp-make-rcp-program-file-name (user host localname) |
(defun tramp-make-copy-program-file-name (user host localname) |
5872 |
"Create a file name suitable to be passed to `rcp'." |
"Create a file name suitable to be passed to `rcp' and workalikes." |
5873 |
(if user |
(if user |
5874 |
(format "%s@%s:%s" user host localname) |
(format "%s@%s:%s" user host localname) |
5875 |
(format "%s:%s" host localname))) |
(format "%s:%s" host localname))) |
5877 |
(defun tramp-method-out-of-band-p (multi-method method user host) |
(defun tramp-method-out-of-band-p (multi-method method user host) |
5878 |
"Return t if this is an out-of-band method, nil otherwise. |
"Return t if this is an out-of-band method, nil otherwise. |
5879 |
It is important to check for this condition, since it is not possible |
It is important to check for this condition, since it is not possible |
5880 |
to enter a password for the `tramp-rcp-program'." |
to enter a password for the `tramp-copy-program'." |
5881 |
(tramp-get-rcp-program |
(tramp-get-copy-program |
5882 |
multi-method |
multi-method |
5883 |
(tramp-find-method multi-method method user host) |
(tramp-find-method multi-method method user host) |
5884 |
user host)) |
user host)) |
5976 |
(error "Method `%s' didn't specify a remote shell" |
(error "Method `%s' didn't specify a remote shell" |
5977 |
(or multi-method method))))) |
(or multi-method method))))) |
5978 |
|
|
5979 |
(defun tramp-get-rsh-program (multi-method method user host) |
(defun tramp-get-login-program (multi-method method user host) |
5980 |
(second (or (assoc 'tramp-rsh-program |
(second (or (assoc 'tramp-login-program |
5981 |
(assoc (tramp-find-method multi-method method user host) |
(assoc (tramp-find-method multi-method method user host) |
5982 |
tramp-methods)) |
tramp-methods)) |
5983 |
(error "Method `%s' didn't specify an rsh program" |
(error "Method `%s' didn't specify a login program" |
5984 |
(or multi-method method))))) |
(or multi-method method))))) |
5985 |
|
|
5986 |
(defun tramp-get-rsh-args (multi-method method user host) |
(defun tramp-get-login-args (multi-method method user host) |
5987 |
(second (or (assoc 'tramp-rsh-args |
(second (or (assoc 'tramp-login-args |
5988 |
(assoc (tramp-find-method multi-method method user host) |
(assoc (tramp-find-method multi-method method user host) |
5989 |
tramp-methods)) |
tramp-methods)) |
5990 |
(error "Method `%s' didn't specify rsh args" |
(error "Method `%s' didn't specify login args" |
5991 |
(or multi-method method))))) |
(or multi-method method))))) |
5992 |
|
|
5993 |
(defun tramp-get-rcp-program (multi-method method user host) |
(defun tramp-get-copy-program (multi-method method user host) |
5994 |
(second (or (assoc 'tramp-rcp-program |
(second (or (assoc 'tramp-copy-program |
5995 |
(assoc (tramp-find-method multi-method method user host) |
(assoc (tramp-find-method multi-method method user host) |
5996 |
tramp-methods)) |
tramp-methods)) |
5997 |
(error "Method `%s' didn't specify an rcp program" |
(error "Method `%s' didn't specify a copy program" |
5998 |
(or multi-method method))))) |
(or multi-method method))))) |
5999 |
|
|
6000 |
(defun tramp-get-rcp-args (multi-method method user host) |
(defun tramp-get-copy-args (multi-method method user host) |
6001 |
(second (or (assoc 'tramp-rcp-args |
(second (or (assoc 'tramp-copy-args |
6002 |
(assoc (tramp-find-method multi-method method user host) |
(assoc (tramp-find-method multi-method method user host) |
6003 |
tramp-methods)) |
tramp-methods)) |
6004 |
(error "Method `%s' didn't specify rcp args" |
(error "Method `%s' didn't specify copy args" |
6005 |
(or multi-method method))))) |
(or multi-method method))))) |
6006 |
|
|
6007 |
(defun tramp-get-rcp-keep-date-arg (multi-method method user host) |
(defun tramp-get-copy-keep-date-arg (multi-method method user host) |
6008 |
(second (or (assoc 'tramp-rcp-keep-date-arg |
(second (or (assoc 'tramp-copy-keep-date-arg |
6009 |
(assoc (tramp-find-method multi-method method user host) |
(assoc (tramp-find-method multi-method method user host) |
6010 |
tramp-methods)) |
tramp-methods)) |
6011 |
(error "Method `%s' didn't specify `keep-date' arg for tramp" |
(error "Method `%s' didn't specify `keep-date' arg for tramp" |
6012 |
(or multi-method method))))) |
(or multi-method method))))) |
6013 |
|
|
|
(defun tramp-get-su-program (multi-method method user host) |
|
|
(second (or (assoc 'tramp-su-program |
|
|
(assoc (tramp-find-method multi-method method user host) |
|
|
tramp-methods)) |
|
|
(error "Method `%s' didn't specify a su program" |
|
|
(or multi-method method))))) |
|
|
|
|
|
(defun tramp-get-su-args (multi-method method user host) |
|
|
(second (or (assoc 'tramp-su-args |
|
|
(assoc (tramp-find-method multi-method method user host) |
|
|
tramp-methods)) |
|
|
(error "Method `%s' didn't specify su args" |
|
|
(or multi-method method))))) |
|
|
|
|
|
(defun tramp-get-telnet-program (multi-method method user host) |
|
|
(second (or (assoc 'tramp-telnet-program |
|
|
(assoc (tramp-find-method multi-method method user host) |
|
|
tramp-methods)) |
|
|
(error "Method `%s' didn't specify a telnet program" |
|
|
(or multi-method method))))) |
|
|
|
|
|
(defun tramp-get-telnet-args (multi-method method user host) |
|
|
(second (or (assoc 'tramp-telnet-args |
|
|
(assoc (tramp-find-method multi-method method user host) |
|
|
tramp-methods)) |
|
|
(error "Method `%s' didn't specify telnet args" |
|
|
(or multi-method method))))) |
|
|
|
|
|
|
|
6014 |
;; Auto saving to a special directory. |
;; Auto saving to a special directory. |
6015 |
|
|
6016 |
(defun tramp-make-auto-save-file-name (fn) |
(defun tramp-make-auto-save-file-name (fn) |