mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
cmd/dockerd: move setting defaults to loadDaemonCliConfig()
Move changes to follow, but this moves the code to a more logical place. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
717a503590
commit
0281f50efa
1 changed files with 3 additions and 3 deletions
|
@ -76,8 +76,6 @@ func NewDaemonCli() *DaemonCli {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *DaemonCli) start(opts *daemonOptions) (err error) {
|
func (cli *DaemonCli) start(opts *daemonOptions) (err error) {
|
||||||
opts.setDefaultOptions()
|
|
||||||
|
|
||||||
if cli.Config, err = loadDaemonCliConfig(opts); err != nil {
|
if cli.Config, err = loadDaemonCliConfig(opts); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -92,7 +90,7 @@ func (cli *DaemonCli) start(opts *daemonOptions) (err error) {
|
||||||
|
|
||||||
if opts.Validate {
|
if opts.Validate {
|
||||||
// If config wasn't OK we wouldn't have made it this far.
|
// If config wasn't OK we wouldn't have made it this far.
|
||||||
fmt.Fprintln(os.Stderr, "configuration OK")
|
_, _ = fmt.Fprintln(os.Stderr, "configuration OK")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,6 +384,8 @@ func shutdownDaemon(d *daemon.Daemon) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadDaemonCliConfig(opts *daemonOptions) (*config.Config, error) {
|
func loadDaemonCliConfig(opts *daemonOptions) (*config.Config, error) {
|
||||||
|
opts.setDefaultOptions()
|
||||||
|
|
||||||
conf := opts.daemonConfig
|
conf := opts.daemonConfig
|
||||||
flags := opts.flags
|
flags := opts.flags
|
||||||
conf.Debug = opts.Debug
|
conf.Debug = opts.Debug
|
||||||
|
|
Loading…
Add table
Reference in a new issue