Browse Source

ignore non-existent cases where '$if' evaluates to '*'.

From Andr� Lucas <andre@ae-35.com>, fixes pr # 2658.
'Looks good' from miod@, millert@, and krw@.
OPENBSD_3_2
todd 22 years ago
parent
commit
060427ae7f
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/etc/netstart

+ 4
- 1
src/etc/netstart View File

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $OpenBSD: netstart,v 1.84 2002/02/23 01:55:24 deraadt Exp $
# $OpenBSD: netstart,v 1.85 2002/05/16 20:48:25 todd Exp $
# Returns true if $1 contains only alphanumerics # Returns true if $1 contains only alphanumerics
isalphanumeric() { isalphanumeric() {
@ -242,6 +242,7 @@ fi
for hn in /etc/hostname.*; do for hn in /etc/hostname.*; do
# Strip off /etc/hostname. prefix # Strip off /etc/hostname. prefix
if=${hn#/etc/hostname.} if=${hn#/etc/hostname.}
test "$if" = "*" && continue
case $if in case $if in
"gif"*|"gre"*) "gif"*|"gre"*)
@ -314,6 +315,7 @@ esac
for hn in /etc/hostname.*; do for hn in /etc/hostname.*; do
# Strip off /etc/hostname. prefix # Strip off /etc/hostname. prefix
if=${hn#/etc/hostname.} if=${hn#/etc/hostname.}
test "$if" = "*" && continue
case $if in case $if in
"gif"*|"gre"*) "gif"*|"gre"*)
@ -330,6 +332,7 @@ done
for bn in /etc/bridgename.*; do for bn in /etc/bridgename.*; do
# Strip off /etc/bridgename. prefix # Strip off /etc/bridgename. prefix
if=${bn#/etc/bridgename.} if=${bn#/etc/bridgename.}
test "$if" = "*" && continue
bridgestart $if bridgestart $if
done done

Loading…
Cancel
Save