[LEDE-DEV] [PATCH v2] base-files: Don't deconfigure IP settings while using NFS root

John Crispin john at phrozen.org
Tue Nov 7 23:01:53 PST 2017



On 06/11/17 15:39, Petr Štetiar wrote:
> This patch allows me to boot my system with root file system mounted over
> Network File System (NFS). Without this patch, the boot process ends in the
> preinit step:
>
>     init: - preinit -
>     ...
>     + [ eth0 = eth0+ ip link set dev eth0 down
>     nfs: server 192.168.1.90 not responding, still trying
>
> Signed-off-by: Petr Štetiar <ynezz at true.cz>
> ---
>   package/base-files/files/lib/preinit/10_indicate_preinit | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit
> index 7a97a8d..457ce21 100644
> --- a/package/base-files/files/lib/preinit/10_indicate_preinit
> +++ b/package/base-files/files/lib/preinit/10_indicate_preinit
> @@ -114,6 +114,8 @@ preinit_ip() {
>   }
>   
>   preinit_ip_deconfig() {
> +	grep -q "nfsroot" /proc/cmdline && return
> +
>   	[ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
Hi,

wondering if it would be nicer to add this to the already existing if 
clause.
            [ -z "$(grep "nfsroot" /proc/cmdline)" ] && ...
     John

>   		local netdev vid
>   




More information about the Lede-dev mailing list