summaryrefslogtreecommitdiff
path: root/wintest
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-27 10:28:15 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-27 01:47:48 +0100
commit353cdd006a467375809eb3c21dc44df7efb9c1d9 (patch)
tree733eb2e18b5af9b7794ba9db9699ba845c760a72 /wintest
parent3bc6145143da320979c867b155bacaf8125adf3a (diff)
downloadsamba-353cdd006a467375809eb3c21dc44df7efb9c1d9.tar.gz
samba-353cdd006a467375809eb3c21dc44df7efb9c1d9.tar.bz2
samba-353cdd006a467375809eb3c21dc44df7efb9c1d9.zip
wintest: avoid adding a blank line to resolv.conf on each run
Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Sat Nov 27 01:47:48 CET 2010 on sn-devel-104
Diffstat (limited to 'wintest')
-rwxr-xr-xwintest/test-s4-howto.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py
index c05d084dc5..3d4b5e0511 100755
--- a/wintest/test-s4-howto.py
+++ b/wintest/test-s4-howto.py
@@ -105,13 +105,12 @@ def set_nameserver(t, nameserver):
nameserver %s
# your original resolv.conf appears below:
-
''' % t.substitute(nameserver))
child = t.pexpect_spawn("cat /etc/resolv.conf", crlf=False)
i = child.expect(['your original resolv.conf appears below:', pexpect.EOF])
if i == 0:
child.expect(pexpect.EOF)
- contents = child.before.replace('\r', '')
+ contents = child.before.lstrip().replace('\r', '')
t.write_file('/etc/resolv.conf.wintest', contents, mode='a')
t.write_file('/etc/resolv.conf.wintest-bak', contents)
t.run_cmd("mv -f /etc/resolv.conf.wintest /etc/resolv.conf")