Skip to content

Commit 6481508

Browse files
committed
utils/mount/mount_linux.go: replace 'mkdir -p' invocation with MkdirAll() standard Go function
It makes trident possible to use on Talos at least with NFS #806 mount.nfs* tools are already being added to the image, see https://github.com/NetApp/trident/blob/v26.02.1/Dockerfile#L13 for example. So `mkdir` was the only reason why trident could not be used on Talos with NFS4
1 parent 0b2f100 commit 6481508

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

utils/mount/mount_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func (client *LinuxClient) MountNFSPath(ctx context.Context, exportPath, mountpo
197197
}
198198

199199
// Create the mount point dir if necessary
200-
if _, err := client.command.Execute(ctx, "mkdir", "-p", mountpoint); err != nil {
200+
if err := client.os.MkdirAll(mountpoint, 0o755); err != nil {
201201
Logc(ctx).WithField("error", err).Warning("Mkdir failed.")
202202
}
203203

0 commit comments

Comments
 (0)