(mountPoint string)
| 364 | } |
| 365 | |
| 366 | func (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 | |
| 379 | func (n *NFSClientSetup) mountNFSDir(serverExport, mountPoint string) error { |
| 380 | output, err := cmd.NewExecutor("", "mount", "-t", "nfs", serverExport, mountPoint).ExecuteOutput() |
no test coverage detected