diff options
author | Geoff Parker <geoffhp@gmail.com> | 2020-09-11 20:07:05 -0700 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2020-09-14 04:49:12 -1000 |
commit | 1cc94a6b9b6a9d12f782471053448ad9795944bb (patch) | |
tree | 4b3d61681a21c726deebe5daa72240b5506cca4a /meta/recipes-core | |
parent | edaecac74210ae201dc5eea5758bcf4e85cb14cb (diff) | |
download | openembedded-core-contrib-1cc94a6b9b6a9d12f782471053448ad9795944bb.tar.gz |
systemd-serialgetty: Replace sed quoting using ' with " to allow var expansion
A recent commit added single quotes around the sed regex's. This prevented the
expansion of $default_baudrate in do_install(), and ended up with systemd's'
serial-getty@.service file having a literal $default_baudrate.
This broke the serial console getty service.
serial-getty@.service was getting a line which looked like this:
ExecStart=-/sbin/agetty -8 -L %I $default_baudrate $TERM
Rather than:
ExecStart=-/sbin/agetty -8 -L %I 115200 $TERM
Fixed by repacing the single quotes with double quotes in the sed expressions.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 80b721bfa4fe300a2f52f233f44fa2835426d304)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/systemd/systemd-serialgetty.bb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb index 059fccc2b6..0cc0dc8c79 100644 --- a/meta/recipes-core/systemd/systemd-serialgetty.bb +++ b/meta/recipes-core/systemd/systemd-serialgetty.bb @@ -21,7 +21,7 @@ do_install() { install -d ${D}${systemd_unitdir}/system/ install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/ install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_unitdir}/system/ - sed -i -e 's/\@BAUDRATE\@/$default_baudrate/g' ${D}${systemd_unitdir}/system/serial-getty@.service + sed -i -e "s/\@BAUDRATE\@/$default_baudrate/g" ${D}${systemd_unitdir}/system/serial-getty@.service tmp="${SERIAL_CONSOLES}" for entry in $tmp ; do @@ -34,7 +34,7 @@ do_install() { else # install custom service file for the non-default baudrate install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_unitdir}/system/serial-getty$baudrate@.service - sed -i -e s/\@BAUDRATE\@/$baudrate/g ${D}${systemd_unitdir}/system/serial-getty$baudrate@.service + sed -i -e "s/\@BAUDRATE\@/$baudrate/g" ${D}${systemd_unitdir}/system/serial-getty$baudrate@.service # enable the service ln -sf ${systemd_unitdir}/system/serial-getty$baudrate@.service \ ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty$baudrate@$ttydev.service |