From c7ee38fb5ad62d2153980b4a2518cc5d527a1c86 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 16 Jul 2023 10:04:12 +0800 Subject: bootscripts: Use /bin/udevadm instead of /sbin/udevadm We are switching from eudev to systemd-udev for SysV. Systemd installs udevadm into /usr/bin, and at least a part of its function can be used as non-root user, so we'll no longer put it into /usr/sbin. --- bootscripts/ChangeLog | 3 +++ bootscripts/lfs/init.d/udev | 8 ++++---- bootscripts/lfs/init.d/udev_retry | 6 ++---- packages.ent | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index c7a3d9a7b..0c1d33f6d 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,6 @@ +2023-07-15 Xi Ruoyao + * Use /bin/udevadm instead of /sbin/udevadm. + 2022-09-30 Bruce Dubbs * Mount /dev/shm as a tmpfs. diff --git a/bootscripts/lfs/init.d/udev b/bootscripts/lfs/init.d/udev index c74c8e19f..612685af7 100644 --- a/bootscripts/lfs/init.d/udev +++ b/bootscripts/lfs/init.d/udev @@ -49,13 +49,13 @@ case "${1}" in # Now traverse /sys in order to "coldplug" devices that have # already been discovered - /sbin/udevadm trigger --action=add --type=subsystems - /sbin/udevadm trigger --action=add --type=devices - /sbin/udevadm trigger --action=change --type=devices + /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 if ! is_true "$OMIT_UDEV_SETTLE"; then - /sbin/udevadm settle + /bin/udevadm settle fi # If any LVM based partitions are on the system, ensure they diff --git a/bootscripts/lfs/init.d/udev_retry b/bootscripts/lfs/init.d/udev_retry index 112846a03..ccac9a2bd 100644 --- a/bootscripts/lfs/init.d/udev_retry +++ b/bootscripts/lfs/init.d/udev_retry @@ -34,8 +34,6 @@ case "${1}" in start) log_info_msg "Retrying failed uevents, if any..." - # As of udev-186, the --run option is no longer valid - #rundir=$(/sbin/udevadm info --run) rundir=/run/udev # From Debian: "copy the rules generated before / was mounted # read-write": @@ -52,13 +50,13 @@ case "${1}" in /bin/sed -e 's/#.*$//' /etc/sysconfig/udev_retry | /bin/grep -v '^$' | \ while read line ; do for subsystem in $line ; do - /sbin/udevadm trigger --subsystem-match=$subsystem --action=add + /bin/udevadm trigger --subsystem-match=$subsystem --action=add done done # Now wait for udevd to process the uevents we triggered if ! is_true "$OMIT_UDEV_RETRY_SETTLE"; then - /sbin/udevadm settle + /bin/udevadm settle fi evaluate_retval diff --git a/packages.ent b/packages.ent index 2abb800d1..8e0a2d222 100644 --- a/packages.ent +++ b/packages.ent @@ -390,7 +390,7 @@ - + -- cgit v1.2.3-54-g00ecf