On 1/31/19 4:34 PM, Paul Menzel wrote:

numbered differently


You can try to do this via tty symlinked udev rule, something along the lines of

# /etc/udev/rules.d/99-consistent-serial.rules

# Generic sample ( replace $FOO with something relevant to your environment )

SUBSYSTEM=="tty", KERNEL=="tty$FOO", SYMLINK+="ttySLAB0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="tty-logger.service"

# Vendir spesific, ( replace idVendor,idProduct,serial for with something relevant to your environment

SUBSYSTEM=="tty", ATTRS{idVendor}=="VI123", ATTRS{idProduct}=="IDP123", ATTRS{serial}=="12345", SYMLINK+="ttySLAB0" TAG+="systemd", ENV{SYSTEMD_WANTS}+="tty-logger.service"

Remove any [Install] section from the tty-logger type service unit.

You might not even need the type service unit ( omitt TAG+="systemd", ENV{SYSTEMD_WANTS}+="tty-logger.service" ) if you create a journal snippet along these lines...

/etc/systemd/journald.conf.d/ttyslab0.conf

[Journal]
ForwardToConsole=yes
TTYPath=/dev/ttySLAB0
MaxLevelConsole=<your choice>

Regards

            JBG

||
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to