diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-03 04:49:35 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-03 14:55:10 +0200 |
commit | 258a9223b9ab18a973c44b238e029a0dc5640102 (patch) | |
tree | 5207280a53e690ed09777adabee95d586ac85393 /warning_linux.go | |
parent | 168ef61a638e4875b260edbc51551bae0dc34ac3 (diff) | |
download | wireguard-go-258a9223b9ab18a973c44b238e029a0dc5640102.tar.gz wireguard-go-258a9223b9ab18a973c44b238e029a0dc5640102.zip |
Start to dust off Darwin
Diffstat (limited to 'warning_linux.go')
-rw-r--r-- | warning_linux.go | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/warning_linux.go b/warning_linux.go new file mode 100644 index 0000000..d82805f --- /dev/null +++ b/warning_linux.go @@ -0,0 +1,39 @@ +package main + +import ( + "fmt" + "os" +) + +func Warning() { + shouldQuit := os.Getenv("WG_I_PREFER_BUGGY_USERSPACE_TO_POLISHED_KMOD") != "1" + + fmt.Fprintln(os.Stderr, "WARNING WARNING WARNING WARNING WARNING WARNING WARNING") + fmt.Fprintln(os.Stderr, "W G") + fmt.Fprintln(os.Stderr, "W This is alpha software. It will very likely not G") + fmt.Fprintln(os.Stderr, "W do what it is supposed to do, and things may go G") + fmt.Fprintln(os.Stderr, "W horribly wrong. You have been warned. Proceed G") + fmt.Fprintln(os.Stderr, "W at your own risk. G") + fmt.Fprintln(os.Stderr, "W G") + fmt.Fprintln(os.Stderr, "W Furthermore, you are running this software on a G") + fmt.Fprintln(os.Stderr, "W Linux kernel, which is probably unnecessary and G") + fmt.Fprintln(os.Stderr, "W foolish. This is because the Linux kernel has G") + fmt.Fprintln(os.Stderr, "W built-in first class support for WireGuard, and G") + fmt.Fprintln(os.Stderr, "W this support is much more refined than this G") + fmt.Fprintln(os.Stderr, "W program. For more information on installing the G") + fmt.Fprintln(os.Stderr, "W kernel module, please visit: G") + fmt.Fprintln(os.Stderr, "W https://www.wireguard.com/install G") + if shouldQuit { + fmt.Fprintln(os.Stderr, "W G") + fmt.Fprintln(os.Stderr, "W If you still want to use this program, against G") + fmt.Fprintln(os.Stderr, "W the sage advice here, please first export this G") + fmt.Fprintln(os.Stderr, "W environment variable: G") + fmt.Fprintln(os.Stderr, "W WG_I_PREFER_BUGGY_USERSPACE_TO_POLISHED_KMOD=1 G") + } + fmt.Fprintln(os.Stderr, "W G") + fmt.Fprintln(os.Stderr, "WARNING WARNING WARNING WARNING WARNING WARNING WARNING") + + if shouldQuit { + os.Exit(1) + } +} |