Page MenuHomeFreeBSD

D59490.diff
No OneTemporary

D59490.diff

diff --git a/devel/libvirt/Makefile b/devel/libvirt/Makefile
--- a/devel/libvirt/Makefile
+++ b/devel/libvirt/Makefile
@@ -1,5 +1,6 @@
PORTNAME= libvirt
DISTVERSION= 12.7.0
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://libvirt.org/sources/ \
ftp://libvirt.org/libvirt/
diff --git a/devel/libvirt/files/libvirtd.in b/devel/libvirt/files/libvirtd.in
--- a/devel/libvirt/files/libvirtd.in
+++ b/devel/libvirt/files/libvirtd.in
@@ -13,6 +13,9 @@
# For example, to make it listen on TCP ports, set it
# to "--listen".
# Default: ""
+# libvirtd_hostvalidate_enable (bool): Run virt-host-validate(1) before starting
+# libvirtd.
+# Default: "YES"
#
. /etc/rc.subr
@@ -20,10 +23,13 @@
name=libvirtd
rcvar=libvirtd_enable
+start_precmd="libvirtd_hostvalidate"
+
load_rc_config $name
: ${libvirtd_enable:="NO"}
: ${libvirtd_flags:=""}
+: ${libvirtd_hostvalidate_enable:="YES"}
command=%%PREFIX%%/sbin/libvirtd
pidfile=/var/run/${name}.pid
@@ -34,4 +40,17 @@
extra_commands="reload"
+libvirtd_hostvalidate()
+{
+ if checkyesno libvirtd_hostvalidate_enable; then
+ # virt-host-validate(1) returns a non-zero exit code when
+ # one or more checks fail. As many of the checks do not
+ # prevent libvirtd from working, but only limit some
+ # features (e.g. console access or pf firewalling), treat
+ # failures as diagnostics rather than preventing libvirtd
+ # from starting.
+ %%PREFIX%%/bin/virt-host-validate || :
+ fi
+}
+
run_rc_command "$1"

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 9, 6:58 AM (12 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38553413
Default Alt Text
D59490.diff (1 KB)

Event Timeline