source: bootscripts/lfs/init.d/udev@ e9ba8aa8

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since e9ba8aa8 was e9ba8aa8, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Change bootscripts to use devtmpfs for /dev.
Move mounting of /dev to mountvirtfs and ensure /dev gets placed in /etc/mtab.
Change fstab and kernel configuration sections to reflect these changes.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9710 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 2.0 KB
Line 
1#!/bin/sh
2########################################################################
3# Begin udev
4#
5# Description : Udev cold-plugging script
6#
7# Authors : Zack Winkles, Alexander E. Patrakov
8# DJ Lucas - dj@linuxfromscratch.org
9# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
10#
11# Version : LFS 7.0
12#
13########################################################################
14
15### BEGIN INIT INFO
16# Provides: udev
17# Required-Start:
18# Should-Start: modules
19# Required-Stop:
20# Should-Stop:
21# Default-Start: S
22# Default-Stop:
23# Short-Description: Populates /dev with device nodes.
24# Description: Mounts a tempfs on /dev and starts the udevd daemon.
25# Device nodes are created as defined by udev.
26# X-LFS-Provided-By: LFS
27### END INIT INFO
28
29. /lib/lsb/init-functions
30
31case "${1}" in
32 start)
33 log_info_msg "Populating /dev with device nodes... "
34 if ! grep -q '[[:space:]]sysfs' /proc/mounts; then
35 log_failure_msg2
36 msg="FAILURE:\n\nUnable to create "
37 msg="${msg}devices without a SysFS filesystem\n\n"
38 msg="${msg}After you press Enter, this system "
39 msg="${msg}will be halted and powered off.\n\n"
40 log_info_msg "$msg"
41 log_info_msg "Press Enter to continue..."
42 wait_for_user
43 /etc/rc.d/init.d/halt stop
44 fi
45
46 # Udev handles uevents itself, so we don't need to have
47 # the kernel call out to any binary in response to them
48 echo > /proc/sys/kernel/hotplug
49
50 # Start the udev daemon to continually watch for, and act on,
51 # uevents
52 /sbin/udevd --daemon
53
54 # Now traverse /sys in order to "coldplug" devices that have
55 # already been discovered
56 /sbin/udevadm trigger --action=add --type=subsystems
57 /sbin/udevadm trigger --action=add --type=devices
58
59 # Now wait for udevd to process the uevents we triggered
60 /sbin/udevadm settle
61 log_success_msg2
62 ;;
63
64 *)
65 echo "Usage ${0} {start}"
66 exit 1
67 ;;
68esac
69
70exit 0
71
72# End udev
Note: See TracBrowser for help on using the repository browser.