[oe-commits] [openembedded-core] 03/05: initramfs-framework: fix boothang when console=null

git at git.openembedded.org git at git.openembedded.org
Fri Mar 13 13:36:36 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit dd6ee0b06cd8df6204cf600050516d15172302ea
Author: Stefan Eichenberger <stefan.eichenberger at toradex.com>
AuthorDate: Fri Mar 13 12:09:07 2020 +0100

    initramfs-framework: fix boothang when console=null
    
    If console=null systemd-udevd throws an assertion which prevents the
    system from booting. This patch redirects stdin, stdout and stderr to
    /dev/null in case that the console can't be opened so that udevd still
    boots.
    
    A systemd issue was reported here. However, they will not fix this
    specific use-case:
    https://github.com/systemd/systemd/issues/13332
    
    Signed-off-by: Stefan Eichenberger <stefan.eichenberger at toradex.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-core/initrdscripts/initramfs-framework/udev | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/udev b/meta/recipes-core/initrdscripts/initramfs-framework/udev
index 87551ff..4898b89 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/udev
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/udev
@@ -41,6 +41,9 @@ udev_run() {
 	mkdir -p /run
 	mkdir -p /var/run
 
+	# Workaround if console=null, systemd-udevd needs valid stdin, stdout and stderr to work
+	sh -c "exec 4< /dev/console" || { exec 0> /dev/null; exec 1> /dev/null; exec 2> /dev/null; }
+
 	$_UDEV_DAEMON --daemon
 	udevadm trigger --action=add
 	udevadm settle

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list