daemon_solaris.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // +build solaris
  2. package main
  3. import (
  4. "fmt"
  5. "net"
  6. "path/filepath"
  7. "github.com/docker/docker/libcontainerd"
  8. "golang.org/x/sys/unix"
  9. )
  10. const defaultDaemonConfigFile = ""
  11. // setDefaultUmask sets the umask to 0022 to avoid problems
  12. // caused by custom umask
  13. func setDefaultUmask() error {
  14. desiredUmask := 0022
  15. unix.Umask(desiredUmask)
  16. if umask := unix.Umask(desiredUmask); umask != desiredUmask {
  17. return fmt.Errorf("failed to set umask: expected %#o, got %#o", desiredUmask, umask)
  18. }
  19. return nil
  20. }
  21. func getDaemonConfDir(_ string) string {
  22. return "/etc/docker"
  23. }
  24. // setupConfigReloadTrap configures the USR2 signal to reload the configuration.
  25. func (cli *DaemonCli) setupConfigReloadTrap() {
  26. }
  27. // preNotifySystem sends a message to the host when the API is active, but before the daemon is
  28. func preNotifySystem() {
  29. }
  30. // notifySystem sends a message to the host when the server is ready to be used
  31. func notifySystem() {
  32. }
  33. func (cli *DaemonCli) getPlatformRemoteOptions() ([]libcontainerd.RemoteOption, error) {
  34. return nil, nil
  35. }
  36. // getSwarmRunRoot gets the root directory for swarm to store runtime state
  37. // For example, the control socket
  38. func (cli *DaemonCli) getSwarmRunRoot() string {
  39. return filepath.Join(cli.Config.ExecRoot, "swarm")
  40. }
  41. func allocateDaemonPort(addr string) error {
  42. return nil
  43. }
  44. // notifyShutdown is called after the daemon shuts down but before the process exits.
  45. func notifyShutdown(err error) {
  46. }
  47. func wrapListeners(proto string, ls []net.Listener) []net.Listener {
  48. return ls
  49. }