SPEC-3495: fix greping of systemd units 26/25026/1 9.99.2 jellyfish/9.99.2 jellyfish_9.99.2
authorCorentin LABBE <clabbe@baylibre.com>
Thu, 16 Jul 2020 07:30:47 +0000 (09:30 +0200)
committerCorentin LABBE <clabbe@baylibre.com>
Thu, 16 Jul 2020 07:30:47 +0000 (09:30 +0200)
The grep pattern for systemd units is not enough restrictive.
So let's made grep a little more restrictive.

Change-Id: If0f75919a89c39da63e5375e3b3cdd020c6ea324
Bug-AGL: SPEC-3495
Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
common/scripts/application-lifecycle.sh

index d28709a..0bdc6d4 100755 (executable)
@@ -194,9 +194,9 @@ do
        fi
 
        echo "DEBUG: check if we see the package with systemctl list-units (before start)"
-       systemctl list-units --full | grep "afm.*$WGTNAME"
+       systemctl list-units --full | grep "afm.*$WGTNAME--"
        echo "DEBUG: check if we see the package with systemctl -a (before start)"
-       systemctl -a |grep "afm.*$WGTNAME"
+       systemctl -a |grep "afm.*$WGTNAME--"
 
        echo "DEBUG: start $NAMEID"
        do_afm_util start $NAMEID > "rid"
@@ -209,9 +209,9 @@ do
        fi
 
        echo "DEBUG: check if we see the package with systemctl list-units (after start)"
-       systemctl list-units --full | grep "afm.*$WGTNAME"
+       systemctl list-units --full | grep "afm.*$WGTNAME--"
        echo "DEBUG: check if we see the package with systemctl -a (after start)"
-       systemctl -a |grep "afm.*$WGTNAME"
+       systemctl -a |grep "afm.*$WGTNAME--"
 
        echo "DEBUG: Get RID for $NAMEID"
        PSLIST="pslist"