git://git.onelab.eu
/
nodemanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
define prompt for root user in slice
[nodemanager.git]
/
sliver_lxc.py
diff --git
a/sliver_lxc.py
b/sliver_lxc.py
index
a2b3432
..
6e2b725
100644
(file)
--- 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)
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 '_'
# TODO: set quotas...
# Set hostname. A valid hostname cannot have '_'