move sigproxy, weaveproxy, weavewait
This commit is contained in:
1 parent
46ef954057
commit
8d4a97fed5
5 files changed
+9
-9
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"syscall"
|
||||
|
||||
"github.com/weaveworks/weave/net"
|
||||
)
|
||||
|
||||
func main() {
|
||||
_, err := net.EnsureInterface("ethwe", 20)
|
||||
checkErr(err)
|
||||
|
||||
if len(os.Args) <= 1 {
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
binary, err := exec.LookPath(os.Args[1])
|
||||
checkErr(err)
|
||||
|
||||
checkErr(syscall.Exec(binary, os.Args[1:], os.Environ()))
|
||||
}
|
||||
|
||||
func checkErr(err error) {
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user