Browse code

Add wait flag to iptables

Fixes #1573
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)

Michael Crosby authored on 2014/05/23 10:24:58
Showing 1 changed files
... ...
@@ -150,7 +150,7 @@ func Raw(args ...string) ([]byte, error) {
150 150
 	if os.Getenv("DEBUG") != "" {
151 151
 		fmt.Printf("[DEBUG] [iptables]: %s, %v\n", path, args)
152 152
 	}
153
-	output, err := exec.Command(path, args...).CombinedOutput()
153
+	output, err := exec.Command(path, append([]string{"--wait"}, args...)...).CombinedOutput()
154 154
 	if err != nil {
155 155
 		return nil, fmt.Errorf("iptables failed: iptables %v: %s (%s)", strings.Join(args, " "), output, err)
156 156
 	}