CICD: openwrt ctl expect login improvements.

This helped with logging into recent TIP openwrt images.

Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
Ben Greear
2020-12-04 13:34:58 -08:00
parent 7d94d974f9
commit 8c44248602

View File

@@ -134,6 +134,9 @@ def main():
egg.sendline(NL) egg.sendline(NL)
try: try:
i = egg.expect([prompt, "Please press Enter to activate", "login:"], timeout=3) i = egg.expect([prompt, "Please press Enter to activate", "login:"], timeout=3)
if (i == 1):
egg.setdline(NL)
i = egg.expect([prompt, "Please press Enter to activate", "login:"], timeout=3)
if (i == 2): if (i == 2):
egg.sendline(user) egg.sendline(user)
egg.expect("Password:") egg.expect("Password:")