Repository navigation
envknob: generalize Windows tailscaled-env.txt support - #5665
Merged
Merged
Conversation
Member
Author
|
2:16pm and this is like my first code of the day 🤦♂️ |
bradfitz
force-pushed
the
bradfitz/env_windows
branch
from
September 16, 2022 21:58
fe900db to
1d19ffb
Compare
andrew-d
approved these changes
Sep 16, 2022
Comment on lines
+200
to
+202
| if diskConfigErr != nil { | ||
| log.Printf("Error reading environment config: %v", diskConfigErr) | ||
| } |
Member
There was a problem hiding this comment.
Is this only printing on Windows because it only does things on Windows? Are you planning on moving this to the non-Windows codepath when adding macOS / Synology support?
Member
Author
There was a problem hiding this comment.
Windows has two start-up paths for ... reasons. The foreground tailscaled vs service paths.
These three lines are already in two places, the other being the generic tailscaled foreground (all platforms including Windows) case.
Member
Author
There was a problem hiding this comment.
OH! it would be if I'd saved that buffer. So good catch.
maisem
approved these changes
Sep 16, 2022
ipnserver previously had support for a Windows-only environment variable mechanism that further only worked when Windows was running as a service, not from a console. But we want it to work from tailscaed too, and we want it to work on macOS and Synology. So move it to envknob, now that envknob can change values at runtime post-init. A future change will wire this up for more platforms, and do something more for CLI flags like --port, which the bug was originally about. Updates #5114 Change-Id: I9fd69a9a91bb0f308fc264d4a6c33e0cbe352d71 Signed-off-by: Brad Fitzpatrick <[email protected]>
bradfitz
force-pushed
the
bradfitz/env_windows
branch
from
September 16, 2022 22:10
1d19ffb to
f1d9264
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ipnserver previously had support for a Windows-only environment variable mechanism that further only worked when Windows was running as a service, not from a console.
But we want it to work from tailscaed too, and we want it to work on macOS and Synology. So move it to envknob, now that envknob can change values at runtime post-init.
A future change will wire this up for more platforms, and do something more for CLI flags like --port, which the bug was originally about.
Updates #5114