From: Martin Winter Date: Fri, 7 Apr 2017 00:38:48 +0000 (-0700) Subject: topotest library: Fix creation of /etc/XXX/vtysh.conf X-Git-Tag: frr-7.1-dev~151^2~344 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a93477ec425fb1949c1335fc454d15a45eb61dc8;p=matthieu%2Ffrr.git topotest library: Fix creation of /etc/XXX/vtysh.conf - Needs to be created in local filesystem of each router Signed-off-by: Martin Winter --- diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index 015705510a..bd797bfafc 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -143,8 +143,7 @@ class Router(Node): # print "Daemons after:", self.daemons def startRouter(self): # Disable integrated-vtysh-config - with open('/etc/%s/vtysh.conf' % self.routertype, "w") as vtyshfile: - vtyshfile.write('no service integrated-vtysh-config') + self.cmd('echo "no service integrated-vtysh-config" >> /etc/%s/vtysh.conf' % self.routertype) self.cmd('chown %s:%svty /etc/%s/vtysh.conf' % (self.routertype, self.routertype, self.routertype)) # Try to find relevant old logfiles in /tmp and delete them map(os.remove, glob.glob("/tmp/*%s*.log" % self.name))