[PATCH 2/3] defaultenv-2: mount tftp server specified in $eth0.serverip

Sascha Hauer s.hauer at pengutronix.de
Thu Jun 7 16:37:35 EDT 2012


This is always the tftp server specified in /env/network/eth0,
this could be either the one returned from a dhcp request or
a manually specified one, but in the end it's always the right
one.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 defaultenv-2/base/init/automount |   11 +++--------
 defaultenv-2/base/init/general   |    2 +-
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/defaultenv-2/base/init/automount b/defaultenv-2/base/init/automount
index 63099f9..7b53309 100644
--- a/defaultenv-2/base/init/automount
+++ b/defaultenv-2/base/init/automount
@@ -5,10 +5,10 @@ if [ "$1" = menu ]; then
 	exit
 fi
 
-# automount server returned from dhcp server
+# automount tftp server based on $eth0.serverip
 
-mkdir -p /mnt/tftp-dhcp
-automount /mnt/tftp-dhcp 'ifup eth0 && mount $eth0.serverip tftp /mnt/tftp-dhcp'
+mkdir -p /mnt/tftp
+automount /mnt/tftp 'ifup eth0 && mount $eth0.serverip tftp /mnt/tftp'
 
 # automount nfs server example
 
@@ -16,11 +16,6 @@ automount /mnt/tftp-dhcp 'ifup eth0 && mount $eth0.serverip tftp /mnt/tftp-dhcp'
 #mkdir -p /mnt/${nfshost}
 #automount /mnt/$nfshost "ifup eth0 && mount ${nfshost}:/tftpboot nfs /mnt/${nfshost}"
 
-# static tftp server example
-
-#mkdir -p /mnt/tftp
-#automount -d /mnt/tftp 'ifup eth0 && mount $serverip tftp /mnt/tftp'
-
 # FAT on usb disk example
 
 #mkdir -p /mnt/fat
diff --git a/defaultenv-2/base/init/general b/defaultenv-2/base/init/general
index ad6c860..2fea03d 100644
--- a/defaultenv-2/base/init/general
+++ b/defaultenv-2/base/init/general
@@ -15,4 +15,4 @@ global.autoboot_timeout=3
 global.boot.default=net
 
 # default tftp path
-global.tftp.path=/mnt/tftp-dhcp
+global.tftp.path=/mnt/tftp
-- 
1.7.10




More information about the barebox mailing list