Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/
Date: Tue, 01 May 2012 16:39:45
Message-Id: 1335890031.355b26f0406ee47281b7a2bcbadd05c2067567da.WilliamH@gentoo
1 commit: 355b26f0406ee47281b7a2bcbadd05c2067567da
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 1 16:33:51 2012 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Tue May 1 16:33:51 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/udev-gentoo-scripts.git;a=commit;h=355b26f0
7
8 udev-mount: allow recovery if devtmpfs is not available
9
10 Now we mount a tmpfs on /dev if devtmpfs is not available.
11 This will allow logins so that it is possible to recover. However, udev
12 is still down and will be until the user fixes their kernel. I would
13 like to thank Mike Frysinger <vapier <AT> gentoo.org> for the suggestion for
14 this.
15
16 ---
17 init.d/udev-mount | 11 ++++++++---
18 1 files changed, 8 insertions(+), 3 deletions(-)
19
20 diff --git a/init.d/udev-mount b/init.d/udev-mount
21 index 676643f..515c44d 100644
22 --- a/init.d/udev-mount
23 +++ b/init.d/udev-mount
24 @@ -14,9 +14,14 @@ mount_dev_directory()
25 local mounted=false fstab=false action=--mount msg=Mounting rc=0
26
27 if ! grep -qs devtmpfs /proc/filesystems; then
28 - eerror "Udev uses a devtmpfs mounted on /dev to manage devices."
29 - eerror "This means that CONFIG_DEVTMPFS=y is required"
30 - eerror "in the kernel configuration."
31 + eerror "CONFIG_DEVTMPFS=y is required in your kernel configuration"
32 + eerror "for this version of udev to run successfully."
33 + eerror "This requires immediate attention."
34 + if ! mountinfo -q /dev; then
35 + mount -t tmpfs dev /dev
36 + busybox mdev -s
37 + mkdir /dev/pts
38 + fi
39 return 1
40 fi