MCPcopy Index your code
hub / github.com/celer-pkg/celer / unmountExisting

Method unmountExisting

pkgcache/cache_setup.go:366–377  ·  view source on GitHub ↗
(mountPoint string)

Source from the content-addressed store, hash-verified

364}
365
366func (n *NFSClientSetup) unmountExisting(mountPoint string) error {
367 if err := cmd.NewExecutor("", "mountpoint", "-q", mountPoint).Execute(); err != nil {
368 return nil
369 }
370
371 if output, err := cmd.NewExecutor("", "umount", mountPoint).ExecuteOutput(); err != nil {
372 return fmt.Errorf("failed to unmount existing point: %s -> %s -> %w", mountPoint, output, err)
373 }
374
375 color.PrintHint("✔ unmount existing mount: %s", mountPoint)
376 return nil
377}
378
379func (n *NFSClientSetup) mountNFSDir(serverExport, mountPoint string) error {
380 output, err := cmd.NewExecutor("", "mount", "-t", "nfs", serverExport, mountPoint).ExecuteOutput()

Callers 2

SetupMethod · 0.95
RemoveMethod · 0.95

Calls 4

NewExecutorFunction · 0.92
PrintHintFunction · 0.92
ExecuteMethod · 0.80
ExecuteOutputMethod · 0.80

Tested by

no test coverage detected