sysv-generator: Provides: $network should also pull network.target to transaction...
authorLukáš Nykrýn <lnykryn@redhat.com>
Thu, 30 Mar 2017 09:12:50 +0000 (11:12 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 30 Mar 2017 09:12:50 +0000 (11:12 +0200)
network.target should be pulled in to the transaction
by the unit that provides network services, but currently
for initscripts it only pulls in network-online.target.

src/sysv-generator/sysv-generator.c

index 9fde9b1..9828078 100644 (file)
@@ -389,6 +389,9 @@ static int handle_provides(SysvStub *s, unsigned line, const char *full_text, co
                                 r = strv_extend(&s->before, SPECIAL_NETWORK_TARGET);
                                 if (r < 0)
                                         return log_oom();
+                                r = strv_extend(&s->wants, SPECIAL_NETWORK_TARGET);
+                                if (r < 0)
+                                        return log_oom();
                         }
 
                         break;