diff options
author | Andrew Gaffney <agaffney@gentoo.org> | 2009-12-26 17:36:11 -0600 |
---|---|---|
committer | Andrew Gaffney <agaffney@gentoo.org> | 2009-12-26 17:36:11 -0600 |
commit | 62f353b65be33b49380900d3cddf150e403cc455 (patch) | |
tree | 1499a7dd87857b29c36521edb11e6d859e7421dc /defaults/initrd.scripts | |
parent | Enable CONFIG_SCSI_MULTI_LUN option for Gentoo bug #261122 (diff) | |
download | genkernel-62f353b65be33b49380900d3cddf150e403cc455.tar.gz genkernel-62f353b65be33b49380900d3cddf150e403cc455.tar.bz2 genkernel-62f353b65be33b49380900d3cddf150e403cc455.zip |
Properly apply NFS mount options for Gentoo bug #262915
Diffstat (limited to 'defaults/initrd.scripts')
-rwxr-xr-x | defaults/initrd.scripts | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 5f611aa9..df4a7dd8 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -236,10 +236,19 @@ findnfsmount() { 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" @@ -247,8 +256,8 @@ findnfsmount() { 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" |