summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gaffney <agaffney@gentoo.org>2009-12-26 18:30:32 -0600
committerAndrew Gaffney <agaffney@gentoo.org>2009-12-26 18:30:32 -0600
commit24446b0465f54c7b0250fadeae7bcfbcfcaea636 (patch)
tree2d52eb9e68d04f90d3fcd4134b4ab547a6e57a07
parentProperly apply NFS mount options for Gentoo bug #262915 (diff)
downloadgenkernel-24446b0465f54c7b0250fadeae7bcfbcfcaea636.tar.gz
genkernel-24446b0465f54c7b0250fadeae7bcfbcfcaea636.tar.bz2
genkernel-24446b0465f54c7b0250fadeae7bcfbcfcaea636.zip
Add support for isoboot= option (for Gentoo bug #294268)
-rw-r--r--ChangeLog4
-rwxr-xr-xdefaults/initrd.scripts24
-rwxr-xr-xdefaults/linuxrc3
3 files changed, 28 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 27eb652..c19f6cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@
# Distributed under the GPL v2
# $Id$
+ 27 Dec 2009; Andrew Gaffney <agaffney@gentoo.org> defaults/initrd.scripts,
+ defaults/linuxrc:
+ Add support for isoboot= option (for Gentoo bug #294268)
+
26 Dec 2009; Andrew Gaffney <agaffney@gentoo.org>
defaults/initrd.defaults, defaults/initrd.scripts:
Properly apply NFS mount options for Gentoo bug #262915
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index df4a7dd..afe4b31 100755
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -72,8 +72,17 @@ findmediamount() {
if [ "$#" -gt "0" ]
then
-
[ ! -d "${mntdir}" ] && mkdir -p ${mntdir} 2>/dev/null >/dev/null
+ if [ -n "${ISOBOOT}" ]
+ then
+ mntcddir="${mntdir%${media}}iso"
+ if [ ! -f ${mntcddir} ]
+ then
+ mkdir ${mntcddir}
+ fi
+ else
+ mntcddir=${mntdir}
+ fi
for x in $*
do
@@ -104,9 +113,18 @@ findmediamount() {
# else
# mount -r -t auto ${x} ${mntdir} &>/dev/null
# fi
- mount -r -t ${CDROOT_TYPE} ${x} ${mntdir} >/dev/null 2>&1
+ mount -r -t ${CDROOT_TYPE} ${x} ${mntcddir} >/dev/null 2>&1
if [ "$?" = '0' ]
then
+ if [ -n "${ISOBOOT}" ]; then
+ if [ -f ${mntcddir}/${ISOBOOT} ]; then
+ mount -o loop ${mntcddir}/${ISOBOOT} ${mntdir}
+ if [ "$?" = "0" ]; then
+ good_msg "iso mounted on ${mntdir}"
+ fi
+ fi
+ fi
+
# Check for the media
if [ -f "${mntdir}/${recon}" ]
then
@@ -115,7 +133,7 @@ findmediamount() {
good_msg "Media found on ${x}" ${CRYPT_SILENT}
break
else
- umount ${mntdir}
+ umount ${mntcddir}
fi
fi
fi
diff --git a/defaults/linuxrc b/defaults/linuxrc
index 0f47215..0bf7316 100755
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -80,6 +80,9 @@ do
looptype\=*)
LOOPTYPE=`parse_opt "${x}"`
;;
+ isoboot\=*)
+ ISOBOOT=`parse_opt "${x}"`
+ ;;
# Start Volume manager options
dolvm)
USE_LVM_NORMAL=1