From: Jacques Gelinas (jack_at_solucorp.qc.ca)
Date: Thu 03 Oct 2002 - 16:06:59 BST
On Thu, 3 Oct 2002 16:50:09 -0500, kint_at_x-tincted.net wrote
> not sure, but if you deleted the /var/run/vservers/<something>.ctx file
> vserver-stat won't show the name. Actually, the filename is what you'll
> see when you do vserver-stat.
If you delete /var/run/vservers/something.ctx and you want to tell what this
security context 17 is, you can do this
/usr/sbin/chcontext --ctx 17 /bin/sh
ls -l /proc/*/root
This will present the root directory of all process running in context 17 including
the fake /sbin/init (which is in all context by default) and your own shell and ls.
Now, /proc/PID/root is presented as a symlink and is shown relative to your world.
The root of your ls command is the real /, but the root of all the other processes
is probably /vservers/something. This is exactly what you will see.
If it is /vservers/xxx, then do
exit
echo S_CONTEXT=17 >/var/run/vservers/xxx.ctx
and your vserver will reborn (not a ghost anymore)
---------------------------------------------------------
Jacques Gelinas <jack_at_solucorp.qc.ca>
vserver: run general purpose virtual servers on one box, full speed!
http://www.solucorp.qc.ca/miscprj/s_context.hc