propellor spin

This commit is contained in:
Joey Hess 2014-04-13 03:28:53 -04:00
parent 427246db6a
commit 756d5754a9
Failed to extract signature
1 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ hostKey keytype = propertyList desc
where where
desc = "known ssh host key (" ++ fromKeyType keytype ++ ")" desc = "known ssh host key (" ++ fromKeyType keytype ++ ")"
install writer p ext = withPrivData p $ \key -> do install writer p ext = withPrivData p $ \key -> do
let f = "/etc/ssh/ssh_host_" ++ fromKeyType keytype ++ "key" ++ ext let f = "/etc/ssh/ssh_host_" ++ fromKeyType keytype ++ "_key" ++ ext
void $ liftIO $ writer f key void $ liftIO $ writer f key
noChange noChange
@ -123,7 +123,7 @@ knownHost hosts hn user = Property desc $
desc = user ++ " knows ssh key for " ++ hn desc = user ++ " knows ssh key for " ++ hn
go (Just (Just k)) = do go (Just (Just k)) = do
f <- liftIO $ dotFile "known_hosts" user f <- liftIO $ dotFile "known_hosts" user
ensureProperty $ propertyList desc ensureProperty $ combineProperties desc
[ File.dirExists (takeDirectory f) [ File.dirExists (takeDirectory f)
, f `File.containsLine` (hn ++ " " ++ k) , f `File.containsLine` (hn ++ " " ++ k)
] ]