Florian Schaal
2015-10-22 33ad8f4149b84394c3bdf7e35fb22863f9515406
add bootorder to openvz
29 files modified
71 ■■■■■ changed files
install/sql/incremental/upd_dev_collection.sql 4 ●●● patch | view | raw | blame | history
install/sql/ispconfig3.sql 1 ●●●● patch | view | raw | blame | history
interface/lib/plugins/vm_openvz_plugin.inc.php 3 ●●●● patch | view | raw | blame | history
interface/web/vm/form/openvz_vm.tform.php 11 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/ar_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/bg_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/br_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/cz_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/de_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/el_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/en_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/es_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/fi_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/fr_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/hr_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/hu_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/id_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/it_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/ja_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/nl_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/pl_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/pt_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/ro_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/ru_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/se_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/sk_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/lib/lang/tr_openvz_vm.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/vm/templates/openvz.conf.tpl 1 ●●●● patch | view | raw | blame | history
interface/web/vm/templates/openvz_vm_edit.htm 5 ●●●● patch | view | raw | blame | history
install/sql/incremental/upd_dev_collection.sql
@@ -170,5 +170,7 @@
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;
install/sql/ispconfig3.sql
@@ -1142,6 +1142,7 @@
  `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,
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,6 +175,7 @@
        $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);
interface/web/vm/form/openvz_vm.tform.php
@@ -150,6 +150,17 @@
            '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',
interface/web/vm/lib/lang/ar_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/bg_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/br_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/cz_openvz_vm.lng
@@ -40,5 +40,7 @@
$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";
?>
interface/web/vm/lib/lang/de_openvz_vm.lng
@@ -39,4 +39,6 @@
$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";
?>
interface/web/vm/lib/lang/el_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/en_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/es_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/fi_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/fr_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/hr_openvz_vm.lng
@@ -40,6 +40,8 @@
$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";
?>
interface/web/vm/lib/lang/hu_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/id_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/it_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/ja_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/nl_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/pl_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/pt_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/ro_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/ru_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/se_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/sk_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/lib/lang/tr_openvz_vm.lng
@@ -40,4 +40,6 @@
$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";
?>
interface/web/vm/templates/openvz.conf.tpl
@@ -4,6 +4,7 @@
# Parameters
ONBOOT="{tmpl_var name='onboot'}"
BOOTORDER="{tmpl_var name='bootorder'}"
KMEMSIZE="{tmpl_var name='kmemsize'}"
LOCKEDPAGES="{tmpl_var name='lockedpages'}"
PRIVVMPAGES="{tmpl_var name='privvmpages'}"
interface/web/vm/templates/openvz_vm_edit.htm
@@ -75,6 +75,9 @@
                    {tmpl_var name='start_boot'}
                </div>
            </div>
            <div class="form-group">
                <label for="bootorder" class="col-sm-3 control-label">{tmpl_var name='bootorder_txt'}</label>
                <div class="col-sm-9"><input type="text" name="bootorder" id="bootorder" value="{tmpl_var name='bootorder'}" class="form-control" /></div></div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
                <div class="col-sm-9">
@@ -95,4 +98,4 @@
        <div class="clear"><div class="right">
            <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="vm/openvz_vm_edit.php">{tmpl_var name='btn_save_txt'}</button>
            <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="vm/openvz_vm_list.php">{tmpl_var name='btn_cancel_txt'}</button>
        </div></div>
        </div></div>