Skip to content

Commit d5d07bd

Browse files
DaanDeMeyerbluca
authored andcommitted
rules: Limit the number of device units generated for serial ttys
As per the suggestion in systemd/systemd#33242. This reduces the number of /dev/ttySXX device units generated in mkosi from 32 to 4. (cherry picked from commit dc38f9a) (cherry picked from commit a3d9433) (cherry picked from commit 6391242) (cherry picked from commit 1a8549f) (cherry picked from commit 38f11f4)
1 parent d7d9ded commit d5d07bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rules.d/99-systemd.rules.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
ACTION=="remove", GOTO="systemd_end"
1111

1212
SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty[0-9]*", TAG+="systemd"
13+
# Exclude 8250 serial ports with a zero IO port, as they are not usable until "setserial /dev/ttySxxx port …" is invoked.
14+
SUBSYSTEM=="tty", KERNEL=="ttyS*", DRIVERS=="serial8250", ATTR{port}=="0x0", ENV{SYSTEMD_READY}="0"
1315
KERNEL=="vport*", TAG+="systemd"
1416

1517
SUBSYSTEM=="ptp", TAG+="systemd"

0 commit comments

Comments
 (0)