diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-16 12:57:32 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-16 12:57:32 +0000 |
commit | b3ebfc3b59636444e318b1293aea1473b3aa2677 (patch) | |
tree | 67bffbc8359ca4678e7e521aa484ab7150cddeb7 /etc | |
parent | e584a3a59f1177f3e6cb4b0828aa51cf24835271 (diff) |
install sample commented /etc/ifaliases file; which can now contain #
comments and blank lines. new format is "interface address netmask"
(yes, i changed the order of the entries). inspired by netbsd pr#2474;
gillhaa@ghost.whirlpool.com
Diffstat (limited to 'etc')
-rw-r--r-- | etc/Makefile | 9 | ||||
-rw-r--r-- | etc/ifaliases | 5 | ||||
-rw-r--r-- | etc/netstart | 15 |
3 files changed, 18 insertions, 11 deletions
diff --git a/etc/Makefile b/etc/Makefile index 64446439014..c615291c252 100644 --- a/etc/Makefile +++ b/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/etc/ifaliases b/etc/ifaliases new file mode 100644 index 00000000000..599e4699cb8 --- /dev/null +++ b/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/etc/netstart b/etc/netstart index a0355930ba5..cbb22872e53 100644 --- a/etc/netstart +++ b/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 |