aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-07-16 10:04:12 +0800
committerXi Ruoyao <xry111@xry111.site>2023-07-16 10:04:12 +0800
commitc7ee38fb5ad62d2153980b4a2518cc5d527a1c86 (patch)
treea7e9ecbefcc58539cb6a8256222e64bd8162ba3a
parent1053282e5f0a6e7bba9605676b650d46db6ffaf4 (diff)
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.
-rw-r--r--bootscripts/ChangeLog3
-rw-r--r--bootscripts/lfs/init.d/udev8
-rw-r--r--bootscripts/lfs/init.d/udev_retry6
-rw-r--r--packages.ent2
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 <xry111@xry111.site>
+ * Use /bin/udevadm instead of /sbin/udevadm.
+
2022-09-30 Bruce Dubbs <bdubbs@linuxfromscratch.org>
* 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 @@
<!ENTITY less-fin-du "4.3 MB">
<!ENTITY less-fin-sbu "less than 0.1 SBU">
-<!ENTITY lfs-bootscripts-version "20230101"> <!-- Scripts depend on this format -->
+<!ENTITY lfs-bootscripts-version "20230715"> <!-- Scripts depend on this format -->
<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB">
<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.xz">
<!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM">