Add a check after mounting NEW_ROOT to see if /dev exists and /sbin/init is executable before moving on

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@645 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Andrew Gaffney 17 years ago
parent d1313f5ecc
commit 72e8e5d04c

@ -2,6 +2,10 @@
# Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2 # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $ # $Header: $
13 Mar 2008; Andrew Gaffney <agaffney@gentoo.org> generic/linuxrc:
Add a check after mounting NEW_ROOT to see if /dev exists and /sbin/init is
executable before moving on
13 Mar 2008; Andrew Gaffney <agaffney@gentoo.org> gen_initramfs.sh: 13 Mar 2008; Andrew Gaffney <agaffney@gentoo.org> gen_initramfs.sh:
Change the location we copy the intiramfs to for integrated initramfs Change the location we copy the intiramfs to for integrated initramfs

@ -403,7 +403,14 @@ do
# else not a good root and start over. # else not a good root and start over.
if [ "$?" = '0' ] if [ "$?" = '0' ]
then then
break if [ -d ${NEW_ROOT}/dev -a -x ${NEW_ROOT}/sbin/init ]
then
break
else
bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again"
got_good_root=0
REAL_ROOT=''
fi
else else
bad_msg "Could not mount specified ROOT, try again" bad_msg "Could not mount specified ROOT, try again"
got_good_root=0 got_good_root=0

Loading…
Cancel
Save