About this list Date view Thread view Subject view Author view Attachment view

From: Darryl Ross (spam_at_afoyi.com)
Date: Tue 05 Jul 2005 - 03:00:30 BST


Manfred Heubach wrote:

> 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.

apps1:~# uname -2
2.4.26smp-vs1.28
apps1:~# cat /proc/sys/kernel/vshelper
/sbin/vshelper

apps2:~# uname -r
2.6.11.6-smp-vs.1.9.5
apps2:~# cat /proc/sys/kernel/vshelper
/sbin/vshelper

> 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.

Going by the above, you should be able to do a:

if [[ -f /proc/sys/kernel/vshelper ]]; then
  echo 'Yay, vservers are here!'
else
  echo 'Please help me get some vserver action!'
fi

HTH
Regards
Darryl

_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 05 Jul 2005 - 03:00:45 BST by hypermail 2.1.3