#
# Copyright (C) 2004, 2007-2010, 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000-2003 Internet Software Consortium.
#
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id$
#
# Set up interface aliases for bind9 system tests.
#
# IPv4: 10.53.0.{1..8} RFC 1918
# IPv6: fd92:7065:b8e:ffff::{1..8} ULA
#
config_guess=""
do
if test -f $f
then
config_guess=$f
fi
done
if test "X$config_guess" = "X"
then
cat <<EOF >&2
$0: must be run from the top level source directory or the
bin/tests/system directory
EOF
exit 1
fi
# If running on hp-ux, don't even try to run config.guess.
# It will try to create a temporary file in the current directory,
# which fails when running as root with the current directory
# on a NFS mounted disk.
*) sys=`sh $config_guess` ;;
esac
case "$2" in
*) base="1"
esac
case "$3" in
esac
case "$1" in
do
if test -n "$base"
then
else
int=$ns
fi
if test -n "$base6"
then
else
fi
;;
;;
if test -n "$int6"
then
fi
;;
*-*-linux*)
;;
;;
;;
;;
;;
;;
;;
;;
;;
hpux)
;;
*-sco3.2v*)
;;
*-darwin*)
;;
*)
echo "Don't know how to set up interface. Giving up."
exit 1
esac
done
;;
stop|down)
do
if test -n "$base"
then
else
int=$ns
fi
if test -n "$base6"
then
else
fi
;;
;;
if test -n "$int6"
then
fi
;;
*-*-linux*)
;;
;;
;;
;;
;;
;;
;;
;;
;;
hpux)
;;
*-sco3.2v*)
;;
*darwin*)
;;
*)
echo "Don't know how to destroy interface. Giving up."
exit 1
esac
done
;;
*)
echo "Usage: $0 { up | down } [base]"
exit 1
esac