git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@645
67a159dc-881f-0410-a524-
ba9dfbe2cb84
# Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
# $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:
Change the location we copy the intiramfs to for integrated initramfs
# else not a good root and start over.
if [ "$?" = '0' ]
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
bad_msg "Could not mount specified ROOT, try again"
got_good_root=0