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.

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@663 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Chris Gianelloni 17 years ago
parent 4187cff9f1
commit cc57e07bb8

@ -2,6 +2,12 @@
# 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

@ -92,6 +92,23 @@ findmediamount() {
# 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
@ -281,8 +298,9 @@ runmdev() {
}
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}"
@ -385,13 +403,13 @@ start_dev_mgr() {
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
}

@ -1,7 +1,7 @@
#!/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.

Loading…
Cancel
Save