Skip to content

Commit 33ad8f4

Browse files
author
Florian Schaal
committed
add bootorder to openvz
1 parent ca06983 commit 33ad8f4

29 files changed

+67
-4
lines changed

install/sql/incremental/upd_dev_collection.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,5 +170,7 @@ ALTER TABLE `web_domain` ADD COLUMN `rewrite_to_https` ENUM('y','n') NOT NULL DE
170170
ALTER TABLE openvz_ip ADD COLUMN `additional` VARCHAR(255) NOT NULL DEFAULT 'n';
171171

172172
ALTER TABLE openvz_template ADD COLUMN `custom` text;
173-
ALTER TABLE openvz_vm ADD COLUMN `custom` text;
174173

174+
ALTER TABLE openvz_vm
175+
ADD COLUMN `bootorder` INT(11) NOT NULL DEFAULT '1' AFTER `start_boot`,
176+
ADD COLUMN `custom` text;

install/sql/ispconfig3.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,7 @@ CREATE TABLE IF NOT EXISTS `openvz_vm` (
11421142
`hostname` varchar(255) DEFAULT NULL,
11431143
`vm_password` varchar(255) DEFAULT NULL,
11441144
`start_boot` varchar(255) NOT NULL DEFAULT 'y',
1145+
`bootorder` int(11) NOT NULL DEFAULT '1',
11451146
`active` varchar(255) NOT NULL DEFAULT 'y',
11461147
`active_until_date` date NOT NULL DEFAULT '0000-00-00',
11471148
`description` text,

interface/lib/plugins/vm_openvz_plugin.inc.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ function openvz_vm_delete($event_name, $page_form) {
134134
foreach ($tmp_rec as $tmp) {
135135
$app->db->datalogUpdate('openvz_ip', array('vm_id' => 0), 'ip_address_id', $tmp['ip_address_id']);
136136
}
137-
unset($tmp);
138-
unset($tmp_rec);
139137
}
140138

141139
private function applyTemplate() {
@@ -177,6 +175,7 @@ private function makeOpenVZConfig() {
177175
$onboot = ($vm['start_boot'] == 'y')?'yes':'no';
178176
$tpl->setVar('onboot', $onboot);
179177

178+
$tpl->setVar('bootorder', $vm['bootorder']);
180179
$tpl->setVar('kmemsize', $vm_template['kmemsize']);
181180
$tpl->setVar('lockedpages', $vm_template['lockedpages']);
182181
$tpl->setVar('privvmpages', $burst_ram.':'.$burst_ram);

interface/web/vm/form/openvz_vm.tform.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,17 @@
150150
'default' => 'y',
151151
'value' => array(0 => 'n', 1 => 'y')
152152
),
153+
'bootorder' => array (
154+
'datatype' => 'INTEGER',
155+
'formtype' => 'TEXT',
156+
'default' => '0',
157+
'value' => '',
158+
'width' => '3',
159+
'maxlength' => '3',
160+
'validators' => array ( 0 => array ( 'type' => 'ISPOSITIVE',
161+
'errmsg'=> 'limit_client_error_notint'),
162+
),
163+
),
153164
'active' => array (
154165
'datatype' => 'VARCHAR',
155166
'formtype' => 'CHECKBOX',

interface/web/vm/lib/lang/ar_openvz_vm.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Advanced';
4040
$wb['features_txt'] = 'Features';
4141
$wb["iptables_txt"] = "IP Tables";
4242
$wb["custom_txt"] = "Custom settings";
43+
$wb["bootorder_txt"] = "Boot order priority";
44+
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
4345
?>

interface/web/vm/lib/lang/bg_openvz_vm.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Advanced';
4040
$wb['features_txt'] = 'Features';
4141
$wb["iptables_txt"] = "IP Tables";
4242
$wb["custom_txt"] = "Custom settings";
43+
$wb["bootorder_txt"] = "Boot order priority";
44+
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
4345
?>

interface/web/vm/lib/lang/br_openvz_vm.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Advanced';
4040
$wb['features_txt'] = 'Features';
4141
$wb["iptables_txt"] = "IP Tables";
4242
$wb["custom_txt"] = "Custom settings";
43+
$wb["bootorder_txt"] = "Boot order priority";
44+
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
4345
?>

interface/web/vm/lib/lang/cz_openvz_vm.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,7 @@ $wb['Advanced'] = 'Pokročilý';
4040
$wb['features_txt'] = 'Features';
4141
$wb["iptables_txt"] = "IP Tables";
4242
$wb["custom_txt"] = "Custom settings";
43+
$wb["bootorder_txt"] = "Boot order priority";
44+
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
4345
?>
4446

interface/web/vm/lib/lang/de_openvz_vm.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,6 @@ $wb['Virtual server'] = 'Virtueller Server';
3939
$wb['Advanced'] = 'Erweitert';
4040
$wb["iptables_txt"] = "IP Tables";
4141
$wb["custom_txt"] = "Custom settings";
42+
$wb["bootorder_txt"] = "Boot order priority";
43+
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
4244
?>

interface/web/vm/lib/lang/el_openvz_vm.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Για προχωρημένους';
4040
$wb['features_txt'] = 'Features';
4141
$wb["iptables_txt"] = "IP Tables";
4242
$wb["custom_txt"] = "Custom settings";
43+
$wb["bootorder_txt"] = "Boot order priority";
44+
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
4345
?>

0 commit comments

Comments
 (0)