summaryrefslogtreecommitdiff
path: root/app-emulation
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2015-09-02 10:14:25 -0500
committerDoug Goldstein <cardoe@gentoo.org>2015-09-02 11:02:57 -0500
commitb0afe0c6c4e48467ae3ca48dd453c0206f18461d (patch)
treef8d4ba1b51334051c32690c996a6e951dfe67a57 /app-emulation
parent0c17b0017c05bfb8b0cdd46895c2b8c147935f2d (diff)
downloadgentoo-b0afe0c6c4e48467ae3ca48dd453c0206f18461d.tar.gz
gentoo-b0afe0c6c4e48467ae3ca48dd453c0206f18461d.tar.xz
app-emulation/libvirt: update new init scripts
More updates to the init scripts to allow the user to not have the networks or VMs started up that were shutdown by the init script based on requests from tamiko and bug #558034.
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/libvirt/files/libvirt-guests.confd9
-rw-r--r--app-emulation/libvirt/files/libvirt-guests.init3
2 files changed, 12 insertions, 0 deletions
diff --git a/app-emulation/libvirt/files/libvirt-guests.confd b/app-emulation/libvirt/files/libvirt-guests.confd
index 514c8eeb4d6..ed2ce58064a 100644
--- a/app-emulation/libvirt/files/libvirt-guests.confd
+++ b/app-emulation/libvirt/files/libvirt-guests.confd
@@ -39,6 +39,15 @@
#LIBVIRT_MAXWAIT="500"
+# LIBVIRT_START
+# If this value is set to 'no', then guests and networks that were shutdown
+# by this script when it was stopped will not be started when it is started
+# back up.
+# Valid values are yes or no
+
+#LIBVIRT_START="yes"
+
+
# LIBVIRT_IGNORE_AUTOSTART
# If the VM is marked for autostart in its XML configuration then we won't
# save its start when the init script is stopped. The result is that when
diff --git a/app-emulation/libvirt/files/libvirt-guests.init b/app-emulation/libvirt/files/libvirt-guests.init
index 2b63dea6dce..c38a0f005a9 100644
--- a/app-emulation/libvirt/files/libvirt-guests.init
+++ b/app-emulation/libvirt/files/libvirt-guests.init
@@ -179,6 +179,9 @@ start() {
[ ! -e "${netstatefile}" ] && touch "${netstatefile}"
[ ! -e "${gueststatefile}" ] && touch "${gueststatefile}"
+ # if the user didn't want to start any guests up then respect their wish
+ [ "x${LIBVIRT_START}" = "xno" ] && return 0
+
# start networks
ebegin "Starting libvirt networks"
while read -r line