# Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 04 Apr 2008; Chris Gianelloni <wolf31o2@gentoo.org>
+ generic/initrd.scripts, genkernel:
+ Added a patch to skip device nodes for devices if at least one partition
+ exists on the device. This aids in LiveUSB usage and is for bug #212794.
+ This is genkernel 3.4.10_pre8.
+
03 Apr 2008; Andrew Gaffney <agaffney@gentoo.org> generic/linuxrc:
Split up /dev node checks into console/null and tty1
# Check for a block device to mount
if [ -b "${x}" ]
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}
# if [ "${media}" = "cdrom" ]; then
}
test_success() {
+ retcode=$?
# If last command failed send error message and fall back to a shell
- if [ "$?" != '0' ]
+ if [ "$retcode" != '0' ]
then
error_string=$1
error_string="${error_string:-run command}"
if [ "${KV_2_6_OR_GREATER}" ]
then
cd /sys
- [ "${DO_slowusb}" ] && sleep 10
+ [ "${DO_slowusb}" ] && sdelay
check_slowusb
- [ "${FORCE_slowusb}" ] && sleep 10
+ [ "${FORCE_slowusb}" ] && sdelay
good_msg 'Activating mdev'
runmdev
[ "${DO_slowusb}" ] || \
- [ "${FORCE_slowusb}" ] && sleep 20
+ [ "${FORCE_slowusb}" ] && sdelay
cd /
fi
}
#!/bin/bash
PATH="${PATH}:/sbin:/usr/sbin"
-GK_V='3.4.10_pre7'
+GK_V='3.4.10_pre8'
# Set the default for TMPDIR. May be modified by genkernel.conf or the
# --tempdir command line option.