propellor spin

This commit is contained in:
Joey Hess 2014-04-04 15:15:56 -04:00
parent e2512c198d
commit fd1b037d45
Failed to extract signature
1 changed files with 3 additions and 2 deletions

View File

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