blob: 605c9e1a0ba2450cb82946dbf5eb6063d4414fa0 [file] [log] [blame]
Hieu Huynh325a8112022-10-24 11:15:17 +00001FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
2RDEPENDS:${PN} += "bash"
3
Chau Lyb10e6e72023-04-13 04:40:02 +00004# Declare port spcific config files
5OBMC_CONSOLE_TTYS = "ttyS0 ttyS1 ttyS2 ttyS3 ttyS7 ttyS8"
6CONSOLE_CLIENT = "2200 2201 2202 2203 2204 2205"
Hieu Huynh325a8112022-10-24 11:15:17 +00007
Chau Lyb10e6e72023-04-13 04:40:02 +00008CONSOLE_SERVER_CONF_FMT = "file://server.{0}.conf"
9CONSOLE_CLIENT_CONF_FMT = "file://client.{0}.conf"
Chau Lybcc46612023-05-10 05:52:40 +000010CONSOLE_CLIENT_SERVICE_FMT = "obmc-console-ssh@{0}.service"
Hieu Huynh325a8112022-10-24 11:15:17 +000011
Chau Lybcc46612023-05-10 05:52:40 +000012SRC_URI += " \
13 ${@compose_list(d, 'CONSOLE_SERVER_CONF_FMT', 'OBMC_CONSOLE_TTYS')} \
Chau Lyb10e6e72023-04-13 04:40:02 +000014 ${@compose_list(d, 'CONSOLE_CLIENT_CONF_FMT', 'CONSOLE_CLIENT')} \
15 "
Hieu Huynh325a8112022-10-24 11:15:17 +000016
Chau Lybcc46612023-05-10 05:52:40 +000017SYSTEMD_SERVICE:${PN}:append = " \
18 ${@compose_list(d, 'CONSOLE_CLIENT_SERVICE_FMT', 'CONSOLE_CLIENT')} \
19 "
Chau Lyb10e6e72023-04-13 04:40:02 +000020SYSTEMD_SERVICE:${PN}:remove = "obmc-console-ssh.socket"
Hieu Huynh325a8112022-10-24 11:15:17 +000021
Chau Lyb10e6e72023-04-13 04:40:02 +000022FILES:${PN}:remove = "${systemd_system_unitdir}/obmc-console-ssh@.service.d/use-socket.conf"
23
Andrew Jeffery08413f22023-04-21 11:45:51 +093024PACKAGECONFIG:append = " concurrent-servers"
Chau Lyb10e6e72023-04-13 04:40:02 +000025
Hieu Huynh325a8112022-10-24 11:15:17 +000026do_install:append() {
Chau Lyb10e6e72023-04-13 04:40:02 +000027 # Install the console client configurations
28 install -m 0644 ${WORKDIR}/client.*.conf ${D}${sysconfdir}/${BPN}/
Hieu Huynh325a8112022-10-24 11:15:17 +000029}