From 852a7c859a3800f70a700a5e510ccc45bda5210a Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 12 Dec 2006 07:20:20 +0000 Subject: [PATCH] Replaced /etc/gosa with CONFIG_DIR for all plugins git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5355 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiPackage.inc | 4 ++-- plugins/admin/systems/class_glpiAttachmentPool.inc | 10 +++++----- plugins/admin/systems/class_servNfs.inc | 10 +++++----- plugins/admin/systems/class_terminalService.inc | 2 +- plugins/admin/systems/class_workstationService.inc | 2 +- plugins/personal/posix/class_posixAccount.inc | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index 825a50e5e..4a433c1d4 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -271,7 +271,7 @@ class faiPackage extends plugin /* Configuration dialog open*/ if((isset($_POST['Conpkg']))&&(isset($_POST['usedPackages']))&&(!empty($_POST['usedPackages']))){ - $path = "/etc/gosa/fai/".$this->FAIdebianRelease."/debconf.d"; + $path = CONFIG_DIR."/fai/".$this->FAIdebianRelease."/debconf.d"; $pkg_config = array(); $pkg = $_POST['usedPackages'][0]; @@ -445,7 +445,7 @@ class faiPackage extends plugin $this->buffer=array(); $a_ret = array(); foreach($this->FAIdebianSection as $sec){ - $strID= "/etc/gosa/fai/".$this->FAIdebianRelease."/".$sec; + $strID= CONFIG_DIR."/fai/".$this->FAIdebianRelease."/".$sec; if(!is_file($strID)){ print_red(sprintf(_("Package file '%s' does not exist."),$strID)); diff --git a/plugins/admin/systems/class_glpiAttachmentPool.inc b/plugins/admin/systems/class_glpiAttachmentPool.inc index 8b0300d6f..0d1ae07ff 100644 --- a/plugins/admin/systems/class_glpiAttachmentPool.inc +++ b/plugins/admin/systems/class_glpiAttachmentPool.inc @@ -113,7 +113,7 @@ class glpiAttachmentPool extends plugin }else{ $this->parent->handle->deleteAttachment($this->delAttach); - @unlink("/etc/gosa/glpi/".$this->filename); + @unlink(CONFIG_DIR."/glpi/".$this->filename); $attach = $this->parent->handle->getAttachments(); } } @@ -130,10 +130,10 @@ class glpiAttachmentPool extends plugin if($FILE['error']!=0) { print_red(_("Upload wasn't successfull.")); }else{ - if(!is_dir("/etc/gosa/glpi/")){ - print_red(_("Missing directory '/etc/gosa/glpi/' to store glpi uploads.")); + if(!is_dir(CONFIG_DIR."/glpi/")){ + print_red(sprintf(_("Missing directory '%s/glpi/' to store glpi uploads."),CONFIG_DIR)); }else{ - $filen = "/etc/gosa/glpi/".$FILE['name']; + $filen = CONFIG_DIR."/glpi/".$FILE['name']; if(file_exists($filen)){ print_red(_("There is already a file with the same name uploaded.")); }else{ @@ -182,7 +182,7 @@ class glpiAttachmentPool extends plugin $smarty->assign($attr,htmlentities(utf8_decode($this->$attr))); } if(!empty($this->filename)){ - if(is_readable("/etc/gosa/glpi/".$this->filename)){ + if(is_readable(CONFIG_DIR."/glpi/".$this->filename)){ $status =_("File is available."); }else{ $status =_("File is not readable, possibly the file is missing."); diff --git a/plugins/admin/systems/class_servNfs.inc b/plugins/admin/systems/class_servNfs.inc index 4eb776046..aa7cbc6a3 100644 --- a/plugins/admin/systems/class_servNfs.inc +++ b/plugins/admin/systems/class_servNfs.inc @@ -42,13 +42,13 @@ class servnfs extends plugin $this->charsets = array(); - if(!file_exists("/etc/gosa/encodings")){ - print_red(_("The file '/etc/gosa/encodings' does not exist, can't get supported charsets.")); + if(!file_exists(CONFIG_DIR."/encodings")){ + print_red(sprintf(_("The file '%s/encodings' does not exist, can't get supported charsets."),CONFIG_DIR)); }else{ - if(!is_readable("/etc/gosa/encodings")){ - print_red(_("Can't read '/etc/gosa/encodings', please check permissions.")); + if(!is_readable(CONFIG_DIR."/encodings")){ + print_red(sprintf(_("Can't read '%s/encodings', please check permissions."),CONFIG_DIR)); }else{ - $fp = fopen("/etc/gosa/encodings","r"); + $fp = fopen(CONFIG_DIR."/encodings","r"); $i = 100; while(!feof($fp)&&$i){ $i -- ; diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc index 8b1cb3a0e..8f1112062 100644 --- a/plugins/admin/systems/class_terminalService.inc +++ b/plugins/admin/systems/class_terminalService.inc @@ -113,7 +113,7 @@ class termservice extends plugin $this->XKbModels[$type] = $type; } - /* Additional values will be extracted from /etc/gosa/keyboardLayouts */ + /* Additional values will be extracted from CONFIG_DIR./keyboardLayouts */ $this->XKbLayouts= array ("default"=>"["._("inherited")."]","de"=> "de","intl" =>"intl","us" =>"us"); $this->XKbVariants= array ("default"=>"["._("inherited")."]", "nodeadkeys"=>"nodeadkeys", "basic"=>"basic"); diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc index b8dbddd00..4db156af8 100644 --- a/plugins/admin/systems/class_workstationService.inc +++ b/plugins/admin/systems/class_workstationService.inc @@ -112,7 +112,7 @@ class workservice extends plugin "/dev/ttyS1" => "/dev/ttyS1", "/dev/psaux" =>"/dev/psaux", "/dev/input/mice" => "/dev/input/mice"); - /* Additional values will be extracted from /etc/gosa/keyboardLayouts */ + /* Additional values will be extracted from CONFIG_DIR/gosa/keyboardLayouts */ $this->XKbLayouts= array ("de"=> "de","intl" =>"intl","us" =>"us"); $this->XKbVariants= array ("nodeadkeys"=>"nodeadkeys", "basic"=>"basic"); diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index 7b6775545..c6d8eea8e 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -172,9 +172,9 @@ class posixAccount extends plugin /* Convert to seconds */ $this->shadowExpire= $this->convertToSeconds($this->shadowExpire); - /* Generate shell list from /etc/gosa/shells */ - if (file_exists('/etc/gosa/shells')){ - $shells = file ('/etc/gosa/shells'); + /* Generate shell list from CONFIG_DIR./shells */ + if (file_exists(CONFIG_DIR.'/shells')){ + $shells = file (CONFIG_DIR.'/shells'); foreach ($shells as $line){ if (!preg_match ("/^#/", $line)){ $this->loginShellList[]= trim($line); -- 2.30.2