Skip to content

Commit

Permalink
Merge pull request #164 from siemens/chao/fix-iot2050setup-issue
Browse files Browse the repository at this point in the history
iot2050setup: fix the issue that it would hang when using dp login
  • Loading branch information
BaochengSu authored Sep 1, 2021
2 parents 3ce6905 + 39012bf commit e57a697
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions recipes-app/iot2050setup/files/iot2050setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,13 +643,11 @@ def resize(cls):


def main():
default_console_login = True
# get the ssh releated env
ssh_client = os.getenv('SSH_CLIENT')
ssh_tty = os.getenv('SSH_TTY')

if ssh_client is not None or ssh_tty is not None:
default_console_login = False
default_console_login = False
# get the input type
input_type = os.readlink('/proc/self/fd/0')
if "ttyS" in input_type or "ttyUSB" in input_type:
default_console_login = True

if default_console_login:
TerminalResize.resize()
Expand Down

0 comments on commit e57a697

Please sign in to comment.