Code

Updated gosa.conf creation.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Apr 2007 11:02:49 +0000 (11:02 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Apr 2007 11:02:49 +0000 (11:02 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5959 594d385d-05f5-0310-b6e9-bd551577e9d8

contrib/gosa.conf
setup/class_setupStep6.inc
setup/class_setupStep8.inc

index 260ce431c01a934374cb028ca110dcaa103e96b6..296794d674b28069bfa7ea3e3b657c3d03e84018 100644 (file)
                                path="plugins/gofax/faxaccount" />
                        <plugin acl="default" class="phoneAccount" icon="phone.png"
                                path="plugins/gofon/phoneaccount" />
-<!--                     <plugin acl="default" class="nagiosAccount" icon="monitoring.png"
-                                path="plugins/personal/nagios" /> -->
+<!-- 
+            <plugin acl="default" class="nagiosAccount" icon="monitoring.png"
+                path="plugins/personal/nagios" /> 
+-->
                        <plugin acl="default" class="password" icon="password.png"
                                path="plugins/personal/password" />
                </section>
@@ -86,7 +88,9 @@
                <tab class="connectivity" name="Connectivity" />
                <tab class="gofaxAccount" name="Fax" />
                <tab class="phoneAccount" name="Phone" />
-<!--            <tab class="nagiosAccount" name="Nagios" /> -->
+<!--            
+               <tab class="nagiosAccount" name="Nagios" /> 
+-->
        </usertabs>
 
        <mimetabs>
 
        <serverservice>
         <tab class="goMailServer" />
-               {servKolab}
+               %%VERGESESN KOLAB TAB %%
         <tab class="goNtpServer" />
        <tab class="servrepository" />
         <tab class="goImapServer" />
     </ogrouptabs>
 
     <connectivity>
-       {kolabAccount}
+               %%VERGESESN KOLAB TAB %%
        <tab class="proxyAccount" />
        <tab class="pureftpdAccount" />
        <tab class="webdavAccount" />
              database="OGo"
              datahost="localhost" />
 
-<!--   <tab class="pptpAccount" /> -->
-<!--   <tab class="phpscheduleitAccount" /> -->
-<!--   <tab class="glpiAccount" /> -->
+<!--   
+       <tab class="pptpAccount" /> 
+       <tab class="phpscheduleitAccount" /> 
+       <tab class="glpiAccount" /> 
+-->
        </connectivity>
 
        <ldiftab>
                <tab class="faiPackage" name="Packages" />
        </faipackagetabs>
        
-       <main default="{LOCATIONNAME}"
+       <main default="{$cv.location}"
+
+       {if $cv.pwd_rules.pwminlen_active}
+               pwminlen="{$cv.pwd_rules.pwminlen}"
+       {/if}
+       {if $cv.pwd_rules.pwdiffer_active}
+               pwdiffer="{$cv.pwd_rules.pwdiffer}"
+       {/if}
+       {if $cv.pwd_rules.externalpwdhook_active}
+               pwdiffer="{$cv.pwd_rules.externalpwdhook}"
+       {/if}
+
+       {if $cv.errorlvl}
+               displayerrors="true"
+       {else}
+               displayerrors="false"
+       {/if}
+
+       {if $cv.enable_schema_check}
+               schema_check="true"
+       {else}
+               schema_check="false"
+       {/if}
+
+               lang="{$cv.lang}"
+               theme="{$cv.theme}"
+
                enableCopyPaste="false" 
                ppd_path="/var/spool/ppd/" 
                kde_applications_menu="" 
                compile="/var/spool/gosa"
-               lang=""
-               theme="default"
                debuglevel="0"
                forcessl="false"
                warnssl="false"
                iconsize="48x48"
-               pwminlen="6"
                forceglobals="false"
-               smbhash='{SMBHASH}'
+               smbhash='SMBHASH'
                session_lifetime="7200"
-               schema_check="true"
                max_ldap_query_time="5.0"
-               displayerrors="{errorlvl}">
-
-               <location name="{LOCATIONNAME}"
-                       gidbase="{UIDBASE}"
-                       uidbase="{UIDBASE}"
-                       governmentmode="{GOVERNMENTMODE}"
-                       sambaversion="{SAMBAVERSION}"
-                       {SID}
-                       {RIDBASE}
-                       mailMethod="{MAILMETHOD}"
-                       hash="{CRYPT}"
-                       dnmode="{DNMODE}"
-                       server="{LDAPHOST}"
-                       include_personal_title="false"
-                       enable_snapshot="false"
-                       snapshot_base="ou=snapshots,{LDAPBASE}"
-                       config="ou=gosa,ou=configs,ou=systems,{LDAPBASE}">
-
-                       <referral url="{LDAPHOST}/{LDAPBASE}"
-                               admin="{LDAPADMIN}"
-                               password="{PASSWORD}" />
+               
+               >
+
+               <location name="{$cv.location}"
+                       hash="{$cv.encryption}"
+                       dnmode="{$cv.peopledn}"
+                       server="{$cv.connection}"
+                       people="{$cv.peopleou}"
+                       groups="{$cv.groupou}"
+                       gidbase="{$cv.uidbase}"
+                       uidbase="{$cv.uidbase}"
+               {if $cv.generic_settings.wws_ou_active}
+                       winstations="{$cv.generic_settings.wws_ou}"
+               {/if}
+               {if $cv.generic_settings.idgen_active}
+                       idgen="{$cv.generic_settings.idgen}"
+               {/if}
+               {if $cv.strict}
+                       strict="yes"
+               {else}
+                       strict="no"
+               {/if}
+               {if $cv.generic_settings.minid_active}
+                       minid="{$cv.generic_settings.minid}"
+               {/if}
+       {if $cv.mail != "disabled"}
+                       mailMethod="{$cv.mail}"
+               {if $cv.cyrusunixstyle}
+                       cyrusunixstyle="true"
+               {else}
+                       cyrusunixstyle="false"
+               {/if}
+               {if $cv.mail_settings.vacationdir_active}
+                       {$cv.mail_settings.vacationdir}
+               {/if}
+       {/if}
+               {if $cv.tls}
+                       tls="true"
+               {/if}
+               {if $cv.governmentmode}
+                       governmentmode="true"
+               {/if}
+               {if $cv.sambaidmapping}
+                       sambaidmapping="true"
+               {/if}
+               {if $cv.account_expiration}
+                       account_expiration="true"
+               {/if}
+               {if $cv.samba_settings.samba_sid_active}
+                       SID="{$cv.samba_settings.samba_sid}"
+               {/if}
+               {if $cv.samba_settings.samba_rid_active}
+                       RIDBASE="{$cv.samba_settings.samba_rid_active}"
+               {/if}
+       {if $cv.generic_settings.snapshot_active}               
+                       enable_snapshot="true"
+               {if $cv.generic_settings.snapshot_base != ""}                   
+                       snapshot_base="{$cv.generic_settings.snapshot_base}"
+               {/if}
+               {if $cv.generic_settings.snapshot_user != ""}                   
+                       snapshot_user="{$cv.generic_settings.snapshot_user}"
+               {/if}
+               {if $cv.generic_settings.snapshot_password != ""}                       
+                       snapshot_password="{$cv.generic_settings.snapshot_password}"
+               {/if}
+               {if $cv.generic_settings.snapshot_server != ""}
+                       snapshot_server="{$cv.generic_settings.snapshot_server}"
+               {/if}
+       {/if}   
+                       sambaversion="SAMBAVERSION"
+                       config="ou=gosa,ou=configs,ou=systems,{$cv.base}">
+
+                       <referral url="{$cv.connection}/{$cv.base}"
+                               admin="{$cv.admin}"
+                               password="{$cv.password}" />
                </location>
 
                <language name="German" tag="de_DE" />
index 754f9ff7f0b15b8210e4097a1c1d9ee9bfeded5b..d5afff820a9e34988cbaf6276cd92c4c3ad58504 100644 (file)
@@ -44,7 +44,7 @@ class setup_step_6 extends setup_step
                                   "samba_sid_active" => FALSE,
                                   "samba_rid"        => 1000,
                                   "samba_rid_active" => FALSE); 
-  var $attributes = array("strict","governmentmode","sambaidmapping","minid","account_expiration");
+  var $attributes = array("strict","governmentmode","sambaidmapping","account_expiration");
 
   function setup_step_6()
   {
index 8a296489f5c55e29de9b03e9c06b6fdea9f459ae..31ff4e97e1fac5bd12cabba7357962617299a5ba 100644 (file)
@@ -37,8 +37,11 @@ class setup_step_8 extends setup_step
 
   function get_conf_data()
   {
-    return("currently not implemented.");
-  }
+    $smarty = get_smarty();
+    $smarty->assign("cv",$this->parent->captured_values);
+    $str =  $smarty->fetch(CONFIG_TEMPLATE_DIR.$this->gosa_conf_name);
+    return($str);
+  }  
 
 
   function execute()
@@ -61,13 +64,21 @@ class setup_step_8 extends setup_step
 
     /* Downlaod config */
     if(isset($_POST['getconf'])){
+
       header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
       header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
       header("Cache-Control: no-cache");
       header("Pragma: no-cache");
       header("Cache-Control: post-check=0, pre-check=0");
       header("Content-type: text/plain");
-      header('Content-Disposition: attachment; filename="gosa.conf"');
+     
+      if (preg_match('/MSIE 5.5/', $_SERVER['HTTP_USER_AGENT']) ||
+          preg_match('/MSIE 6.0/', $_SERVER['HTTP_USER_AGENT'])){
+        header('Content-Disposition: filename="gosa.conf"');
+      } else {
+        header('Content-Disposition: attachment; filename="gosa.conf"');
+      }
+
       echo $this->get_conf_data();
       exit();
     }
@@ -95,7 +106,7 @@ class setup_step_8 extends setup_step
         }else{
 
           $data = $this->get_conf_data();
-          if(!fwrite($fp,strlen($data))){
+          if(!fwrite($fp,$data)){
             $err_msg = sprintf(_("Can not write file '%s'. Please check folder permission and try again. Or use the manual method if this can not be fixed anyway."),CONFIG_DIR.$this->gosa_conf_name);
             $abort  =TRUE;
           }else{