From 43aefb0b76acd21e5f9146fabe511c2444b31518 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 19 Jun 2012 17:19:05 +0200 Subject: [PATCH] define prompt for root user in slice --- sliver_lxc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sliver_lxc.py b/sliver_lxc.py index a2b3432..6e2b725 100644 --- a/sliver_lxc.py +++ b/sliver_lxc.py @@ -53,6 +53,11 @@ class Sliver_LXC(lv.Sliver_Libvirt): command = ['chmod', '755', containerDir] logger.log_call(command, timeout=15*60) + # customize prompt for slice owner + dot_profile=os.path.join(containerDir,"root/.profile") + with open(dot_profile,'w') as f: + f.write("export PS1='%s@\H \$ '\n"%(name)) + # TODO: set quotas... # Set hostname. A valid hostname cannot have '_' -- 2.43.0