diff options
author | delphij <delphij@FreeBSD.org> | 2014-09-17 02:32:22 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-09-17 02:32:22 +0000 |
commit | f38530676caf0a6e9637453a93d886cd96f5c9ae (patch) | |
tree | 58786bc3c1dfc4c908ece1d82cc44b797fc8f4ec /etc/devd | |
parent | 1642671ec5727db3d568e4db1c8e6b9fd2063208 (diff) | |
download | FreeBSD-src-f38530676caf0a6e9637453a93d886cd96f5c9ae.zip FreeBSD-src-f38530676caf0a6e9637453a93d886cd96f5c9ae.tar.gz |
Use a devd event to start hv_kvpd instead of doing so in rc.d script.
This is cleaner and eliminates the unneeded startup of KVP daemon on
systems that do not run as a Hyper-V guest.
Submitted by: hrs
X-MFC-with: 271493, 271688, 271699
Diffstat (limited to 'etc/devd')
-rw-r--r-- | etc/devd/Makefile | 4 | ||||
-rw-r--r-- | etc/devd/hyperv.conf | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/etc/devd/Makefile b/etc/devd/Makefile index 94cafdc..82a5000 100644 --- a/etc/devd/Makefile +++ b/etc/devd/Makefile @@ -18,6 +18,10 @@ FILES+= uath.conf usb.conf FILES+= zfs.conf .endif +.if ${MK_HYPERV} != "no" +FILES+= hyperv.conf +.endif + NO_OBJ= FILESDIR= /etc/devd FILESMODE= 644 diff --git a/etc/devd/hyperv.conf b/etc/devd/hyperv.conf new file mode 100644 index 0000000..8abafa9 --- /dev/null +++ b/etc/devd/hyperv.conf @@ -0,0 +1,19 @@ +# $FreeBSD$ +# +# Hyper-V specific events + +notify 10 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "CREATE"; + match "cdev" "/dev/hv_kvp_dev"; + action "/usr/sbin/hv_kvp_daemon"; +}; + +notify 10 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "DESTROY"; + match "cdev" "/dev/hv_kvp_dev"; + action "pkill -x hv_kvp_daemon"; +}; |