#! /bin/sh
# prefix command to run stuff from our programs directory
# 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.
#
# RCSID $Id: ipsec.in,v 1.3 1999/04/12 01:25:42 henry Exp $

LIBDIR=/usr/local/lib/ipsec
DONTMENTION='^(ipsec|_.*|.*\.old)$'

version="Linux FreeS/WAN 1.00"
copyright="Copyright (C) 1999 Henry Spencer, Richard Guy Briggs, D. Hugh Redelmeier,
	Sandy Harris, Angelos D. Keromytis, John Ioannidis.

   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
   (file COPYING in the distribution) for more details."

case "$1" in
--help|'')
	echo "Usage: ipsec command argument ..."
	echo "where command is one of:"
	ls $LIBDIR | egrep -v -i "$DONTMENTION" | sed 's/^/	/'
	echo
	exit 0
	;;
--version)
	echo "$version"
	echo "$copyright"
	exit 0
	;;
esac

cmd=$1
shift

$LIBDIR/$cmd "$@"
