tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wherefore art thou multi-hop?


From: Kirk Strauser
Subject: Re: Wherefore art thou multi-hop?
Date: 22 Jul 2002 14:45:52 -0500

At 2002-07-22T19:22:26Z, address@hidden (Kai Großjohann) writes:

> You can look at tramp-make-tramp-file-format.  If it contains square
> brackets, it's still the old format.  If it contains colons and no square
> brackets, it's the new format.

I seem to still be using the old format.

> You could (setq tramp-debug-buffer t) and (setq tramp-verbose 10) and then
> recreate the problem and show me the *tramp/foo* buffer in addition to the
> *debug tramp/foo* buffer.

In this particular case, I'm ssh'ing from a Debian-woody workstation to a
FreeBSD server, but I get the same results from all of the various
client/server combinations I've tried.  Also note that single-hop
connections have always worked perfectly for me, which is why this never was
a high-priority item for me.  However, I've recently grown very tired of
using 'vi' on remote servers to edit config files.  :)



Here is *tramp/multi address@hidden:address@hidden:* :

######################################################################

(t 2 0 0 (15676 24425) (15664 61623) (15664 61623) 512 16877 t (0 . 10865) (0 
23300))

######################################################################




...and this is *debug tramp/multi address@hidden:address@hidden:* :

######################################################################

# Opening `multi' connection...
# Waiting 60s for local shell to come up...
sh-2.05a$ # Sending rlogin command `ssh vserver2 -l kirk'
# Waiting 60s for shell or passwd prompt from vserver2
Last login: Mon Jul 22 18:29:09 2002 from 10.0.1.2
FreeBSD 4.6-STABLE (HONEYPOT_KANGA) #1: Sun Jul  7 20:58:28 CDT 2002
# Sending su command `su - root'
# Waiting 60s for shell or passwd prompt for root

Welcome to FreeBSD!

address@hidden:~$ $ exec /bin/sh
# Waiting 30s for remote `/bin/sh' to come up...

