]> code.ossystems Code Review - openembedded-core.git/commitdiff
systemctl-native: add target.wants to target regex
authorMartin Kelly <mkelly@xevo.com>
Mon, 16 Oct 2017 16:31:42 +0000 (09:31 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 4 Dec 2017 17:14:27 +0000 (17:14 +0000)
The regex for acceptable systemd WantedBy/RequiredBy targets does not include
target.wants, so a line like this:

WantedBy=multi-user.target.wants

gets silently ignored, even though it works fine on a real system.

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
meta/recipes-core/systemd/systemd-systemctl/systemctl

index efad14ce17cf8ea1e76b659ba51922831d5d31a1..6e5a1b718129106cd0b8a1cb3c94e1d78410ed88 100755 (executable)
@@ -108,7 +108,7 @@ for service in $services; do
 
        # If any new unit types are added to systemd they should be added
        # to this regular expression.
-       unit_types_re='\.\(service\|socket\|device\|mount\|automount\|swap\|target\|path\|timer\|snapshot\)\s*$'
+       unit_types_re='\.\(service\|socket\|device\|mount\|automount\|swap\|target\|target\.wants\|path\|timer\|snapshot\)\s*$'
        if [ "$action" = "preset" ]; then
                action=`egrep -sh  $service $ROOT/etc/systemd/user-preset/*.preset | cut -f1 -d' '`
                if [ -z "$action" ]; then