initramfs-module-nfs: Make it actually mount NFS by using the same option as kernel...
authorPaul Sokolovsky <pmiscml@gmail.com>
Thu, 19 Jul 2007 21:11:07 +0000 (21:11 +0000)
committerPaul Sokolovsky <pmiscml@gmail.com>
Thu, 19 Jul 2007 21:11:07 +0000 (21:11 +0000)
packages/initrdscripts/files/nfsboot.sh
packages/initrdscripts/initramfs-module-nfs_0.1.bb

index 62a0442..5129a53 100644 (file)
@@ -1,6 +1,11 @@
 #!/bin/sh
 
 if [ "$ROOT_DEVICE" = "/dev/nfs" ]; then
+
+    # These correspond to what kernel itself uses
+    # DO NOT CHANGE!
+    NFS_OPTIONS="-o nfsvers=2,nolock"
+
     for arg in $CMDLINE; do
         echo $arg
         optarg=`expr "x$arg" : 'x[^=]*=\(.*\)'`
@@ -33,6 +38,6 @@ if [ "$ROOT_DEVICE" = "/dev/nfs" ]; then
     )
 
     echo "booting from NFS: $nfsroot"
-    mount -t nfs $nfsroot /mnt
+    mount -t nfs $NFS_OPTIONS $nfsroot /mnt
     BOOT_ROOT=/mnt
 fi
index 90b80a3..9f4436a 100644 (file)
@@ -1,5 +1,5 @@
 SRC_URI = "file://nfsboot.sh"
-PR = "r0"
+PR = "r1"
 
 do_install() {
         install -m 0755 ${WORKDIR}/nfsboot.sh ${D}/initrd.d/nfs