mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Return error when iptables is not found
This commit is contained in:
parent
dfc3904f77
commit
c66d2b6a53
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ func networkSize(mask net.IPMask) (int32, error) {
|
||||||
func iptables(args ...string) error {
|
func iptables(args ...string) error {
|
||||||
path, err := exec.LookPath("iptables")
|
path, err := exec.LookPath("iptables")
|
||||||
if err != nil {
|
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 {
|
if err := exec.Command(path, args...).Run(); err != nil {
|
||||||
return fmt.Errorf("iptables failed: iptables %v", strings.Join(args, " "))
|
return fmt.Errorf("iptables failed: iptables %v", strings.Join(args, " "))
|
||||||
|
|
Loading…
Reference in a new issue