propellor spin

This commit is contained in:
Joey Hess 2014-03-31 14:56:19 -04:00
parent 6a27b6fd71
commit e4c5884252
Failed to extract signature
1 changed files with 2 additions and 6 deletions

View File

@ -74,10 +74,10 @@ spin host = do
status <- getstatus fromh `catchIO` error "protocol error"
case status of
NeedKeyRing -> do
putStr $ "Sending " ++ keyring ++ " to " ++ host ++ "..."
hFlush stdout
s <- w82s . BL.unpack . B64.encode
<$> BL.readFile keyring
putStr $ "Sending " ++ keyring ++ " (" ++ show (BL.length s) ++ " bytes) to " ++ host ++ "..."
hFlush stdout
hPutStrLn toh $ toMarked keyringMarker s
hFlush toh
putStrLn "done"
@ -149,10 +149,6 @@ boot props = do
hFlush stdout
reply <- hGetContentsStrict stdin
hPutStrLn stderr $ show $ B64.decode . BL.pack . s2w8 . takeWhile (/= '\n')
<$> fromMarked keyringMarker reply
hFlush stderr
makePrivDataDir
maybe noop (writeFileProtected privDataLocal) $
fromMarked privDataMarker reply