summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2012-05-01 11:33:51 -0500
committerWilliam Hubbs <williamh@gentoo.org>2012-05-01 11:33:51 -0500
commit355b26f0406ee47281b7a2bcbadd05c2067567da (patch)
treed51f9e4c261f39ebaa32121f6e60c75bdb59718f
parentRemove shunit2 testing framework (diff)
downloadudev-gentoo-scripts-355b26f0406ee47281b7a2bcbadd05c2067567da.tar.gz
udev-gentoo-scripts-355b26f0406ee47281b7a2bcbadd05c2067567da.tar.bz2
udev-gentoo-scripts-355b26f0406ee47281b7a2bcbadd05c2067567da.zip
udev-mount: allow recovery if devtmpfs is not available
Now we mount a tmpfs on /dev if devtmpfs is not available. This will allow logins so that it is possible to recover. However, udev is still down and will be until the user fixes their kernel. I would like to thank Mike Frysinger <vapier@gentoo.org> for the suggestion for this.
-rw-r--r--init.d/udev-mount11
1 files changed, 8 insertions, 3 deletions
diff --git a/init.d/udev-mount b/init.d/udev-mount
index 676643f..515c44d 100644
--- a/init.d/udev-mount
+++ b/init.d/udev-mount
@@ -14,9 +14,14 @@ mount_dev_directory()
local mounted=false fstab=false action=--mount msg=Mounting rc=0
if ! grep -qs devtmpfs /proc/filesystems; then
- eerror "Udev uses a devtmpfs mounted on /dev to manage devices."
- eerror "This means that CONFIG_DEVTMPFS=y is required"
- eerror "in the kernel configuration."
+ eerror "CONFIG_DEVTMPFS=y is required in your kernel configuration"
+ eerror "for this version of udev to run successfully."
+ eerror "This requires immediate attention."
+ if ! mountinfo -q /dev; then
+ mount -t tmpfs dev /dev
+ busybox mdev -s
+ mkdir /dev/pts
+ fi
return 1
fi