diff --git a/src/etc/Makefile b/src/etc/Makefile index 64446439..c615291c 100644 --- a/src/etc/Makefile +++ b/src/etc/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.14 1996/06/03 07:20:41 mickey Exp $ +# $OpenBSD: Makefile,v 1.15 1996/06/16 12:57:30 deraadt Exp $ TZDIR= /usr/share/zoneinfo LOCALTIME= US/Pacific @@ -15,9 +15,10 @@ BINOWN= root BINGRP= wheel BIN1= aliases bootptab changelist csh.cshrc csh.login csh.logout daily \ dm.conf ftpusers ftpchroot gettytab group hosts hosts.equiv hosts.lpd \ - inetd.conf man.conf monthly motd myname netstart newsyslog.conf \ - phones printcap protocols rc rc.local remote rpc security services \ - shells syslog.conf weekly etc.${MACHINE}/ttys etc.${MACHINE}/disktab + ifaliases inetd.conf man.conf monthly motd myname netstart \ + newsyslog.conf phones printcap protocols rc rc.local remote rpc \ + security services shells syslog.conf weekly etc.${MACHINE}/ttys \ + etc.${MACHINE}/disktab # -rw-rw-r-- BIN2= motd diff --git a/src/etc/ifaliases b/src/etc/ifaliases new file mode 100644 index 00000000..599e4699 --- /dev/null +++ b/src/etc/ifaliases @@ -0,0 +1,5 @@ +# $OpenBSD: ifaliases,v 1.1 1996/06/16 12:57:30 deraadt Exp $ +# This file contains a list of IP addresses aliases in the form +# interface address netmask +# ie: +# ep0 124.125.126.129 255.255.255.0 diff --git a/src/etc/netstart b/src/etc/netstart index a0355930..cbb22872 100644 --- a/src/etc/netstart +++ b/src/etc/netstart @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: netstart,v 1.6 1996/06/02 21:17:58 tholo Exp $ +# $OpenBSD: netstart,v 1.7 1996/06/16 12:57:31 deraadt Exp $ # set these to "NO" to turn them off. otherwise, they're used as flags routed_flags=-q @@ -120,15 +120,16 @@ 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 +# interface address netmask if [ -f /etc/ifaliases ]; then ( - set -- `cat /etc/ifaliases` + # delete comments and blank lines + set -- `sed -e 's/#.*$//' /etc/ifaliases | grep -v '^$'` - while [ $# -ge 2 ] ; do - ifconfig $2 inet alias $1 - route add $1 localhost - shift 2 + while [ $# -ge 3 ] ; do + ifconfig $1 inet alias $2 netmask $3 + route add $2 localhost + shift 3 done ) fi