From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1102963-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id E4E71138334
	for <garchives@archives.gentoo.org>; Mon, 29 Jul 2019 20:10:37 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 218FBE0872;
	Mon, 29 Jul 2019 20:10:31 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 03CF5E0874
	for <gentoo-commits@lists.gentoo.org>; Mon, 29 Jul 2019 20:10:31 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id C5F3F348F8C
	for <gentoo-commits@lists.gentoo.org>; Mon, 29 Jul 2019 20:10:29 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 98D5C763
	for <gentoo-commits@lists.gentoo.org>; Mon, 29 Jul 2019 20:10:25 +0000 (UTC)
From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" <whissi@gentoo.org>
Message-ID: <1564430541.8a24f11205f7be79b22d81936c0c7e628b74986c.whissi@gentoo>
Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/
X-VCS-Repository: proj/genkernel
X-VCS-Files: defaults/initrd.scripts
X-VCS-Directories: defaults/
X-VCS-Committer: whissi
X-VCS-Committer-Name: Thomas Deutschmann
X-VCS-Revision: 8a24f11205f7be79b22d81936c0c7e628b74986c
X-VCS-Branch: master
Date: Mon, 29 Jul 2019 20:10:25 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 2963b5b6-79b3-452a-b055-adb46171f4c1
X-Archives-Hash: 270fc8f00296a4cd3b10d2c4a0099e81

commit:     8a24f11205f7be79b22d81936c0c7e628b74986c
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 29 18:20:42 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Jul 29 20:02:21 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=8a24f112

initrd.scripts: cleanup(): Don't bring down network interface when real_root=/dev/nfs

At this stage we already have mounted root over network so we
should not bring down the network interface.

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 defaults/initrd.scripts | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index e01f461..4c8955d 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -2011,7 +2011,12 @@ cleanup() {
 
 	if [ -f "${GK_NET_LOCKFILE}" ]
 	then
-		kill_network
+		if [ "${REAL_ROOT}" = "/dev/nfs" ]
+		then
+			warn_msg "real_root=/dev/nfs; Will not bring down interface ${GK_NET_IFACE} ..."
+		else
+			kill_network
+		fi
 	fi
 }