mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
cmd/dockerd: remove config_common_unix.go
This file was originally part of the work to support Solaris, and there's nothing "not common unix" anymmore, so merging the files. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
92d9e892b5
commit
5d352f6a87
2 changed files with 33 additions and 43 deletions
|
@ -1,43 +0,0 @@
|
|||
//go:build linux || freebsd
|
||||
// +build linux freebsd
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/docker/docker/pkg/homedir"
|
||||
)
|
||||
|
||||
func getDefaultPidFile() (string, error) {
|
||||
if !honorXDG {
|
||||
return "/var/run/docker.pid", nil
|
||||
}
|
||||
runtimeDir, err := homedir.GetRuntimeDir()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return filepath.Join(runtimeDir, "docker.pid"), nil
|
||||
}
|
||||
|
||||
func getDefaultDataRoot() (string, error) {
|
||||
if !honorXDG {
|
||||
return "/var/lib/docker", nil
|
||||
}
|
||||
dataHome, err := homedir.GetDataHome()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return filepath.Join(dataHome, "docker"), nil
|
||||
}
|
||||
|
||||
func getDefaultExecRoot() (string, error) {
|
||||
if !honorXDG {
|
||||
return "/var/run/docker", nil
|
||||
}
|
||||
runtimeDir, err := homedir.GetRuntimeDir()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return filepath.Join(runtimeDir, "docker"), nil
|
||||
}
|
|
@ -97,3 +97,36 @@ func configureCertsDir() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func getDefaultPidFile() (string, error) {
|
||||
if !honorXDG {
|
||||
return "/var/run/docker.pid", nil
|
||||
}
|
||||
runtimeDir, err := homedir.GetRuntimeDir()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return filepath.Join(runtimeDir, "docker.pid"), nil
|
||||
}
|
||||
|
||||
func getDefaultDataRoot() (string, error) {
|
||||
if !honorXDG {
|
||||
return "/var/lib/docker", nil
|
||||
}
|
||||
dataHome, err := homedir.GetDataHome()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return filepath.Join(dataHome, "docker"), nil
|
||||
}
|
||||
|
||||
func getDefaultExecRoot() (string, error) {
|
||||
if !honorXDG {
|
||||
return "/var/run/docker", nil
|
||||
}
|
||||
runtimeDir, err := homedir.GetRuntimeDir()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return filepath.Join(runtimeDir, "docker"), nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue