commit: 8cca1dada7be5625cbdbcf4e8ab14c51d131e099
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 28 13:28:33 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug 28 16:35:59 2020 +0000
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=8cca1dad
defaults/linuxrc: Add gk.udev.debug to run udevd in debug mode
When gk.udev.debug=yes is set (boolean option), udevd will run in
debug mode. Output will be written to /run/initramfs/udevd.log.
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
defaults/initrd.defaults | 1 +
defaults/linuxrc | 10 +++++++++-
doc/genkernel.8.txt | 4 ++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/defaults/initrd.defaults b/defaults/initrd.defaults
index fa71ecb..b665355 100644
--- a/defaults/initrd.defaults
+++ b/defaults/initrd.defaults
@@ -96,6 +96,7 @@ GK_SSHD_PIDFILE='/var/run/dropbear.pid'
GK_SSHD_PORT=22
GK_SSHD_WAIT=
GK_UDEV_LOG='/run/initramfs/udevd.log'
+GK_UDEV_DEBUG=0
GK_UDEV_TIMEOUT=120
GK_USERINTERACTION_DISABLED_STATEFILE='/tmp/user-interaction.disabled'
diff --git a/defaults/linuxrc b/defaults/linuxrc
index 1a4ddac..b42366f 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -332,6 +332,14 @@ do
fi
unset tmp_wait
;;
+ gk.udev.debug=*)
+ tmp_enabled=${x#*=}
+ if is_true "${tmp_enabled}"
+ then
+ GK_UDEV_DEBUG=1
+ fi
+ unset tmp_enabled
+ ;;
gk.udev.timeout=*)
tmp_timeout=${x#*=}
if is_int "${tmp_timeout}"
@@ -566,7 +574,7 @@ fi
good_msg 'Activating udev ...'
udevd_cmd="run udevd --resolve-names=never"
-if is_debug
+if [ "${GK_UDEV_DEBUG}" = '1' ]
then
udevd_cmd="${udevd_cmd} --debug > ${GK_UDEV_LOG} 2>&1 &"
else
diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt
index d8b9e09..7b96879 100644
--- a/doc/genkernel.8.txt
+++ b/doc/genkernel.8.txt
@@ -721,6 +721,10 @@ recognized by the kernel itself.
*gk.net.timeout.interface*=<...>::
By default we will wait up to 10 seconds for interface to show up.
+*gk.udev.debug*=<...>::
+ This boolean option allows you to run udevd in debug mode. Output
+ will be logged to '/run/initramfs/udevd.log'.
+
*gk.udev.timeout*=<...>::
By default we will wait up to 120 seconds (UDEV default) for
UDEV event queue to become empty.