Sorry
address@hidden:~$ # Setting up remote shell environment
address@hidden:~$ address@hidden:~$ # Determining 
coding system
foo
bar
address@hidden:~$ # Waiting 30s for 
`HISTFILE=$HOME/.tramp_history; HISTSIZE=1'
address@hidden:~$ # Waiting 30s for `set +o vi +o emacs'
address@hidden:~$ # Waiting 30s for `unset MAIL MAILCHECK 
MAILPATH'
address@hidden:~$ # Waiting 30s for `unset CDPATH'
address@hidden:~$ # Setting shell prompt
$ PS1='
/////
'; PS2=''; PS3=''
$ echo hello
# Waiting for remote `/bin/sh' to come up...
hello
# Waiting for remote `/bin/sh' to come up...done
$ echo ~root
/root
# Remote `/bin/sh' groks tilde expansion, good
# Finding command to check if file exists
$ ls -d / 2>/dev/null; echo tramp_exit_status $? 
/
tramp_exit_status 0
$ ls -d /\ this\ file\ does\ not\ exist\  2>/dev/null; echo tramp_exit_status 
$? 
tramp_exit_status 1
# Finding a suitable `ls' command
# Checking remote `/bin/ls' command for `-n' option
$ test -x /bin/ls 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# Testing remote command `/bin/ls' for -n...
$ /bin/ls -lnd / >/dev/null 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# Testing remote command `/bin/ls' for -n...okay
# Using remote command `/bin/ls' for getting directory listings
$ tramp_set_exit_status () {
return $1
}
$ ls -d /bin 2>/dev/null; echo tramp_exit_status $? 
/bin
tramp_exit_status 0
$ ( test -d /bin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ ls -d /usr/bin 2>/dev/null; echo tramp_exit_status $? 
/usr/bin
tramp_exit_status 0
$ ( test -d /usr/bin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ ls -d /usr/sbin 2>/dev/null; echo tramp_exit_status $? 
/usr/sbin
tramp_exit_status 0
$ ( test -d /usr/sbin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ ls -d /usr/local/bin 2>/dev/null; echo tramp_exit_status $? 
/usr/local/bin
tramp_exit_status 0
$ ( test -d /usr/local/bin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ ls -d /usr/ccs/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ ls -d /local/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ ls -d /local/freeware/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ ls -d /local/gnu/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ ls -d /usr/freeware/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ ls -d /usr/pkg/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ ls -d /usr/contrib/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin; export PATH
$ LC_TIME=C; export LC_TIME; echo huhu
huhu
$ mesg n; echo huhu
huhu
$ biff n ; echo huhu
huhu
$ unalias ls; echo huhu
huhu
$ ( test / -nt / )
$ tramp_test_nt () {
test -n "`find $1 -prune -newer $2 -print`"
}
$ while read d; do if test -x $d/perl5 -a -f $d/perl5; then echo 
tramp_executable $d/perl5; break; fi; done <<'EOF'
$ /bin
$ /usr/bin
$ /usr/sbin
$ /usr/local/bin
$ /usr/ccs/bin
$ /local/bin
$ /local/freeware/bin
$ /local/gnu/bin
$ /usr/freeware/bin
$ /usr/pkg/bin
$ /usr/contrib/bin
$ EOF
tramp_executable /usr/bin/perl5
# Sending the Perl `file-attributes' implementation.
$ tramp_file_attributes () {
/usr/bin/perl5 -e '$f = $ARGV[0];
@s = lstat($f);
if (($s[2] & 0170000) == 0120000) { $l = readlink($f); $l = "\"$l\""; }
elsif (($s[2] & 0170000) == 040000) { $l = "t"; }
else { $l = "nil" };
printf("(%s %u %u %u (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) (%u %u))\n",
$l, $s[3], $s[4], $s[5], $s[8] >> 16 & 0xffff, $s[8] & 0xffff,
$s[9] >> 16 & 0xffff, $s[9] & 0xffff, $s[10] >> 16 & 0xffff, $s[10] & 0xffff,
$s[7], $s[2], $s[1] >> 16 & 0xffff, $s[1] & 0xffff, $s[0] >> 16 & 0xffff, $s[0] 
& 0xffff);' $1 2>/dev/null
}
$ while read d; do if test -x $d/ln -a -f $d/ln; then echo tramp_executable 
$d/ln; break; fi; done <<'EOF'
$ /bin
$ /usr/bin
$ /usr/sbin
$ /usr/local/bin
$ /usr/ccs/bin
$ /local/bin
$ /local/freeware/bin
$ /local/gnu/bin
$ /usr/freeware/bin
$ /usr/pkg/bin
$ /usr/contrib/bin
$ EOF
tramp_executable /bin/ln
# Checking to see if encoding and decoding commands work on remote host.
$ echo xyzzy | mimencode -b | mimencode -u -b
xyzzy
$ ( test -d /root 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ ( test -d /root 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ ls -d /root/.dired 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
# Inserting directory `ls -al 
/[multi/ssh:address@hidden/su:address@hidden/root/', wildcard no, fulldir yes
$ /bin/ls -al /root/.
total 16
drwxr-xr-x   2 root  wheel   512 Jul 13 22:32 .
drwxr-xr-x  16 root  wheel   512 Jul 18 10:57 ..
-rw-------   1 root  wheel  5435 Jul 21 17:05 .bash_history
-rwxr--r--   1 root  wheel   209 Jul 13 22:25 .bash_profile
-rwxr--r--   1 root  wheel  1304 Jul 13 22:25 .bashrc
-rw-r--r--   2 root  wheel   802 Jul 13 21:14 .cshrc
-rw-------   1 root  wheel   361 Jul 13 22:31 .history
-rw-r--r--   1 root  wheel   142 Jul 13 21:14 .klogin
-rw-r--r--   1 root  wheel   297 Jul 13 21:14 .login
-rw-r--r--   2 root  wheel   251 Jul 13 21:14 .profile
$ ls -d /root/ 2>/dev/null; echo tramp_exit_status $? 
/root/
tramp_exit_status 0
$ tramp_file_attributes /root/

######################################################################


-- 
Kirk Strauser
The Strauser Group - http://www.strausergroup.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]