Till Brehm
2014-03-08 82ff6299b381800b48fd243172111334cd1df498
Fixed: FS#3302 - Hourly monitoring of system updates make system unusable
- Updated Linux Distribution detection to recognize all wheezy sub versions correctly.
8 files modified
23 ■■■■■ changed files
install/lib/install.lib.php 2 ●●● patch | view | raw | blame | history
install/tpl/server.ini.master 1 ●●●● patch | view | raw | blame | history
interface/web/admin/form/server_config.tform.php 6 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/de_server_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/en_server_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/templates/server_config_server_edit.htm 6 ●●●●● patch | view | raw | blame | history
server/lib/classes/monitor_tools.inc.php 2 ●●● patch | view | raw | blame | history
server/mods-available/monitor_core_module.inc.php 4 ●●●● patch | view | raw | blame | history
install/lib/install.lib.php
@@ -160,7 +160,7 @@
            $distid = 'debian60';
            $distbaseid = 'debian';
            swriteln("Operating System: Debian 6.0 (Squeeze/Sid) or compatible\n");
        } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '7.0') || strstr(trim(file_get_contents('/etc/debian_version')), '7.1') || trim(file_get_contents('/etc/debian_version')) == 'wheezy/sid') {
        } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '7.0') || substr(trim(file_get_contents('/etc/debian_version')),0,2) == '7.' || trim(file_get_contents('/etc/debian_version')) == 'wheezy/sid') {
            $distname = 'Debian';
            $distver = 'Wheezy/Sid';
            $distid = 'debian60';
install/tpl/server.ini.master
@@ -24,6 +24,7 @@
munin_url=
munin_user=
munin_password=
monitor_system_updates=y
[mail]
module=postfix_mysql
interface/web/admin/form/server_config.tform.php
@@ -249,6 +249,12 @@
            'width' => '40',
            'maxlength' => '255'
        ),
        'monitor_system_updates' => array(
            'datatype' => 'VARCHAR',
            'formtype' => 'CHECKBOX',
            'default' => 'y',
            'value' => array(0 => 'n', 1 => 'y')
        ),
        //#################################
        // ENDE Datatable fields
        //#################################
interface/web/admin/lib/lang/de_server_config.lng
@@ -190,4 +190,5 @@
$wb['munin_url_note_txt'] = 'Platzhalter:';
$wb['backup_dir_is_mount_txt'] = 'Backupverzeichnis ist ein eigener Mount?';
$wb['backup_dir_mount_cmd_txt'] = 'Mount-Befehl, falls Backupverzeichnis nicht gemountet';
$wb['monitor_system_updates_txt'] = 'Suche nach Linux updates';
?>
interface/web/admin/lib/lang/en_server_config.lng
@@ -190,4 +190,5 @@
$wb['munin_url_note_txt'] = 'Placeholder:';
$wb['backup_dir_is_mount_txt'] = 'Backup directory is a mount?';
$wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
$wb['monitor_system_updates_txt'] = 'Check for Linux updates';
?>
interface/web/admin/templates/server_config_server_edit.htm
@@ -99,6 +99,12 @@
                <label for="munin_password">{tmpl_var name='munin_password_txt'}</label>
                <input name="munin_password" id="munin_password" value="{tmpl_var name='munin_password'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='monitor_system_updates_txt'}</p>
                <div class="multiField">
                    {tmpl_var name='monitor_system_updates'}
                </div>
            </div>
        </fieldset>
            
        <input type="hidden" name="id" value="{tmpl_var name='id'}">
server/lib/classes/monitor_tools.inc.php
@@ -132,7 +132,7 @@
                $distver = 'Squeeze/Sid';
                $distid = 'debian60';
                $distbaseid = 'debian';
            } elseif (strstr(trim(file_get_contents('/etc/debian_version')), '7.0') || strstr(trim(file_get_contents('/etc/debian_version')), '7.1') || trim(file_get_contents('/etc/debian_version')) == 'wheezy/sid') {
            } elseif (strstr(trim(file_get_contents('/etc/debian_version')), '7.0') || substr(trim(file_get_contents('/etc/debian_version')),0,2) == '7.' || trim(file_get_contents('/etc/debian_version')) == 'wheezy/sid') {
                $distname = 'Debian';
                $distver = 'Wheezy/Sid';
                $distid = 'debian60';
server/mods-available/monitor_core_module.inc.php
@@ -419,6 +419,10 @@
         * OK - here we go...
         */
        global $app;
        $app->uses('getconf');
        $server_config = $app->getconf->get_server_config($conf['server_id'], 'server');
        if($server_config['monitor_system_updates'] == 'n') return;
        /*
         * First we get the Monitoring-data from the tools