propellor spin

This commit is contained in:
Joey Hess 2014-04-04 15:54:42 -04:00
parent 1a44d4010a
commit 68ed5153aa
Failed to extract signature
1 changed files with 3 additions and 2 deletions

View File

@ -246,8 +246,9 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
go oldimage
getrunningident :: IO (Maybe ContainerIdent)
getrunningident = simpleShClient (namedPipe cid) "cat" [propellorIdent] $
return . extractident
getrunningident = simpleShClient (namedPipe cid) "cat" [propellorIdent] $ \rs -> do
print (extractident rs)
return $ extractident rs
extractident :: [Resp] -> Maybe ContainerIdent
extractident = headMaybe . catMaybes . map (readish :: String -> Maybe ContainerIdent) . catMaybes . map getStdout