=== modified file 'lava_dispatcher/actions/lava-test.py'
@@ -143,10 +143,10 @@
if lava_proxy:
session.run("sh -c 'export http_proxy=%s'" % lava_proxy)
session.run("echo 'Acquire::http::proxy \"%s\";' > /etc/apt/apt.conf.d/30proxy" % lava_proxy)
- session.run("cat /etc/apt/apt.conf.d/30proxy")
else:
- session.run("echo '' > /etc/apt/apt.conf.d/30proxy")
- session.run("cat /etc/apt/apt.conf.d/30proxy")
+ # If the rootfs is new generated, the cmd will fail,
+ # just ignore it
+ session.run("rm -f /etc/apt/apt.conf.d/30proxy")
_install_lava_test(self.client, session)
=== modified file 'lava_dispatcher/client/base.py'
@@ -396,12 +396,9 @@
self.proc.expect(prompt_str, timeout=30)
self.proc.sendline("echo 'Acquire::http::proxy \"%s\";' > /etc/apt/apt.conf.d/30proxy" % lava_proxy)
self.proc.expect(prompt_str, timeout=30)
- self.proc.sendline("cat /etc/apt/apt.conf.d/30proxy")
- self.proc.expect(prompt_str, timeout=30)
else:
- self.proc.sendline("echo '' > /etc/apt/apt.conf.d/30proxy")
- self.proc.expect(prompt_str, timeout=30)
- self.proc.sendline("cat /etc/apt/apt.conf.d/30proxy")
+ # If the rootfs is new generated, the cmd will fail, just ignore it
+ self.proc.sendline("rm -f /etc/apt/apt.conf.d/30proxy")
self.proc.expect(prompt_str, timeout=30)