From: cajus Date: Wed, 7 Jun 2006 14:24:53 +0000 (+0000) Subject: Fixed terminal NFS share handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b73b7ab43a1b732ccf81c6348bffbfe9b01eae76;p=gosa.git Fixed terminal NFS share handling git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@3674 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/contrib/openldap/goto.schema b/contrib/openldap/goto.schema index 3a1cbaa58..0c7ade886 100644 --- a/contrib/openldap/goto.schema +++ b/contrib/openldap/goto.schema @@ -86,7 +86,7 @@ attributetype ( 1.3.6.1.4.1.10098.1.1.11.15 NAME 'gotoProfileQuota' objectclass (1.3.6.1.4.1.10098.1.2.1.1 NAME 'gotoTerminal' DESC 'GOto - Gonicus Terminal Concept, objectclass (v2.5)' SUP top AUXILIARY MUST ( cn ) - MAY ( description $ macAddress $ ipHostNumber $ goFonHardware )) + MAY ( description $ macAddress $ ipHostNumber $ gotoShare $ goFonHardware )) # objectclass for the Terminal Conecept objectclass (1.3.6.1.4.1.10098.1.2.1.30 NAME 'gotoWorkstation' diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc index 3872b3824..7f07d2e8e 100644 --- a/plugins/admin/systems/class_terminalGeneric.inc +++ b/plugins/admin/systems/class_terminalGeneric.inc @@ -275,18 +275,7 @@ class termgeneric extends plugin $tmp2 = array(); foreach($this->config->data['SERVERS']['NFS'] as $server){ if($server != "default"){ - $tmp = split("\|",$server); - $tmp3= split(":",$tmp[0]); - - $servername = $tmp3[0]; - $nfsname = $tmp3[1]; - - $path =""; - if(isset($tmp[4])){ - $path = $tmp[4]; - } - - $tmp2[$servername.":".$path]= $servername.":".$path; + $tmp2[$server]= $server; }else{ $tmp2[$server]="["._("inherited")."]"; } @@ -443,11 +432,9 @@ class termgeneric extends plugin $this->attrs= $attrs; } - if($this->inheritTimeServer){ - $this->attrs['gotoNtpServer'] = array(); - }else{ - /* Set ntpServers */ - $this->attrs['gotoNtpServer'] = array(); + /* Set ntpServers */ + $this->attrs['gotoNtpServer'] = array(); + if(!$this->inheritTimeServer){ foreach($this->gotoNtpServer as $server){ $this->attrs['gotoNtpServer'][] = $server; } @@ -464,6 +451,9 @@ class termgeneric extends plugin $ldap->cd($this->config->current['BASE']); $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); $ldap->cd($this->dn); + if (!count($this->attrs['gotoNtpServer'])){ + unset($this->attrs['gotoNtpServer']); + } $ldap->add($this->attrs); $this->handle_post_events("add"); } else { diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc index 836e733a8..7a02964f2 100644 --- a/plugins/admin/systems/class_terminalStartup.inc +++ b/plugins/admin/systems/class_terminalStartup.inc @@ -363,7 +363,7 @@ class termstartup extends plugin /* Strip out 'default' values */ foreach(array("gotoBootKernel","gotoLdapServer") as $value){ - if ($this->attrs[$value] == "default"){ + if (!isset($this->attrs[$value]) || $this->attrs[$value] == "default"){ $this->attrs[$value] = array(); } }