add weavewait
binocarlos/wait-for-weave is Apache2 licensed, so attribution/etc applies. Thus, we re-invent the wheel here.
This commit is contained in:
1 parent
9389001a1d
commit
444b1482fa
5 files changed
+37
-6
No files matched your search
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
"github.com/weaveworks/weave/net"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if _, err := net.EnsureInterface("ethwe", 20); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
}
|
||||
|
||||
if len(os.Args) <= 1 {
|
||||
os.Exit(0)
|
||||
}
|
||||
cmd := exec.Command(os.Args[1], os.Args[2:]...)
|
||||
cmd.Stdin = os.Stdin
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
if err := cmd.Run(); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user