]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(base): set udev log level properly
authorturret <turret@duck.com>
Sun, 26 Oct 2025 22:56:44 +0000 (17:56 -0500)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Wed, 29 Oct 2025 20:19:11 +0000 (16:19 -0400)
since udev logging functionality was added in af67d62 to dracut,
in commit 25e773eeb4 in systemd, udev has since migrated from its own
logging system to the logging system found in the rest of systemd, which
uses a different environment variable for setting the log level.  this
will allow for systems to truely be quiet during boot (i.e., before
showing a splash or before the init system begins being loud)

instead of using the systemd-specific environment variable, we set it in
udev.conf so that the change also applies to eudev-and-friends

hilariously, udev did the migration the day after dracut added support!
if systems were kept up to date with live branches, that means the
original change would have only worked for one day.

Signed-off-by: Mason Rocha <mrocha@turretllc.us>
modules.d/80base/init.sh

index c9090e9edbfc19e570055de9f90d55f1b202b57f..fcbd4bbed307b755b62d74337de2c2d96bd72e70 100755 (executable)
@@ -146,8 +146,11 @@ getargbool 0 rd.udev.log_level=info -d rd.udev.log-priority=info -d rd.udev.info
 getargbool 0 rd.udev.log_level=debug -d rd.udev.log-priority=debug -d rd.udev.debug -d -y rdudevdebug \
     && UDEV_LOG=debug
 
+mkdir -p /etc/udev
+echo "udev_log=${UDEV_LOG}" >> /etc/udev/udev.conf
+
 # start up udev and trigger cold plugs
-UDEV_LOG=$UDEV_LOG "$systemdutildir"/systemd-udevd --daemon --resolve-names=never
+"$systemdutildir"/systemd-udevd --daemon --resolve-names=never
 
 UDEV_QUEUE_EMPTY="udevadm settle --timeout=0"