propellor spin

This commit is contained in:
Joey Hess 2015-01-01 13:31:30 -04:00
parent b9c1bd87a3
commit 72b7b06525
Failed to extract signature
1 changed files with 5 additions and 1 deletions

View File

@ -105,7 +105,11 @@ getSshTarget target hst
matchingtarget a = (==) target <$> inet_ntoa a
useip = return $ fromMaybe target configip
useip = case configip of
Nothing -> return target
Just ip -> do
warningMessage $ "DNS seems out of date for " ++ target ++ "; using IP address from configuration instead."
return ip
configip = case mapMaybe getIPAddr (S.toList (_dns (hostInfo hst))) of
[] -> Nothing