Update jumpserver.py

修改PS1显示
pull/2/head
蓝枫 2015-01-12 13:31:20 +08:00
parent 8ad37c6ce3
commit 3f7f1a8cdb
1 changed files with 2 additions and 2 deletions

View File

@ -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])