Lines 489-495
Link Here
|
489 |
|
489 |
|
490 |
# Here, we check for /dev/device-mapper, and if it exists, we setup a |
490 |
# Here, we check for /dev/device-mapper, and if it exists, we setup a |
491 |
# a symlink, which should hopefully fix bug #142775 and bug #147015 |
491 |
# a symlink, which should hopefully fix bug #142775 and bug #147015 |
492 |
if [ -e /dev/device-mapper ] |
492 |
if [ -e /dev/device-mapper ] && [ ! -e /dev/mapper/control ] |
493 |
then |
493 |
then |
494 |
mkdir -p /dev/mapper |
494 |
mkdir -p /dev/mapper |
495 |
ln -sf /dev/device-mapper /dev/mapper/control |
495 |
ln -sf /dev/device-mapper /dev/mapper/control |
Lines 546-551
Link Here
|
546 |
fi |
546 |
fi |
547 |
} |
547 |
} |
548 |
|
548 |
|
|
|
549 |
startLUKS() { |
550 |
if [ -n "${LUKS_ROOT}" ] |
551 |
then |
552 |
if [ -e /sbin/cryptsetup ] |
553 |
then |
554 |
if cryptsetup isLuks ${LUKS_ROOT} |
555 |
then |
556 |
good_msg "Opening LUKS device ${LUKS_ROOT}" |
557 |
|
558 |
cryptsetup luksOpen ${LUKS_ROOT} root |
559 |
if [ ! "$?" -eq '0' ] |
560 |
then |
561 |
bad_msg "Failed open LUKS device ${LUKS_ROOT}" |
562 |
fi |
563 |
|
564 |
if [ -n "${REAL_ROOT}" ] |
565 |
then |
566 |
# Rescan volumes |
567 |
startVolumes |
568 |
else |
569 |
REAL_ROOT="/dev/mapper/root" |
570 |
fi |
571 |
else |
572 |
bad_msg "The LUKS device ${LUKS_ROOT} does not contain a LUKS hearder" |
573 |
fi |
574 |
else |
575 |
bad_msg "The initrd does not support LUKS" |
576 |
fi |
577 |
fi |
578 |
} |
579 |
|
549 |
sdelay() { |
580 |
sdelay() { |
550 |
# Sleep a specific number of seconds if SDELAY is set otherwise only sleep |
581 |
# Sleep a specific number of seconds if SDELAY is set otherwise only sleep |
551 |
# 1 second |
582 |
# 1 second |