summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd-serialgetty.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd-serialgetty.bb')
-rw-r--r--meta/recipes-core/systemd/systemd-serialgetty.bb7
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb
index 44a93ac684..9035b8c335 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty.bb
+++ b/meta/recipes-core/systemd/systemd-serialgetty.bb
@@ -9,7 +9,8 @@ SERIAL_TERM ?= "linux"
9 9
10SRC_URI = "file://serial-getty@.service" 10SRC_URI = "file://serial-getty@.service"
11 11
12S = "${WORKDIR}" 12S = "${WORKDIR}/sources"
13UNPACKDIR = "${S}"
13 14
14# As this package is tied to systemd, only build it when we're also building systemd. 15# As this package is tied to systemd, only build it when we're also building systemd.
15inherit features_check 16inherit features_check
@@ -21,7 +22,7 @@ do_install() {
21 default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'` 22 default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'`
22 install -d ${D}${systemd_system_unitdir}/ 23 install -d ${D}${systemd_system_unitdir}/
23 install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/ 24 install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/
24 install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_system_unitdir}/ 25 install -m 0644 ${S}/serial-getty@.service ${D}${systemd_system_unitdir}/
25 sed -i -e "s/\@BAUDRATE\@/$default_baudrate/g" ${D}${systemd_system_unitdir}/serial-getty@.service 26 sed -i -e "s/\@BAUDRATE\@/$default_baudrate/g" ${D}${systemd_system_unitdir}/serial-getty@.service
26 sed -i -e "s/\@TERM\@/${SERIAL_TERM}/g" ${D}${systemd_system_unitdir}/serial-getty@.service 27 sed -i -e "s/\@TERM\@/${SERIAL_TERM}/g" ${D}${systemd_system_unitdir}/serial-getty@.service
27 28
@@ -35,7 +36,7 @@ do_install() {
35 ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@$ttydev.service 36 ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@$ttydev.service
36 else 37 else
37 # install custom service file for the non-default baudrate 38 # install custom service file for the non-default baudrate
38 install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_system_unitdir}/serial-getty$baudrate@.service 39 install -m 0644 ${S}/serial-getty@.service ${D}${systemd_system_unitdir}/serial-getty$baudrate@.service
39 sed -i -e "s/\@BAUDRATE\@/$baudrate/g" ${D}${systemd_system_unitdir}/serial-getty$baudrate@.service 40 sed -i -e "s/\@BAUDRATE\@/$baudrate/g" ${D}${systemd_system_unitdir}/serial-getty$baudrate@.service
40 # enable the service 41 # enable the service
41 ln -sf ${systemd_system_unitdir}/serial-getty$baudrate@.service \ 42 ln -sf ${systemd_system_unitdir}/serial-getty$baudrate@.service \