diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-12-03 13:28:37 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-12-03 13:28:37 +0000 |
commit | ee094fb2268b4ec5b4578e092ebe3ee2e45edcf1 (patch) | |
tree | d3f59fb0f52617ee5e76ea2b9ba787611a2c8b0a /etc/netstart | |
parent | 2e49ee4565faccd70bff97b38a2bd521089f6d62 (diff) |
add support for ifconfig clone; from netbsd; ok deraadt, henning
Diffstat (limited to 'etc/netstart')
-rw-r--r-- | etc/netstart | 8 |
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 |