keyringer_config_load_preferences
}
+# Load config preferences
function keyringer_config_load_preferences {
# Load custom keyring preferences
if [ ! -z "$PREFERENCES" ] && [ -f "$PREFERENCES" ]; then
# Get file
keyringer_get_file $2
+# Warn user
echo "Make sure that $BASEDIR is atop of an encrypted volume."
# Set a tmp file
# Decrypt the information to the file
gpg --yes -o $TMPFILE --use-agent -d $KEYDIR/$FILE
+# Prompt
echo "Press any key to open the decrypted data into $EDITOR, Ctrl-C to abort"
read key
$EDITOR $TMPFILE
# Prepare
mkdir -p $KEYDIR && chmod 700 $KEYDIR
+
+WORK="`keyringer_set_tmpfile genpair`"
+trap "keyringer_unset_tmpfile $WORK; exit" INT TERM EXIT
+
WORK="`mktemp -d $KEYDIR/genpair.XXXXXX`"
if [ "$?" != "0" ]; then
echo "Error setting up $WORK"