From e272497bf5096408f5648d185d18b2131453f188 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 30 Jan 2023 08:20:57 +0100 Subject: defaultenv-2: automount: use ifup -a1 for NFS/TFTP automounts The ifup -a in the automounts has too big a scope: The remote server is specified at mount time, so we could stop bringing up interfaces once $global.net.server becomes resolvable. For the common case, where $global.net.server is initially empty and then set via DHCP, ifup provides the new -1 option to early-exit once $global.net.server was set. For setups where one, but not all, Ethernet interfaces have a cable attached, this normally reduces ifup -a time from 10s to 1s. Signed-off-by: Ahmad Fatoum Link: https://lore.barebox.org/20230130072057.34349-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- Documentation/user/automount.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/user/automount.rst b/Documentation/user/automount.rst index 1fdeffc663..b41b41ef02 100644 --- a/Documentation/user/automount.rst +++ b/Documentation/user/automount.rst @@ -15,7 +15,7 @@ TFTP server, the following is required: .. code-block:: sh mkdir -p /mnt/tftp - automount /mnt/tftp 'ifup -a && mount -t tftp $global.net.server /mnt/tftp' + automount /mnt/tftp 'ifup -a1 && mount -t tftp $global.net.server /mnt/tftp' This creates an automountpoint on ``/mnt/tftp``. Whenever this directory is accessed, the command ``ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp`` is executed. -- cgit v1.2.1