propellor spin
This commit is contained in:
parent
427246db6a
commit
756d5754a9
|
@ -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)
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue