ifconfig.sh revision cbb8a1b7cbab933795ddee4f05f4eb5074a68e6c
#
# Copyright (C) 2004, 2007, 2008 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: ifconfig.sh,v 1.54 2008/07/25 20:40:07 fdupont Exp $
#
# Set up interface aliases for bind9 system tests.
#
config_guess=""
do
if test -f $f
then
config_guess=$f
fi
done
if test "X$config_guess" = "X"
then
echo <<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=""
esac
case "$1" in
do
if test -n "$base"
then
else
int=$ns
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
;;
;;
;;
*-*-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