@ -92,6 +92,23 @@ findmediamount() {
# Check for a block device to mount
# Check for a block device to mount
if [ -b "${x}" ]
if [ -b "${x}" ]
then
then
skip=0
bsn=`basename "${x}"`
#
# If disk and it has at least one partition, skip.
# We use /sys/block/${bsn}/${bsn}[0-9]* to make sure that we
# don't skip device mapper devices. Even the craziest scenario
# deserves a fair chance.
#
for part in `ls /sys/block/${bsn}/${bsn}[0-9]* 2>/dev/null`
do
skip=1
break;
done
if [ ${skip} -eq 1 ]
then
continue
fi
good_msg "Attempting to mount media:- ${x}" ${CRYPT_SILENT}
good_msg "Attempting to mount media:- ${x}" ${CRYPT_SILENT}
# if [ "${media}" = "cdrom" ]; then
# if [ "${media}" = "cdrom" ]; then
@ -281,8 +298,9 @@ runmdev() {
}
}
test_success() {
test_success() {
retcode=$?
# If last command failed send error message and fall back to a shell
# If last command failed send error message and fall back to a shell
if [ "$? " != '0' ]
if [ "$retcode " != '0' ]
then
then
error_string=$1
error_string=$1
error_string="${error_string:-run command}"
error_string="${error_string:-run command}"
@ -385,13 +403,13 @@ start_dev_mgr() {
if [ "${KV_2_6_OR_GREATER}" ]
if [ "${KV_2_6_OR_GREATER}" ]
then
then
cd /sys
cd /sys
[ "${DO_slowusb}" ] && sleep 10
[ "${DO_slowusb}" ] && sdelay
check_slowusb
check_slowusb
[ "${FORCE_slowusb}" ] && sleep 10
[ "${FORCE_slowusb}" ] && sdelay
good_msg 'Activating mdev'
good_msg 'Activating mdev'
runmdev
runmdev
[ "${DO_slowusb}" ] || \
[ "${DO_slowusb}" ] || \
[ "${FORCE_slowusb}" ] && sleep 20
[ "${FORCE_slowusb}" ] && sdelay
cd /
cd /
fi
fi
}
}