From 02bfe283991b1eed20dbebca52e9582a3b11a378 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 14 Aug 2019 20:09:02 +0100 Subject: [PATCH] Minor tweaks --- cmd/yggdrasil/main.go | 4 ++-- cmd/yggdrasilctl/main.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/yggdrasil/main.go b/cmd/yggdrasil/main.go index 36494c40..15d7d226 100644 --- a/cmd/yggdrasil/main.go +++ b/cmd/yggdrasil/main.go @@ -120,7 +120,7 @@ func main() { normaliseconf := flag.Bool("normaliseconf", false, "use in combination with either -useconf or -useconffile, outputs your configuration normalised") confjson := flag.Bool("json", false, "print configuration from -genconf or -normaliseconf as JSON instead of HJSON") autoconf := flag.Bool("autoconf", false, "automatic mode (dynamic IP, peer with IPv6 neighbors)") - ver := flag.Bool("version", false, "prints the version of this build") + ver := flag.Bool("version", false, "prints the version of this build") logging := flag.String("logging", "info,warn,error", "comma-separated list of logging levels to enable") logto := flag.String("logto", "stdout", "file path to log to, \"syslog\" or \"stdout\"") flag.Parse() @@ -131,7 +131,7 @@ func main() { case *ver: fmt.Println("Build name:", version.BuildName()) fmt.Println("Build version:", version.BuildVersion()) - os.Exit(0) + return case *autoconf: // Use an autoconf-generated config, this will give us random keys and // port numbers, and will use an automatically selected TUN/TAP interface. diff --git a/cmd/yggdrasilctl/main.go b/cmd/yggdrasilctl/main.go index 4cc9745d..94d90842 100644 --- a/cmd/yggdrasilctl/main.go +++ b/cmd/yggdrasilctl/main.go @@ -59,10 +59,10 @@ func main() { args := flag.Args() if *ver { - fmt.Println(os.Args[0], "build name:", version.BuildName()) - fmt.Println(os.Args[0], "version:", version.BuildVersion()) - fmt.Println("\nFor get yggdrasil version use\n - ", os.Args[0], "getSelf") - os.Exit(0) + fmt.Println("Build name:", version.BuildName()) + fmt.Println("Build version:", version.BuildVersion()) + fmt.Println("To get the version number of the running Yggdrasil node, run", os.Args[0], "getSelf") + return } if len(args) == 0 {