Skip to content

Commit c1fb1ef

Browse files
committed
Fix vs check install login timeout issue
1 parent 743625c commit c1fb1ef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

check_install.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def main():
1919
passwd_prompt = 'Password:'
2020
cmd_prompt = "{}@sonic:~\$ $".format(args.u)
2121
grub_selection = "The highlighted entry will be executed"
22+
firsttime_prompt = '+ firsttime_exit'
2223

2324
i = 0
2425
while True:
@@ -38,13 +39,17 @@ def main():
3839

3940
# bootup sonic image
4041
while True:
41-
i = p.expect([login_prompt, passwd_prompt, cmd_prompt])
42+
i = p.expect([login_prompt, passwd_prompt, firsttime_prompt, cmd_prompt])
4243
if i == 0:
4344
# send user name
4445
p.sendline(args.u)
4546
elif i == 1:
4647
# send password
4748
p.sendline(args.P)
49+
elif i == 2:
50+
# fix a login timeout issue, caused by the login_prompt message mixed with the output message of the rc.local
51+
time.sleep(1)
52+
p.sendline()
4853
else:
4954
break
5055

0 commit comments

Comments
 (0)