diff options
author | Erich Eckner <git@eckner.net> | 2020-03-04 13:50:51 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-03-04 13:50:51 +0100 |
commit | 72e9cd3e0bfdd1625bf6c18afa0dabf3bab556ab (patch) | |
tree | a6ae90e7c8baf1783d37c0ae30674b81b41827ab | |
parent | ccaa951dc9d722086d61973ce897f432bca549b1 (diff) | |
download | cryptfs-daemon-72e9cd3e0bfdd1625bf6c18afa0dabf3bab556ab.tar.xz |
cryptfs: verbose errors
-rw-r--r-- | cryptfs.bin.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cryptfs.bin.in b/cryptfs.bin.in index d9a358f..5516e5d 100644 --- a/cryptfs.bin.in +++ b/cryptfs.bin.in @@ -217,6 +217,8 @@ do_mount() { max_tries=10 mount_parameters=$(mount_details all "$1") while ! mount ${mount_parameters}; do + >&2 printf '"mount %s" failed.\n' \ + "${mount_parameters}" max_tries=$((max_tries-1)) if [ ${max_tries} -le 0 ]; then exit 1 @@ -247,6 +249,8 @@ do_unmount() { fi mount_point=$(mount_details mp "$1") while ! umount ${lazy} "${mount_point}"; do + >&2 printf '"umount %s" failed.\n' \ + "${lazy} ${mount_point}" fuser -k -M -m "${mount_point}" sleep 1 done @@ -258,6 +262,8 @@ do_unmount() { do_crypt_close() { if is_unlocked "$1"; then while ! cryptsetup luksClose "$1"; do + >&2 printf '"cryptsetup luksClose %s" failed.\n' \ + "$1" sleep 1 done fi @@ -275,6 +281,8 @@ do_crypt_open() { if ! is_unlocked "${name}"; then max_tries=10 while ! cryptsetup luksOpen "${raw}" "${name}" --key-file="${key}" "$@"; do + >&2 printf '"cryptsetup luksOpen %s %s --key-file=%s %s" failed.\n' \ + "${raw}" "${name}" "${key}" "$*" sleep 1 max_tries=$((max_tries-1)) if [ ${max_tries} -le 0 ]; then @@ -287,6 +295,8 @@ do_crypt_open() { do_integrity_close() { if is_unlocked "$1"; then while ! integritysetup close "$1" && ! dmsetup remove "$1"; do + >&2 printf '"integritysetup close %s || dmsetup remove %s" failed.\n' \ + "$1" "$1" sleep 1 done fi @@ -300,6 +310,8 @@ do_integrity_open() { if ! is_unlocked "${name}"; then max_tries=10 while ! integritysetup open "${raw}" "${name}"; do + >&2 printf '"integritysetup open %s %s" failed.\n' \ + "${raw}" "${name}" sleep 1 max_tries=$((max_tries-1)) if [ ${max_tries} -le 0 ]; then |