obmc-console cleanups
Make use of systemd class features.
Change-Id: Ia1341adc96b099d2aa43c70877d45dd32c57a500
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-phosphor/common/recipes-phosphor/console/obmc-console.bb b/meta-phosphor/common/recipes-phosphor/console/obmc-console.bb
index 131c6c7..065b5c6 100644
--- a/meta-phosphor/common/recipes-phosphor/console/obmc-console.bb
+++ b/meta-phosphor/common/recipes-phosphor/console/obmc-console.bb
@@ -10,30 +10,19 @@
TARGET_CFLAGS += "-fpic -O2"
SRC_URI += "git://github.com/openbmc/obmc-console"
-SRC_URI += "file://${PN}.conf \
- file://obmc-console-ssh.socket \
- file://obmc-console-ssh@.service"
+SRC_URI += "file://${PN}.conf"
SRCREV = "87e344cd6bd848f886e226c8d58ffe4da77ce4bc"
-FILES_${PN} += "${systemd_unitdir}/system/obmc-console-ssh@.service \
- ${systemd_unitdir}/system/obmc-console-ssh.socket"
-
-SYSTEMD_SERVICE_${PN} = "${BPN}.service ${BPN}-ssh.socket"
+SYSTEMD_SERVICE_${PN} = " \
+ ${PN}.service \
+ ${PN}-ssh.socket \
+ ${PN}-ssh@.service \
+ "
do_install_append() {
install -m 0755 -d ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/${PN}.conf ${D}${sysconfdir}/${PN}.conf
-
- # add additional unit files for ssh-based console server
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/obmc-console-ssh@.service ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/obmc-console-ssh.socket ${D}${systemd_unitdir}/system
- sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
- -e 's,@BINDIR@,${bindir},g' \
- -e 's,@SBINDIR@,${sbindir},g' \
- ${D}${systemd_unitdir}/system/obmc-console-ssh@.service \
- ${D}${systemd_unitdir}/system/obmc-console-ssh.socket
}
S = "${WORKDIR}/git"
diff --git a/meta-phosphor/common/recipes-phosphor/console/obmc-console/obmc-console-ssh@.service b/meta-phosphor/common/recipes-phosphor/console/obmc-console/obmc-console-ssh@.service
index a2e1068..198383c 100644
--- a/meta-phosphor/common/recipes-phosphor/console/obmc-console/obmc-console-ssh@.service
+++ b/meta-phosphor/common/recipes-phosphor/console/obmc-console/obmc-console-ssh@.service
@@ -5,7 +5,7 @@
[Service]
Environment="DROPBEAR_RSAKEY_DIR=/etc/dropbear"
EnvironmentFile={envfiledir}/dropbear
-ExecStart=-{sbindir}/dropbear -i -r ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key -c {bindir}/obmc-console-client $DROPBEAR_EXTRA_ARGS
+ExecStart=-{sbindir}/dropbear -i -r ${{DROPBEAR_RSAKEY_DIR}}/dropbear_rsa_host_key -c {bindir}/obmc-console-client $DROPBEAR_EXTRA_ARGS
ExecReload={base_bindir}/kill -HUP $MAINPID
StandardInput=socket
KillMode=process