#
# 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,
+# 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
# on a NFS mounted disk.
case `uname -a` in
- *HP-UX*) sys=hpux ;;
- *) sys=`sh $config_guess` ;;
+ *HP-UX*) sys=hpux ;;
+ *) sys=`sh $config_guess` ;;
esac
case "$2" in
-[0-9]|[1-9][0-9]|[1-9][0-9][0-9]) base=$2;;
-*) base=""
+ [1-9]|[1-9][0-9]|[1-9][0-9][0-9]) base=$2;;
+ *) base="1"
esac
case "$3" in
-[0-9]|[1-9][0-9]|[1-9][0-9][0-9]) base6=$2;;
-*) base6=""
+ [1-9]|[1-9][0-9]|[1-9][0-9][0-9]) base6=$3;;
+ *) base6=$base
esac
case "$1" in
ifconfig lo0:$int 10.53.0.$ns netmask 0xffffffff up
;;
*-*-solaris2.[8-9]|*-*-solaris2.1[0-9])
- /sbin/ifconfig lo0:$int plumb
+ /sbin/ifconfig lo0:$int plumb
/sbin/ifconfig lo0:$int 10.53.0.$ns up
if test -n "$int6"
then
*-*-linux*)
ifconfig lo:$int 10.53.0.$ns up netmask 255.255.255.0
ifconfig lo inet6 add fd92:7065:b8e:ffff::$ns/64
- ;;
+ ;;
*-unknown-freebsd*)
ifconfig lo0 10.53.0.$ns alias netmask 0xffffffff
ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns alias
hpux)
ifconfig lo0:$int 10.53.0.$ns netmask 255.255.255.0 up
ifconfig lo0:$int inet6 fd92:7065:b8e:ffff::$ns up
- ;;
+ ;;
*-sco3.2v*)
ifconfig lo0 alias 10.53.0.$ns
;;
ifconfig lo0 alias 10.53.0.$ns
ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns alias
;;
- *)
+ *)
echo "Don't know how to set up interface. Giving up."
exit 1
esac
then
int=`expr $ns + $base - 1`
else
- int=$ns
+ int=$ns
+ fi
+ if test -n "$base6"
+ then
+ int6=`expr $ns + $base6 - 1`
+ else
+ int6=$ns
fi
case "$sys" in
*-pc-solaris2.5.1)
*-*-linux*)
ifconfig lo:$int 10.53.0.$ns down
ifconfig lo inet6 del fd92:7065:b8e:ffff::$ns/64
- ;;
+ ;;
*-unknown-freebsd*)
ifconfig lo0 10.53.0.$ns delete
ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns delete
hpux)
ifconfig lo0:$int 0.0.0.0
ifconfig lo0:$int inet6 ::
- ;;
+ ;;
*-sco3.2v*)
ifconfig lo0 -alias 10.53.0.$ns
;;
ifconfig lo0 -alias 10.53.0.$ns
ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns delete
;;
- *)
+ *)
echo "Don't know how to destroy interface. Giving up."
exit 1
esac