From 61d17c579434ed6bfc85b62b9cae5e75ba151acb Mon Sep 17 00:00:00 2001 From: markus <> Date: Wed, 3 Dec 2003 13:28:36 +0000 Subject: [PATCH] add support for ifconfig clone; from netbsd; ok deraadt, henning --- src/etc/netstart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/etc/netstart b/src/etc/netstart index 8780589b..c1a6c2ae 100644 --- a/src/etc/netstart +++ b/src/etc/netstart @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: netstart,v 1.88 2003/10/20 17:53:32 david Exp $ +# $OpenBSD: netstart,v 1.89 2003/12/03 13:28:36 markus Exp $ # Returns true if $1 contains only alphanumerics isalphanumeric() { @@ -27,7 +27,11 @@ ifstart() { ifconfig $if > /dev/null 2>&1 if [ "$?" != "0" ]; then - return + # Try to create interface if it does not exist + ifconfig $if create > /dev/null 2>&1 + if [ "$?" != "0" ]; then + return + fi fi # Now parse the hostname.* file