Revert "systemd-serialgetty: Fix sed expression quoting"
PATCH 1/1 Revert "systemd-serialgetty: Fix sed expression quoting"
From: Geoff Parker <[email protected]>
This reverts commit 12d0fdd9c990bdc67bf6c8fd2d269cb766069ea5.
Adding quotes around sed string treats $default_baudrate as a literal rather than a variable substitution in the do_install function. Breaks the systemd [email protected] file and
serial console getty.
[email protected] 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
--- meta/recipes-core/systemd/systemd-serialgetty.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd-serialgetty.bb +1 -1
@@ -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}/[email protected] ${D}${systemd_unitdir}/system/ - sed -i -e 's/\@BAUDRATE\@/$default_baudrate/g' ${D}${systemd_unitdir}/system/[email protected] + sed -i -e s/\@BAUDRATE\@/$default_baudrate/g ${D}${systemd_unitdir}/system/[email protected] tmp="${SERIAL_CONSOLES}" for entry in $tmp ; do
Signature · 1 line
2.20.1
instead of revert can you try double quotes?
e.g.
sed -e "s/\@BAUDRATE\@/$default_baudrate/g" ....
Quoted 39 lines · Geoff Parker
From: Geoff Parker <[email protected]>
This reverts commit
12d0fdd9c990bdc67bf6c8fd2d269cb766069ea5.Adding quotes around sed string treats $default_baudrate as a literal rather than a variable substitution in the
do_installfunction. Breaks the systemd [email protected] file and
serial console getty.[email protected] 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
Signed-off-by Geoff Parker <[email protected]>--- meta/recipes-core/systemd/systemd-serialgetty.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-core/systemd/systemd-serialgetty.bb +1
-1@@ -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}/[email protected] ${D}${systemd_unitdir}/system/ - sed -i -e 's/\@BAUDRATE\@/$default_baudrate/g' ${D}${systemd_unitdir}/system/[email protected] + sed -i -e s/\@BAUDRATE\@/$default_baudrate/g ${D}${systemd_unitdir}/system/[email protected] tmp="${SERIAL_CONSOLES}" for entry in $tmp ; do
instead of revert can you try double quotes?
e.g.
sed -i -e "s/\@BAUDRATE\@/$default_baudrate/g" ....
Quoted 39 lines · Geoff Parker
From: Geoff Parker <[email protected]>
This reverts commit
12d0fdd9c990bdc67bf6c8fd2d269cb766069ea5.Adding quotes around sed string treats $default_baudrate as a literal rather than a variable substitution in the
do_installfunction. Breaks the systemd [email protected] file and
serial console getty.[email protected] 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
Signed-off-by Geoff Parker <[email protected]>--- meta/recipes-core/systemd/systemd-serialgetty.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-core/systemd/systemd-serialgetty.bb +1
-1@@ -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}/[email protected] ${D}${systemd_unitdir}/system/ - sed -i -e 's/\@BAUDRATE\@/$default_baudrate/g' ${D}${systemd_unitdir}/system/[email protected] + sed -i -e s/\@BAUDRATE\@/$default_baudrate/g ${D}${systemd_unitdir}/system/[email protected] tmp="${SERIAL_CONSOLES}" for entry in $tmp ; do