-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc_systetmd_units: Add service unit for logging over serial console
This service unit file was added to the system in June to be able to log Linux Kernel crashes. Put it under version control. ``` $ ls -l --full-time /etc/systemd/system/serial-log@.service -rw-r--r-- 1 root system 254 2017-06-23 10:24:55.000000000 +0200 /etc/systemd/system/serial-log@.service ```
- Loading branch information
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=TTY logger | ||
|
||
[Service] | ||
ExecStartPre=/usr/bin/stty -F /dev/%I 115200 -echo | ||
ExecStart=-/usr/bin/sh -c "/usr/bin/cat /dev/%I >> /var/log/%I.log 2>&1" | ||
Type=idle | ||
Restart=always | ||
RestartSec=0 | ||
UtmpIdentifier=%I | ||
|
||
[Install] | ||
WantedBy=basic.target |