Add LABEL support to crypt_root, clean up UUID crypt_root patch

cleanup-cruft
Sebastian Pipping 14 years ago
parent 3e60ed9eee
commit f5547a519f

@ -762,26 +762,26 @@ openLUKS() {
KEYDEV_ERROR=0 KEYDEV_ERROR=0
else else
case "${LUKS_DEVICE}" in case "${LUKS_DEVICE}" in
UUID\=*) UUID\=*|LABEL\=*)
REAL_LUKS="" local REAL_LUKS=""
retval=1 local retval=1
if [ "${retval}" -ne '0' ]; then if [ "${retval}" -ne 0 ]; then
REAL_LUKS=`findfs "${LUKS_DEVICE}" 2>/dev/null` REAL_LUKS=`findfs "${LUKS_DEVICE}" 2>/dev/null`
retval=$? retval=$?
fi fi
if [ "$retval" -ne '0' ]; then if [ "$retval" -ne 0 ]; then
REAL_LUKS=`busybox findfs "${LUKS_DEVICE}" 2>/dev/null` REAL_LUKS=`busybox findfs "${LUKS_DEVICE}" 2>/dev/null`
retval=$? retval=$?
fi fi
if [ "${retval}" -ne '0' ]; then if [ "${retval}" -ne 0 ]; then
REAL_LUKS=`blkid -t "${LUKS_DEVICE}" | cut -d ":" -f 1 2>/dev/null` REAL_LUKS=`blkid -t "${LUKS_DEVICE}" | cut -d ":" -f 1 2>/dev/null`
retval=$? retval=$?
fi fi
if [ "${retval}" -eq '0' ] && [ -n "${REAL_LUKS}" ]; then if [ "${retval}" -eq 0 ] && [ -n "${REAL_LUKS}" ]; then
good_msg "Detected device ${REAL_LUKS}" good_msg "Detected device ${REAL_LUKS}"
LUKS_DEVICE="${REAL_LUKS}" LUKS_DEVICE="${REAL_LUKS}"
fi fi

Loading…
Cancel
Save