From f0dea2475d5ffe5ffbaa4e3b3c51487c1ad93079 Mon Sep 17 00:00:00 2001 From: Alex Crawford Date: Tue, 2 Dec 2014 17:21:31 -0800 Subject: [PATCH] initialize: restart networkd before other units --- initialize/config.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/initialize/config.go b/initialize/config.go index 684912e..ded6741 100644 --- a/initialize/config.go +++ b/initialize/config.go @@ -363,7 +363,12 @@ func processUnits(units []system.Unit, root string, um system.UnitManager) error } if restartNetworkd { - actions = append(actions, action{"systemd-networkd.service", "restart"}) + log.Printf("Restarting systemd-networkd") + res, err := um.RunUnitCommand("restart", "systemd-networkd.service") + if err != nil { + return err + } + log.Printf("Restarted systemd-networkd (%s)", res) } for _, action := range actions {