aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-08-28 15:28:33 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-08-28 18:35:59 +0200
commit8cca1dada7be5625cbdbcf4e8ab14c51d131e099 (patch)
treeffcbc5a05a7bc3663f774144d909d051f3d36c8f
parentdefaults/linuxrc: Log udevd debug output into /run/initramfs/udevd.log (diff)
downloadgenkernel-8cca1dada7be5625cbdbcf4e8ab14c51d131e099.tar.gz
genkernel-8cca1dada7be5625cbdbcf4e8ab14c51d131e099.tar.bz2
genkernel-8cca1dada7be5625cbdbcf4e8ab14c51d131e099.zip
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@gentoo.org>
-rw-r--r--defaults/initrd.defaults1
-rw-r--r--defaults/linuxrc10
-rw-r--r--doc/genkernel.8.txt4
3 files changed, 14 insertions, 1 deletions
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.