Replace lxqt-openssh-askpass by emacs-askpass.
parent
f19bd66ed2
commit
c2d320d4df
|
@ -21,14 +21,18 @@ check() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## REVIEW: Only set extpass if no PTY is connected?
|
||||||
|
if [ -z "$SUDO_ASKPASS" ] && command -v emacs-askpass >/dev/null 2>&1; then
|
||||||
|
SUDO_ASKPASS=emacs-askpass
|
||||||
|
fi
|
||||||
|
|
||||||
mount() {
|
mount() {
|
||||||
check realpath encfs
|
check realpath encfs
|
||||||
SOURCE="$(realpath "$1")"
|
SOURCE="$(realpath "$1")"
|
||||||
MOUNTPOINT="${SOURCE}_decrypted"
|
MOUNTPOINT="${SOURCE}_decrypted"
|
||||||
mkdir -p "$MOUNTPOINT"
|
mkdir -p "$MOUNTPOINT"
|
||||||
if [ -z "$PASS" ]; then
|
if [ -z "$PASS" ]; then
|
||||||
## REVIEW: Only set extpass if no PTY is connected?
|
encfs --extpass="$SUDO_ASKPASS" "$SOURCE" "$MOUNTPOINT" || rmdir "$MOUNTPOINT"
|
||||||
encfs --extpass=$(which lxqt-openssh-askpass 2>/dev/null) "$SOURCE" "$MOUNTPOINT" || rmdir "$MOUNTPOINT"
|
|
||||||
else
|
else
|
||||||
echo "$PASS" | encfs --stdinpass "$SOURCE" "$MOUNTPOINT" || rmdir "$MOUNTPOINT"
|
echo "$PASS" | encfs --stdinpass "$SOURCE" "$MOUNTPOINT" || rmdir "$MOUNTPOINT"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
"ccl" ; Useful for portability checks, alternative compilation warnings, etc.
|
"ccl" ; Useful for portability checks, alternative compilation warnings, etc.
|
||||||
"lisp-repl-core-dumper"
|
"lisp-repl-core-dumper"
|
||||||
|
|
||||||
"lxqt-openssh-askpass" ; To set SUDO_ASKPASS.
|
|
||||||
|
|
||||||
"sbcl-alexandria"
|
"sbcl-alexandria"
|
||||||
"sbcl-bordeaux-threads"
|
"sbcl-bordeaux-threads"
|
||||||
"sbcl-calispel"
|
"sbcl-calispel"
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
;; To get "sudo" to work in SLY.
|
;; To get "sudo" to work in SLY.
|
||||||
(let ((askpass (format nil
|
(let ((askpass (format nil "~a/.local/bin/emacs-askpass" (uiop:getenv "HOME"))))
|
||||||
"~a/.guix-extra-profiles/common-lisp/common-lisp/bin/lxqt-openssh-askpass"
|
|
||||||
(uiop:getenv "HOME")) ))
|
|
||||||
(when (uiop:file-exists-p askpass)
|
(when (uiop:file-exists-p askpass)
|
||||||
(setf (uiop:getenv "SUDO_ASKPASS") askpass)))
|
(setf (uiop:getenv "SUDO_ASKPASS") askpass)))
|
||||||
|
|
Loading…
Reference in New Issue