From fb3b7844765ce9b60650fb86dddea6b65bd2eb4e Mon Sep 17 00:00:00 2001 From: Alain Kalker Date: Sun, 25 Mar 2012 14:28:11 +0200 Subject: [PATCH] busybox-initramfs: init: Add user-defined mount options for NFS mounts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds the possibility of specifying extra mount options for NFS mounts. Example usage: disk=NFS=192.168.1.1:/export,proto=udp Feature request and patch submitted by: Björn Ketelaars Signed-off-by: Alain Kalker --- packages/initramfs/sysutils/busybox-initramfs/scripts/init | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/initramfs/sysutils/busybox-initramfs/scripts/init b/packages/initramfs/sysutils/busybox-initramfs/scripts/init index e391c6b9c9..60f3b1bdc9 100755 --- a/packages/initramfs/sysutils/busybox-initramfs/scripts/init +++ b/packages/initramfs/sysutils/busybox-initramfs/scripts/init @@ -160,9 +160,12 @@ NBD_DEVS="0" mount_nfs() { # Mount NFS export - NFS_OPTIONS="nolock,retrans=10" + NFS_EXPORT="${1%%,*}" + NFS_OPTIONS="${1#*,}" - mount_common "$1" "$2" "$3,$NFS_OPTIONS" "nfs" + [ "$NFS_OPTIONS" = "$1" ] && NFS_OPTIONS= + + mount_common "$NFS_EXPORT" "$2" "$3,nolock,retrans=10,$NFS_OPTIONS" "nfs" } mount_part() {