]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
perf(systemd): remove duplicate rules
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Fri, 3 May 2024 01:02:10 +0000 (21:02 -0400)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Fri, 3 May 2024 12:15:38 +0000 (08:15 -0400)
Consolidate systemd-udevd logic into the systemd-udevd module.

modules.d/00systemd/module-setup.sh
modules.d/01systemd-udevd/module-setup.sh

index 33ffd1b955a82e473b5ea5512b40f6540d3e7b5f..669da970ee192eb495af53dfb2796e7a9d3029fb 100755 (executable)
@@ -38,7 +38,6 @@ install() {
         "$systemdutildir"/systemd-shutdown \
         "$systemdutildir"/systemd-reply-password \
         "$systemdutildir"/systemd-fsck \
-        "$systemdutildir"/systemd-udevd \
         "$systemdutildir"/systemd-sysctl \
         "$systemdutildir"/systemd-modules-load \
         "$systemdutildir"/systemd-vconsole-setup \
@@ -81,25 +80,16 @@ install() {
         "$systemdsystemunitdir"/sys-kernel-config.mount \
         "$systemdsystemunitdir"/modprobe@.service \
         "$systemdsystemunitdir"/kmod-static-nodes.service \
-        "$systemdsystemunitdir"/systemd-udevd-control.socket \
-        "$systemdsystemunitdir"/systemd-udevd-kernel.socket \
         "$systemdsystemunitdir"/systemd-modules-load.service \
         "$systemdsystemunitdir"/systemd-halt.service \
         "$systemdsystemunitdir"/systemd-poweroff.service \
         "$systemdsystemunitdir"/systemd-reboot.service \
         "$systemdsystemunitdir"/systemd-kexec.service \
         "$systemdsystemunitdir"/systemd-fsck@.service \
-        "$systemdsystemunitdir"/systemd-udevd.service \
-        "$systemdsystemunitdir"/systemd-udev-trigger.service \
-        "$systemdsystemunitdir"/systemd-udev-settle.service \
         "$systemdsystemunitdir"/systemd-vconsole-setup.service \
         "$systemdsystemunitdir"/systemd-volatile-root.service \
         "$systemdsystemunitdir"/systemd-sysctl.service \
         "$systemdsystemunitdir"/sysinit.target.wants/systemd-modules-load.service \
-        "$systemdsystemunitdir"/sockets.target.wants/systemd-udevd-control.socket \
-        "$systemdsystemunitdir"/sockets.target.wants/systemd-udevd-kernel.socket \
-        "$systemdsystemunitdir"/sysinit.target.wants/systemd-udevd.service \
-        "$systemdsystemunitdir"/sysinit.target.wants/systemd-udev-trigger.service \
         "$systemdsystemunitdir"/sysinit.target.wants/kmod-static-nodes.service \
         "$systemdsystemunitdir"/sysinit.target.wants/systemd-sysctl.service \
         "$systemdsystemunitdir"/ctrl-alt-del.target \
@@ -112,8 +102,7 @@ install() {
         kmod insmod rmmod modprobe modinfo depmod lsmod \
         mount umount reboot poweroff \
         systemd-run systemd-escape \
-        systemd-cgls \
-        /etc/udev/udev.hwdb
+        systemd-cgls
 
     inst_multiple -o \
         /usr/lib/modules-load.d/*.conf \
@@ -155,8 +144,7 @@ install() {
             /etc/locale.conf \
             /etc/modules-load.d/*.conf \
             /etc/sysctl.d/*.conf \
-            /etc/sysctl.conf \
-            /etc/udev/udev.conf
+            /etc/sysctl.conf
 
         mapfile -t _mods < <(modules_load_get /etc/modules-load.d)
         [[ ${#_mods[@]} -gt 0 ]] && hostonly='' instmods "${_mods[@]}"
index 97f972d8b985ee8bcad5df20b5a4a937bc5b8a9e..30a7b0aa970df3ba9f0e36e2a38802f10e6a9bf0 100755 (executable)
@@ -30,6 +30,7 @@ depends() {
 install() {
 
     inst_multiple -o \
+        /etc/udev/udev.hwdb \
         "$udevdir"/hwdb.bin \
         "$udevdir"/dmi_memory_id \
         "$udevdir"/fido_id \
@@ -72,6 +73,7 @@ install() {
     # Install the hosts local user configurations if enabled.
     if [[ $hostonly ]]; then
         inst_multiple -H -o \
+            /etc/udev/udev.conf \
             "$udevconfdir"/hwdb.bin \
             "$udevconfdir"/udev.conf \
             "$udevrulesconfdir/*.rules" \