From b778fe6f41643035eda22f1463ff8fd9dc7b0709 Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Mon, 24 Mar 2014 14:12:52 -0700 Subject: [PATCH] fix(unit): Default unit command to NOP --- initialize/config.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/initialize/config.go b/initialize/config.go index 2563c16..b81170b 100644 --- a/initialize/config.go +++ b/initialize/config.go @@ -144,14 +144,12 @@ func Apply(cfg CloudConfig, env *Environment) error { } } - if unit.Group() != "network" { - command := unit.Command - if command == "" { - command = "restart" - } - commands[unit.Name] = command - } else { + if unit.Group() == "network" { commands["systemd-networkd.service"] = "restart" + } else { + if unit.Command != "" { + commands[unit.Name] = unit.Command + } } }