mirror of
https://github.com/troglobit/finit.git
synced 2026-10-07 08:04:22 +07:00
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:
@@ -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");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user