LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: how to tell if certain code is in kernel

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx, Roberto Nibali <ratz@xxxxxx>
Subject: Re: how to tell if certain code is in kernel
From: Joseph Mack <mack.joseph@xxxxxxx>
Date: Mon, 24 Sep 2001 14:05:37 -0400
Roberto Nibali wrote:
> 
> If you absolutely
>   want to be fool-proof, then do something like
>   ip link add dev tun0 || { echo "Sorry, mate, but we need the ipip.o
>   support in the kernel."; exit 23; }
>   This at least tries to check the problem without you having to
>   grep away the invariants.

I remember why I wanted to check before running these commands. The
command is 

ip link add dev $DEVICE

Where $DEVICE was parsed elsewhere in the code and possibly on another machine.

In that case all I can say is

"Sorry mate, couldn't put IP=x.x.x.x onto dev $DEVICE"

I have no idea whether device is eth0, tun0, hme0 at that stage. I'd have
to give error message appropriate for all devices. 

I could still do my tests ahead (like when I find a tunl device in the conf 
file).

Joe

-- 
Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
contractor to the National Environmental Supercomputer Center, 
mailto:mack.joseph@xxxxxxx ph# 919-541-0007, RTP, NC, USA


<Prev in Thread] Current Thread [Next in Thread>