Add support for isoboot= option (for Gentoo bug #294268)

cleanup-cruft
Andrew Gaffney 15 years ago
parent 62f353b65b
commit 24446b0465

@ -5,6 +5,10 @@
# Distributed under the GPL v2 # Distributed under the GPL v2
# $Id$ # $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> 26 Dec 2009; Andrew Gaffney <agaffney@gentoo.org>
defaults/initrd.defaults, defaults/initrd.scripts: defaults/initrd.defaults, defaults/initrd.scripts:
Properly apply NFS mount options for Gentoo bug #262915 Properly apply NFS mount options for Gentoo bug #262915

@ -72,8 +72,17 @@ findmediamount() {
if [ "$#" -gt "0" ] if [ "$#" -gt "0" ]
then then
[ ! -d "${mntdir}" ] && mkdir -p ${mntdir} 2>/dev/null >/dev/null [ ! -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 $* for x in $*
do do
@ -104,9 +113,18 @@ findmediamount() {
# else # else
# mount -r -t auto ${x} ${mntdir} &>/dev/null # mount -r -t auto ${x} ${mntdir} &>/dev/null
# fi # 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' ] if [ "$?" = '0' ]
then 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 # Check for the media
if [ -f "${mntdir}/${recon}" ] if [ -f "${mntdir}/${recon}" ]
then then
@ -115,7 +133,7 @@ findmediamount() {
good_msg "Media found on ${x}" ${CRYPT_SILENT} good_msg "Media found on ${x}" ${CRYPT_SILENT}
break break
else else
umount ${mntdir} umount ${mntcddir}
fi fi
fi fi
fi fi

@ -80,6 +80,9 @@ do
looptype\=*) looptype\=*)
LOOPTYPE=`parse_opt "${x}"` LOOPTYPE=`parse_opt "${x}"`
;; ;;
isoboot\=*)
ISOBOOT=`parse_opt "${x}"`
;;
# Start Volume manager options # Start Volume manager options
dolvm) dolvm)
USE_LVM_NORMAL=1 USE_LVM_NORMAL=1

Loading…
Cancel
Save