From: Matthew Excell (matt_at_possibilityforge.com)
Date: Fri 23 Jan 2004 - 16:34:50 GMT
A couple of items:
First, where do I find the pre-release patches for 1.3.6 so I can test
compile them on x86_64?
Next, thanks to the help I received on IRC yesterday, I basically have
1.3.5 running on 2.6.1 (32 bit kernel, but on an SMP amd64.) I have
included a couple of patches below to the util-vserver 0.27.90 rc - both
of them simply update the tools for the new /proc/self/vinfo. I haven't
had a chance to take a look at vserver-stat yet (it still only shows the
root vserver.) One thing I have noticed and haven't had a chance to
track down: during vserver stop, the vserver script is stopped in the
middle - and the host server switches to runlevel 6! If anyone knows
where I should start to look on that one, let me know. (My hunch is that
the vserver script is somehow showing up in the vps list for the context
being rebooted and, therefore, being sent the term signal along with the
other context processes. . .)
----------------------------------------------------------------
diff -Naur scripts.orig/save_s_context scripts/save_s_context
--- scripts.orig/save_s_context 2004-01-22 19:27:51.000000000 -0700
+++ scripts/save_s_context 2004-01-22 19:29:50.000000000 -0700
@@ -21,7 +21,7 @@
echo save_s_context file command
echo Save the security context in file and execute a command
else
- CTX=`grep ^s_context: /proc/self/status | sed s/s_context:// | (read a
b; echo $a)`
+ CTX=`grep ^VxID: /proc/self/vinfo | sed s/VxID:// | (read a b; echo
$a)`
CTX=`eval expr $CTX + 0`
echo S_CONTEXT=$CTX >$1
echo S_PROFILE=$PROFILE >>$1
diff -Naur scripts.orig/vps scripts/vps
--- scripts.orig/vps 2004-01-22 19:31:18.000000000 -0700
+++ scripts/vps 2004-01-23 09:18:35.000000000 -0700
@@ -81,13 +81,13 @@
{
my $pid = $_[0];
$pid =~ s/ //g;
- open STATUS, "/proc/$pid/status";
+ open STATUS, "/proc/$pid/vinfo";
while (<STATUS>)
{
chomp;
- if (/s_context: (\d+)/) {
+ if (/VxID:/) {
close STATUS;
- return $1;
+ return $';
}
}
close STATUS;
diff -Naur scripts.orig/vps.subst scripts/vps.subst
--- scripts.orig/vps.subst 2004-01-23 09:22:49.000000000 -0700
+++ scripts/vps.subst 2003-11-26 05:42:54.000000000 -0700
@@ -81,13 +81,13 @@
{
my $pid = $_[0];
$pid =~ s/ //g;
- open STATUS, "/proc/$pid/vinfo";
+ open STATUS, "/proc/$pid/status";
while (<STATUS>)
{
chomp;
- if (/VxID:/) {
+ if (/s_context: (\d+)/) {
close STATUS;
- return $';
+ return $1;
}
}
close STATUS;
-- Matthew Excell <matt_at_possibilityforge.com> The Possibility Forge, Inc.
_______________________________________________ Vserver mailing list Vserver_at_list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver