MCPcopy Create free account
hub / github.com/cloudfoundry/bosh-agent / SetupCanRestartDir

Method SetupCanRestartDir

platform/linux_platform.go:1082–1099  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1080}
1081
1082func (p linux) SetupCanRestartDir() error {
1083 canRebootDir := p.dirProvider.CanRestartDir()
1084
1085 err := p.fs.MkdirAll(canRebootDir, 0740)
1086 if err != nil {
1087 return bosherr.WrapError(err, "Creating canReboot dir")
1088 }
1089
1090 if err = p.diskManager.GetMounter().MountTmpfs(canRebootDir, "16m"); err != nil {
1091 return err
1092 }
1093 _, _, _, err = p.cmdRunner.RunCommand("chown", "root:vcap", canRebootDir)
1094 if err != nil {
1095 return bosherr.WrapError(err, "Chowning canrestart dir")
1096 }
1097
1098 return nil
1099}
1100
1101func (p linux) SetupTmpDir() error {
1102 systemTmpDir := "/tmp"

Callers

nothing calls this directly

Calls 5

CanRestartDirMethod · 0.80
MkdirAllMethod · 0.80
MountTmpfsMethod · 0.65
GetMounterMethod · 0.65
RunCommandMethod · 0.65

Tested by

no test coverage detected