From 1f08ae1059c4878d96608c7ef3217732963058d4 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Thu, 7 Jun 2018 12:38:10 +0200 Subject: prototypes: Fix bad layer names This fixes the layer names, since 'DIF X' was being passed instead of just 'X'. It also adds a bash command to startup.sh so that it is always executed as a bash script. --- rumba/prototypes/ouroboros.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'rumba/prototypes/ouroboros.py') diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py index 1c24a0c..022c931 100644 --- a/rumba/prototypes/ouroboros.py +++ b/rumba/prototypes/ouroboros.py @@ -56,25 +56,25 @@ class OurServer(sb.Server): server.difs ) - def _make_run_cmd(self): - o_cmd = super(OurServer, self)._make_run_cmd() + def _make_run_cmd(self, node): + o_cmd = super(OurServer, self)._make_run_cmd(node) # Run and store PID - n_cmd = 'pid=$(%s); ' % (o_cmd,) + n_cmd = 'pid=$(%s) && ' % (o_cmd,) # Build register command r_cmd = 'irm r n %s ' % (self.id,) if len(self.difs) == 0: - r_cmd += 'layer \'*\'' + r_cmd += ' '.join('layer %s' % (layer.name,) for layer in node.difs) else: - r_cmd += ' '.join('layer %s' % (layer,) for layer in self.difs) - r_cmd += ' > /dev/null 2>&1; ' + r_cmd += ' '.join('layer %s' % (layer.name,) for layer in self.difs) + r_cmd += ' && ' # Add register command n_cmd += r_cmd # Add bind command - n_cmd += 'irm b process $pid name %s > /dev/null 2>&1; ' % (self.id,) + n_cmd += 'irm b process $pid name %s && ' % (self.id,) n_cmd += 'echo $pid' # We need to return the pid for the sb -- cgit v1.2.3