diff options
author | Jonathan Chu <milki@rescomp.berkeley.edu> | 2012-09-23 09:22:16 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2012-09-23 09:22:16 +0200 |
commit | 2e53d994cd2c9e870f0c13be4769fd4ef9510aa8 (patch) | |
tree | 10685c61f052fa39f4ba75ee896437659e449409 | |
parent | 454c810c9a480a436ea3e73f49b126b59cef8703 (diff) |
Add FreeBSD platform file
Redefine GNUPG and GETOPT for port paths
Redefine tmpdir() for a different ramdisk path
-rw-r--r-- | src/platform/freebsd.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/platform/freebsd.sh b/src/platform/freebsd.sh new file mode 100644 index 0000000..3900f10 --- /dev/null +++ b/src/platform/freebsd.sh @@ -0,0 +1,21 @@ +tmpdir() { + ramdisk="/var/tmp/password-store.ramdisk" + if [[ -d $ramdisk && -d $ramdisk && -d $ramdisk ]]; then + tmp_dir="$(TMPDIR=$ramdisk mktemp -t "$template" -d)" + else + yesno "$(cat <<PROMPT +A ramdisk does not exist at + + $ramdisk + +which means that it may be difficult to entirely erase +the temporary non-encrypted password file after editing. +Are you sure you would like to continue? +PROMPT +)" + tmp_dir="$(mktemp -t "$template" -d)" + fi +} + +GPG="gpg2" +GETOPT="/usr/local/bin/getopt" |