summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-18 16:37:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-18 16:37:11 +0000
commit2bc1762747fbc8dd892d5b1fe08cb64c22dc1f55 (patch)
tree2740e426d1e2c9fb22ff8db857b3b704b51c10c1
parentae61dccab6bdfc57c9ecba2a88da4aca5ec77f59 (diff)
/etc/ifaliases support by randy@zyzzyva.com
-rw-r--r--etc/netstart18
1 files changed, 17 insertions, 1 deletions
diff --git a/etc/netstart b/etc/netstart
index 9d4149aca26..35e813ecee6 100644
--- a/etc/netstart
+++ b/etc/netstart
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: netstart,v 1.21 1995/10/08 18:11:40 thorpej Exp $
+# $NetBSD: netstart,v 1.22 1995/12/17 18:31:09 perry Exp $
# @(#)netstart 5.9 (Berkeley) 3/30/91
# set these to "NO" to turn them off. otherwise, they're used as flags
@@ -100,3 +100,19 @@ route add $hostname localhost
if [ -f /etc/mygate ]; then
route add default `cat /etc/mygate`
fi
+
+# /etc/ifaliases, if it exists, contains the names of additional IP
+# addresses for each interface. It is formatted as a series of lines
+# that contain
+# address interface
+if [ -f /etc/ifaliases ]; then
+(
+ set -- `cat /etc/ifaliases`
+
+ while [ $# -ge 2 ] ; do
+ ifconfig $2 inet alias $1
+ route add $1 localhost
+ shift 2
+ done
+)
+fi