summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortodd <todd@openbsd.org>2000-11-08 19:09:29 +0000
committertodd <todd@openbsd.org>2000-11-08 19:09:29 +0000
commit6bbb0011659afeb3be9e03f0f3e36786fab6f784 (patch)
treeb32bd591824a357734695867c6330bfae8c4555d
parentadjust for changes to kcore, and dynamically compute page shift. (diff)
downloadwireguard-openbsd-6bbb0011659afeb3be9e03f0f3e36786fab6f784.tar.xz
wireguard-openbsd-6bbb0011659afeb3be9e03f0f3e36786fab6f784.zip
This fixes pr 1481, we now handle args > 6 in /etc/hostname.if in the
cases where we did not previously handle them. Thanks to Scott Atwood <atwood@cs.stanford.edu> for reminding us of this.
-rw-r--r--etc/netstart8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/netstart b/etc/netstart
index 9dbcc3a3aa2..36640dee5be 100644
--- a/etc/netstart
+++ b/etc/netstart
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: netstart,v 1.72 2000/09/02 15:59:29 todd Exp $
+# $OpenBSD: netstart,v 1.73 2000/11/08 19:09:29 todd Exp $
# Returns true if $1 contains only alphanumerics
isalphanumeric() {
@@ -112,8 +112,10 @@ for hn in /etc/hostname.*; do
if [ "$cmd2" ]; then
# we are carrying over from the 'read dt dtaddr' last time
set -- $cmd2
- af="$1" name="$2" mask="$3" bcaddr="$4" ext1="$5" ext2="$6"
- cmd2=
+ af="$1" name="$2" mask="$3" bcaddr="$4" ext1="$5" cmd2=
+ # make sure and get any remaining args in ext2, like the read below
+ i=1; while [ i -lt 6 -a "$1" ]; do shift; let i=i+1; done
+ ext2="$@"
else
# read the next line or exit the while loop
read af name mask bcaddr ext1 ext2 || break