diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-28 13:51:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-28 13:51:14 -0400 |
commit | ef8c4afd050cc729819b97a1f8864f613b6debbd (patch) | |
tree | f1e2aa10bdc7efe682913af317fcf3bd1c05fec6 /Annex/Ssh.hs | |
parent | 9600c62cef11809a32a86cc48824a647f87fcc44 (diff) |
rsync special remote: Include annex-rsync-options when running rsync to test a key's presence.
Also, use the new withQuietOutput function to avoid running the shell to
/dev/null stderr in two other places.
Diffstat (limited to 'Annex/Ssh.hs')
-rw-r--r-- | Annex/Ssh.hs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index 294270e43..2dd73a8a0 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -99,17 +99,14 @@ sshCleanup = do stopssh socketfile = do let (host, port) = socket2hostport socketfile (_, params) <- sshInfo (host, port) - void $ liftIO $ do - -- "ssh -O stop" is noisy on stderr even with -q - let cmd = unwords $ toCommand $ - [ Params "-O stop" - ] ++ params ++ [Param host] - boolSystem "sh" - [ Param "-c" - , Param $ "ssh " ++ cmd ++ " >/dev/null 2>/dev/null" - ] - -- Cannot remove the lock file; other processes may - -- be waiting on our exclusive lock to use it. + -- "ssh -O stop" is noisy on stderr even with -q + void $ liftIO $ catchMaybeIO $ + withQuietOutput createProcessSuccess $ + proc "ssh" $ toCommand $ + [ Params "-O stop" + ] ++ params ++ [Param host] + -- Cannot remove the lock file; other processes may + -- be waiting on our exclusive lock to use it. hostport2socket :: String -> Maybe Integer -> FilePath hostport2socket host Nothing = host |