diff options
author | 1999-03-01 05:04:24 +0000 | |
---|---|---|
committer | 1999-03-01 05:04:24 +0000 | |
commit | 0ad5d6377bb106873b0d8d37daf6b0f34ffca5af (patch) | |
tree | fec53a4e5538007a09ea161ea6978ea0f2e62c10 | |
parent | add /var/www/htdocs/manual/mod/mod_ssl (diff) | |
download | wireguard-openbsd-0ad5d6377bb106873b0d8d37daf6b0f34ffca5af.tar.xz wireguard-openbsd-0ad5d6377bb106873b0d8d37daf6b0f34ffca5af.zip |
Add support in /etc/hostname.xxx for files of the format:
up [options]
Any of the following may or may not be set:
$name $mask $bcaddr $extras
-rw-r--r-- | etc/netstart | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/etc/netstart b/etc/netstart index f053ca73903..92d22f7d148 100644 --- a/etc/netstart +++ b/etc/netstart @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: netstart,v 1.45 1998/10/28 19:17:10 millert Exp $ +# $OpenBSD: netstart,v 1.46 1999/03/01 05:04:24 millert Exp $ # Returns true if $1 contains only alphanumerics isalphanumeric() { @@ -89,8 +89,11 @@ route -n add -net 127 127.0.0.1 -reject read af name mask bcaddr extras read dt dtaddr - # check to see if device should be configure by dhcp - if [ "$af" = "dhcp" ]; then + # $af can be either "up", "dhcp", or an address family. + if [ "$af" = "up" ]; then + # The only one of these guaranteed to be set is $if + ifconfig $if $name $mask $bcaddr $extras up + elif [ "$af" = "dhcp" ]; then ifconfig $if $extras down cmd="/sbin/dhclient $if"; else |