- using sh as interpreter
- open let-opt - removed a relict
This commit is contained in:
parent
7ee58bbe7a
commit
ddf471ff81
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/local/bin/scsh \
|
#!/bin/sh
|
||||||
-lm ../scheme/packages.scm -o threads -o chat-package -o expect-package -e main -s
|
exec scsh -lm ../scheme/packages.scm -o threads -o chat-package -o expect-package -o let-opt -e main -s "$0" "$@"
|
||||||
!#
|
!#
|
||||||
|
|
||||||
(define (assq/false key alist)
|
(define (assq/false key alist)
|
||||||
|
@ -135,10 +135,6 @@ Please choose a password with at least 2 character classes.")
|
||||||
|
|
||||||
(define (verify-yp-password old-pw)
|
(define (verify-yp-password old-pw)
|
||||||
(let ((prompts (yppasswd-prompts)))
|
(let ((prompts (yppasswd-prompts)))
|
||||||
(old-prompt (assq/false 'old prompts))
|
|
||||||
(wrong (assq/false 'wrong-old prompts))
|
|
||||||
;; if prompted for new password, old one is correct
|
|
||||||
(correct (assq/false 'new prompts)))
|
|
||||||
(call/cc
|
(call/cc
|
||||||
(lambda (return)
|
(lambda (return)
|
||||||
(chat (spawn ,(yppasswd-program) (= 2 1))
|
(chat (spawn ,(yppasswd-program) (= 2 1))
|
||||||
|
@ -151,7 +147,7 @@ Please choose a password with at least 2 character classes.")
|
||||||
(send/cr old-pw)
|
(send/cr old-pw)
|
||||||
(look-for (assq/false 'new-prompt prompts))
|
(look-for (assq/false 'new-prompt prompts))
|
||||||
;; if we are prompted for the new pw, old one was correct
|
;; if we are prompted for the new pw, old one was correct
|
||||||
#t))))
|
#t)))))
|
||||||
|
|
||||||
(define (change-yp-password old-pw new-pw)
|
(define (change-yp-password old-pw new-pw)
|
||||||
(let ((prompts (yppasswd-prompts))
|
(let ((prompts (yppasswd-prompts))
|
||||||
|
|
Loading…
Reference in New Issue