[Lunar-commits] <moonbase> lunar-init: fix the mount script to be compatible with the new udev version.

Florin Braescu florin at lunar-linux.org
Fri Jul 18 13:18:09 CEST 2008


commit 6bb40bcf2e29bb6fad8a4d3beeda6b2da354d8ee
Author: Florin Braescu <florin at lunar-linux.org>
Date:   Fri Jul 18 14:18:09 2008 +0300

    lunar-init: fix the mount script to be compatible with the new udev version.
    
    Many thanks to Zbiggy who did it.
---
 utils/lunar-init/mount |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/utils/lunar-init/mount b/utils/lunar-init/mount
index d98e3fe..0e93697 100644
--- a/utils/lunar-init/mount
+++ b/utils/lunar-init/mount
@@ -196,11 +196,21 @@ start()
 		run_with_msg " * Mounting /dev" "mount -n -t devfs devfs /dev"
 		run_with_msg "Starting devfsd" "devfsd /dev"
 	elif [ "$DEVNODES" = "udev" ]; then
-		run_with_msg " * Mounting tmpfs on /dev" "mount -t tmpfs tmpfs /dev -o size=6m,mode=0755"
+		run_with_msg " * Mounting udev  on /dev" "mount -w -n -t tmpfs udevfs /dev -o size=6m,mode=0755"
+		# Creating "must have" static device nodes
+		run_without_msg "mkdir -p /dev/{pts,shm}"
+		run_without_msg "cp -a /lib/udev/devices/* /dev"
+		if [ ! -h /dev/ram ]; then
+			ln -sf /dev/ram0 /dev/ram
+		fi
 		run_without_msg "echo > /proc/sys/kernel/hotplug" # Hotplug agents are deprecated!
-		run_with_msg "Creating udev device nodes on /dev" "/sbin/udevstart"
                 run_with_msg "Starting udev device handling daemon" "/sbin/udevd --daemon"
-		run_without_msg "mkdir -p /dev/{pts,shm}"
+                run_with_msg "Activating coldplug devices" "/sbin/udevadm trigger"
+		run_with_msg "Devices activation - please wait" "/sbin/udevadm settle"
+		# This is first aid code for devices hard to init (too slow or to buggy for init by 1st time)
+		# I never have to use it as my machine works great - I leave it just in case
+		#run_with_msg "Activating lazy devices" "/sbin/udevadm trigger --retry-failed"
+		#run_with_msg "Lazy devices activation - please wait" "/sbin/udevadm settle"
 		if [ ! -h /dev/fd ]; then
 			ln -sf /proc/self/fd /dev/fd
 		fi


More information about the Lunar-commits mailing list