From c66d2b6a532c657b554ffa3c80b2cf15e218ee8e Mon Sep 17 00:00:00 2001 From: Shawn Siefkas Date: Thu, 28 Mar 2013 14:30:56 -0500 Subject: [PATCH] Return error when iptables is not found --- network.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network.go b/network.go index 4fcbfb202e..1a347c1c18 100644 --- a/network.go +++ b/network.go @@ -70,7 +70,7 @@ func networkSize(mask net.IPMask) (int32, error) { func iptables(args ...string) error { path, err := exec.LookPath("iptables") if err != nil { - log.Fatal("command not found: iptables") + return fmt.Errorf("command not found: iptables") } if err := exec.Command(path, args...).Run(); err != nil { return fmt.Errorf("iptables failed: iptables %v", strings.Join(args, " "))