summaryrefslogtreecommitdiffstats
path: root/defaultenv
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@gmail.com>2019-01-18 19:50:39 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-21 09:56:50 +0100
commit7083e6b9f750f956c11984ed2ae1809e709b90e0 (patch)
tree5c4d66b447df8c170defe0ebf7c52a64dacc4e98 /defaultenv
parentd90948f2bd1f9462a765c665c45c643ab4a15deb (diff)
downloadbarebox-7083e6b9f750f956c11984ed2ae1809e709b90e0.tar.gz
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 <vivien.didelot@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv')
-rw-r--r--defaultenv/defaultenv-2-base/boot/net6
1 files changed, 2 insertions, 4 deletions
diff --git a/defaultenv/defaultenv-2-base/boot/net b/defaultenv/defaultenv-2-base/boot/net
index 26e931c..e79432e 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