From 7083e6b9f750f956c11984ed2ae1809e709b90e0 Mon Sep 17 00:00:00 2001 From: Vivien Didelot Date: Fri, 18 Jan 2019 19:50:39 -0500 Subject: defaultenv-2: centralize nfs commands for 'net' 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 Signed-off-by: Sascha Hauer --- defaultenv/defaultenv-2-base/boot/net | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'defaultenv') diff --git a/defaultenv/defaultenv-2-base/boot/net b/defaultenv/defaultenv-2-base/boot/net index 26e931ce63..e79432eb27 100644 --- a/defaultenv/defaultenv-2-base/boot/net +++ b/defaultenv/defaultenv-2-base/boot/net @@ -18,13 +18,11 @@ if [ $? != 0 ]; then exit 1 fi -nfsroot="${nfsserver}:/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="${nfsserver}:/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 -- cgit v1.2.3