From owner-svn-src-head@FreeBSD.ORG Wed Sep 17 02:32:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD2029B; Wed, 17 Sep 2014 02:32:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98088FCA; Wed, 17 Sep 2014 02:32:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8H2WOHj042367; Wed, 17 Sep 2014 02:32:24 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8H2WNBS042361; Wed, 17 Sep 2014 02:32:23 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409170232.s8H2WNBS042361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 17 Sep 2014 02:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271696 - in head: . etc/defaults etc/devd etc/rc.d tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2014 02:32:24 -0000 Author: delphij Date: Wed Sep 17 02:32:22 2014 New Revision: 271696 URL: http://svnweb.freebsd.org/changeset/base/271696 Log: 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 Added: head/etc/devd/hyperv.conf (contents, props changed) Deleted: head/etc/rc.d/hv_kvpd Modified: head/ObsoleteFiles.inc head/etc/defaults/rc.conf head/etc/devd/Makefile head/etc/rc.d/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Sep 17 00:54:00 2014 (r271695) +++ head/ObsoleteFiles.inc Wed Sep 17 02:32:22 2014 (r271696) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20140917: hv_kvpd rc.d script removed in favor of devd configuration +OLD_FILES+=etc/rc.d/hv_kvpd # 20140814: libopie version bump OLD_LIBS+=usr/lib/libopie.so.7 OLD_LIBS+=usr/lib32/libopie.so.7 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Wed Sep 17 00:54:00 2014 (r271695) +++ head/etc/defaults/rc.conf Wed Sep 17 02:32:22 2014 (r271696) @@ -684,8 +684,6 @@ jail_enable="NO" # Set to NO to disable jail_parallel_start="NO" # Start jails in the background jail_list="" # Space separated list of names of jails -hv_kvpd_enable="NO" # Start the Hyper-V key-value Pair Driver hv_kvp(4) - ############################################################## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## ### scripts to source rc_conf_files overrides safely. ## Modified: head/etc/devd/Makefile ============================================================================== --- head/etc/devd/Makefile Wed Sep 17 00:54:00 2014 (r271695) +++ head/etc/devd/Makefile Wed Sep 17 02:32:22 2014 (r271696) @@ -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 Added: head/etc/devd/hyperv.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/devd/hyperv.conf Wed Sep 17 02:32:22 2014 (r271696) @@ -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"; +}; Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Wed Sep 17 00:54:00 2014 (r271695) +++ head/etc/rc.d/Makefile Wed Sep 17 02:32:22 2014 (r271696) @@ -57,7 +57,6 @@ FILES= DAEMON \ hostid \ hostid_save \ hostname \ - ${_hv_kvpd} \ inetd \ initrandom \ ip6addrctl \ @@ -193,10 +192,6 @@ _ubthidhci= ubthidhci _casperd= casperd .endif -.if ${MK_HYPERV} != "no" -_hv_kvpd= hv_kvpd -.endif - .if ${MK_UNBOUND} != "no" _unbound= local_unbound .endif Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Sep 17 00:54:00 2014 (r271695) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Sep 17 02:32:22 2014 (r271696) @@ -4768,7 +4768,7 @@ OLD_FILES+=usr/share/examples/dma/mailer .endif .if ${MK_HYPERV} == no -OLD_FILES+=etc/rc.d/hv_kvpd +OLD_FILES+=etc/devd/hyperv.conf OLD_FILES+=usr/libexec/hyperv/hv_set_ifconfig OLD_FILES+=usr/libexec/hyperv/hv_get_dns_info OLD_FILES+=usr/libexec/hyperv/hv_get_dhcp_info