summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-04 15:03:03 -0400
committerJoey Hess2014-04-04 15:03:03 -0400
commit50a9e826a3661e2b7456997213bdf404bb7b542b (patch)
treeb9b25a32a8e5fceeca8e9a89683bebe65ea42267 /Propellor/Property
parent0b7fb010321ecde043fa1293ef793a3f36cf2ff0 (diff)
propellor spin
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Docker.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs
index e625a129..659c39eb 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -243,9 +243,14 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
ident = ContainerIdent image hn cn runps
getrunningident :: IO (Maybe ContainerIdent)
- getrunningident = catchDefaultIO Nothing $
- simpleShClient (namedPipe cid) "cat" [propellorIdent] $
- pure . headMaybe . catMaybes . map readish . catMaybes . map getStdout
+ getrunningident = simpleShClient (namedPipe cid) "cat" [propellorIdent] $ \vs -> do
+ let l = (extractident) vs
+ print l
+ print vs
+ return l
+
+ extractident :: [Resp] -> Maybe ContainerIdent
+ extractident = headMaybe . catMaybes . map readish . catMaybes . map getStdout
runps = getRunParams $ containerprops ++
-- expose propellor directory inside the container