Handle systemd's "inactive" state as transient
authorJosé Bollo <jose.bollo@iot.bzh>
Mon, 3 Apr 2017 10:16:43 +0000 (12:16 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Mon, 3 Apr 2017 10:16:43 +0000 (12:16 +0200)
Inactive is returned sometimes but it means that
the service is not started yet not that it failed
to start.

AGL-Issue: SPEC-520

Change-Id: I3b39b983b45a0f6ee449958100595c5c486cbfdd
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afm-urun.c

index 48f8436..d6185c8 100644 (file)
@@ -93,7 +93,7 @@ static const char *wait_state_stable(int isuser, const char *dpath)
        for (;;) {
                state = systemd_unit_state_of_dpath(isuser, dpath);
                if (state == NULL || state == SysD_State_Active
-                || state == SysD_State_Failed || state == SysD_State_Inactive)
+                || state == SysD_State_Failed)
                        return state;
                /* TODO: sleep */
        }