[lfs] branch openrc updated: usage: Add udevd service.
| Newsgroups | gmane.linux.lfs.book |
|---|---|
| Message-ID | <176530624156.4795.2379021623188395938@rivendell.linuxfromscratch.org> |
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch openrc
in repository lfs.
The following commit(s) were added to refs/heads/openrc by this push:
new 663a7053b usage: Add udevd service.
663a7053b is described below
commit 663a7053b679df3d9237fb1120fa8a3c508f40ec
Author: Zeckmathederg <[email protected]>
AuthorDate: Tue Dec 9 11:52:08 2025 -0700
usage: Add udevd service.
---
chapter09/usage.xml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 59 insertions(+), 1 deletion(-)
diff --git a/chapter09/usage.xml b/chapter09/usage.xml
index 771a0a100..efba5c5c0 100644
--- a/chapter09/usage.xml
+++ b/chapter09/usage.xml
@@ -93,13 +93,71 @@
<screen><userinput>for i in $(seq 1 6); do
ln -sv agetty /etc/init.d/agetty.tty$i
rc-update add agetty.tty$i default
-done </userinput></screen>
+done</userinput></screen>
<para>These <literal>tty</literal> services are started on the
<literal>default</literal> run level.</para>
</sect2>
+ <sect2 id="ch-config-udevd">
+ <title>Creating the Udevd Service</title>
+
+ <indexterm zone="ch-config-udevd">
+ <primary sortas="d-udevd">udevd</primary>
+ <secondary>configuring</secondary></indexterm>
+
+ <para>OpenRC doesn't ship a service for <command>udevd</command>, leading to
+ kernel modules not being loaded. Create and enable it now:</para>
+
+<screen><userinput>cat > /etc/init.d/udevd << "EOF"
+<literal>#!/sbin/openrc-run
+# Starts the udevd daemon and adds device nods via udevadm.
+# Authors: Zeckma - [email protected]
+# Version: LFS 12.5
+
+description="starts the udevd daemon"
+
+depend()
+{
+ after localnet
+ before modules
+}
+
+start()
+{
+ ebegin "Starting the udevd daemon"
+
+# Start the udev daemon to continually watch for, and act on,
+# uevents
+ SYSTEMD_LOG_TARGET=kmsg /sbin/udevd --daemon
+
+# Now traverse /sys in order to "coldplug" devices that have
+# already been discovered
+ /bin/udevadm trigger --action=add --type=subsystems
+ /bin/udevadm trigger --action=add --type=devices
+ /bin/udevadm trigger --action=change --type=devices
+
+# Now wait for udevd to process the uevents we triggered
+ /bin/udevadm settle
+
+# If any LVM based partitions are on the system, ensure they
+# are activated so they can be used.
+ if [ -x /sbin/vgchange ]; then /sbin/vgchange -a y >/dev/null; fi
+
+}</literal>
+EOF
+
+rc-update add udevd boot</userinput></screen>
+
+ <para>
+ This service should load most if not all modules automatically. If you
+ need to load a given module but it isn't being loaded, pass the module
+ name to the <filename>/etc/conf.d/modules</filename> configuration file.
+ </para>
+
+ </sect2>
+
<sect2 id="ch-config-clock">
<title>Configuring the System Clock</title>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
--
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page