summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2013-04-24 13:37:21 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-22 17:13:55 +0100
commita1f1c7fb1d563f60155134d0e7cd31ec6bf24fb0 (patch)
tree28934411dfed5ec5fa7b0224cc7db3735447d50d /meta/recipes-core
parent6410b87876d4ebb9bacc3c6087aa732194ad4376 (diff)
downloadpoky-a1f1c7fb1d563f60155134d0e7cd31ec6bf24fb0.tar.gz
systemd-systemctl: parse unit files more correctly
Old script failed to parse unit files containing comments like | #Alias=some-alias or whitespaces like | WantedBy = foo correctly. Patch changes script to interpret keywords only when they are at the beginning of a line and ignores whitespaces before the '='. (From OE-Core master rev: 443e75ee2c0e9a62df997aef24855bce54d39177) (From OE-Core rev: 7a8205e28d4bc826b0dc3f692a958e1e8e9a1432) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rwxr-xr-xmeta/recipes-core/systemd/systemd-systemctl/systemctl9
1 files changed, 3 insertions, 6 deletions
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index d71c7eda8b..8abbdf6938 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -78,8 +78,7 @@ for service in $services; do
78 echo "Found $service in $service_file" 78 echo "Found $service in $service_file"
79 79
80 # create the required symbolic links 80 # create the required symbolic links
81 wanted_by=$(grep WantedBy $ROOT/$service_file \ 81 wanted_by=$(sed '/^WantedBy[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \
82 | sed 's,WantedBy=,,g' \
83 | tr ',' '\n' \ 82 | tr ',' '\n' \
84 | grep '\(\.target$\)\|\(\.service$\)') 83 | grep '\(\.target$\)\|\(\.service$\)')
85 84
@@ -97,8 +96,7 @@ for service in $services; do
97 done 96 done
98 97
99 # create the required symbolic 'Alias' links 98 # create the required symbolic 'Alias' links
100 alias=$(grep Alias $ROOT/$service_file \ 99 alias=$(sed '/^Alias[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \
101 | sed 's,Alias=,,g' \
102 | tr ',' '\n' \ 100 | tr ',' '\n' \
103 | grep '\.service$') 101 | grep '\.service$')
104 102
@@ -114,8 +112,7 @@ for service in $services; do
114 done 112 done
115 113
116 # call us for the other required scripts 114 # call us for the other required scripts
117 also=$(grep Also $ROOT/$service_file \ 115 also=$(sed '/^Also[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \
118 | sed 's,Also=,,g' \
119 | tr ',' '\n') 116 | tr ',' '\n')
120 for a in $also; do 117 for a in $also; do
121 echo "Also=$a found in $service" 118 echo "Also=$a found in $service"