On Sun, 9 Jan 2011, Brandon Gooch wrote:
On Sun, Jan 9, 2011 at 9:17 AM, Subbsd <sub...@gmail.com> wrote:
is there any mechanism to find out from userland is supports the
current kernel VIMAGE or not? something like 'sysctl
I've not been able to determine this either, but as it requires kernel
re-configuration, I usually just know. In my scripts, I make sure and
fail if the call to create a vnet jail fails:
sh -c 'TEST=$(sudo jail -c vnet name=test host.hostname=test path=/) ;
if [ $? = "1" ]; then echo "VIMAGE NOT AVAILABLE" ; exit 1 ; fi'
I would just go with jail -c vnet command=/usr/bin/true or something
along these liens for the pure test. Otherwise you might end up with
a running jail, that you may not want unless you test it with the
complete command line.
...or something like that.
There may be a better way, or perhaps there should be.
Or there will be if there isn't yet. I remember I added a FEATURE()
macro somehere. At least my dev machine already has it...
# sysctl -a kern.features
kern.features.vimage: 1 <<<
Bjoern A. Zeeb You have to have visions!
<ks> Going to jail sucks -- <bz> All my daemons like it!
email@example.com mailing list
To unsubscribe, send any mail to