Systems with udev/udevadm mess up /dev/console => silence console

On systems with systemd-udev/udevadm the trigger addition of devices at
boot wrecks havoc of /dev/console.  This patch forces Finit to go silent
by default on such systems.  Far from ideal, but since the actual root
cause for this messup is unknown this will have to do for now.

Also, add a settle timeout of 120 sec to the udev device tree population.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-10-02 23:08:18 +02:00
parent 38142baa93
commit 6885a9f868
+10 -2
View File
@@ -267,6 +267,13 @@ int main(int argc, char* argv[])
if (getpid() != 1)
return client(argc, argv);
/*
* The trigger call to udevadm later on screws up the console
* XXX: Yes, this is an ugly workaround, please fix me.
*/
if (fexist("/sbin/udevadm"))
silent = 1;
/*
* In case of emergency.
*/
@@ -352,8 +359,9 @@ int main(int argc, char* argv[])
run_interactive(devfsd, "Populating device tree");
if (fexist("/sbin/udevadm")) {
run_interactive("/sbin/udevadm trigger --action=add --type=subsystems", "Trigger subsystems");
run_interactive("/sbin/udevadm trigger --action=add --type=devices", "Trigger devices");
run("/sbin/udevadm trigger --action=add --type=subsystems");
run("/sbin/udevadm trigger --action=add --type=devices");
run("/sbin/udevadm settle --timeout=120");
}
/*