[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposition of reviving multi method
From: |
Michael Albinus |
Subject: |
Re: Proposition of reviving multi method |
Date: |
Thu, 28 May 2009 17:13:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) |
<address@hidden> writes:
> Disadvantage of the tramp-default-proxies-alist construction is that
> it doesn't take into account that there may be more than one route to
> an account on a host. For instance, the route may depend on where you
> are. Also, one route may be to log in directly into an application
> account, an alternate route may be to log in to a personal account and
> do su/sudo (or similar) from there to the application account.
>
> With multi-hop you can specify which route you want to use to get
> there in each case.
In such a case, you check the route during startup. For example:
(defun my-host-reachable-p (hostname)
(zerop (call-process "ping" nil nil nil hostname "-c" "1")))
(if (my-host-reachable-p "homeserver")
;; I'm at home
(add-to-list 'tramp-default-proxies-alist ...)
;; I'm in the company
(add-to-list 'tramp-default-proxies-alist ...))
> Regards,
>
> Peter Wagemans
Best regards, Michael.