cmd/tailscaled: eliminate unnecessary use of an init() function.

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
pull/395/head
Avery Pennarun 5 years ago
parent c5fcc38bf1
commit d074ec6571

@ -36,15 +36,12 @@ import (
// later, the global state key doesn't look like a username.
const globalStateKey = "_daemon"
var defaultTunName = "tailscale0"
func init() {
func main() {
defaultTunName := "tailscale0"
if runtime.GOOS == "openbsd" {
defaultTunName = "tun"
}
}
func main() {
fake := getopt.BoolLong("fake", 0, "fake tunnel+routing instead of tuntap")
debug := getopt.StringLong("debug", 0, "", "Address of debug server")
tunname := getopt.StringLong("tun", 0, defaultTunName, "tunnel interface name")

Loading…
Cancel
Save