John Wang | a66aa8a | 2020-09-30 13:19:08 +0800 | [diff] [blame] | 1 | [Unit] |
| 2 | Description=Phosphor Console Muxer listening on device /dev/%I |
| 3 | BindsTo=dev-%i.device |
| 4 | After=dev-%i.device |
| 5 | |
| 6 | [Service] |
Lei YU | 63beff0 | 2021-09-08 15:21:51 +0800 | [diff] [blame] | 7 | ExecStartPre=/bin/sh -c 'echo -n "uart3" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/uart1' |
| 8 | ExecStartPre=/bin/sh -c 'echo -n "uart1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/uart3' |
| 9 | ExecStartPre=/bin/sh -c 'echo -n "io1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/uart4' |
| 10 | ExecStartPre=/bin/sh -c 'echo -n "uart4" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/io1' |
John Wang | a66aa8a | 2020-09-30 13:19:08 +0800 | [diff] [blame] | 11 | ExecStart=/usr/bin/env obmc-console-server --config {sysconfdir}/obmc-console.conf %i |
Lei YU | 63beff0 | 2021-09-08 15:21:51 +0800 | [diff] [blame] | 12 | ExecStopPost=/bin/sh -c 'echo -n "io1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/uart1' |
| 13 | ExecStopPost=/bin/sh -c 'echo -n "io3" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/uart3' |
| 14 | ExecStopPost=/bin/sh -c 'echo -n "io4" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/uart4' |
| 15 | ExecStopPost=/bin/sh -c 'echo -n "uart1" > /sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing/io1' |
John Wang | a66aa8a | 2020-09-30 13:19:08 +0800 | [diff] [blame] | 16 | SyslogIdentifier=obmc-console-server |
| 17 | Restart=always |
| 18 | |
| 19 | [Install] |
| 20 | WantedBy={SYSTEMD_DEFAULT_TARGET} |