#
# Copyright (C) 2000-2004, 2007-2010, 2012, 2013, 2016 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# $Id: ifconfig.sh,v 1.59 2010/06/11 23:46:49 tbox Exp $
#
# 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*)
;;
*-cygwin*)
echo "Please run ifconfig.bat as Administrator."
exit 1
;;
*)
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*)
;;
*-cygwin*)
echo "Please run ifconfig.bat as Administrator."
exit 1
;;
*)
echo "Don't know how to destroy interface. Giving up."
exit 1
esac
done
;;
*)
echo "Usage: $0 { up | down } [base]"
exit 1
esac