summaryrefslogtreecommitdiffstats
path: root/usr.sbin/hotplugd
diff options
context:
space:
mode:
authorian <ian@openbsd.org>2008-11-06 09:16:25 +0000
committerian <ian@openbsd.org>2008-11-06 09:16:25 +0000
commit9892f1fc6cc33bc94d174fccfe4d6aead6fcd7e9 (patch)
tree47fe50c4109d091c7f6d5bb2728ebeba087f5f08 /usr.sbin/hotplugd
parent-Wall -Wshadow clean, no binary change (diff)
downloadwireguard-openbsd-9892f1fc6cc33bc94d174fccfe4d6aead6fcd7e9.tar.xz
wireguard-openbsd-9892f1fc6cc33bc94d174fccfe4d6aead6fcd7e9.zip
More complete example, for e.g., usb devices that need wep/wpa keys.
OK (with typo corrected) sthen@
Diffstat (limited to 'usr.sbin/hotplugd')
-rw-r--r--usr.sbin/hotplugd/hotplugd.812
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/hotplugd/hotplugd.8 b/usr.sbin/hotplugd/hotplugd.8
index 48cfb161797..e601162a717 100644
--- a/usr.sbin/hotplugd/hotplugd.8
+++ b/usr.sbin/hotplugd/hotplugd.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: hotplugd.8,v 1.6 2007/05/31 19:20:24 jmc Exp $
+.\" $OpenBSD: hotplugd.8,v 1.7 2008/11/06 09:16:25 ian Exp $
.\"
.\" Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: November 6 2008 $
.Dt HOTPLUGD 8
.Os
.Sh NAME
@@ -110,9 +110,13 @@ case $DEVCLASS in
;;
3)
- # network devices
+ # network devices; use hostname.if if found, else dhclient.
- /sbin/dhclient $DEVNAME
+ if [ -f /etc/hostname.$DEVNAME ]; then
+ sh /etc/netstart $DEVNAME
+ else
+ /sbin/dhclient $DEVNAME
+ fi
;;
esac