From 40c8f7f1907805bce929500a751e2c8ae05a2836 Mon Sep 17 00:00:00 2001
From: Ruben <ruben@rubenkerkhof.com>
Date: Sun, 17 Oct 2010 17:18:41 +0200
Subject: [PATCH 08/14] 10_hostname-login.diff from Debian
---
ajaxterm.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ajaxterm.py b/ajaxterm.py
index a3b928f..91d938d 100755
--- a/ajaxterm.py
+++ b/ajaxterm.py
@@ -15,6 +15,7 @@ os.chdir(os.path.normpath(os.path.dirname(__file__)))
sys.path[0:0]=glob.glob('../../python')
import qweb
+from socket import gethostname
class Terminal:
def __init__(self,width=80,height=24):
@@ -403,7 +404,7 @@ class Multiplex:
elif os.getuid()==0:
cmd=['/bin/login']
else:
- sys.stdout.write("Login: ")
+ sys.stdout.write(gethostname() + " login: ")
login=sys.stdin.readline().strip()
if re.match('^[0-9A-Za-z-_. ]+$',login):
cmd=['ssh']
--
1.7.3.1