a bit more robust
[nodemanager.git] / sliver_lxc.py
index 1b038d5..6e2b725 100644 (file)
@@ -2,7 +2,6 @@
 
 """LXC slivers"""
 
-import accounts
 import logger
 import subprocess
 import os, os.path
@@ -54,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 '_'