Fix for bug 86487. Allowing a subdirectory of a block device to be chrooted from and booted. New cmdline option subdir=

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@218 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Eric Edgar 20 years ago
parent a36ec1816d
commit e4c77638ba

@ -45,6 +45,9 @@ do
real_root\=*) real_root\=*)
REAL_ROOT=`parse_opt "${x}"` REAL_ROOT=`parse_opt "${x}"`
;; ;;
subdir\=*)
SUBDIR=`parse_opt "${x}"`
;;
real_init\=*) real_init\=*)
REAL_INIT=`parse_opt "${x}"` REAL_INIT=`parse_opt "${x}"`
;; ;;
@ -461,6 +464,12 @@ else
mkdir -p ${NEW_ROOT}/tmp/.initrd mkdir -p ${NEW_ROOT}/tmp/.initrd
fi fi
if [ "${SUBDIR}" != '' -a -e "${CHROOT}/${SUBDIR}" ]
then
good_msg"Entering ${SUBDIR} to boot"
CHROOT=${CHROOT}/${SUBDIR}
fi
if [ "$0" = '/linuxrc' ] if [ "$0" = '/linuxrc' ]
then then
[ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1 [ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1

Loading…
Cancel
Save