summaryrefslogtreecommitdiff
path: root/src/Process.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2023-03-25 22:24:04 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2023-03-26 21:40:59 +0200
commita76fa89bf612f39a053390dfe1c78ba1f9331bd8 (patch)
treeb7b68d630b2c695422919a2bc4057a390b4dd2ec /src/Process.hs
parentea38fdd4614bc8d3c5adf36932b0e5808a4cba67 (diff)
Network refactoring with explicit prefixes
Diffstat (limited to 'src/Process.hs')
-rw-r--r--src/Process.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Process.hs b/src/Process.hs
index a93b464..a90a734 100644
--- a/src/Process.hs
+++ b/src/Process.hs
@@ -88,7 +88,8 @@ lineReadingLoop process h act =
spawnOn :: Either Network Node -> ProcName -> Maybe Signal -> String -> TestRun Process
spawnOn target pname killWith cmd = do
- let prefix = either (const "") (\node -> "ip netns exec \"" ++ unpackNodeName (nodeName node) ++ "\" ") target
+ let netns = either netnsName netnsName target
+ let prefix = T.unpack $ "ip netns exec \"" <> netns <> "\" "
(Just hin, Just hout, Just herr, handle) <- liftIO $ createProcess (shell $ prefix ++ cmd)
{ std_in = CreatePipe, std_out = CreatePipe, std_err = CreatePipe
, env = Just [("EREBOS_DIR", either netDir nodeDir target)]