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
|