From 9dfbec64488b6ca145a0f5ec305a17a068df8eb9 Mon Sep 17 00:00:00 2001
From: Daniel Steglich <steglich@datasystems24.de>
Date: Fri, 18 Mar 2016 07:40:48 -0400
Subject: [PATCH] fixed sieve mail filter creation

---
 interface/lib/plugins/vm_openvz_plugin.inc.php |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/interface/lib/plugins/vm_openvz_plugin.inc.php b/interface/lib/plugins/vm_openvz_plugin.inc.php
index aae645c..281fae4 100644
--- a/interface/lib/plugins/vm_openvz_plugin.inc.php
+++ b/interface/lib/plugins/vm_openvz_plugin.inc.php
@@ -134,8 +134,6 @@
 		foreach ($tmp_rec as $tmp) {
 			$app->db->datalogUpdate('openvz_ip', array('vm_id' => 0), 'ip_address_id', $tmp['ip_address_id']);
 		}
-		unset($tmp);
-		unset($tmp_rec);
 	}
 
 	private function applyTemplate() {
@@ -177,13 +175,14 @@
 		$onboot = ($vm['start_boot'] == 'y')?'yes':'no';
 		$tpl->setVar('onboot', $onboot);
 
+		$tpl->setVar('bootorder', $vm['bootorder']);
 		$tpl->setVar('kmemsize', $vm_template['kmemsize']);
 		$tpl->setVar('lockedpages', $vm_template['lockedpages']);
-		$tpl->setVar('privvmpages', $burst_ram.':'.$burst_ram);
+		$tpl->setVar('privvmpages', $burst_ram.':'.$burst_ram*1.0625);
 		$tpl->setVar('shmpages', $guar_ram.':'.$guar_ram);
 		$tpl->setVar('numproc', $vm_template['numproc']);
 		$tpl->setVar('physpages', $vm_template['physpages']);
-		$tpl->setVar('vmguarpages', $guar_ram.':'.$guar_ram);
+		$tpl->setVar('vmguarpages', $guar_ram.':unlimited');
 		$tpl->setVar('oomguarpages', $guar_ram.':'.$guar_ram);
 		$tpl->setVar('numtcpsock', $vm_template['numtcpsock']);
 		$tpl->setVar('numflock', $vm_template['numflock']);

--
Gitblit v1.9.1