# Distributed under the GPL v2
# $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>
arch/alpha/kernel-config, arch/ia64/kernel-config, arch/ppc/kernel-config,
arch/x86_64/kernel-config:
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
# 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'
if [ "${NFSROOT}" != '' ]
then
+ NFSOPTIONS=${NFSROOT#*,}
+ NFSROOT=${NFSROOT%%,*}
+ if [ "${NFSOPTIONS}" = "${NFSROOT}" ]
+ then
+ NFSOPTIONS=$DEFAULT_NFSOPTIONS
+ else
+ NFSOPTIONS="${DEFAULT_NFSOPTIONS},${NFSOPTIONS}"
+ fi
+
if [ "${CDROOT}" != '0' ]
then
- good_msg "Attempting to mount NFS CD image on ${NFSROOT}"
- mount -t nfs -o ro,nolock,rsize=1024,wsize=1024 ${NFSROOT} ${NEW_ROOT}/mnt/cdrom
+ good_msg "Attempting to mount NFS CD image on ${NFSROOT} with options ${NFSOPTIONS}"
+ mount -t nfs -o ${NFSOPTIONS} ${NFSROOT} ${NEW_ROOT}/mnt/cdrom
if [ "$?" = '0' ]
then
REAL_ROOT="/dev/nfs"
bad_msg "NFS Mounting failed. Is the path corrent ?"
fi
else
- good_msg "Attempting to mount NFS root on ${NFSROOT}"
- mount -t nfs -o ro,nolock,rsize=1024,wsize=1024 ${NFSROOT} ${NEW_ROOT}
+ good_msg "Attempting to mount NFS root on ${NFSROOT} with options ${NFSOPTIONS}"
+ mount -t nfs -o ${NFSOPTIONS} ${NFSROOT} ${NEW_ROOT}
if [ "$?" = '0' ]
then
REAL_ROOT="/dev/nfs"