Skip to contentSkip to conversation

systemd-systemctl-native: fix unit detection

PATCH New Ross Burton 1 participant 1 message Apr 6, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 systemd-systemctl-native: fix unit detection

The regexs were too strict and didn't allow for trailing whitespace.

[ YOCTO #9337 ]

---
 meta/recipes-core/systemd/systemd-systemctl/systemctl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd-systemctl/systemctl +1 -1
index 1164dd4..efad14c 100755
@@ -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\)$'
+	unit_types_re='\.\(service\|socket\|device\|mount\|automount\|swap\|target\|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
Signature · 1 line
2.7.0