From: Daniel Hokka Zakrisson Date: Tue, 21 Aug 2007 18:39:03 +0000 (+0000) Subject: Add a static context sanity check. X-Git-Tag: release-0.30.214~12 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52bbff428db43698e122672edbde8a105a7a60a5;p=util-vserver.git Add a static context sanity check. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2593 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/scripts/vserver.functions b/scripts/vserver.functions index 30e82f0..546cc6a 100644 --- a/scripts/vserver.functions +++ b/scripts/vserver.functions @@ -1080,6 +1080,15 @@ WARNING: There is no cachedirectory configured for this vserver; /proc/uptime can not be accessed. Usually, this is caused by procfs-security. Please read the FAQ for more details http://linux-vserver.org/Proc-Security" + + test -e "$cfgdir"/context || { + TYPE=$( $_VSERVER_INFO 49152 XIDTYPE ) + test "$TYPE" != "static" || panic $"\ +The kernel does not have dynamic contexts enabled. Please configure +a static one by executing + + echo [number between 2 and 49151] > $cfgdir/context" + } }