busybox-initramfs: init: Add user-defined mount options for NFS mounts

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 <bjorn.ketelaars@hydroxide.nl>

Signed-off-by: Alain Kalker <a.c.kalker@gmail.com>
This commit is contained in:
Alain Kalker 2012-03-25 14:28:11 +02:00
parent e7e4f54f16
commit fb3b784476

View File

@ -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() {