[SCM] live-boot branch, debian-next, updated. debian/3.0_a25-1-70-ga39a167
Daniel Baumann
daniel at debian.org
Thu Apr 5 06:00:33 UTC 2012
The following commit has been merged in the debian-next branch:
commit bb77d0efe779cd9e2e245e7f56f3abbd2baa7d72
Author: Tails developers <amnesia at boum.org>
Date: Wed Feb 15 12:10:06 2012 +0100
Check if luks device is already open before trying to open it.
diff --git a/scripts/live-helpers b/scripts/live-helpers
index a69ce29..8822125 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -721,6 +721,21 @@ open_luks_device ()
opts="${opts} --readonly"
fi
+ if /sbin/cryptsetup status "${name}" >/dev/null 2>&1
+ then
+ re="^[[:space:]]*device:[[:space:]]*\([^[:space:]]*\)$"
+ opened_dev=$(cryptsetup status ${name} 2>/dev/null | grep "${re}" | sed "s|${re}|\1|")
+ if [ "${opened_dev}" = "${dev}" ]
+ then
+ luks_device="/dev/mapper/${name}"
+ echo ${luks_device}
+ return 0
+ else
+ log_warning_msg "Cannot open luks device ${dev} since ${opened_dev} already is opened with its name"
+ return 1
+ fi
+ fi
+
load_keymap
while true
--
live-boot
More information about the debian-live-changes
mailing list