summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/trigger.inc.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php
index ecfa6017..8ed098fc 100644
--- a/inc/trigger.inc.php
+++ b/inc/trigger.inc.php
@@ -128,9 +128,10 @@ class Trigger
* Mount the VM store into the server.
*
* @param array $vmstore VM Store configuration to use. If false, read from properties
+ * @param bool $ifLocalOnly Only execute task if the storage type is local (used for DNBD3)
* @return array|false task status of mount procedure, or false on error
*/
- public static function mount($vmstore = false)
+ public static function mount($vmstore = false, $ifLocalOnly = false)
{
if ($vmstore === false) {
$vmstore = Property::getVmStoreConfig();
@@ -152,6 +153,9 @@ class Trigger
$opts = null;
$addr = 'null';
}
+ // Bail out if storage is not local, and we only want to run it in that case
+ if ($ifLocalOnly && $addr !== 'null')
+ return false;
if (isset($vmstore[$opts])) {
$opts = $vmstore[$opts];
}else {