From: Eric Edgar Date: Wed, 22 Jun 2005 15:12:43 +0000 (+0000) Subject: Fix for bug 86487. Allowing a subdirectory of a block device to be chrooted from... X-Git-Tag: v3.4.10.902~534 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e4c77638ba905c45865a28fd602edb6c5bed87b8;p=genkernel.git 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 --- diff --git a/generic/linuxrc b/generic/linuxrc index 1d89f30..718e24b 100644 --- a/generic/linuxrc +++ b/generic/linuxrc @@ -45,6 +45,9 @@ do real_root\=*) REAL_ROOT=`parse_opt "${x}"` ;; + subdir\=*) + SUBDIR=`parse_opt "${x}"` + ;; real_init\=*) REAL_INIT=`parse_opt "${x}"` ;; @@ -461,6 +464,12 @@ else mkdir -p ${NEW_ROOT}/tmp/.initrd fi +if [ "${SUBDIR}" != '' -a -e "${CHROOT}/${SUBDIR}" ] +then + good_msg"Entering ${SUBDIR} to boot" + CHROOT=${CHROOT}/${SUBDIR} +fi + if [ "$0" = '/linuxrc' ] then [ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1