commit 2601dccb27cad9c3f0c442adf29b23e8c8e5b789
parent 917d8e8c6c0dac5373d8cd0c020eb583e9fb2be9
Author: Jaromil <jaromil@dyne.org>
Date: Tue, 28 May 2013 12:58:05 +0200
Temporary key from stdin
fix to temp dir and docu in help
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tomb b/tomb
@@ -211,6 +211,7 @@ EOF
# }}}
# {{{ Commandline interaction
+
usage() {
cat <<EOF
@@ -250,7 +251,7 @@ EOF
Options:
-s size of the tomb file when creating/resizing one (in MB)
- -k path to the key to use for opening a tomb
+ -k path to the key to be used ('-k -' to read from stdin)
-n don't process the hooks found in tomb
-o mount options used to open (default: rw,noatime,nodev)
-f force operation (i.e. even if swap is active)
@@ -424,7 +425,7 @@ check_bin() {
# {{{ Key operations
-typeset -h tombkeydir
+typeset -h tombkeydir # global used if key comes from stdin
# This function retrieves a tomb key specified on commandline or one
# laying nearby the tomb if found, or from stdin if the option was
@@ -438,7 +439,6 @@ load_key() {
if option_is_set -k ; then
if [[ "`option_value -k`" == "-" ]]; then
# take key from stdin
- local tombkeydir
tombkeydir=`safe_dir`
cat > ${tombkeydir}/stdin.tmp
tombkey=${tombkeydir}/stdin.tmp