*** /tmp/ediff2198r4N 2010-03-12 06:32:58.165822018 +0100 --- /home/albinus/src/emacs/lisp/net/tramp.el 2010-03-12 06:29:07.744569594 +0100 *************** *** 6294,6300 **** Returns the absolute file name of PROGNAME, if found, and nil otherwise. This function expects to be in the right *tramp* buffer." ! (with-current-buffer (tramp-get-buffer vec) (let (result) ;; Check whether the executable is in $PATH. "which(1)" does not ;; report always a correct error code; therefore we check the --- 6294,6300 ---- Returns the absolute file name of PROGNAME, if found, and nil otherwise. This function expects to be in the right *tramp* buffer." ! (with-current-buffer (tramp-get-connection-buffer vec) (let (result) ;; Check whether the executable is in $PATH. "which(1)" does not ;; report always a correct error code; therefore we check the *************** *** 6302,6308 **** (unless ignore-path (tramp-send-command vec (format "which \\%s | wc -w" progname)) (goto-char (point-min)) ! (if (looking-at "^1$") (setq result (concat "\\" progname)))) (unless result (when ignore-tilde --- 6302,6308 ---- (unless ignore-path (tramp-send-command vec (format "which \\%s | wc -w" progname)) (goto-char (point-min)) ! (if (looking-at "^\\s-*1$") (setq result (concat "\\" progname)))) (unless result (when ignore-tilde *************** *** 6403,6414 **** (with-current-buffer (tramp-get-buffer vec) (tramp-send-command vec "echo ~root" t) (cond ! ((string-match "^~root$" (buffer-string)) (setq shell (or (tramp-find-executable ! vec "bash" (tramp-get-remote-path vec) t) (tramp-find-executable ! vec "ksh" (tramp-get-remote-path vec) t))) (unless shell (tramp-error vec 'file-error --- 6403,6417 ---- (with-current-buffer (tramp-get-buffer vec) (tramp-send-command vec "echo ~root" t) (cond ! ((or (string-match "^~root$" (buffer-string)) ! ;; The default shell (ksh93) of OpenSolaris is buggy. ! (string-equal (tramp-get-connection-property vec "uname" "") ! "SunOS 5.11")) (setq shell (or (tramp-find-executable ! vec "bash" (tramp-get-remote-path vec) t t) (tramp-find-executable ! vec "ksh" (tramp-get-remote-path vec) t t))) (unless shell (tramp-error vec 'file-error *************** *** 6837,6845 **** ;; "test foo; echo $?" to check if various conditions hold, and ;; there are buggy /bin/sh implementations which don't execute the ;; "echo $?" part if the "test" part has an error. In particular, ! ;; the Solaris /bin/sh is a problem. I'm betting that all systems ! ;; with buggy /bin/sh implementations will have a working bash or ! ;; ksh. Whee... (tramp-find-shell vec) ;; Disable unexpected output. --- 6840,6850 ---- ;; "test foo; echo $?" to check if various conditions hold, and ;; there are buggy /bin/sh implementations which don't execute the ;; "echo $?" part if the "test" part has an error. In particular, ! ;; the OpenSolaris /bin/sh is a problem. There are also other ! ;; problems with /bin/sh of OpenSolaris, like redirection of stderr ! ;; in in function declarations, or changing HISTFILE in place. ! ;; Therefore, OpenSolaris' /bin/sh is replaced by bash, when ! ;; detected. (tramp-find-shell vec) ;; Disable unexpected output. *************** *** 6848,6859 **** ;; Set the environment. (tramp-message vec 5 "Setting default environment") - ;; On OpenSolaris, there is a bug when HISTFILE is changed in place - ;; . We - ;; apply the workaround. - (if (string-equal (tramp-get-connection-property vec "uname" "") "SunOS 5.11") - (tramp-send-command vec "unset HISTFILE" t)) - (let ((env (copy-sequence tramp-remote-process-environment)) unset item) (while env --- 6853,6858 ----