]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
systemd: avoid parsing error when 'networkd' is enabled in PACKAGECONFIG ChenQi/systemd-networkd
authorChen Qi <Qi.Chen@windriver.com>
Mon, 2 Mar 2015 06:01:17 +0000 (14:01 +0800)
committerChen Qi <Qi.Chen@windriver.com>
Mon, 2 Mar 2015 07:30:27 +0000 (15:30 +0800)
If 'networkd' is enabled in PACKAGECONFIG, the do_install variable cannot
be correctly expanded. Error message is like below.

Failure expanding variable do_install: ShellSyntaxError: LexToken(Fi,'fi',0,0)
followed by:
  LexToken(NEWLINE,'\n',0,0)

This patch fixes the above problem.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
meta/recipes-core/systemd/systemd_219.bb

index f245239c18bd947547415b16af39db9f4c496894..d785255e103f963900e58145f5b759610b0e049a 100644 (file)
@@ -169,7 +169,7 @@ do_install() {
        # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
        # for existence else it fails
        if [ -s ${D}${libdir}/tmpfiles.d/systemd.conf ]; then
-               ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)}
+               ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)}
        fi
 }