[PATCH] defaultenv-2: centralize nfs commands for 'net'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Setting the nfsroot variable as well as the kernel bootargs for the
interface used to reach the server is specific to nfs, which are used
only if there's no initramfs to load from tftp. Move these statements
within the condition.

Signed-off-by: Vivien Didelot <vivien.didelot@xxxxxxxxx>
---
 defaultenv/defaultenv-2-base/boot/net | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/defaultenv/defaultenv-2-base/boot/net b/defaultenv/defaultenv-2-base/boot/net
index b0fe4f584..5bd077d80 100644
--- a/defaultenv/defaultenv-2-base/boot/net
+++ b/defaultenv/defaultenv-2-base/boot/net
@@ -12,13 +12,11 @@ if [ -f "${oftree}" ]; then
 	global.bootm.oftree="$oftree"
 fi
 
-nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
-
-ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip
-
 initramfs="${path}/${global.user}-initramfs-${global.hostname}"
 if [ -f "${initramfs}" ]; then
 	global.bootm.initrd="$initramfs"
 else
+	nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
+	ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip
 	global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
 fi
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux