summaryrefslogtreecommitdiff
path: root/etc/netstart
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2003-12-03 13:28:37 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2003-12-03 13:28:37 +0000
commitee094fb2268b4ec5b4578e092ebe3ee2e45edcf1 (patch)
treed3f59fb0f52617ee5e76ea2b9ba787611a2c8b0a /etc/netstart
parent2e49ee4565faccd70bff97b38a2bd521089f6d62 (diff)
add support for ifconfig clone; from netbsd; ok deraadt, henning
Diffstat (limited to 'etc/netstart')
-rw-r--r--etc/netstart8
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/netstart b/etc/netstart
index 8780589b61f..c1a6c2ae172 100644
--- a/etc/netstart
+++ b/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