Manfred Heubach wrote: > Hello, > > I'm looking for a simple way to determine from a bash script if the > loaded kernel supports vserver or not. This should work for both 2.4 and > 2.6 kernels. > > I can call vserver-stat and get "function not implemented" on a kernel > without the vserver patches - but this is not what I really want to do.
Well you actually _need_ a working (and obviously running) vserver-kernel first. To determine, if the running kernel "supports vserver" or if the vserver options are enabled, you could use [1] *after* you successfully installed the utils. Another option is, to grep your config (or probably config.gz if it's enabled in your .config) for the relevant options: CONFIG_VSERVER_LEGACY CONFIG_VSERVER_NGNET CONFIG_VSERVER_PROC_SECURE CONFIG_VSERVER_HARDCPU CONFIG_INOXID_NONE CONFIG_INOXID_UID16 CONFIG_INOXID_GID16 CONFIG_INOXID_UGID24 CONFIG_INOXID_INTERN CONFIG_INOXID_RUNTIME CONFIG_XID_TAG_NFSD CONFIG_VSERVER_DEBUG Please note, that those CONFIG's may differ if you are using a patch-version <vs2.0 (these are from vs2.0-rc5). [1] http://vserver.13thfloor.at/Stuff/SCRIPT/testme.sh Regards, Christian _______________________________________________ Vserver mailing list [email protected] http://list.linux-vserver.org/mailman/listinfo/vserver
