Commit 33ad8f41 authored by Florian Schaal's avatar Florian Schaal
Browse files

add bootorder to openvz

parent ca069831
......@@ -170,5 +170,7 @@ ALTER TABLE `web_domain` ADD COLUMN `rewrite_to_https` ENUM('y','n') NOT NULL DE
ALTER TABLE openvz_ip ADD COLUMN `additional` VARCHAR(255) NOT NULL DEFAULT 'n';
ALTER TABLE openvz_template ADD COLUMN `custom` text;
ALTER TABLE openvz_vm ADD COLUMN `custom` text;
ALTER TABLE openvz_vm
ADD COLUMN `bootorder` INT(11) NOT NULL DEFAULT '1' AFTER `start_boot`,
ADD COLUMN `custom` text;
......@@ -1142,6 +1142,7 @@ CREATE TABLE IF NOT EXISTS `openvz_vm` (
`hostname` varchar(255) DEFAULT NULL,
`vm_password` varchar(255) DEFAULT NULL,
`start_boot` varchar(255) NOT NULL DEFAULT 'y',
`bootorder` int(11) NOT NULL DEFAULT '1',
`active` varchar(255) NOT NULL DEFAULT 'y',
`active_until_date` date NOT NULL DEFAULT '0000-00-00',
`description` text,
......
......@@ -134,8 +134,6 @@ class vm_openvz_plugin {
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,6 +175,7 @@ class vm_openvz_plugin {
$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);
......
......@@ -150,6 +150,17 @@ $form["tabs"]['main'] = array (
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'bootorder' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '3',
'maxlength' => '3',
'validators' => array ( 0 => array ( 'type' => 'ISPOSITIVE',
'errmsg'=> 'limit_client_error_notint'),
),
),
'active' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
......
......@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,5 +40,7 @@ $wb['Advanced'] = 'Pokročilý';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -39,4 +39,6 @@ $wb['Virtual server'] = 'Virtueller Server';
$wb['Advanced'] = 'Erweitert';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Για προχωρημένους';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,4 +40,6 @@ $wb["Advanced"] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Avanzado';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Avancé';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,6 +40,8 @@ $wb['Advanced'] = 'Napredno';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
......@@ -40,4 +40,6 @@ $wb['Advanced'] = 'Advanced';
$wb['features_txt'] = 'Features';
$wb["iptables_txt"] = "IP Tables";
$wb["custom_txt"] = "Custom settings";
$wb["bootorder_txt"] = "Boot order priority";
$wb["bootorder_error_notpositive"] = "Only positive integers are allowed for Boot order priority";
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment