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