Re: Report on package efs 1.5

Andy Norman (ange@hplb.hpl.hp.com)
Thu, 17 Feb 1994 23:16:08 +0000


Jack writes:

> In order to get patches from this vendor, I need to aftp to their site and
> then issue two "site" commands.  Have I any prayer of making this all happen
> through efs?

Your prayer may be answered, my son.  ;-)

This is what I do for lucid.com and one of my local machines.  This might give
you a start on what you need to do.

					-- ange -- <><

					ange@hplb.hpl.hp.com

(setq efs-ftp-startup-function-alist
      (list (cons "^lucid.com$" (function ange-login-lucid))
	    (cons "^hplose" (function ange-login-hplose))))

(defun ange-login-lucid (host user)
  (if (string-equal user "anonymous")
      (let (result)
	(setq result (efs-raw-send-cmd
		      proc
		      "site group SECRET"
		      "issuing group"))
	
	(if (car result)
	    (efs-error host user
		       (concat "GROUP command failed: "
			       (cdr result))))
	
	(setq result (efs-raw-send-cmd
		      proc
		      "site gpass SECRET"
		      "issuing gpass"))
	
	(if (car result)
	    (efs-error host user
		       (concat "GPASS command failed: "
			       (cdr result)))))))

(defun ange-login-hplose (host user)
  (if (string-equal user "anonymous")
      (let (result)
	(setq result (efs-raw-send-cmd
		      proc 
		      "quote user ange"
		      "Re-logging in as ange"))
	(if (car result)
	    (efs-error host user
		       (concat "USER request failed: "
			       (cdr result))))
	(setq result (efs-raw-send-cmd
		      proc 
		      "quote pass SECRET"
		      "Issuing password"))
	(if (car result)
	    (efs-error host user
		       (concat "PASS request failed: "
			       (cdr result)))))))

(setq efs-load-hook 'ange-fix-efs)

(defun ange-fix-efs ()
  (setq efs-cmd-ok-cmds (concat "^site group\\|^site gpass\\|"
				efs-cmd-ok-cmds)))