From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.77)
	(envelope-from <gentoo-commits+bounces-487277-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1Ss3UA-0000fB-GI
	for garchives@archives.gentoo.org; Fri, 20 Jul 2012 03:02:35 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id E8B8BE068E;
	Fri, 20 Jul 2012 03:02:24 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id BB9B0E0684
	for <gentoo-commits@lists.gentoo.org>; Fri, 20 Jul 2012 03:02:24 +0000 (UTC)
Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id F0E851B40BC
	for <gentoo-commits@lists.gentoo.org>; Fri, 20 Jul 2012 03:02:18 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id B1643E5431
	for <gentoo-commits@lists.gentoo.org>; Fri, 20 Jul 2012 03:02:16 +0000 (UTC)
From: "Richard Yao" <ryao@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Richard Yao" <ryao@gentoo.org>
Message-ID: <1342753170.3ef477862d08c20628273c3c855bb78d6e417b25.ryao@gentoo>
Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/
X-VCS-Repository: proj/genkernel
X-VCS-Files: defaults/linuxrc
X-VCS-Directories: defaults/
X-VCS-Committer: ryao
X-VCS-Committer-Name: Richard Yao
X-VCS-Revision: 3ef477862d08c20628273c3c855bb78d6e417b25
X-VCS-Branch: master
Date: Fri, 20 Jul 2012 03:02:16 +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
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 019fe9df-f2ab-4c94-aa0a-7efced31c1bd
X-Archives-Hash: fe7152f7b4581d2cda10a6a47e0ad4bb

commit:     3ef477862d08c20628273c3c855bb78d6e417b25
Author:     Richard Yao <ryao <AT> cs <DOT> stonybrook <DOT> edu>
AuthorDate: Fri Jul 20 00:34:07 2012 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Fri Jul 20 02:59:30 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/genkernel.git=
;a=3Dcommit;h=3D3ef47786

Run mdev -s after modules are loaded

Running `mdev -s` will ensure that device nodes are properly initialized.
It does not function as a netlink hotplug daemon. We must run it after
the modules are loaded to ensure that /dev/zfs has been created before
userland programs attempt to use it.

---
 defaults/linuxrc |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/defaults/linuxrc b/defaults/linuxrc
index 90099c8..f434339 100755
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -293,7 +293,7 @@ mount_devfs
 # Mount sysfs
 mount_sysfs
=20
-# Start mdev
+# Initialize mdev
 if [ "${KV_2_6_OR_GREATER}" ]
 then
 	good_msg 'Activating mdev'
@@ -303,9 +303,6 @@ then
=20
 	# Setup hotplugging for firmware loading
 	echo /sbin/mdev > /proc/sys/kernel/hotplug
-
-	# Setup mdev netlink socket daemon
-	( cd /sys && mdev -s ) || bad_msg "Failed to receive dynamic updates fr=
om mdev"
 fi
=20
 # Load modules listed in MY_HWOPTS if /lib/modules exists for the runnin=
g kernel
@@ -329,6 +326,12 @@ else
 	good_msg 'Skipping module load; no modules in the ramdisk!'
 fi
=20
+# Ensure that device nodes are properly configured
+if [ "${KV_2_6_OR_GREATER}" ]
+then
+	mdev -s || bad_msg "mdev -s failed"
+fi
+
 # Apply scan delay if specified
 sdelay
=20