diff options
Diffstat (limited to 'lib/Kiki.hs')
-rw-r--r-- | lib/Kiki.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Kiki.hs b/lib/Kiki.hs index 9fb71be..8090aac 100644 --- a/lib/Kiki.hs +++ b/lib/Kiki.hs | |||
@@ -240,6 +240,20 @@ refreshCache rt rootdir = do | |||
240 | return (mkpath,commit) | 240 | return (mkpath,commit) |
241 | (mkpath, commit) <- getMkPathAndCommit (fromMaybe "" rootdir ++ "/var/cache/kiki/config") | 241 | (mkpath, commit) <- getMkPathAndCommit (fromMaybe "" rootdir ++ "/var/cache/kiki/config") |
242 | 242 | ||
243 | -- Generete hosts file. | ||
244 | let hostspath = mkpath "hosts" | ||
245 | op = KeyRingOperation | ||
246 | { opFiles = Map.fromList $ | ||
247 | [ ( HomePub, streaminfo { typ=KeyRingFile, spill=KF_All, access=Pub } ) | ||
248 | , ( ArgFile hostspath, streaminfo { typ=Hosts, spill=KF_None, fill=KF_All, access=Pub } ) | ||
249 | ] | ||
250 | , opPassphrases = [] | ||
251 | , opHome = Just $ takeDirectory (rtPubring rt) | ||
252 | , opTransforms = [] | ||
253 | } | ||
254 | KikiResult _ report <- runKeyRing op | ||
255 | outputReport report | ||
256 | |||
243 | let write' wr f bs = do | 257 | let write' wr f bs = do |
244 | createDirectoryIfMissing True $ takeDirectory f | 258 | createDirectoryIfMissing True $ takeDirectory f |
245 | wr f bs | 259 | wr f bs |