pastebin - collaborative debugging tool
rovema.kpaste.net RSS


mount_sshnfs patch for Cygwin/ms-nfsv41
Posted by Anonymous on Mon 7th Aug 2023 14:31
raw | new post

  1. --- mount_sshnfs.ksh    2023-08-01 18:50:25.000000000 +0200
  2. +++ mount_sshnfs.ksh    2023-08-07 15:16:34.315545500 +0200
  3. @@ -474,6 +474,8 @@
  4.                                 fi
  5.                         fi
  6.  
  7. +                       # Cygwin does not set logname
  8. +                       [[ ! -v LOGNAME ]] && export LOGNAME="$(logname)"
  9.  
  10.                         c.ssh_control_socket_name="/tmp/mount_sshnfs/mount_sshnfs_ssh-control-socket_logname${LOGNAME}_ppid${PPID}_pid$$"
  11.  
  12. @@ -538,21 +540,24 @@
  13.                         # Build argument list for mount.nfs ...
  14.                         #
  15.                         typeset -a mount_args
  16. -                       mount_args+=( '-vvv' )
  17. -                       mount_args+=( '-t' 'nfs' )
  18. +#                      mount_args+=( '-vvv' )
  19. +#                      mount_args+=( '-t' 'nfs' )
  20.                         for s in "${c.mount_nfs_options[@]}" ; do
  21.                                 mount_args+=( '-o' "$s" )
  22.                         done
  23. -                       mount_args+=( '-o' 'vers=4.2' )
  24. -                       mount_args+=( '-o' "port=${c.local_forward_port}" )
  25. +#                      mount_args+=( '-o' 'vers=4.2' )
  26. +#                      mount_args+=( '-o' "port=${c.local_forward_port}" )
  27.                         mount_args+=( "localhost:/${c.nfs_server.uripath}" )
  28. -                       mount_args+=( "${c.mountpoint}" )
  29. +                       #mount_args+=( "${c.mountpoint}" )
  30.  
  31.                         #
  32.                         # ... and do the mount
  33.                         #
  34. -                       mount "${mount_args[@]}"
  35. +                       #mount "${mount_args[@]}"
  36. +                       /cygdrive/c/Users/roland_mainz/Downloads/ms-nfs41-client-x64/ms-nfs41-client-x64/nfs_mount.exe \
  37. +                               -o sec=sys X "${mount_args[@]}"
  38.                         (( retval=$? ))
  39. +                       (( retval == 0 )) && mount -o bind /cygdrive/x "${c.mountpoint}"
  40.  
  41.                         if (( retval != 0 )) ; then
  42.                                 #
  43. @@ -670,7 +675,9 @@
  44.         #
  45.         # Do the unmount
  46.         #
  47. -       umount "${c.mountpoint}"
  48. +       #umount "${c.mountpoint}"
  49. +       /cygdrive/c/Users/roland_mainz/Downloads/ms-nfs41-client-x64/ms-nfs41-client-x64/nfs_mount.exe -d X
  50. +      
  51.         (( retval=$? ))
  52.  
  53.         if (( retval != 0 )) ; then

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at