avoid ever removing all host keys
This commit is contained in:
parent
017e1928d4
commit
fd1e01c853
|
@ -98,8 +98,8 @@ hostKeys ctx l = propertyList desc $ catMaybes $
|
||||||
staletypes = let have = map fst l in filter (`notElem` have) alltypes
|
staletypes = let have = map fst l in filter (`notElem` have) alltypes
|
||||||
removestale b = map (File.notPresent . flip keyFile b) staletypes
|
removestale b = map (File.notPresent . flip keyFile b) staletypes
|
||||||
cleanup
|
cleanup
|
||||||
| null staletypes = Nothing
|
| null staletypes || null l = Nothing
|
||||||
| otherwise = Just $ property ("stale host keys removed " ++ typelist staletypes) $
|
| otherwise = Just $ property ("any other ssh host keys removed " ++ typelist staletypes) $
|
||||||
ensureProperty $
|
ensureProperty $
|
||||||
combineProperties desc (removestale True ++ removestale False)
|
combineProperties desc (removestale True ++ removestale False)
|
||||||
`onChange` restarted
|
`onChange` restarted
|
||||||
|
|
Loading…
Reference in New Issue