We try and force the server to start, and we try to force the
TelnetClients group to exist
Change-Id: I192f0aaaf283b77065ecc671ca2b59a69781d744
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/36
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Mar 14 14:51:20 CET 2014 on sn-devel-104
set_route = False
set_dns = False
set_telnetclients = True
+ start_telnet = True
if self.getvar('WIN_IP'):
ip = self.getvar('WIN_IP')
else:
pexpect.EOF])
if i == 1:
if set_telnetclients:
+ self.run_cmd('bin/net rpc group add TelnetClients -S $WIN_IP -U$WIN_USER%$WIN_PASS')
self.run_cmd('bin/net rpc group addmem TelnetClients "authenticated users" -S $WIN_IP -U$WIN_USER%$WIN_PASS')
child.close()
retries -= 1
else:
raise RuntimeError("Failed to connect with telnet due to missing TelnetClients membership")
+ if i == 6:
+ # This only works if it is installed and enabled, but not started. Not entirely likely, but possible
+ self.run_cmd('bin/net rpc service start TlntSvr -S $WIN_IP -U$WIN_USER%$WIN_PASS')
+ child.close()
+ start_telnet = False
+ retries -= 1
+ self.info("retrying (retries=%u delay=%u)" % (retries, delay))
+ continue
+
if i != 0:
child.close()
time.sleep(delay)