From a78a8d94eafe82d5e957d8f5904a890c67600c13 Mon Sep 17 00:00:00 2001 From: rpe <> Date: Sun, 2 Dec 2012 21:02:45 +0000 Subject: [PATCH] use the more compact version of the check for ifconfig'able interfaces from install.sub with feedback from and ok halex --- src/etc/netstart | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/etc/netstart b/src/etc/netstart index 6bfd6cd0..641323e0 100644 --- a/src/etc/netstart +++ b/src/etc/netstart @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: netstart,v 1.135 2012/12/02 16:19:18 rpe Exp $ +# $OpenBSD: netstart,v 1.136 2012/12/02 21:02:45 rpe Exp $ # Strip comments (and leading/trailing whitespace if IFS is set) # from a file and spew to stdout @@ -34,12 +34,8 @@ ifstart() { chmod -LR o-rwx $file chown -LR root.wheel $file fi - if ! ifconfig $if > /dev/null 2>&1; then - # Try to create interface if it does not exist - if ! ifconfig $if create > /dev/null 2>&1; then - return - fi - fi + # Check for ifconfig'able interface. + (ifconfig $if || ifconfig $if create) >/dev/null 2>&1 || return # Now parse the hostname.* file while :; do