hjmangalam / parsyncfp2

MultiHost parallel rsync wrapper
Other
52 stars 6 forks source link

Only prompt user for "fixing" .ssh/config if --nowait is not specif… #6

Closed gt3M closed 1 year ago

gt3M commented 1 year ago

…ied. Else this prompt prevents unattended use of parsyncfp2.

@hjmangalam I noticed while trying to script the use of parsyncfp2 that prompting the user to add ForwardX11Trusted yes to their .ssh/config is immune to --nowait. Though I don't know why, if I wrap parsyncfp2 in a bash script and use that script interactively (i.e. in a shell with a controlling terminal), the prompt is not printed. parsyncfp2 appears to hang until I press Enter, at which point the prompt to modify my .ssh/config is printed and my .ssh/config is modified. One potential solution is what I propose in this PR, which is a modification of the fix_ssh_config subroutine making the prompting of the user conditional on !$NOWAIT.

hjmangalam commented 1 year ago

Merged. The conflict only occurs once per login (once the ~/.ssh/config is modified, this interruption is never heard from again), so it's generally not an issue, but formally it is, so the patch is welcome. Thanks!