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