summaryrefslogtreecommitdiffstats
path: root/luks-header-backup
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-09-13 00:07:55 +0200
committerFlorian Pritz <bluewind@xinu.at>2014-09-13 00:07:55 +0200
commit8450e9ac59dfb678ae3fc2adca5bb837804710f3 (patch)
tree655b5c145aeb9f30e7e8ea8b019b38474176c994 /luks-header-backup
parente59d9c40e64cb5e6fb4fcfd6401583c03bbd99be (diff)
downloadbin-8450e9ac59dfb678ae3fc2adca5bb837804710f3.tar.gz
bin-8450e9ac59dfb678ae3fc2adca5bb837804710f3.tar.xz
add some new scripts
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'luks-header-backup')
-rwxr-xr-xluks-header-backup13
1 files changed, 13 insertions, 0 deletions
diff --git a/luks-header-backup b/luks-header-backup
new file mode 100755
index 0000000..4219df7
--- /dev/null
+++ b/luks-header-backup
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+host=${HOST:-$HOSTNAME}
+test -n "$host"
+
+dev=$1
+dev_basename=${dev##*/}
+
+test -n "$dev_basename"
+
+cryptsetup --header-backup-file=$HOME/$host-${dev_basename}-luks-header.bak luksHeaderBackup $dev