mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-16 16:01:35 +00:00
Update jumpserver.py
修改PS1显示
This commit is contained in:
parent
8ad37c6ce3
commit
3f7f1a8cdb
@ -125,7 +125,7 @@ def connect(host, port, user, password):
|
||||
logfile = open(logfile_name, 'a') # 记录日志文件
|
||||
logfile.write('\nDateTime:%s' % logtime_start)
|
||||
foo.logfile = logfile
|
||||
foo.sendline('')
|
||||
foo.sendline("export PS1='[\u@%s \W]\$ ';clear" % host)
|
||||
signal.signal(signal.SIGWINCH, sigwinch_passthrough)
|
||||
size = getwinsize()
|
||||
foo.setwinsize(size[0], size[1])
|
||||
@ -307,4 +307,4 @@ if __name__ == '__main__':
|
||||
#except (BaseException, Exception):
|
||||
except IndexError:
|
||||
print "Exit."
|
||||
sys.exit()
|
||||
sys.exit()
|
||||
|
Loading…
Reference in New Issue
Block a user