[PATCH] defaultenv-2: add automount for nfs

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Wed Mar 23 02:17:09 PDT 2016


Automatically mount the path that is also used for net booting by
default to /mnt/nfs.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
 defaultenv/defaultenv-2-base/init/automount | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/defaultenv/defaultenv-2-base/init/automount b/defaultenv/defaultenv-2-base/init/automount
index fe56d920e7e9..fd1f5a6f494e 100644
--- a/defaultenv/defaultenv-2-base/init/automount
+++ b/defaultenv/defaultenv-2-base/init/automount
@@ -10,11 +10,11 @@ fi
 mkdir -p /mnt/tftp
 automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp'
 
-# automount nfs server example
+# automount nfs server's nfsroot
+
+mkdir -p /mnt/nfs
+automount /mnt/nfs 'ifup eth0 && mount -t nfs ${eth0.serverip}:/home/${global.user}/nfsroot/${global.hostname} /mnt/nfs'
 
-#nfshost=somehost
-#mkdir -p /mnt/${nfshost}
-#automount /mnt/$nfshost "ifup eth0 && mount -t nfs ${nfshost}:/tftpboot /mnt/${nfshost}"
 
 # FAT on usb disk example
 
-- 
2.7.0




More information about the barebox mailing list