#! /bin/sh
# quick look at current connections and related information
# Copyright (C) 1998, 1999  Henry Spencer.
# 
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#

LC_ALL=C export LC_ALL

info=/var/run/pluto/ipsec.info
me="ipsec look"

case "$1" in
--help)		echo "Usage: ipsec look" ; exit 0	;;
--version)	echo "$me $IPSEC_VERSION" ; exit 0	;;
esac

# Pick up IPsec configuration etc.
eval `ipsec addconn --varprefix IPSEC --configsetup`
if test " $IPSEC_confreadstatus" != " "
then
	echo "$IPSEC_confreadstatus -- aborting" |
		logger -s -p daemon.error -t ipsec_look
	exit 1
fi
if test -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $info
fi

#.  t -s $info
then
	. $i