Properly apply NFS mount options for Gentoo bug #262915

cleanup-cruft
Andrew Gaffney 15 years ago
parent 734543ef90
commit 62f353b65b

@ -5,6 +5,10 @@
# Distributed under the GPL v2 # Distributed under the GPL v2
# $Id$ # $Id$
26 Dec 2009; Andrew Gaffney <agaffney@gentoo.org>
defaults/initrd.defaults, defaults/initrd.scripts:
Properly apply NFS mount options for Gentoo bug #262915
26 Dec 2009; Andrew Gaffney <agaffney@gentoo.org> 26 Dec 2009; Andrew Gaffney <agaffney@gentoo.org>
arch/alpha/kernel-config, arch/ia64/kernel-config, arch/ppc/kernel-config, arch/alpha/kernel-config, arch/ia64/kernel-config, arch/ppc/kernel-config,
arch/x86_64/kernel-config: arch/x86_64/kernel-config:

@ -75,6 +75,8 @@ CONSOLE='/dev/console'
LOOPS='/livecd.loop /zisofs /livecd.squashfs /image.squashfs /livecd.gcloop' LOOPS='/livecd.loop /zisofs /livecd.squashfs /image.squashfs /livecd.gcloop'
DEFAULT_NFSOPTIONS="ro,nolock,rsize=1024,wsize=1024"
# Only sections that are in by default or those that # Only sections that are in by default or those that
# are not module groups need to be defined here... # are not module groups need to be defined here...
HWOPTS='keymap cache modules pata sata scsi usb firewire waitscan slowusb evms lvm dmraid mdadm fs net' HWOPTS='keymap cache modules pata sata scsi usb firewire waitscan slowusb evms lvm dmraid mdadm fs net'

@ -236,10 +236,19 @@ findnfsmount() {
if [ "${NFSROOT}" != '' ] if [ "${NFSROOT}" != '' ]
then then
NFSOPTIONS=${NFSROOT#*,}
NFSROOT=${NFSROOT%%,*}
if [ "${NFSOPTIONS}" = "${NFSROOT}" ]
then
NFSOPTIONS=$DEFAULT_NFSOPTIONS
else
NFSOPTIONS="${DEFAULT_NFSOPTIONS},${NFSOPTIONS}"
fi
if [ "${CDROOT}" != '0' ] if [ "${CDROOT}" != '0' ]
then then
good_msg "Attempting to mount NFS CD image on ${NFSROOT}" good_msg "Attempting to mount NFS CD image on ${NFSROOT} with options ${NFSOPTIONS}"
mount -t nfs -o ro,nolock,rsize=1024,wsize=1024 ${NFSROOT} ${NEW_ROOT}/mnt/cdrom mount -t nfs -o ${NFSOPTIONS} ${NFSROOT} ${NEW_ROOT}/mnt/cdrom
if [ "$?" = '0' ] if [ "$?" = '0' ]
then then
REAL_ROOT="/dev/nfs" REAL_ROOT="/dev/nfs"
@ -247,8 +256,8 @@ findnfsmount() {
bad_msg "NFS Mounting failed. Is the path corrent ?" bad_msg "NFS Mounting failed. Is the path corrent ?"
fi fi
else else
good_msg "Attempting to mount NFS root on ${NFSROOT}" good_msg "Attempting to mount NFS root on ${NFSROOT} with options ${NFSOPTIONS}"
mount -t nfs -o ro,nolock,rsize=1024,wsize=1024 ${NFSROOT} ${NEW_ROOT} mount -t nfs -o ${NFSOPTIONS} ${NFSROOT} ${NEW_ROOT}
if [ "$?" = '0' ] if [ "$?" = '0' ]
then then
REAL_ROOT="/dev/nfs" REAL_ROOT="/dev/nfs"

Loading…
Cancel
Save