Changeset 3307

Show
Ignore:
Timestamp:
04/21/06 18:23:05 (2 years ago)
Author:
bergius
Message:

Removed too strict checking if the Midgard config file exists

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/support/Role_Midgardelement/Midgardelement.xml

    r3268 r3307  
    1010    <config_vars> 
    1111        <midgard_config_file> 
    12             <type>directory</type> 
    13             <default>/etc/midgard/conf.d/midgard</default> 
     12            <type>string</type> 
     13            <default>midgard</default> 
    1414            <doc>Midgard conf.d file to use</doc> 
    1515            <prompt>Midgard conf.d file</prompt> 
  • trunk/support/Role_Midgardelement/package.xml

    r3306 r3307  
    1616    <time>20:55:14</time> 
    1717    <version> 
    18         <release>1.0.1</release> 
     18        <release>1.0.2</release> 
    1919        <api>1.0.0</api> 
    2020    </version> 
     
    2424    </stability> 
    2525    <license uri="http://www.php.net/license/3_01.txt">PHP License</license> 
    26     <notes>First release of the Midgard Element file role.</notes> 
     26    <notes>Fixed loading of template file contents into a style element and made the package more resilient on different Midgard conf.d locations.</notes> 
    2727    <contents> 
    2828        <dir name="/"> 
     
    3838                            <name>midgard_config_file</name> 
    3939                            <prompt>Which Midgard conf.d file to use?</prompt> 
    40                             <default>/etc/midgard/conf.d/midgard</default> 
     40                            <default>midgard</default> 
    4141                            <type>string</type> 
    4242                        </param> 
  • trunk/support/Role_Midgardelement/setup.php

    r3268 r3307  
    5252            case 'dbSetup': 
    5353                if ($answers['midgard_config_file'] != '') { 
    54                     if (is_dir($answers['midgard_config_file'])) { 
    55                         $doingit = "setting midgard_config_file to {$answers['midgard_config_file']} ..."; 
    56                         $this->_ui->outputData($outputPrefix.$doingit); 
    57                         $this->_config->set('midgard_config_file', $answers['midgard_config_file']); 
    58                         $e = $this->_config->store(); 
    59                         if (PEAR::isError($e)) { 
    60                             $this->_ui->outputData($outputPrefix.$e->getMessage()); 
    61                             return false; 
    62                         } 
    63                         return true; 
    64                     } else { 
    65                         $this->_ui->outputData($outputPrefix.'Please choose a path that exists! Setup failed.'); 
     54                    $doingit = "setting midgard_config_file to {$answers['midgard_config_file']} ..."; 
     55                    $this->_ui->outputData($outputPrefix.$doingit); 
     56                    $this->_config->set('midgard_config_file', $answers['midgard_config_file']); 
     57                    $e = $this->_config->store(); 
     58                    if (PEAR::isError($e)) { 
     59                        $this->_ui->outputData($outputPrefix.$e->getMessage()); 
    6660                        return false; 
    6761                    } 
     62                    return true; 
    6863                } 
    6964                return false;