From 0a18f95ca2948ddcb28ce5e72eb0d3848f7a5668 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 8 May 2008 13:23:43 +0000 Subject: [PATCH] Updated setup. -Identification verification is now variable. (Welcome dialog) -Added sslog options to setup git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10848 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/setup/class_setupStep_Config2.inc | 15 +++++++++++++++ gosa-core/setup/class_setupStep_Welcome.inc | 7 +++++-- gosa-core/setup/setup_config2.tpl | 13 +++++++++++++ gosa-core/setup/setup_welcome.tpl | 2 +- 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/gosa-core/setup/class_setupStep_Config2.inc b/gosa-core/setup/class_setupStep_Config2.inc index 450fe81e1..ff3a9718a 100644 --- a/gosa-core/setup/class_setupStep_Config2.inc +++ b/gosa-core/setup/class_setupStep_Config2.inc @@ -42,6 +42,7 @@ class Step_Config2 extends setup_step "snapshot_base" => "ou=snapshots,%base%", "snapshot_user" => "%admin%", "snapshot_password" => "", + "logging" => "syslog,mysql", "snapshot_server" => "%connection%"); var $samba_settings = array( "samba_sid" => "0-815-4711", @@ -159,6 +160,10 @@ class Step_Config2 extends setup_step $smarty->assign("mail_settings",$this->mail_settings); $smarty->assign("mail_methods",$this->mail_methods); $smarty->assign("samba_settings",$this->samba_settings); + + $smarty->assign("logging_mysql" ,preg_match("/mysql/",$this->generic_settings['logging'])); + $smarty->assign("logging_syslog",preg_match("/syslog/",$this->generic_settings['logging'])); + $smarty->assign("bool",array(FALSE => _("No"), TRUE => _("Yes"))); foreach($this->attributes as $attr){ $smarty->assign($attr,$this->$attr); @@ -185,6 +190,16 @@ class Step_Config2 extends setup_step } } + /* Get logging */ + $logging = ""; + if(isset($_POST['logging_syslog'])){ + $logging.= "syslog,"; + } + if(isset($_POST['logging_mysql'])){ + $logging.= "mysql,"; + } + $this->generic_settings['logging'] = trim($logging,","); + /* Mail settings */ if(isset($_POST['vacationdir_active'])){ $this->mail_settings['vacationdir_active'] = TRUE; diff --git a/gosa-core/setup/class_setupStep_Welcome.inc b/gosa-core/setup/class_setupStep_Welcome.inc index f030f3121..cfe14cf6d 100644 --- a/gosa-core/setup/class_setupStep_Welcome.inc +++ b/gosa-core/setup/class_setupStep_Welcome.inc @@ -44,6 +44,8 @@ class Step_Welcome extends setup_step { $smarty = get_smarty(); $smarty->assign('auth_id', session_id()); + + $smarty->assign("path",TEMP_DIR.'/gosa.auth'); return($smarty->fetch(get_template_path("setup_welcome.tpl",TRUE,dirname(__FILE__)))); } @@ -52,8 +54,9 @@ class Step_Welcome extends setup_step $id = ""; /* Get auth ID from file */ - if (file_exists('/tmp/gosa.auth') && is_readable('/tmp/gosa.auth')){ - $contents= file('/tmp/gosa.auth'); + $path = TEMP_DIR.'/gosa.auth'; + if (file_exists($path) && is_readable($path)){ + $contents= file($path); $id= chop($contents[0]); } diff --git a/gosa-core/setup/setup_config2.tpl b/gosa-core/setup/setup_config2.tpl index 62bdafc4c..3ed7daec9 100644 --- a/gosa-core/setup/setup_config2.tpl +++ b/gosa-core/setup/setup_config2.tpl @@ -177,6 +177,19 @@ +
+
+ {t}Logging options{/t} +
+
+ {t}Syslog{/t} + {t}MySQL{/t} +
+
+ +

{t}Mail settings{/t}

diff --git a/gosa-core/setup/setup_welcome.tpl b/gosa-core/setup/setup_welcome.tpl index e6f76c7b6..5333adeab 100644 --- a/gosa-core/setup/setup_welcome.tpl +++ b/gosa-core/setup/setup_welcome.tpl @@ -28,7 +28,7 @@ {t}For security reasons you need to authenticate for the installation by creating the file '/tmp/gosa.auth', containing the current session ID on the servers local filesystem. This can be done by executing the following command:{/t}

- echo -n {$auth_id} > /tmp/gosa.auth + echo -n {$auth_id} > {$path}

{t}Click the 'Continue' button when you've finished.{/t} -- 2.30.2