syncthing/cmd/syncthing/cmdutil
André Colomb 5237337626
cmd/syncthing: Add --skip-port-probing (fixes #8090) (#8099)
* cmd/syncthing: Remove unnecessary function arguments.

The openGUI() function does not need a device ID to work, and there is
only one caller anyway which uses EmptyDeviceID.

The loadOrDefaultConfig() function is always called with the same
dummy values.

* cmd/syncthing: Avoid misleading info messages from monitor process.

In order to check whether panic reporting is enabled, the monitor
process utilizes the loadOrDefaultConfig() function.  In case there is
no config file yet, info messages may be logged during creation if the
config Wrapper, which is discarded immediately after.

Stop using the DefaultConfig() utility function from lib/syncthing and
directly generate a minimal config instead to avoid these.

Add comments to loadOrDefaultConfig() explaining its limited purpose.

* cmd/syncthing/generate: Always write updated config file.

Previously, an existing config file was left untouched unless either
of the --gui-user or --gui-password options was given.  Remove that
condition and simplify the checking code.

* lib/config: Factor out ProbeFreePorts().

* cmd/syncthing: Add option --skip-port-probing.

Applies to both the "generate" and "serve" subcommands, as well as the
deprecated --generate option, just as the --no-default-folder flag.
2022-01-07 11:19:17 +01:00
..
options_common.go cmd/syncthing: Add --skip-port-probing (fixes #8090) (#8099) 2022-01-07 11:19:17 +01:00
options_others.go cmd/syncthing: Implement generate as a subcommand with optional API credential setting (fixes #8021) (#8043) 2021-11-18 22:57:59 +01:00
options_windows.go cmd/syncthing: Implement generate as a subcommand with optional API credential setting (fixes #8021) (#8043) 2021-11-18 22:57:59 +01:00
util.go Normalize CLI options to always use two dashes. (#8037) 2021-11-04 08:42:55 +01:00