Lines 55-60
readkey() {
Link Here
|
55 |
handler() { |
55 |
handler() { |
56 |
nameluks="${LUKS_ROOT##*/}-luks" |
56 |
nameluks="${LUKS_ROOT##*/}-luks" |
57 |
|
57 |
|
|
|
58 |
if [ -r /etc/crypttab ]; then |
59 |
LUKS_ROOT_UUID=$(blkid -o value -s UUID "$LUKS_ROOT") |
60 |
while read crypttab_name crypttab_block crypttab_specifies crypttab_options; do |
61 |
if [ x"$crypttab_block" = x"$LUKS_ROOT" ] || [ x"$crypttab_block" = x"UUID=$LUKS_ROOT_UUID" ]; then |
62 |
nameluks=$crypttab_name |
63 |
break |
64 |
fi |
65 |
done < /etc/crypttab |
66 |
fi |
67 |
|
58 |
# skip if $nameluks has already exist |
68 |
# skip if $nameluks has already exist |
59 |
! dmsetup info "$nameluks" >/dev/null 2>&1 || |
69 |
! dmsetup info "$nameluks" >/dev/null 2>&1 || |
60 |
exit 0 |
70 |
exit 0 |