forked from Lainports/freebsd-ports
- Patches updated PR: ports/171905 Submitted by: milki <milki@rescomp.berkeley.edu> (maintainer)
45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
diff --git a/src/password-store.sh b/src/password-store.sh
|
|
index 503bac4..6fcf2cc 100755
|
|
--- src/password-store.sh
|
|
+++ src/password-store.sh
|
|
@@ -1,4 +1,4 @@
|
|
-#!/bin/bash
|
|
+#!/usr/local/bin/bash
|
|
|
|
# Copyright (C) 2012 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
|
# This file is licensed under the GPLv2+. Please see COPYING for more information.
|
|
@@ -107,22 +107,24 @@ clip() {
|
|
) & disown
|
|
echo "Copied $2 to clipboard. Will clear in 45 seconds."
|
|
}
|
|
+
|
|
tmpdir() {
|
|
- if [[ -d /dev/shm && -w /dev/shm && -x /dev/shm ]]; then
|
|
- tmp_dir="$(TMPDIR=/dev/shm mktemp -t "$template" -d)"
|
|
+ ramdisk="/var/tmp/password-store.ramdisk"
|
|
+ if [[ -d $ramdisk && -w $ramdisk && -x $ramdisk ]]; then
|
|
+ tmp_dir="$(TMPDIR=$ramdisk mktemp -t "$template" -d)"
|
|
else
|
|
- yesno "$(echo "Your system does not have /dev/shm, which means that it may"
|
|
- echo "be difficult to entirely erase the temporary non-encrypted"
|
|
- echo "password file after editing. Are you sure you would like to"
|
|
- echo -n "continue?")"
|
|
+ yesno "$(echo "A ramdisk does not exist at $ramdisk, which means that it may"
|
|
+ echo "be difficult to entirely erase the temporary non-encrypted"
|
|
+ echo "password file after editing. Are you sure you would like to"
|
|
+ echo -n "continue?")"
|
|
+
|
|
tmp_dir="$(mktemp -t "$template" -d)"
|
|
fi
|
|
-
|
|
}
|
|
-GPG="gpg"
|
|
-GETOPT="getopt"
|
|
|
|
-# source /path/to/platform-defined-functions
|
|
+GPG="gpg2"
|
|
+GETOPT="/usr/local/bin/getopt"
|
|
+
|
|
#
|
|
# END Platform definable
|
|
#
|