summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-06-09 17:34:31 +0000
committermtm <mtm@FreeBSD.org>2003-06-09 17:34:31 +0000
commit37d801936a730d980f3974cc25bfc18f11d8c1d2 (patch)
tree9df8973c30b2ec4bdf7eb386b27fb7787d9814b2 /etc
parent286a32fdca89e1f29840bba19e79c647056ebd1b (diff)
downloadFreeBSD-src-37d801936a730d980f3974cc25bfc18f11d8c1d2.zip
FreeBSD-src-37d801936a730d980f3974cc25bfc18f11d8c1d2.tar.gz
o Fix a typo
o Fill in the ipx_down() routine. Submitted by: ceri
Diffstat (limited to 'etc')
-rw-r--r--etc/network.subr26
1 files changed, 23 insertions, 3 deletions
diff --git a/etc/network.subr b/etc/network.subr
index 146e204..85ee4d3 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -49,7 +49,7 @@ ifconfig_up()
# ifconfig_down if
# Remove all inet entries from the $if interface. It returns
# 0 if inet entries were found and removed. It returns 1 if
-# no entries were found or the could not be removed.
+# no entries were found or they could not be removed.
#
ifconfig_down()
{
@@ -226,8 +226,28 @@ ipx_up()
#
ipx_down()
{
- # XXX - So, who's an IPX expert ?
- return 1
+ [ -z "$1" ] && return 1
+ _ifs="^"
+ _ret=1
+
+ ipxList="`ifconfig $1 | grep 'ipx ' | tr "\n" "$_ifs"`"
+
+ oldifs="$IFS"
+ IFS="$_ifs"
+ for _ipx in $ipxList ; do
+ # get rid of extraneous line
+ [ -z "$_ipx" ] && break
+
+ _ipx=`expr "$_ipx" : '.*\(ipx [0-9a-h]\{1,8\}H*\.[0-9a-h]\{1,12\}\).*'`
+
+ IFS="$oldifs"
+ ifconfig $1 ${_ipx} delete
+ IFS="$_ifs"
+ _ret=0
+ done
+ IFS="$oldifs"
+
+ return $_ret
}
#
OpenPOWER on IntegriCloud